Skip to content

Commit d683ced

Browse files
update API doc with instructions
1 parent 0502782 commit d683ced

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/zkEVM/api/json-rpc.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,34 @@ hide:
33
- toc
44
---
55

6+
## Terminal
7+
8+
Use the Cardona testnet https://rpc.cardona.zkevm-rpc.com to test the [endpoint methods](#playground) in a terminal. For example:
9+
10+
### `zkevm_estimateGasPrice`
11+
12+
```sh
13+
curl -X POST \
14+
-H "Content-Type: application/json" \
15+
--data '{"jsonrpc":"2.0","method":"zkevm_estimateGasPrice","params":[{"from":"0x0000000000000000000000000000000000000001","to":"0x0000000000000000000000000000000000000002","value":"0x1"}],"id":1}' \
16+
https://rpc.cardona.zkevm-rpc.com
17+
```
18+
19+
#### Result
20+
21+
```sh
22+
{"jsonrpc":"2.0","id":1,"result":"0xe2ea2f0"}
23+
```
24+
25+
## Playground
26+
27+
The available methods are detailed in the playground description below.
28+
29+
Each method description provides:
30+
31+
- Method name and explanation.
32+
- Parameters required if any and their details.
33+
- Expected return.
34+
- Examples.
35+
636
<embed type="text/html" src="https://playground.open-rpc.org/?schemaUrl=https://raw.githubusercontent.com/0xPolygon/polygon-docs/3eb44779e7380e91e5c92f160424159a3da1bdba/docs/zkEVM/api/zkevm.openrpc.json&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:splitView]=false" width="100%" height="1000px">

0 commit comments

Comments
 (0)