File tree 5 files changed +168
-0
lines changed
5 files changed +168
-0
lines changed Original file line number Diff line number Diff line change @@ -2250,6 +2250,36 @@ zkevm_getBroadcastURI:
2250
2250
$ref : ./components/schemas.yaml#/Method
2251
2251
default : zkevm_getBroadcastURI
2252
2252
2253
+ zkevm_estimateFee :
2254
+ allOf :
2255
+ - $ref : ' #/common_request_fields'
2256
+ - type : object
2257
+ properties :
2258
+ method :
2259
+ $ref : ./components/schemas.yaml#/Method
2260
+ default : zkevm_estimateFee
2261
+ params :
2262
+ type : array
2263
+ minItems : 1
2264
+ maxItems : 1
2265
+ items :
2266
+ $ref : ' #/transaction_object'
2267
+
2268
+ zkevm_estimateGasPrice :
2269
+ allOf :
2270
+ - $ref : ' #/common_request_fields'
2271
+ - type : object
2272
+ properties :
2273
+ method :
2274
+ $ref : ./components/schemas.yaml#/Method
2275
+ default : zkevm_estimateGasPrice
2276
+ params :
2277
+ type : array
2278
+ minItems : 1
2279
+ maxItems : 1
2280
+ items :
2281
+ $ref : ' #/transaction_object'
2282
+
2253
2283
# ===================== Account Abstraction Methods =====================
2254
2284
2255
2285
eth_sendUserOperation :
Original file line number Diff line number Diff line change @@ -2808,6 +2808,10 @@ eth_getTransactionReceipt_zkevm:
2808
2808
},
2809
2809
}
2810
2810
2811
+ zkevm_estimateFee: {'jsonrpc': '2.0', 'id': 1, 'result': '0x1ff3e2c2fec0'}
2812
+
2813
+ zkevm_estimateGasPrice: {'jsonrpc': '2.0', 'id': 1, 'result': '0x64848414'}
2814
+
2811
2815
# ========== Account Abstraction Method Examples ==========
2812
2816
2813
2817
eth_sendUserOperation: { 'jsonrpc': '2.0', 'id': 1, 'result': '0x1234...5678' }
Original file line number Diff line number Diff line change @@ -1433,6 +1433,30 @@ zkevm_getBroadcastURI:
1433
1433
example :
1434
1434
$ref : ./evm_examples.yaml#/zkevm_getBroadcastURI
1435
1435
1436
+ zkevm_estimateFee :
1437
+ allOf :
1438
+ - $ref : ' #/common_response_fields'
1439
+ - type : object
1440
+ description : Returns the estimated fee for the transaction.
1441
+ properties :
1442
+ result :
1443
+ type : string
1444
+ description : The estimated fee for the transaction.
1445
+ example :
1446
+ $ref : ./evm_examples.yaml#/zkevm_estimateFee
1447
+
1448
+ zkevm_estimateGasPrice :
1449
+ allOf :
1450
+ - $ref : ' #/common_response_fields'
1451
+ - type : object
1452
+ description : Returns the estimated gas price.
1453
+ properties :
1454
+ result :
1455
+ type : string
1456
+ description : The estimated gas price.
1457
+ example :
1458
+ $ref : ./evm_examples.yaml#/zkevm_estimateGasPrice
1459
+
1436
1460
# ============= Account Abstraction ===============
1437
1461
1438
1462
eth_sendUserOperation :
Original file line number Diff line number Diff line change
1
+ openapi : 3.1.0
2
+ info :
3
+ title : zkevm_estimateFee API - Polygon zkEVM
4
+ description : Estimates the transaction fee based on the current gas price and transaction complexity.
5
+ version : ' 1.0'
6
+ servers :
7
+ - url : ' https://{network}.g.alchemy.com/v2/'
8
+ variables :
9
+ network :
10
+ enum :
11
+ - polygonzkevm-mainnet
12
+ - polygonzkevm-testnet
13
+ - polygonzkevm-cardona
14
+ default : polygonzkevm-cardona
15
+ x-sandbox :
16
+ category :
17
+ type :
18
+ $ref : ' ../components/sandbox.yaml#/Category'
19
+ value : core
20
+ paths :
21
+ /{apiKey} :
22
+ $ref : ' #/components/pathItems/path'
23
+ components :
24
+ pathItems :
25
+ path :
26
+ post :
27
+ operationId : zkevm-estimateFee-polygon-zkevm
28
+ summary : zkevm_estimateFee API - Polygon zkEVM
29
+ description : Estimates the transaction fee following the effective gas price rules.
30
+ parameters :
31
+ - name : apiKey
32
+ in : path
33
+ schema :
34
+ type : string
35
+ default : docs-demo
36
+ description : |
37
+ <style>
38
+ .custom-style {
39
+ color: #048FF4;
40
+ }
41
+ </style>
42
+ For higher throughput, <span class="custom-style"><a href="https://alchemy.com/?a=docs-demo" target="_blank">create your own API key</a></span>
43
+ required : true
44
+ requestBody :
45
+ content :
46
+ application/json :
47
+ schema :
48
+ $ref : ' ../evm_body.yaml#/zkevm_estimateFee'
49
+ responses :
50
+ ' 200 ' :
51
+ description : Successfully estimated the transaction fee.
52
+ content :
53
+ application/json :
54
+ schema :
55
+ $ref : ' ../evm_responses.yaml#/zkevm_estimateFee'
Original file line number Diff line number Diff line change
1
+ openapi : 3.1.0
2
+ info :
3
+ title : zkevm_estimateGasPrice API - Polygon zkEVM
4
+ description : Estimates the gas price needed to get a transaction processed within a target number of blocks.
5
+ version : ' 1.0'
6
+ servers :
7
+ - url : ' https://{network}.g.alchemy.com/v2/'
8
+ variables :
9
+ network :
10
+ enum :
11
+ - polygonzkevm-mainnet
12
+ - polygonzkevm-testnet
13
+ - polygonzkevm-cardona
14
+ default : polygonzkevm-cardona
15
+ x-sandbox :
16
+ category :
17
+ type :
18
+ $ref : ' ../components/sandbox.yaml#/Category'
19
+ value : core
20
+ paths :
21
+ /{apiKey} :
22
+ $ref : ' #/components/pathItems/path'
23
+ components :
24
+ pathItems :
25
+ path :
26
+ post :
27
+ operationId : zkevm-estimateGasPrice-polygon-zkevm
28
+ summary : zkevm_estimateGasPrice API - Polygon zkEVM
29
+ description : Estimates the transaction gas price following the effective gas price rules.
30
+ parameters :
31
+ - name : apiKey
32
+ in : path
33
+ schema :
34
+ type : string
35
+ default : docs-demo
36
+ description : |
37
+ <style>
38
+ .custom-style {
39
+ color: #048FF4;
40
+ }
41
+ </style>
42
+ For higher throughput, <span class="custom-style"><a href="https://alchemy.com/?a=docs-demo" target="_blank">create your own API key</a></span>
43
+ required : true
44
+ requestBody :
45
+ content :
46
+ application/json :
47
+ schema :
48
+ $ref : ' ../evm_body.yaml#/zkevm_estimateGasPrice'
49
+ responses :
50
+ ' 200 ' :
51
+ description : Successfully estimated the gas price.
52
+ content :
53
+ application/json :
54
+ schema :
55
+ $ref : ' ../evm_responses.yaml#/zkevm_estimateGasPrice'
You can’t perform that action at this time.
0 commit comments