Skip to content

Commit 38d3bee

Browse files
authored
Fix the formatting in the chain extension documentation (hyperledger-solang#1309)
Signed-off-by: xermicus <[email protected]>
1 parent b961ce1 commit 38d3bee

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

docs/language/builtins.rst

+8-7
Original file line numberDiff line numberDiff line change
@@ -322,19 +322,20 @@ The caller is responsible for encoding the input and decoding the output correct
322322
We expect parachain authors to write their own higher level libraries on top.
323323

324324
.. warning::
325-
This function calls the runtime API `call_chain_extension <https://docs.rs/pallet-contracts/latest/pallet_contracts/api_doc/trait.Version0.html#tymethod.call_chain_extension>`.
325+
This function calls the runtime API `call_chain_extension <https://docs.rs/pallet-contracts/latest/pallet_contracts/api_doc/trait.Version0.html#tymethod.call_chain_extension>`_.
326+
326327
It assumes that the implementation of the chain extension
327-
- reads the input from the ``input_ptr`` parameter, used as a buffer pointer
328-
- writes potential output into the buffer found at the ``output_ptr`` pointer
329-
- respects the output buffer length in ``output_len_ptr`` to prevent OOB writes. The output buffer is 16KB in size.
330-
- writes the amount of bytes written to ``output_ptr`` into the buffer at ``output_len_ptr``
331-
328+
- reads the input from the ``input_ptr`` parameter, used as a buffer pointer
329+
- writes potential output into the buffer found at the ``output_ptr`` pointer
330+
- respects the output buffer length in ``output_len_ptr`` to prevent OOB writes. The output buffer is 16KB in size.
331+
- writes the amount of bytes written to ``output_ptr`` into the buffer at ``output_len_ptr``
332+
332333
Unlike with other runtime API calls, the contracts pallet can not guarantee this behaviour.
333334
Instead, it's specific to the targeted chain runtime. Hence, when using this builtin,
334335
you must be sure that the implementation being called underneath is compatible.
335336

336337
The following example demonstrates the usage of this builtin function.
337-
It shows how the chain extension example from the <ink! documentation https://use.ink/macros-attributes/chain-extension/>
338+
It shows how the chain extension example from the `ink! documentation <https://use.ink/macros-attributes/chain-extension/>`_
338339
looks like in a solidity contract:
339340

340341
.. include:: ../examples/substrate/call_chain_extension.sol

0 commit comments

Comments
 (0)