Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

change getBalance script example input param from blockTag to blockNumber #1051

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions content/rsk-devportal/tools/rpc-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,20 +307,21 @@ Find below a list of JSON-RPC methods available on the RPC API.
- **Pending:** A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool. Intuitively, you can think of these as blocks that have not been mined yet.
- if not specified, it will return the balance at the latest block available.
- Example request by `blockNumber`:
```shell
curl --location 'https://rpc.testnet.rootstock.io/<api-key>' \
--request POST \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc":"2.0",
"method":"eth_getBalance",
"params":[
"0x1fab9a0e24ffc209b01faa5a61ad4366982d0b7f",
"latest"],
"id":0
}'
```
```shell
curl --location 'https://rpc.testnet.rootstock.io/<api-key>' \
--request POST \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc":"2.0",
"method":"eth_getBalance",
"params":[
"0x1fab9a0e24ffc209b01faa5a61ad4366982d0b7f",
"0x6444bb"
],
"id":0
}'
```
- Example Response:
```shell
{
Expand Down