aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-09-27 01:10:48 +0800
committerGitHub <noreply@github.com>2018-09-27 01:10:48 +0800
commitaa6fefc9a95243f1588cf8f99c81e82f00ce510d (patch)
treeffdddb07557a93f021e9b57056e147597ce05edc
parent8d99d26c7c21bd5c049be1f35d20eabcdddfee4e (diff)
parent9c2b809fc77bbd7b0e2eda4cc7153be484fb4c52 (diff)
downloaddexon-solidity-aa6fefc9a95243f1588cf8f99c81e82f00ce510d.tar
dexon-solidity-aa6fefc9a95243f1588cf8f99c81e82f00ce510d.tar.gz
dexon-solidity-aa6fefc9a95243f1588cf8f99c81e82f00ce510d.tar.bz2
dexon-solidity-aa6fefc9a95243f1588cf8f99c81e82f00ce510d.tar.lz
dexon-solidity-aa6fefc9a95243f1588cf8f99c81e82f00ce510d.tar.xz
dexon-solidity-aa6fefc9a95243f1588cf8f99c81e82f00ce510d.tar.zst
dexon-solidity-aa6fefc9a95243f1588cf8f99c81e82f00ce510d.zip
Merge pull request #5080 from ethereum/docMeta
[DOCS] Update metadata.
-rw-r--r--docs/metadata.rst15
1 files changed, 12 insertions, 3 deletions
diff --git a/docs/metadata.rst b/docs/metadata.rst
index 9c4f2574..a9b5b7d4 100644
--- a/docs/metadata.rst
+++ b/docs/metadata.rst
@@ -117,19 +117,28 @@ to the end of the deployed bytecode::
So in order to retrieve the data, the end of the deployed bytecode can be checked
to match that pattern and use the Swarm hash to retrieve the file.
+.. note::
+ The compiler currently uses the "swarm version 0" hash of the metadata,
+ but this might change in the future, so do not rely on this sequence
+ to start with ``0xa1 0x65 'b' 'z' 'z' 'r' '0'``. We might also
+ add additional data to this CBOR structure, so the
+ best option is to use a proper CBOR parser.
+
+
Usage for Automatic Interface Generation and NatSpec
====================================================
The metadata is used in the following way: A component that wants to interact
-with a contract (e.g. Mist) retrieves the code of the contract, from that
+with a contract (e.g. Mist or any wallet) retrieves the code of the contract, from that
the Swarm hash of a file which is then retrieved.
That file is JSON-decoded into a structure like above.
The component can then use the ABI to automatically generate a rudimentary
user interface for the contract.
-Furthermore, Mist can use the userdoc to display a confirmation message to the user
-whenever they interact with the contract.
+Furthermore, the wallet can use the NatSpec user documentation to display a confirmation message to the user
+whenever they interact with the contract, together with requesting
+authorization for the transaction signature.
Additional information about Ethereum Natural Specification (NatSpec) can be found `here <https://github.com/ethereum/wiki/wiki/Ethereum-Natural-Specification-Format>`_.