From 28dc6aa5bc6bb6b94364f818e93dd9744222cb92 Mon Sep 17 00:00:00 2001 From: evyatar oster Date: Thu, 6 Jul 2023 14:28:46 +0300 Subject: [PATCH] change invoke v0: no nonce, add contract address --- api/starknet_api_openrpc.json | 79 ++++++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 15 deletions(-) diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index 4e9b8fd..6e89c16 100644 --- a/api/starknet_api_openrpc.json +++ b/api/starknet_api_openrpc.json @@ -1835,39 +1835,88 @@ "INVOKE_TXN_V0": { "title": "Invoke transaction V0", "description": "invokes a specific function in the desired contract (not necessarily an account)", - "$ref": "#/components/schemas/FUNCTION_CALL" - }, - "INVOKE_TXN_V1": { - "title": "Invoke transaction V1", - "description": "initiates a transaction from a given account", - "type": "object", "properties": { - "sender_address": { - "title": "sender address", + "max_fee": { + "title": "Max fee", + "$ref": "#/components/schemas/FELT", + "description": "The maximal fee that can be charged for including the transaction" + }, + "version": { + "title": "Version", + "description": "Version of the transaction scheme", + "$ref": "#/components/schemas/NUM_AS_HEX" + }, + "signature": { + "title": "Signature", + "$ref": "#/components/schemas/SIGNATURE" + }, + "transaction_hash": { + "title": "Transaction hash", + "$ref": "#/components/schemas/TXN_HASH", + "description": "The hash identifying the transaction" + }, + "contract_address": { + "title": "Contract address", "$ref": "#/components/schemas/ADDRESS" }, + "entry_point_selector": { + "title": "Entry point selector", + "$ref": "#/components/schemas/FELT" + }, "calldata": { + "title": "Calldata", "type": "array", - "title": "calldata", - "description": "The data expected by the account's `execute` function (in most usecases, this includes the called contract address and a function selector)", + "description": "The parameters passed to the function", "items": { "$ref": "#/components/schemas/FELT" } } }, "required": [ - "sender_address", - "calldata" + "contract_address", + "entry_point_selector", + "calldata", + "max_fee", + "version", + "signature", + "transaction_hash" ] }, - "INVOKE_TXN": { - "title": "Invoke transaction", - "description": "Initiate a transaction from an account", + "INVOKE_TXN_V1": { + "title": "Invoke transaction V1", + "description": "initiates a transaction from a given account", "allOf": [ { "title": "Common transaction properties", "$ref": "#/components/schemas/COMMON_TXN_PROPERTIES" }, + { + "type": "object", + "properties": { + "sender_address": { + "title": "sender address", + "$ref": "#/components/schemas/ADDRESS" + }, + "calldata": { + "type": "array", + "title": "calldata", + "description": "The data expected by the account's `execute` function (in most usecases, this includes the called contract address and a function selector)", + "items": { + "$ref": "#/components/schemas/FELT" + } + } + }, + "required": [ + "sender_address", + "calldata" + ] + } + ] + }, + "INVOKE_TXN": { + "title": "Invoke transaction", + "description": "Initiate a transaction from an account", + "allOf": [ { "type": "object", "title": "Type",