Skip to content

Commit afd316f

Browse files
committed
feat: use ButtonLink
1 parent bc36a16 commit afd316f

File tree

3 files changed

+77
-36
lines changed

3 files changed

+77
-36
lines changed

public/content/developers/docs/apis/json-rpc/index.md

Lines changed: 77 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[]
303303

304304
Returns an object with data about the sync status or `false`.
305305

306-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_syncing)
306+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_syncing">
307+
Try endpoint in playground
308+
</ButtonLink>
307309

308310
**Parameters**
309311

@@ -389,7 +391,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}
389391

390392
Returns the client coinbase address.
391393

392-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_coinbase)
394+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_coinbase">
395+
Try endpoint in playground
396+
</ButtonLink>
393397

394398
> **Note:** This method has been deprecated as of **v1.14.0** and is no longer supported. Attempting to use this method will result in a "Method not supported" error.
395399
@@ -418,7 +422,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":6
418422

419423
Returns the chain ID used for signing replay-protected transactions.
420424

421-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_chainId)
425+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_chainId">
426+
Try endpoint in playground
427+
</ButtonLink>
422428

423429
**Parameters**
424430

@@ -445,7 +451,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":67
445451

446452
Returns `true` if client is actively mining new blocks. This can only return `true` for proof-of-work networks and may not be available in some clients since [The Merge](/roadmap/merge/).
447453

448-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_mining)
454+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_mining">
455+
Try endpoint in playground
456+
</ButtonLink>
449457

450458
**Parameters**
451459

@@ -472,7 +480,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_mining","params":[],"id":71}
472480

473481
Returns the number of hashes per second that the node is mining with. This can only return `true` for proof-of-work networks and may not be available in some clients since [The Merge](/roadmap/merge/).
474482

475-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_hashrate)
483+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_hashrate">
484+
Try endpoint in playground
485+
</ButtonLink>
476486

477487
**Parameters**
478488

@@ -499,7 +509,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":7
499509

500510
Returns an estimate of the current price per gas in wei. For example, the Besu client examines the last 100 blocks and returns the median gas unit price by default.
501511

502-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_gasPrice)
512+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_gasPrice">
513+
Try endpoint in playground
514+
</ButtonLink>
503515

504516
**Parameters**
505517

@@ -522,13 +534,13 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":7
522534
}
523535
```
524536

525-
526-
527537
### eth_accounts {#eth_accounts}
528538

529539
Returns a list of addresses owned by client.
530540

531-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_accounts)
541+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_accounts">
542+
Try endpoint in playground
543+
</ButtonLink>
532544

533545
**Parameters**
534546

@@ -554,8 +566,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1
554566
### eth_blockNumber {#eth_blocknumber}
555567

556568
Returns the number of most recent block.
557-
558-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_blockNumber)
569+
570+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_blockNumber">
571+
Try endpoint in playground
572+
</ButtonLink>
559573

560574
**Parameters**
561575

@@ -582,7 +596,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id
582596

583597
Returns the balance of the account of given address.
584598

585-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getBalance)
599+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getBalance">
600+
Try endpoint in playground
601+
</ButtonLink>
586602

587603
**Parameters**
588604

@@ -614,7 +630,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x407
614630

615631
Returns the value from a storage position at a given address.
616632

617-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getStorageAt)
633+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getStorageAt">
634+
Try endpoint in playground
635+
</ButtonLink>
618636

619637
**Parameters**
620638

@@ -684,7 +702,9 @@ curl -X POST --data '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": [
684702

685703
Returns the number of transactions _sent_ from an address.
686704

687-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getTransactionCount)
705+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getTransactionCount">
706+
Try endpoint in playground
707+
</ButtonLink>
688708

689709
**Parameters**
690710

@@ -719,7 +739,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params
719739

720740
Returns the number of transactions in a block from a block matching the given block hash.
721741

722-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getBlockTransactionCountByHash)
742+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getBlockTransactionCountByHash">
743+
Try endpoint in playground
744+
</ButtonLink>
723745

724746
**Parameters**
725747

@@ -750,7 +772,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHa
750772

751773
Returns the number of transactions in a block matching the given block number.
752774

753-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getBlockTransactionCountByNumber)
775+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getBlockTransactionCountByNumber">
776+
Try endpoint in playground
777+
</ButtonLink>
754778

755779
**Parameters**
756780

@@ -783,7 +807,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNu
783807

784808
Returns the number of uncles in a block from a block matching the given block hash.
785809

786-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getUncleCountByBlockHash)
810+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getUncleCountByBlockHash">
811+
Try endpoint in playground
812+
</ButtonLink>
787813

788814
**Parameters**
789815

@@ -814,7 +840,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","p
814840

815841
Returns the number of uncles in a block from a block matching the given block number.
816842

817-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getUncleCountByBlockNumber)
843+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getUncleCountByBlockNumber">
844+
Try endpoint in playground
845+
</ButtonLink>
846+
818847
**Parameters**
819848

820849
1. `QUANTITY|TAG` - integer of a block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"` or `"finalized"`, see the [block parameter](/developers/docs/apis/json-rpc/#block-parameter)
@@ -846,7 +875,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber",
846875

847876
Returns code at a given address.
848877

849-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getCode)
878+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getCode">
879+
Try endpoint in playground
880+
</ButtonLink>
850881

