Skip to content

Commit

Permalink
fix(build,api-reference): fix errors in RPC API (#137)
Browse files Browse the repository at this point in the history
# Description

Fix the errors in JSON RPC API for `zks` and `eth` namespaces.
  • Loading branch information
danijelTxFusion authored Jun 19, 2024
1 parent bbc7d6c commit 1bc9c88
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
40 changes: 38 additions & 2 deletions content/00.build/70.api-reference/20.zks-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,42 @@ curl --request POST \

---

## `zks_getBaseTokenL1Address`

Retrieves the L1 base token address.

#### Parameters

None

#### Returns

**DATA, 20 bytes** - Layer 1 Ethereum address of base token.

#### Example Request

```sh
curl --request POST \
--url https://mainnet.era.zksync.io/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getBaseTokenL1Address",
"params": []
}'
```

#### Example Response

```json
{
"jsonrpc": "2.0",
"result": "0x0000000000000000000000000000000000000001",
"id": 1
}
```

## `zks_getConfirmedTokens`

Lists confirmed tokens. **Confirmed** in the method name means any token bridged to ZKsync Era via the official bridge.
Expand Down Expand Up @@ -1203,7 +1239,7 @@ curl --request POST \
}
```

### `zks_sendRawTransactionWithDetailedOutput`
## `zks_sendRawTransactionWithDetailedOutput`

Executes a transaction and returns its hash, storage logs, and events that would have been generated
if the transaction had already been included in the block. The API has a similar behaviour to
Expand All @@ -1225,7 +1261,7 @@ relationships between each other.

```sh
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["Signed Transaction"],"id":1}' \
--data '{"jsonrpc":"2.0","method":"zks_sendRawTransactionWithDetailedOutput","params":["Signed Transaction"],"id":1}' \
"https://mainnet.era.zksync.io"
```

Expand Down
1 change: 1 addition & 0 deletions content/00.build/70.api-reference/35.ethereum-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ curl --request POST \
"transactionHash": "0xfdfcfdc6a0e2e3d09218749a752a2c2933f9eda5e9985c7fa3d861cb0112817d",
"transactionIndex": "0x0",
"logIndex": "0x0",
"l1BatchNumber": null,
"transactionLogIndex": "0x0",
"logType": null,
"removed": false
Expand Down

0 comments on commit 1bc9c88

Please sign in to comment.