Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions EIPS/eip-6110.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ Advantages of in-protocol deposit processing consist of but are not limit to the
| Name | Value | Comment |
| - | - | - |
|`DEPOSIT_CONTRACT_ADDRESS` | `0x00000000219ab540356cbb839cbe05303d7705fa` | Mainnet |
|`DEPOSIT_EVENT_SIGNATURE_HASH` | `0x649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5` | |

`DEPOSIT_CONTRACT_ADDRESS` parameter **MUST** be included into client software binary distribution.
`DEPOSIT_CONTRACT_ADDRESS`, `DEPOSIT_EVENT_SIGNATURE_HASH` parameters **MUST** be included into client software binary distribution.

#### Definitions

Expand Down Expand Up @@ -96,7 +97,8 @@ def get_deposit_request_data(receipts)
deposit_requests = []
for receipt in receipts:
for log in receipt.logs:
if log.address == DEPOSIT_CONTRACT_ADDRESS:
is_deposit_event = (len(log.topics) > 0 and log.topics[0] == DEPOSIT_EVENT_SIGNATURE_HASH)
if log.address == DEPOSIT_CONTRACT_ADDRESS and is_deposit_event:
deposit_request = event_data_to_deposit_request(log.data)
deposit_requests.append(deposit_request)

Expand Down Expand Up @@ -140,9 +142,9 @@ Deposit `index` is used to deteministically initialize `deposit_requests_start_i

The list is unbounded because of negligible data complexity and absence of potential DoS vectors. See [Security Considerations](#security-considerations) for more details.

### Filtering events only by `DEPOSIT_CONTRACT_ADDRESS`
### Filtering events by `DEPOSIT_CONTRACT_ADDRESS` and `DEPOSIT_EVENT_SIGNATURE_HASH`

Deposit contract does not emit any events except for `DepositEvent`, thus additional filtering is unnecessary.
Depending on the deisgn, Deposit smart contract can emit different type of events when deposit is being processed. For instance, Deposit smart contract on Sepolia emits `Transfer` in addition to `DepositEvent`. Thus it is important to filter out irrelevant events.

## Backwards Compatibility

Expand Down