From f323cb2ef56dfce8723ba969e9a1b26bd4995844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Tue, 14 Jun 2022 10:37:03 +0200 Subject: [PATCH] Improve index entries for selectors, events and selfdestruct --- docs/abi-spec.rst | 3 ++- docs/assembly.rst | 2 +- docs/contracts/errors.rst | 2 +- docs/contracts/events.rst | 6 ++++-- docs/contracts/libraries.rst | 2 +- docs/introduction-to-smart-contracts.rst | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst index d67e85828..08c75fbec 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -19,7 +19,7 @@ We assume that all contracts will have the interface definitions of any contract This specification does not address contracts whose interface is dynamic or otherwise known only at run-time. .. _abi_function_selector: -.. index:: selector +.. index:: ! selector; of a function Function Selector ================= @@ -503,6 +503,7 @@ efficient search and arbitrary legibility by defining events with two arguments indexed, one not — intended to hold the same value. .. _abi_errors: +.. index:: error, selector; of an error Errors ====== diff --git a/docs/assembly.rst b/docs/assembly.rst index 70c4a458d..d6cf68568 100644 --- a/docs/assembly.rst +++ b/docs/assembly.rst @@ -116,7 +116,7 @@ efficient code, for example: } } - +.. index:: selector; of a function Access to External Variables, Functions and Libraries ----------------------------------------------------- diff --git a/docs/contracts/errors.rst b/docs/contracts/errors.rst index 77b224c4e..19577a387 100644 --- a/docs/contracts/errors.rst +++ b/docs/contracts/errors.rst @@ -1,4 +1,4 @@ -.. index:: ! error, revert, selector; of an error +.. index:: ! error, revert, ! selector; of an error .. _errors: ******************************* diff --git a/docs/contracts/events.rst b/docs/contracts/events.rst index 2595527d1..8618e7524 100644 --- a/docs/contracts/events.rst +++ b/docs/contracts/events.rst @@ -1,4 +1,4 @@ -.. index:: ! event +.. index:: ! event, ! event; anonymous, ! event; indexed, ! event; topic .. _events: @@ -73,6 +73,8 @@ four indexed arguments rather than three. In particular, it is possible to "fake" the signature of another event using an anonymous event. +.. index:: ! selector; of an event + Members of Events ================= @@ -147,7 +149,7 @@ The output of the above looks like the following (trimmed): } Additional Resources for Understanding Events -============================================== +============================================= - `Javascript documentation `_ - `Example usage of events `_ diff --git a/docs/contracts/libraries.rst b/docs/contracts/libraries.rst index c40284b49..7256ebe03 100644 --- a/docs/contracts/libraries.rst +++ b/docs/contracts/libraries.rst @@ -215,7 +215,7 @@ In comparison to contracts, libraries are restricted in the following ways: (These might be lifted at a later point.) .. _library-selectors: -.. index:: selector +.. index:: ! selector; of a library function Function Signatures and Selectors in Libraries ============================================== diff --git a/docs/introduction-to-smart-contracts.rst b/docs/introduction-to-smart-contracts.rst index 9b2e5fceb..ad98047cf 100644 --- a/docs/introduction-to-smart-contracts.rst +++ b/docs/introduction-to-smart-contracts.rst @@ -548,7 +548,7 @@ these **create calls** and normal message calls is that the payload data is executed and the result stored as code and the caller / creator receives the address of the new contract on the stack. -.. index:: selfdestruct, self-destruct, deactivate +.. index:: ! selfdestruct, deactivate Deactivate and Self-destruct ============================