We refreshed our doc site!

Bookmarked links may have changed

Read release notes

deployContract

Web3 Services
Compliance Engine

Deploy a contract

POSThttps://api.circle.com/v1/w3s/contracts/deploy

Deploy a smart contract on a specified blockchain using the contract's ABI and bytecode. The deployment will originate from one of your Circle Programmable Wallets.

Body parameters
blockchain
string
Required

The blockchain network that the resource is to be created on or is currently on.

entitySecretCiphertext
byte
Required

A base64 string expression of the entity secret ciphertext. The entity secret should be encrypted by the entity public key. Circle mandates that the entity secret ciphertext is unique for each API request.

bytecode
string
Required

Bytecode of the contract being deployed.

abiJson
string
Required

The contract's ABI in a JSON stringified format.

walletId
uuid
Required

System-generated unique identifier of the resource.

name
string
Required

The name for a contract. Must be alphanumeric [a-zA-Z0-9].

idempotencyKey
uuid
Required

Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. To create a UUIDv4 go to uuidgenerator.net. If the same key is reused, it will be treated as the same request and the original response will be returned.

description
string

The description for a contract.

constructorParameters
array

A list of arguments to pass to the contract's constructor function. Must be an empty array if there are no constructor parameters.

feeLevel
string

A dynamic blockchain fee level setting (LOW, MEDIUM, or HIGH) that will be used to pay gas for the transaction. Calculated based on network traffic, supply of validators, and demand for transaction verification. Cannot be used with gasPrice, priorityFee, or maxFee. Estimates for each fee level can be obtained through the POST /transactions/transfer/estimateFee API.

gasLimit
string

The maximum units of gas to use for the transaction. Required if feeLevel is not provided. Estimates for this limit can be obtained through the POST /transactions/transfer/estimateFee API. GasLimit override (only supported for EOA wallets): Using gasLimit together with feeLevel, the provided gasLimit is required to be greater or equal to feeLevel estimation and will override the estimation's gasLimit.

gasPrice
string

For blockchains without EIP-1559 support, the maximum price of gas, in gwei, to use per each unit of gas (see gasLimit). Requires gasLimit. Cannot be used with feeLevel, priorityFee, or maxFee. Estimates for this fee can be obtained through the POST /transactions/transfer/estimateFee API.

maxFee
string

For blockchains with EIP-1559 support, the maximum price per unit of gas (see gasLimit), in gwei. Requires priorityFee, and gasLimit to be present. Cannot be used with feeLevel or gasPrice. Estimates for this fee can be obtained through the POST /transactions/transfer/estimateFee API.

priorityFee
string

For blockchains with EIP-1559 support, the “tip”, in gwei, to add to the base fee as an incentive for validators. Please note that the maxFee and gasLimit parameters are required alongside the priorityFee. The feeLevel and gasPrice parameters cannot be used with the priorityFee. Estimations for this fee can be obtained through the POST /transactions/transfer/estimateFee API.

refId
string

Optional reference or description used to identify the transaction.

Response
RequestChoose a language
ResponseChoose an example
1{
2  "data": {
3    "contractId": "676f83a8-81a1-4dd5-b738-e2509b8f5460",
4    "transactionId": "36790743-b78d-4061-9558-1af9a9c837bd"
5  }
6}
Did this page help you?
© 2023-2024 Circle Technology Services, LLC. All rights reserved.