post https://api.infstones.com/starknet/mainnet/
Submit a new deploy account transaction
Parameter
Key | Required | Type | Detail |
---|---|---|---|
contract_address_salt | ✅ | String | A random salt that determines the contract address |
class_hash | ✅ | String | The hash of the desired account class |
constructor_calldata | ✅ | List<String> | The arguments to the account constructor |
max_fee | ✅ | String | The maximum fee that the sender is willing to pay for the transaction |
nonce | ✅ | String | The transaction nonce |
version | ✅ | String | The transaction’s version. The value is 1 |
signature | ✅ | List<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
}