Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add v3 transactions additional fields #162

Merged
merged 2 commits into from
Nov 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 163 additions & 4 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the structure of l1_gas, l2_gas is different in the GW and FGW, would be nicer if they'd be the same:
"resource_bounds": {
"L1_GAS": {
"max_amount": "0x5",
"max_price_per_unit": "0x6"
},
"L2_GAS": {
"max_amount": "0x0",
"max_price_per_unit": "0x0"
}
},

"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": [
Expand All @@ -1892,7 +1928,13 @@
"signature",
"nonce",
"class_hash",
"l1_gas"
"l1_gas",
"l2_gas",
"tip",
"paymaster_data",
"account_deployment_data",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is "account_deployment_data" relevant for declare?

"nonce_data_availability_mode",
"fee_data_availability_mode"
]
}
]
Expand Down Expand Up @@ -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": [
Expand All @@ -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"
]
}
]
Expand Down Expand Up @@ -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": [
Expand All @@ -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": {
Expand Down Expand Up @@ -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": [
Expand All @@ -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"
]
}
]
Expand Down