make consistent with pr to old site

pull/26459/head^2
Joe 2 years ago
parent 15ef3b64f8
commit f7c8e8a2eb
  1. 2
      src/pages/docs/interacting-with-geth/javascript-console.md
  2. 4
      src/pages/docs/interacting-with-geth/javascript-console_contracts.md

@ -15,7 +15,7 @@ This returns a result which is also a JSON object, with values expressed as hexa
{"id":2,"jsonrpc":"2.0","result":"0x1639e49bba16280000"}
```
While this is valid, it is also a very low level and rather error-prone way to interact with Geth. Most developers prefer to use convenience libraries that abstract away some of the more tedious and awkward tasks such as converting values from hexadecimal strings into numbers, or converting between denominations of ether (Wei, Gwei, etc). One such library is [Web3.js](https://web3js.readthedocs.io/en/v1.7.3/).
This is a low level and rather error-prone way to interact with Geth. Most developers prefer to use convenience libraries that abstract away some of the more tedious and awkward tasks such as converting values from hexadecimal strings into numbers, or converting between denominations of ether (Wei, Gwei, etc). One such library is [Web3.js](https://web3js.readthedocs.io/en/v1.7.3/).
The purpose of Geth's Javascript console is to provide a built-in environment to use a subset of the Web3.js libraries to interact with a Geth node.
{% include note.html content="The web3.js version that comes bundled with Geth is not up to date with the official Web3.js documentation. There are several Web3.js libraries that are not available in the Geth Javascript Console. There are also administrative APIs included in the Geth console that are not documented in the Web3.js documentation. The full list of libraries available in the Geth console is available on the [JSON-RPC API page](/docs/rpc/server)." %}

@ -70,7 +70,7 @@ This contract instance can then be deployed to the blockchain. This is done usin
var gas = eth.estimateGas({data: bytecode})
```
Note that each command that touches accounts will require approval in Clef unless a custom rule has been implemented.
Note that each command that touches accounts will require **approval in Clef** unless a custom rule has been implemented. The bytecode, gas and address of the sender can be bundled together into an object that will be passed to the contract's `new()` method which deploys the contract.
```js
var tx = {'from': eth.accounts[0], data: bytecode, gas: gas}
@ -114,3 +114,5 @@ contract.retrieve().call()
>> 2
```
## Summary
This page demonstrated how to create, compile, deploy and interact with an Ethereum smart contract using Geth's Javascript console.

Loading…
Cancel
Save