Skip to main content

POST /v1/tokens/{tokenId}/deployment/estimate

Run a dry-run validation of the deployment parameters and return a gas estimate, expected contract address (CREATE2 if applicable), and any warnings — without creating an approval request or broadcasting anything.
AspectDetail
MethodPOST
Path/v1/tokens/{tokenId}/deployment/estimate
AuthenticationBearer API key
Required permissionstokens:read
IdempotentYes — read-only
Approval policyNot applicable
Blockchain effectNone — eth_call only
Webhook eventsNone

Request body

{
  "deployerWalletId": "wallet_xyz789",
  "constructorArgs": {
    "name": "Example Institutional Token",
    "symbol": "EIT",
    "decimals": 18,
    "initialSupply": "0"
  }
}

Response (200)

{
  "tokenId": "token_abc123",
  "estimatedGas": "1230000",
  "estimatedFeeWei": "12300000000000",
  "predictedContractAddress": "0x9a8e5e21f0c27d2c5c14b6e9bd8e4a0f9c9b4d12",
  "warnings": [],
  "checks": {
    "templateBytecodeHashMatches": true,
    "deployerHasFunds": true,
    "deployerNonceAvailable": true
  }
}

Errors

CodeTypeMeaning
1100VALIDATIONInvalid constructor args or wallet reference.
1702TOKEN_ALREADY_DEPLOYEDToken already has a confirmed contractAddress.
1707TOKEN_DEPLOYMENT_FAILEDEstimate failed because the simulated deploy would revert.
1500NODE_UNAVAILABLEUpstream Quantum Chain node could not respond.