starknet_addDeployAccountTransaction

Submit a new deploy account transaction

Parameter

KeyRequiredTypeDetail
contract_address_saltStringA random salt that determines the contract address
class_hashStringThe hash of the desired account class
constructor_calldataList<String>The arguments to the account constructor
max_feeStringThe maximum fee that the sender is willing to pay for the transaction
nonceStringThe transaction nonce
versionStringThe transaction’s version. The value is 1
signatureList<String>Additional information given by the sender, used to validate the transaction
"params": [
  {
    "max_fee": "string",
    "version": "string",
    "signature": [
      "string"
    ],
    "nonce": "string",
    "type": "DEPLOY_ACCOUNT",
    "contract_address_salt": "string",
    "constructor_calldata": [
      "string"
    ],
    "class_hash": "string"
  }
]

Result

The transaction hash, as assigned in StarkNet.

The contract address, represented by at most 63 hex digits.

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "starknet_addDeployAccountTransaction",
  "params": [
    {
      "max_fee": "string",
      "version": "string",
      "signature": [
        "string"
      ],
      "nonce": "string",
      "type": "DEPLOY_ACCOUNT",
      "contract_address_salt": "string",
      "constructor_calldata": [
        "string"
      ],
      "class_hash": "string"
    }
  ]
}
'

Return

{
    "jsonrpc": "2.0",
    "result": {
        "transaction_hash": "0x3cf80e627fc2c2512fbf84133af6e3542e739206efb26067f56bbffc1f76f23",
        "contract_address": "0x02a5c09dce40dc88a098059bbb133647734a1152e79b2495d9c12667009fb547"
    },
    "id": 1
}
Language
Click Try It! to start a request and see the response here!