diff --git a/docs/interacting-with-geth/rpc/ns-admin.md b/docs/interacting-with-geth/rpc/ns-admin.md index 01fd105ad4..6cf190d46a 100644 --- a/docs/interacting-with-geth/rpc/ns-admin.md +++ b/docs/interacting-with-geth/rpc/ns-admin.md @@ -17,7 +17,7 @@ The method accepts a single argument, the [`enode`](https://ethereum.org/en/deve | Console | `admin.addPeer(url)` | | RPC | `{"method": "admin_addPeer", "params": [url]}` | -Example: +**Example:** ```js > admin.addPeer("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303") @@ -43,7 +43,7 @@ The `datadir` administrative property can be queried for the absolute path the r | Console | `admin.datadir` | | RPC | `{"method": "admin_datadir"}` | -Example: +**Example:** ```js > admin.datadir @@ -78,7 +78,7 @@ The `nodeInfo` administrative property can be queried for all the information kn | Console | `admin.nodeInfo` | | RPC | `{"method": "admin_nodeInfo"}` | -Example: +**Example:** ```js > admin.nodeInfo @@ -122,7 +122,7 @@ The `peers` administrative property can be queried for all the information known | Console | `admin.peers` | | RPC | `{"method": "admin_peers"}` | -Example: +**Example:** ```js > admin.peers @@ -194,7 +194,7 @@ The method returns a boolean flag specifying whether the HTTP RPC listener was o | Console | `admin.startHTTP(host, port, cors, apis)` | | RPC | `{"method": "admin_startHTTP", "params": [host, port, cors, apis]}` | -Example: +**Example:** ```js > admin.startHTTP("127.0.0.1", 8545) @@ -218,7 +218,7 @@ The method returns a boolean flag specifying whether the WebSocket RPC listener | Console | `admin.startWS(host, port, cors, apis)` | | RPC | `{"method": "admin_startWS", "params": [host, port, cors, apis]}` | -Example: +**Example:** ```js > admin.startWS("127.0.0.1", 8546) @@ -235,7 +235,7 @@ The `stopHTTP` administrative method closes the currently open HTTP RPC endpoint | Console | `admin.stopHTTP()` | | RPC | `{"method": "admin_stopHTTP"` | -Example: +**Example:** ```js > admin.stopHTTP() @@ -252,7 +252,7 @@ The `stopWS` administrative method closes the currently open WebSocket RPC endpo | Console | `admin.stopWS()` | | RPC | `{"method": "admin_stopWS"` | -Example: +**Example:** ```js > admin.stopWS() diff --git a/docs/interacting-with-geth/rpc/ns-clique.md b/docs/interacting-with-geth/rpc/ns-clique.md index 5dba480baf..06bdeca5d2 100644 --- a/docs/interacting-with-geth/rpc/ns-clique.md +++ b/docs/interacting-with-geth/rpc/ns-clique.md @@ -14,7 +14,7 @@ Retrieves a snapshot of all clique state at a given block. | Console | `clique.getSnapshot(blockNumber)` | | RPC | `{"method": "clique_getSnapshot", "params": [blockNumber]}` | -Example: +**Example:** ```js > clique.getSnapshot(5463755) @@ -118,7 +118,7 @@ This is a debugging method which returns statistics about signer activity for th | Console | `clique.status()` | | RPC | `{"method": "clique_status", "params": []}` | -Example: +**Example:** ```js > clique.status() diff --git a/docs/interacting-with-geth/rpc/ns-debug.md b/docs/interacting-with-geth/rpc/ns-debug.md index d5a2536833..ac186d3e1c 100644 --- a/docs/interacting-with-geth/rpc/ns-debug.md +++ b/docs/interacting-with-geth/rpc/ns-debug.md @@ -27,7 +27,7 @@ The location is specified as `:`. | Console | `debug.backtraceAt(string)` | | RPC | `{"method": "debug_backtraceAt", "params": [string]}` | -Example: +**Example:** ```js > debug.backtraceAt("server.go:443") @@ -112,7 +112,7 @@ Retrieves the state that corresponds to the block number and returns a list of a | Console | `debug.traceBlockByHash(number, [options])` | | RPC | `{"method": "debug_dumpBlock", "params": [number]}` | -Example: +**Example:** ```js > debug.dumpBlock(10) @@ -500,7 +500,7 @@ The `traceBlock` method will return a full stack trace of all invoked opcodes of References: [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/) -Example: +**Example:** ```js > debug.traceBlock("0xblock_rlp") @@ -585,7 +585,7 @@ The `debug_traceCall` method lets you run an `eth_call` within the context of th | Console | `debug.traceCall(object, blockNrOrHash, [options])` | | RPC | `{"method": "debug_traceCall", "params": [object, blockNrOrHash, {}]}` | -Example: +**Example:** No specific call options: @@ -697,7 +697,7 @@ If set, the previous four arguments will be ignored. Geth comes with a bundle of [built-in tracers](/docs/developers/evm-tracing/built-in-tracers), each providing various data about a transaction. This method defaults to the [struct logger](/docs/developers/evm-tracing/built-in-tracers#structopcode-logger). The `tracer` field of the second parameter can be set to use any of the other tracers. Alternatively a [custom tracer](/docs/developers/evm-tracing/custom-tracer) can be implemented in either Go or Javascript. -Example: +**Example:** ```js > debug.traceTransaction("0x2059dd53ecac9827faad14d364f9e04b1d5fe5b506e3acc886eff7a6f88a696a") diff --git a/docs/interacting-with-geth/rpc/ns-eth.md b/docs/interacting-with-geth/rpc/ns-eth.md index 7d358052c1..a7f48061ef 100644 --- a/docs/interacting-with-geth/rpc/ns-eth.md +++ b/docs/interacting-with-geth/rpc/ns-eth.md @@ -13,7 +13,7 @@ These methods are used for real-time events through subscriptions. See the [subs Executes a new message call immediately, without creating a transaction on the block chain. The `eth_call` method can be used to query internal contract state, to execute validations coded into a contract or even to test what the effect of a transaction would be without running it live. -Parameters: +**Parameters:** The method takes 3 parameters: an unsigned transaction object to execute in read-only mode; the block number to execute the call against; and an optional state override-set to allow executing the call against a modified chain state. @@ -44,7 +44,7 @@ The goal of the _state override set_ is manyfold: - It can be used to debug smart contracts in an already deployed large suite of contracts by selectively overriding some code or state and seeing how execution changes. Specialized tooling will probably be necessary. -Example: +**Example:** ```json { @@ -141,7 +141,7 @@ Just for the sake of completeness, decoded the response is: `2`. This method creates an [EIP2930](https://eips.ethereum.org/EIPS/eip-2930) type `accessList` based on a given `Transaction`. The `accessList` contains all storage slots and addresses read and written by the transaction, except for the sender account and the precompiles. This method uses the same `transaction` call [object](/docs/interacting-with-geth/rpc/objects#transaction-call-object) and `blockNumberOrTag` object as `eth_call`. An `accessList` can be used to unstuck contracts that became inaccessible due to gas cost increases. -Parameters: +**Parameters:** | Field | Type | Description | | :----------------- | :------- | :--------------------------------------------- | @@ -160,7 +160,7 @@ The method `eth_createAccessList` returns list of addresses and storage keys use That is, it gives the list of addresses and storage keys that will be used by that transaction, plus the gas consumed if the access list is included. Like `eth_estimateGas`, this is an estimation; the list could change when the transaction is actually mined. Adding an `accessList` to a transaction does not necessary result in lower gas usage compared to a transaction without an access list. -Example: +**Example:** ```json { @@ -180,7 +180,7 @@ Example: Returns a block header. -Parameters: +**Parameters:** | Field | Type | Description | | :----------------- | :--------- | :--------------------------------- | @@ -223,7 +223,7 @@ curl localhost:8545 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":" Returns a block header. -Parameters: +**Parameters:** | Field | Type | Description | | :----------------- | :--------- | :--------------------------------- | diff --git a/docs/interacting-with-geth/rpc/ns-les.md b/docs/interacting-with-geth/rpc/ns-les.md index 9be412f477..e8416a22e9 100644 --- a/docs/interacting-with-geth/rpc/ns-les.md +++ b/docs/interacting-with-geth/rpc/ns-les.md @@ -15,7 +15,7 @@ Get information about currently connected and total/individual allowed connectio | Console | `les.serverInfo()` | | RPC | `{"method": "les_serverInfo", "params": []}` | -Example: +**Example:** ```js > les.serverInfo @@ -39,7 +39,7 @@ Get individual client information (connection, balance, pricing) on the specifie | Console | `les.clientInfo([id, ...])` | | RPC | `{"method": "les_clientInfo", "params": [[id, ...]]}` | -Example: +**Example:** ```js > les.clientInfo([]) @@ -111,7 +111,7 @@ Get individual client information on clients with a positive balance in the spec | Console | `les.priorityClientInfo(id, id, number)` | | RPC | `{"method": "les_priorityClientInfo", "params": [id, id, number]}` | -Example: +**Example:** ```js > les.priorityClientInfo("0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", 100) @@ -206,7 +206,7 @@ Add signed value to the token balance of the specified client and update its `me | Console | `les.addBalance(id, number, string)` | | RPC | `{"method": "les_addBalance", "params": [id, number, string]}` | -Example: +**Example:** ```js > les.addBalance("0x6a47fe7bb23fd335df52ef1690f37ab44265a537b1d18eb616a3e77f898d9e77", 1000000000, "qwerty") @@ -223,7 +223,7 @@ Set capacity and pricing factors for the specified list of connected clients or | Console | `les.setClientParams([id, ...], {string: value, ...})` | | RPC | `{"method": "les_setClientParams", "params": [[id, ...], {string: value, ...}]}` | -Example: +**Example:** ```js > les.setClientParams(["0x6a47fe7bb23fd335df52ef1690f37ab44265a537b1d18eb616a3e77f898d9e77"], { @@ -248,7 +248,7 @@ Set default pricing factors for subsequently connected clients. | Console | `les.setDefaultParams({string: value, ...})` | | RPC | `{"method": "les_setDefaultParams", "params": [{string: value, ...}]}` | -Example: +**Example:** ```js > les.setDefaultParams({ @@ -272,7 +272,7 @@ Get the index and hashes of the latest known checkpoint. | Console | `les.latestCheckpoint()` | | RPC | `{"method": "les_latestCheckpoint", "params": []}` | -Example: +**Example:** ```js > les.latestCheckpoint @@ -289,7 +289,7 @@ Get checkpoint hashes by index. | Console | `les.getCheckpoint(number)` | | RPC | `{"method": "les_getCheckpoint", "params": [number]}` | -Example: +**Example:** ```js > les.getCheckpoint(256) @@ -306,7 +306,7 @@ Get the address of the checkpoint oracle contract. | Console | `les.checkpointContractAddress()` | | RPC | `{"method": "les_getCheckpointContractAddress", "params": []}` | -Example: +**Example:** ```js > les.checkpointContractAddress diff --git a/docs/interacting-with-geth/rpc/ns-txpool.md b/docs/interacting-with-geth/rpc/ns-txpool.md index 617d79860c..39abce3cd2 100644 --- a/docs/interacting-with-geth/rpc/ns-txpool.md +++ b/docs/interacting-with-geth/rpc/ns-txpool.md @@ -19,7 +19,7 @@ Please note, there may be multiple transactions associated with the same account | Console | `txpool.content` | | RPC | `{"method": "txpool_content"}` | -Example: +**Example:** ```js > txpool.content @@ -127,7 +127,7 @@ Please note, there may be multiple transactions associated with the same account | Console | `txpool.inspect` | | RPC | `{"method": "txpool_inspect"}` | -Example: +**Example:** ```js > txpool.inspect @@ -194,7 +194,7 @@ The result is an object with two fields `pending` and `queued`, each of which is | Console | `txpool.status` | | RPC | `{"method": "txpool_status"}` | -Example: +**Example:** ```js > txpool.status diff --git a/docs/interacting-with-geth/rpc/pubsub.md b/docs/interacting-with-geth/rpc/pubsub.md index 11b3ead9cf..90266f1576 100644 --- a/docs/interacting-with-geth/rpc/pubsub.md +++ b/docs/interacting-with-geth/rpc/pubsub.md @@ -7,7 +7,7 @@ Geth v1.4 and later support publish / subscribe using JSON-RPC notifications. Th It works by subscribing to particular events. The node will return a subscription id. For each event that matches the subscription a notification with relevant data is send together with the subscription id. -Example: +**Example:** ```sh // create subscription @@ -42,12 +42,12 @@ to cancel the subscription: Subscriptions are created with a regular RPC call with `eth_subscribe` as method and the subscription name as first parameter. If successful it returns the subscription id. -Parameters: +**Parameters:** 1. Subscription name 2. Optional arguments -Example: +**Example:** ```sh {"id": 1, "jsonrpc": "2.0", "method": "eth_subscribe", "params": ["newHeads"]} @@ -58,11 +58,11 @@ Example: Subscriptions are cancelled with a regular RPC call with `eth_unsubscribe` as method and the subscription id as first parameter. It returns a bool indicating if the subscription was cancelled successful. -Parameters: +**Parameters:** 1. subscription id -Example: +**Example:** ```json {"id": 1, "jsonrpc": "2.0", "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]} @@ -119,7 +119,7 @@ Returns logs that are included in new imported blocks and match the given filter In case of a chain reorganization previous sent logs that are on the old chain will be resent with the `removed` property set to true. Logs from transactions that ended up in the new chain are emitted. Therefore a subscription can emit logs for the same transaction multiple times. -Parameters: +**Parameters:** 1. `object` with the following (optional) fields - **address**, either an address or an array of addresses. Only logs that are created from these addresses are returned (optional) @@ -156,7 +156,7 @@ Returns the hash for all transactions that are added to the pending state and ar When a transaction that was previously part of the canonical chain isn't part of the new canonical chain after a reorganization its again emitted. -Parameters: +**Parameters:** none @@ -184,7 +184,7 @@ returns Indicates when the node starts or stops synchronizing. The result can either be a boolean indicating that the synchronization has started (true), finished (false) or an object with various progress indicators. -Parameters: +**Parameters:** none