v1

latestOpenAPI 3.1.02026-07-13570316.1 KB
Wallets

Deploy Contract

Deploy a new smart contract to a blockchain network using raw bytecode. This endpoint allows you to deploy contracts by providing the contract bytecode, ABI, constructor parameters, and optional salt for deterministic deployment.

Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.

post/v1/contracts

Request body

chainIdinteger required

The blockchain network identifier. Common values include: 1 (Ethereum), 8453 (Base), 137 (Polygon), 56 (BSC), 43114 (Avalanche), 42161 (Arbitrum), 10 (Optimism).

fromstring

The wallet address or ENS name that will deploy the contract. If omitted, the project wallet will be used if available.

bytecodestring required

The contract bytecode as a hex string.

constructorParamsobject

Object containing constructor parameters for the contract deployment (e.g., { param1: 'value1', param2: 123 }).

saltstring

Optional salt value for deterministic contract deployment.

Example request

{
  "chainId": 1,
  "from": "0x1234567890123456789012345678901234567890",
  "bytecode": "0x608060405234801561001057600080fd5b50...",
  "abi": [
    {
      "type": "constructor",
      "inputs": [
        {
          "name": "defaultAdmin",
          "type": "address"
        }
      ]
    },
    {
      "type": "function",
      "name": "name",
      "inputs": [],
      "outputs": [
        {
          "type": "string"
        }
      ],
      "stateMutability": "view"
    }
  ],
  "constructorParams": {
    "defaultAdmin": "0x1234567890123456789012345678901234567890"
  }
}

Response

Contract deployed successfully