You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/language/builtins.rst
+8-7
Original file line number
Diff line number
Diff line change
@@ -322,19 +322,20 @@ The caller is responsible for encoding the input and decoding the output correct
322
322
We expect parachain authors to write their own higher level libraries on top.
323
323
324
324
.. 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
+
326
327
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
+
332
333
Unlike with other runtime API calls, the contracts pallet can not guarantee this behaviour.
333
334
Instead, it's specific to the targeted chain runtime. Hence, when using this builtin,
334
335
you must be sure that the implementation being called underneath is compatible.
335
336
336
337
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/>`_
0 commit comments