Skip to content

Commit 38a5852

Browse files
authored
Merge pull request #14563 from ethereum/event-docs-corrections
Small docs corrections related to events
2 parents 04434c9 + 70870a6 commit 38a5852

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

docs/contracts/events.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ arguments to be stored in the transaction's log - a special data structure
1515
in the blockchain. These logs are associated with the address of the contract that emitted them,
1616
are incorporated into the blockchain, and stay there as long as a block is
1717
accessible (forever as of now, but this might
18-
change with Serenity). The Log and its event data is not accessible from within
18+
change in the future). The Log and its event data is not accessible from within
1919
contracts (not even from the contract that created them).
2020

2121
It is possible to request a Merkle proof for logs, so if

docs/contracts/inheritance.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,11 @@ One area where inheritance linearization is especially important and perhaps not
590590
Inheriting Different Kinds of Members of the Same Name
591591
======================================================
592592

593-
It is an error when any of the following pairs in a contract have the same name due to inheritance:
594-
- a function and a modifier
595-
- a function and an event
596-
- an event and a modifier
597-
598-
As an exception, a state variable getter can override an external function.
593+
The only situations where, due to inheritance, a contract may contain multiple definitions sharing
594+
the same name are:
595+
596+
- Overloading of functions.
597+
- Overriding of virtual functions.
598+
- Overriding of external virtual functions by state variable getters.
599+
- Overriding of virtual modifiers.
600+
- Overloading of events.

docs/style-guide.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Yes:
233233
bytes32[] options
234234
);
235235
236-
LongAndLotsOfArgs(
236+
emit LongAndLotsOfArgs(
237237
sender,
238238
recipient,
239239
publicKey,
@@ -251,7 +251,7 @@ No:
251251
uint256 amount,
252252
bytes32[] options);
253253
254-
LongAndLotsOfArgs(sender,
254+
emit LongAndLotsOfArgs(sender,
255255
recipient,
256256
publicKey,
257257
amount,
@@ -1045,13 +1045,15 @@ No:
10451045
Order of Layout
10461046
***************
10471047

1048-
Layout contract elements in the following order:
1048+
Contract elements should be laid out in the following order:
10491049

10501050
1. Pragma statements
10511051
2. Import statements
1052-
3. Interfaces
1053-
4. Libraries
1054-
5. Contracts
1052+
3. Events
1053+
4. Errors
1054+
5. Interfaces
1055+
6. Libraries
1056+
7. Contracts
10551057

10561058
Inside each contract, library or interface, use the following order:
10571059

0 commit comments

Comments
 (0)