From ab964624f05053ef757ba231a90a438159021b12 Mon Sep 17 00:00:00 2001 From: Ariel Elperin Date: Mon, 27 Nov 2023 15:28:24 +0200 Subject: [PATCH 1/2] add unit to FEE_ESTIMATE --- api/starknet_api_openrpc.json | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index 0dce666..245a272 100644 --- a/api/starknet_api_openrpc.json +++ b/api/starknet_api_openrpc.json @@ -3638,6 +3638,14 @@ ], "description": "Flags that indicate how to simulate a given transaction. By default, the sequencer behavior is replicated locally" }, + "PRICE_UNIT": { + "title": "price unit", + "type": "string", + "enum": [ + "WEI", + "FRI" + ] + }, "FEE_ESTIMATE": { "title": "Fee estimation", "type": "object", @@ -3656,12 +3664,18 @@ "title": "Overall fee", "description": "The estimated fee for the transaction (in gwei or fri, depending on the tx version), product of gas_consumed and gas_price", "$ref": "#/components/schemas/FELT" + }, + "unit": { + "title": "Fee unit", + "description": "units in which the fee is given", + "$ref": "#/components/schemas/PRICE_UNIT" } }, "required": [ "gas_consumed", "gas_price", - "overall_fee" + "overall_fee", + "unit" ] }, "FEE_PAYMENT": { @@ -3675,12 +3689,9 @@ "$ref": "#/components/schemas/FELT" }, "unit": { - "title": "fee unit", - "type": "string", - "enum": [ - "WEI", - "FRI" - ] + "title": "Fee unit", + "description": "units in which the fee is given", + "$ref": "#/components/schemas/PRICE_UNIT" } }, "required": [ From 01ba2e0fd2d732b666d32ca31698d16487bc17d4 Mon Sep 17 00:00:00 2001 From: Ariel Elperin Date: Mon, 27 Nov 2023 15:33:57 +0200 Subject: [PATCH 2/2] update estimateFee description --- api/starknet_api_openrpc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index 245a272..6c0dbbf 100644 --- a/api/starknet_api_openrpc.json +++ b/api/starknet_api_openrpc.json @@ -582,7 +582,7 @@ { "name": "starknet_estimateFee", "summary": "estimate the fee for of StarkNet transactions", - "description": "Estimates the resources required by a given sequence of transactions when applied on a given state. If one of the transaction reverts, a TRANSACTION_EXECUTION_ERROR is returned.", + "description": "Estimates the resources required by a given sequence of transactions when applied on a given state. If one of the transactions reverts or fails due to any reason (e.g. validation failure or an internal error), a TRANSACTION_EXECUTION_ERROR is returned. For v0-2 transactions the estimate is given in wei, and for v3 transactions it is given in fri.", "params": [ { "name": "request",