diff --git a/public/content/developers/docs/apis/json-rpc/index.md b/public/content/developers/docs/apis/json-rpc/index.md index 23cc8aa09d5..40cf96ee585 100755 --- a/public/content/developers/docs/apis/json-rpc/index.md +++ b/public/content/developers/docs/apis/json-rpc/index.md @@ -565,7 +565,7 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1 ### eth_blockNumber {#eth_blocknumber} -Returns the number of most recent block. +Returns the number of the most recent block. Try endpoint in playground @@ -594,7 +594,7 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id ### eth_getBalance {#eth_getbalance} -Returns the balance of the account of given address. +Returns the balance of the account at a given address. Try endpoint in playground @@ -658,7 +658,7 @@ contract Storage { } ``` -Retrieving the value of pos0 is straight forward: +Retrieving the value of pos0 is straightforward: ```js curl -X POST --data '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}' localhost:8545 @@ -720,7 +720,7 @@ params: [ **Returns** -`QUANTITY` - integer of the number of transactions send from this address. +`QUANTITY` - integer of the number of transactions sent from this address. **Example** @@ -1102,7 +1102,7 @@ Generates and returns an estimate of how much gas is necessary to allow the tran **Parameters** -See [eth_call](#eth_call) parameters, except that all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit. +See [eth_call](#eth_call) parameters, except that all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to execute the call/transaction when the amount of gas is higher than the pending block gas limit. **Returns** @@ -1172,10 +1172,9 @@ params: [ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae", false],"id":1}' // Result { -{ -"jsonrpc": "2.0", -"id": 1, -"result": { + "jsonrpc": "2.0", + "id": 1, + "result": { "difficulty": "0x4ea3f27bc", "extraData": "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32", "gasLimit": "0x1388", @@ -1198,7 +1197,7 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0 "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncles": [ ] -} + } } ``` @@ -1394,7 +1393,7 @@ params: ["0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5"] It also returns _either_ : -- `root` : `DATA` 32 bytes of post-transaction stateroot (pre Byzantium) +- `root` : `DATA` 32 bytes of post-transaction state root (pre Byzantium) - `status`: `QUANTITY` either `1` (success) or `0` (failure) **Example** @@ -1431,7 +1430,7 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","para ### eth_getUncleByBlockHashAndIndex {#eth_getunclebyblockhashandindex} -Returns information about a uncle of a block by hash and uncle index position. +Returns information about an uncle of a block by hash and uncle index position. Try endpoint in playground @@ -1465,7 +1464,7 @@ Result see [eth_getBlockByHash](#eth_getblockbyhash) ### eth_getUncleByBlockNumberAndIndex {#eth_getunclebyblocknumberandindex} -Returns information about a uncle of a block by number and uncle index position. +Returns information about an uncle of a block by number and uncle index position. Try endpoint in playground @@ -1777,7 +1776,7 @@ This will start the HTTP RPC interface on `http://localhost:8545`. We can verify that the interface is running by retrieving the coinbase address (by obtaining the first address from the array of accounts) and balance using [curl](https://curl.se). Please note that data in these examples will differ on your local node. If you want to try these commands, replace the request params in the second curl request with the result returned from the first. ```bash -curl --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[]", "id":1}' -H "Content-Type: application/json" localhost:8545 +curl --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[], "id":1}' -H "Content-Type: application/json" localhost:8545 {"id":1,"jsonrpc":"2.0","result":["0x9b1d35635cc34752ca54713bb99d38614f63c955"]} curl --data '{"jsonrpc":"2.0","method":"eth_getBalance", "params": ["0x9b1d35635cc34752ca54713bb99d38614f63c955", "latest"], "id":2}' -H "Content-Type: application/json" localhost:8545 @@ -1793,7 +1792,7 @@ web3.fromWei("0x1639e49bba16280000", "ether") Now that there is some ether on our private development chain, we can deploy the contract. The first step is to compile the Multiply7 contract to byte code that can be sent to the EVM. To install solc, the Solidity compiler, follow the [Solidity documentation](https://docs.soliditylang.org/en/latest/installing-solidity.html). (You might want to use an older `solc` release to match [the version of compiler used for our example](https://github.com/ethereum/solidity/releases/tag/v0.4.20).) -The next step is to compile the Multiply7 contract to byte code that can be send to the EVM. +The next step is to compile the Multiply7 contract to byte code that can be sent to the EVM. ```bash echo 'pragma solidity ^0.4.16; contract Multiply7 { event Print(uint); function multiply(uint input) public returns (uint) { Print(input * 7); return input * 7; } }' | solc --bin