Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
Add docs on fetching participants from Registry
Browse files Browse the repository at this point in the history
Closes #41.
  • Loading branch information
nksazonov committed Nov 12, 2022
1 parent d936f32 commit b6453e9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/api/templates/extenders/YellowClearingBase.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ export interface IdentityPayloadBN {
}
```

### Retrieve registered participants

There is no on-chain mechanism to get all registered participants as to implement this, we would create a vector of attack.

> Specifically, to return a list of participants, it must be stored in an iterable structure, which in Solidity there is only one type of - an array.
> However, if anyone is able to add themselves to an array, then a malicious party can create a flood service that will register a ton of participants and make the registration call indefinitely costly on gas.
To get the list of registered participants, one can fetch all `ParticipantRegistered` events on the specific contract.
To filter participants by status, `getParticipantData` view (thus free and instant) function can be called on each participant from the list retrieved.

## Usage

### Frontdex
Expand Down

0 comments on commit b6453e9

Please sign in to comment.