Skip to content

Commit

Permalink
docs: natspec for eboactor
Browse files Browse the repository at this point in the history
  • Loading branch information
0xyaco committed Aug 7, 2024
1 parent 03e75c7 commit bd3f0db
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/automated-dispute/src/eboActor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export class EboActor {
this.registry = new EboRegistry();
}

/**
* Handle RequestCreated event.
*
* @param event RequestCreated event
*/
public async onRequestCreated(event: EboEvent<"RequestCreated">): Promise<void> {
if (event.metadata.requestId != this.requestId)
throw new RequestMismatch(this.requestId, event.metadata.requestId);
Expand Down
6 changes: 6 additions & 0 deletions packages/automated-dispute/src/eboRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ export class EboRegistry {
this.dispute = new Map();
}

/**
* Add a `Request` by ID.
*
* @param requestId the ID of the `Request`
* @param request the `Request`
*/
public addRequest(requestId: string, request: Request) {
this.requests.set(requestId, request);
}
Expand Down
3 changes: 2 additions & 1 deletion packages/automated-dispute/src/protocolProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export class ProtocolProvider {

/**
* Gets the current epoch, the block number and its timestamp of the current epoch
* @returns The current epoch and the block number of the current epoch
*
* @returns The current epoch, its block number and its timestamp
*/
async getCurrentEpoch(): Promise<{
currentEpoch: bigint;
Expand Down

0 comments on commit bd3f0db

Please sign in to comment.