mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Enable highlighting for more code blocks in the docs
This commit is contained in:
parent
a0ee14f7c2
commit
0400b435b8
@ -153,7 +153,7 @@ the :ref:`standard JSON interface <compiler-api>`. The output is a JSON object
|
|||||||
element has the following form:
|
element has the following form:
|
||||||
|
|
||||||
|
|
||||||
.. code::
|
.. code-block:: json
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -181,7 +181,7 @@ The given ``type``, in this case ``t_uint256`` represents an element in
|
|||||||
``types``, which has the form:
|
``types``, which has the form:
|
||||||
|
|
||||||
|
|
||||||
.. code::
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"encoding": "inplace",
|
"encoding": "inplace",
|
||||||
@ -238,7 +238,7 @@ value and reference types, types that are encoded packed, and nested types.
|
|||||||
bytes b1;
|
bytes b1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.. code:: json
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"storage": [
|
"storage": [
|
||||||
|
@ -186,7 +186,9 @@ transactions.
|
|||||||
|
|
||||||
To listen for this event, you could use the following
|
To listen for this event, you could use the following
|
||||||
JavaScript code, which uses `web3.js <https://github.com/ethereum/web3.js/>`_ to create the ``Coin`` contract object,
|
JavaScript code, which uses `web3.js <https://github.com/ethereum/web3.js/>`_ to create the ``Coin`` contract object,
|
||||||
and any user interface calls the automatically generated ``balances`` function from above::
|
and any user interface calls the automatically generated ``balances`` function from above:
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
|
||||||
Coin.Sent().watch({}, '', function(error, result) {
|
Coin.Sent().watch({}, '', function(error, result) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
|
@ -183,7 +183,7 @@ other to be used by the developer.
|
|||||||
If the above contract is saved as ``ex1.sol`` then you can generate the
|
If the above contract is saved as ``ex1.sol`` then you can generate the
|
||||||
documentation using:
|
documentation using:
|
||||||
|
|
||||||
.. code::
|
.. code-block:: shell
|
||||||
|
|
||||||
solc --userdoc --devdoc ex1.sol
|
solc --userdoc --devdoc ex1.sol
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ User Documentation
|
|||||||
The above documentation will produce the following user documentation
|
The above documentation will produce the following user documentation
|
||||||
JSON file as output:
|
JSON file as output:
|
||||||
|
|
||||||
.. code::
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"version" : 1,
|
"version" : 1,
|
||||||
@ -230,7 +230,7 @@ Developer Documentation
|
|||||||
Apart from the user documentation file, a developer documentation JSON
|
Apart from the user documentation file, a developer documentation JSON
|
||||||
file should also be produced and should look like this:
|
file should also be produced and should look like this:
|
||||||
|
|
||||||
.. code::
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"version" : 1,
|
"version" : 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user