851882
**Parameters**
852883

@@ -1027,7 +1058,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params"
10271058

10281059
Executes a new message call immediately without creating a transaction on the blockchain. Often used for executing read-only smart contract functions, for example the `balanceOf` for an ERC-20 contract.
10291060

1030-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_call)
1061+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_call">
1062+
Try endpoint in playground
1063+
</ButtonLink>
10311064

10321065
**Parameters**
10331066

@@ -1063,7 +1096,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{see above}]
10631096

10641097
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
10651098

1066-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_estimateGas)
1099+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_estimateGas">
1100+
Try endpoint in playground
1101+
</ButtonLink>
10671102

10681103
**Parameters**
10691104

@@ -1090,7 +1125,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{see
10901125

10911126
Returns information about a block by hash.
10921127

1093-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getBlockByHash)
1128+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getBlockByHash">
1129+
Try endpoint in playground
1130+
</ButtonLink>
10941131

10951132
**Parameters**
10961133

@@ -1169,7 +1206,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0
11691206
11701207
Returns information about a block by block number.
11711208
1172-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getBlockByNumber)
1209+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getBlockByNumber">
1210+
Try endpoint in playground
1211+
</ButtonLink>
11731212
11741213
**Parameters**
11751214
@@ -1199,7 +1238,9 @@ Result see [eth_getBlockByHash](#eth_getblockbyhash)
11991238
12001239
Returns the information about a transaction requested by transaction hash.
12011240
1202-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getTransactionByHash)
1241+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getTransactionByHash">
1242+
Try endpoint in playground
1243+
</ButtonLink>
12031244
12041245
**Parameters**
12051246
@@ -1260,7 +1301,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","param
12601301
12611302
Returns information about a transaction by block hash and transaction index position.
12621303
1263-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getTransactionByBlockHashAndIndex)
1304+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getTransactionByBlockHashAndIndex">
1305+
Try endpoint in playground
1306+
</ButtonLink>
12641307
12651308
**Parameters**
12661309
@@ -1290,7 +1333,9 @@ Result see [eth_getTransactionByHash](#eth_gettransactionbyhash)
12901333
12911334
Returns information about a transaction by block number and transaction index position.
12921335
1293-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getTransactionByBlockNumberAndIndex)
1336+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getTransactionByBlockNumberAndIndex">
1337+
Try endpoint in playground
1338+
</ButtonLink>
12941339
12951340
**Parameters**
12961341
@@ -1388,7 +1433,9 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","para
13881433
13891434
Returns information about a uncle of a block by hash and uncle index position.
13901435
1391-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getUncleByBlockHashAndIndex)
1436+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getUncleByBlockHashAndIndex">
1437+
Try endpoint in playground
1438+
</ButtonLink>
13921439
13931440
**Parameters**
13941441
@@ -1420,7 +1467,9 @@ Result see [eth_getBlockByHash](#eth_getblockbyhash)
14201467
14211468
Returns information about a uncle of a block by number and uncle index position.
14221469
1423-
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getUncleByBlockNumberAndIndex)
1470+
<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getUncleByBlockNumberAndIndex">
1471+
Try endpoint in playground
1472+
</ButtonLink>
14241473
14251474
**Parameters**
14261475
@@ -1640,7 +1689,6 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":[
16401689
16411690
Returns an array of all logs matching filter with given id.
16421691
1643-
16441692
**Parameters**
16451693
16461694
1. `QUANTITY` - The filter id.

public/content/developers/docs/apis/json-rpc/playground.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/data/placeholders/content-developers-docs-apis-json-rpc-data.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)