From 79b3a5d4639623e136ff3e2ccf5f0c53bd68353c Mon Sep 17 00:00:00 2001 From: Ariel Elperin Date: Wed, 8 Nov 2023 19:19:23 +0200 Subject: [PATCH 1/2] add v3 additional fields --- api/starknet_api_openrpc.json | 167 +++++++++++++++++++++++++++++++++- 1 file changed, 163 insertions(+), 4 deletions(-) diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index 12ece3d..1982c19 100644 --- a/api/starknet_api_openrpc.json +++ b/api/starknet_api_openrpc.json @@ -1882,6 +1882,42 @@ "title": "L1 Gas", "description": "The max amount and max price per unit of L1 gas used in this tx", "$ref": "#/components/schemas/RESOURCE_LIMITS" + }, + "l2_gas": { + "title": "L2 Gas", + "description": "The max amount and max price per unit of L2 gas used in this tx", + "$ref": "#/components/schemas/RESOURCE_LIMITS" + }, + "tip": { + "title": "Tip", + "$ref": "#/components/schemas/FELT", + "description": "the tip for the transaction" + }, + "paymaster_data": { + "title": "Paymaster data", + "type": "array", + "items": { + "$ref": "#/components/schemas/FELT" + }, + "description": "data needed to allow the paymaster to pay for the transaction in native tokens" + }, + "account_deployment_data": { + "title": "Account deployment data", + "type": "array", + "items": { + "$ref": "#/components/schemas/FELT" + }, + "description": "data needed to deploy the account contract from which this tx will be initiated" + }, + "nonce_data_availability_mode": { + "title": "Nonce DA mode", + "description": "The storage domain of the account's nonce (an account has a nonce per DA mode)", + "$ref": "#/components/schemas/DA_MODE" + }, + "fee_data_availability_mode": { + "title": "Fee DA mode", + "description": "The storage domain of the account's balance from which fee will be charged", + "$ref": "#/components/schemas/DA_MODE" } }, "required": [ @@ -1892,7 +1928,13 @@ "signature", "nonce", "class_hash", - "l1_gas" + "l1_gas", + "l2_gas", + "tip", + "paymaster_data", + "account_deployment_data", + "nonce_data_availability_mode", + "fee_data_availability_mode" ] } ] @@ -2111,6 +2153,42 @@ "title": "L1 Gas", "description": "The max amount and max price per unit of L1 gas used in this tx", "$ref": "#/components/schemas/RESOURCE_LIMITS" + }, + "l2_gas": { + "title": "L2 Gas", + "description": "The max amount and max price per unit of L2 gas used in this tx", + "$ref": "#/components/schemas/RESOURCE_LIMITS" + }, + "tip": { + "title": "Tip", + "$ref": "#/components/schemas/FELT", + "description": "the tip for the transaction" + }, + "paymaster_data": { + "title": "Paymaster data", + "type": "array", + "items": { + "$ref": "#/components/schemas/FELT" + }, + "description": "data needed to allow the paymaster to pay for the transaction in native tokens" + }, + "account_deployment_data": { + "title": "Account deployment data", + "type": "array", + "items": { + "$ref": "#/components/schemas/FELT" + }, + "description": "data needed to deploy the account contract from which this tx will be initiated" + }, + "nonce_data_availability_mode": { + "title": "Nonce DA mode", + "description": "The storage domain of the account's nonce (an account has a nonce per DA mode)", + "$ref": "#/components/schemas/DA_MODE" + }, + "fee_data_availability_mode": { + "title": "Fee DA mode", + "description": "The storage domain of the account's balance from which fee will be charged", + "$ref": "#/components/schemas/DA_MODE" } }, "required": [ @@ -2121,7 +2199,13 @@ "signature", "nonce", "contract_class", - "l1_gas" + "l1_gas", + "l2_gas", + "tip", + "paymaster_data", + "account_deployment_data", + "nonce_data_availability_mode", + "fee_data_availability_mode" ] } ] @@ -2253,6 +2337,34 @@ "title": "L1 Gas", "description": "The max amount and max price per unit of L1 gas used in this tx", "$ref": "#/components/schemas/RESOURCE_LIMITS" + }, + "l2_gas": { + "title": "L2 Gas", + "description": "The max amount and max price per unit of L2 gas used in this tx", + "$ref": "#/components/schemas/RESOURCE_LIMITS" + }, + "tip": { + "title": "Tip", + "$ref": "#/components/schemas/FELT", + "description": "the tip for the transaction" + }, + "paymaster_data": { + "title": "Paymaster data", + "type": "array", + "items": { + "$ref": "#/components/schemas/FELT" + }, + "description": "data needed to allow the paymaster to pay for the transaction in native tokens" + }, + "nonce_data_availability_mode": { + "title": "Nonce DA mode", + "description": "The storage domain of the account's nonce (an account has a nonce per DA mode)", + "$ref": "#/components/schemas/DA_MODE" + }, + "fee_data_availability_mode": { + "title": "Fee DA mode", + "description": "The storage domain of the account's balance from which fee will be charged", + "$ref": "#/components/schemas/DA_MODE" } }, "required": [ @@ -2263,7 +2375,12 @@ "contract_address_salt", "constructor_calldata", "class_hash", - "l1_gas" + "l1_gas", + "l2_gas", + "tip", + "paymaster_data", + "nonce_data_availability_mode", + "fee_data_availability_mode" ] }, "DEPLOY_TXN": { @@ -2479,6 +2596,42 @@ "title": "L1 Gas", "description": "The max amount and max price per unit of L1 gas used in this tx", "$ref": "#/components/schemas/RESOURCE_LIMITS" + }, + "l2_gas": { + "title": "L2 Gas", + "description": "The max amount and max price per unit of L2 gas used in this tx", + "$ref": "#/components/schemas/RESOURCE_LIMITS" + }, + "tip": { + "title": "Tip", + "$ref": "#/components/schemas/FELT", + "description": "the tip for the transaction" + }, + "paymaster_data": { + "title": "Paymaster data", + "type": "array", + "items": { + "$ref": "#/components/schemas/FELT" + }, + "description": "data needed to allow the paymaster to pay for the transaction in native tokens" + }, + "account_deployment_data": { + "title": "Account deployment data", + "type": "array", + "items": { + "$ref": "#/components/schemas/FELT" + }, + "description": "data needed to deploy the account contract from which this tx will be initiated" + }, + "nonce_data_availability_mode": { + "title": "Nonce DA mode", + "description": "The storage domain of the account's nonce (an account has a nonce per DA mode)", + "$ref": "#/components/schemas/DA_MODE" + }, + "fee_data_availability_mode": { + "title": "Fee DA mode", + "description": "The storage domain of the account's balance from which fee will be charged", + "$ref": "#/components/schemas/DA_MODE" } }, "required": [ @@ -2488,7 +2641,13 @@ "version", "signature", "nonce", - "l1_gas" + "l1_gas", + "l2_gas", + "tip", + "paymaster_data", + "account_deployment_data", + "nonce_data_availability_mode", + "fee_data_availability_mode" ] } ] From cc9da96f54a6d73d48df4d4951409a76d8147943 Mon Sep 17 00:00:00 2001 From: Ariel Elperin Date: Thu, 9 Nov 2023 13:07:50 +0200 Subject: [PATCH 2/2] join l1_gas and l2_gas under resource bounds --- api/starknet_api_openrpc.json | 85 +++++++++++++++++------------------ 1 file changed, 40 insertions(+), 45 deletions(-) diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index 1982c19..a7aa93f 100644 --- a/api/starknet_api_openrpc.json +++ b/api/starknet_api_openrpc.json @@ -1878,15 +1878,10 @@ "description": "The hash of the declared class", "$ref": "#/components/schemas/FELT" }, - "l1_gas": { - "title": "L1 Gas", - "description": "The max amount and max price per unit of L1 gas used in this tx", - "$ref": "#/components/schemas/RESOURCE_LIMITS" - }, - "l2_gas": { - "title": "L2 Gas", - "description": "The max amount and max price per unit of L2 gas used in this tx", - "$ref": "#/components/schemas/RESOURCE_LIMITS" + "resource_bounds": { + "title": "Resource bounds", + "description": "resource bounds for the transaction execution", + "$ref": "#/components/schemas/RESOURCE_BOUNDS_MAPPING" }, "tip": { "title": "Tip", @@ -1928,8 +1923,7 @@ "signature", "nonce", "class_hash", - "l1_gas", - "l2_gas", + "resource_bounds", "tip", "paymaster_data", "account_deployment_data", @@ -2149,15 +2143,10 @@ "description": "The class to be declared", "$ref": "#/components/schemas/CONTRACT_CLASS" }, - "l1_gas": { - "title": "L1 Gas", - "description": "The max amount and max price per unit of L1 gas used in this tx", - "$ref": "#/components/schemas/RESOURCE_LIMITS" - }, - "l2_gas": { - "title": "L2 Gas", - "description": "The max amount and max price per unit of L2 gas used in this tx", - "$ref": "#/components/schemas/RESOURCE_LIMITS" + "resource_bounds": { + "title": "Resource bounds", + "description": "resource bounds for the transaction execution", + "$ref": "#/components/schemas/RESOURCE_BOUNDS_MAPPING" }, "tip": { "title": "Tip", @@ -2199,8 +2188,7 @@ "signature", "nonce", "contract_class", - "l1_gas", - "l2_gas", + "resource_bounds", "tip", "paymaster_data", "account_deployment_data", @@ -2333,15 +2321,10 @@ "description": "The hash of the deployed contract's class", "$ref": "#/components/schemas/FELT" }, - "l1_gas": { - "title": "L1 Gas", - "description": "The max amount and max price per unit of L1 gas used in this tx", - "$ref": "#/components/schemas/RESOURCE_LIMITS" - }, - "l2_gas": { - "title": "L2 Gas", - "description": "The max amount and max price per unit of L2 gas used in this tx", - "$ref": "#/components/schemas/RESOURCE_LIMITS" + "resource_bounds": { + "title": "Resource bounds", + "description": "resource bounds for the transaction execution", + "$ref": "#/components/schemas/RESOURCE_BOUNDS_MAPPING" }, "tip": { "title": "Tip", @@ -2375,8 +2358,7 @@ "contract_address_salt", "constructor_calldata", "class_hash", - "l1_gas", - "l2_gas", + "resource_bounds", "tip", "paymaster_data", "nonce_data_availability_mode", @@ -2592,15 +2574,10 @@ "title": "Nonce", "$ref": "#/components/schemas/FELT" }, - "l1_gas": { - "title": "L1 Gas", - "description": "The max amount and max price per unit of L1 gas used in this tx", - "$ref": "#/components/schemas/RESOURCE_LIMITS" - }, - "l2_gas": { - "title": "L2 Gas", - "description": "The max amount and max price per unit of L2 gas used in this tx", - "$ref": "#/components/schemas/RESOURCE_LIMITS" + "resource_bounds": { + "title": "Resource bounds", + "description": "resource bounds for the transaction execution", + "$ref": "#/components/schemas/RESOURCE_BOUNDS_MAPPING" }, "tip": { "title": "Tip", @@ -2641,8 +2618,7 @@ "version", "signature", "nonce", - "l1_gas", - "l2_gas", + "resource_bounds", "tip", "paymaster_data", "account_deployment_data", @@ -3697,7 +3673,26 @@ "L2" ] }, - "RESOURCE_LIMITS": { + "RESOURCE_BOUNDS_MAPPING": { + "type": "object", + "properties": { + "l1_gas": { + "title": "L1 Gas", + "description": "The max amount and max price per unit of L1 gas used in this tx", + "$ref": "#/components/schemas/RESOURCE_BOUNDS" + }, + "l2_gas": { + "title": "L2 Gas", + "description": "The max amount and max price per unit of L2 gas used in this tx", + "$ref": "#/components/schemas/RESOURCE_BOUNDS" + } + }, + "required": [ + "l1_gas", + "l2_gas" + ] + }, + "RESOURCE_BOUNDS": { "type": "object", "properties": { "max_amount": {