Skip to content

Commit 77de96e

Browse files
committed
add deploy_account transaction
1 parent 01832d3 commit 77de96e

File tree

2 files changed

+101
-4
lines changed

2 files changed

+101
-4
lines changed

api/starknet_api_openrpc.json

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"openrpc": "1.0.0-rc1",
33
"info": {
4-
"version": "0.44.0",
4+
"version": "0.45.0",
55
"title": "StarkNet Node API",
66
"license": {}
77
},
@@ -619,7 +619,7 @@
619619
{
620620
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
621621
}
622-
]
622+
]
623623
},
624624
{
625625
"name": "starknet_getNonce",
@@ -1129,6 +1129,9 @@
11291129
},
11301130
{
11311131
"$ref": "#/components/schemas/DEPLOY_TXN"
1132+
},
1133+
{
1134+
"ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN"
11321135
}
11331136
]
11341137
},
@@ -1144,6 +1147,9 @@
11441147
},
11451148
{
11461149
"$ref": "#/components/schemas/BROADCASTED_DEPLOY_TXN"
1150+
},
1151+
{
1152+
"$ref": "#/components/schemas/BROADCASTED_DEPLOY_ACCOUNT_TXN"
11471153
}
11481154
]
11491155
},
@@ -1237,6 +1243,49 @@
12371243
}
12381244
]
12391245
},
1246+
"DEPLOY_ACCOUNT_TXN": {
1247+
"title": "Deploy Account Transaction",
1248+
"description": "Deploys an account contract, charges fee from the pre-funded account addresses",
1249+
"allOf": [
1250+
{
1251+
"$ref": "#/components/schemas/COMMON_TXN_PROPERTIES"
1252+
},
1253+
{
1254+
"$ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN_PROPERTIES"
1255+
}
1256+
]
1257+
},
1258+
"BROADCASTED_DEPLOY_ACCOUNT_TXN": {
1259+
"description": "Mempool representation of a deploy account transaction",
1260+
"allOf": [
1261+
{
1262+
"$ref": "#/components/schemas/BROADCASTED_TXN_COMMON_PROPERTIES"
1263+
},
1264+
{
1265+
"$ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN_PROPERTIES"
1266+
}
1267+
]
1268+
},
1269+
"DEPLOY_ACCOUNT_TXN_PROPERTIES": {
1270+
"type": "object",
1271+
"properties": {
1272+
"contract_address_salt": {
1273+
"description": "The salt for the address of the deployed contract",
1274+
"$ref": "#/components/schemas/FELT"
1275+
},
1276+
"constructor_calldata": {
1277+
"type": "array",
1278+
"description": "The parameters passed to the constructor",
1279+
"items": {
1280+
"$ref": "#/components/schemas/FELT"
1281+
}
1282+
},
1283+
"class_hash": {
1284+
"description": "The hash of the deployed contract's class",
1285+
"$ref": "#/components/schemas/FELT"
1286+
}
1287+
}
1288+
},
12401289
"DEPLOY_TXN": {
12411290
"title": "Deploy Contract Transaction",
12421291
"description": "The structure of a deploy transaction. Note that this transaction type is deprecated and will no longer be supported in future versions",
@@ -1429,7 +1478,7 @@
14291478
"$ref": "#/components/schemas/EVENT"
14301479
}
14311480
}
1432-
},
1481+
},
14331482
"required": [
14341483
"transaction_hash",
14351484
"actual_fee",
@@ -1449,6 +1498,10 @@
14491498
"title": "Declare Transaction Receipt",
14501499
"$ref": "#/components/schemas/COMMON_RECEIPT_PROPERTIES"
14511500
},
1501+
"DEPLOY_ACCOUNT_TXN_RECEIPT": {
1502+
"title": "Deploy Account Transaction Receipt",
1503+
"$ref": "#/components/schemas/DEPLOY_TXN_RECEIPT"
1504+
},
14521505
"DEPLOY_TXN_RECEIPT": {
14531506
"title": "Deploy Transaction Receipt",
14541507
"allOf": [
@@ -1484,6 +1537,9 @@
14841537
{
14851538
"$ref": "#/components/schemas/DEPLOY_TXN_RECEIPT"
14861539
},
1540+
{
1541+
"$ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN_RECEIPT"
1542+
},
14871543
{
14881544
"$ref": "#/components/schemas/PENDING_TXN_RECEIPT"
14891545
}

api/starknet_write_api.json

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"params": [
7676
{
7777
"name": "deploy_transaction",
78-
"description": "The salt used for calculting the contract address",
78+
"description": "The deploy transaction",
7979
"schema": {
8080
"$ref": "#/components/schemas/BROADCASTED_DEPLOY_TXN"
8181
}
@@ -103,6 +103,41 @@
103103
"$ref": "#/components/errors/INVALID_CONTRACT_CLASS"
104104
}
105105
]
106+
},
107+
{
108+
"name": "starknet_addDeployAccountTransaction",
109+
"summary": "Submit a new deploy account transaction",
110+
"params": [
111+
{
112+
"name": "deploy_account_transaction",
113+
"description": "The deploy account transaction",
114+
"schema": {
115+
"$ref": "#/components/schemas/BROADCASTED_DEPLOY_ACCOUNT_TXN"
116+
}
117+
}
118+
],
119+
"result": {
120+
"name": "result",
121+
"description": "The result of the transaction submission",
122+
"schema": {
123+
"type": "object",
124+
"properties": {
125+
"transaction_hash": {
126+
"title": "The hash of the deploy transaction",
127+
"$ref": "#/components/schemas/TXN_HASH"
128+
},
129+
"contract_address": {
130+
"title": "The address of the new contract",
131+
"$ref": "#/components/schemas/FELT"
132+
}
133+
}
134+
}
135+
},
136+
"errors": [
137+
{
138+
"$ref": "#/components/errors/CLASS_HASH_NOT_FOUND"
139+
}
140+
]
106141
}
107142
],
108143
"components": {
@@ -134,6 +169,9 @@
134169
"BROADCASTED_DEPLOY_TXN": {
135170
"$ref": "./api/starknet_api_openrpc.json#/components/schemas/BROADCASTED_DEPLOY_TXN"
136171
},
172+
"BROADCASTED_DEPLOY_ACCOUNT_TXN": {
173+
"$ref": "./api/starknet_api_openrpc.json#/components/schemas/BROADCASTED_DEPLOY_ACCOUNT_TXN"
174+
},
137175
"FUNCTION_CALL": {
138176
"$ref": "./api/starknet_api_openrpc.json#/components/schemas/FUNCTION_CALL"
139177
}
@@ -142,6 +180,9 @@
142180
"INVALID_CONTRACT_CLASS": {
143181
"code": 50,
144182
"message": "Invalid contract class"
183+
},
184+
"CLASS_HASH_NOT_FOUND": {
185+
"$ref": "./api/starknet_api_openrpc.json#/components/errors/CLASS_HASH_NOT_FOUND"
145186
}
146187
}
147188
}

0 commit comments

Comments
 (0)