Skip to content

Commit

Permalink
Merge pull request #175 from starkware-libs/add_fee_units_to_estimate
Browse files Browse the repository at this point in the history
add units to FEE_ESTIMATE (#175)
  • Loading branch information
ArielElp authored Nov 27, 2023
2 parents bec6939 + 01ba2e0 commit 34fa365
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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": {
Expand All @@ -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": [
Expand Down

0 comments on commit 34fa365

Please sign in to comment.