-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: base EboActor implementation (#16)
# 🤖 Linear Closes GRT-80 ## Description Implements base class for `EboActor`
- Loading branch information
Showing
7 changed files
with
95 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { BlockNumberService } from "@ebo-agent/blocknumber"; | ||
|
||
import { ProtocolProvider } from "./protocolProvider.js"; | ||
import { | ||
DisputeStatusChanged, | ||
RequestCreated, | ||
RequestFinalizable, | ||
ResponseDisputed, | ||
} from "./types/events.js"; | ||
import { Dispute, Response } from "./types/prophet.js"; | ||
|
||
export class EboActor { | ||
private requestActivity: unknown[]; | ||
|
||
constructor( | ||
private readonly protocolProvider: ProtocolProvider, | ||
private readonly blockNumberService: BlockNumberService, | ||
private readonly requestId: string, | ||
) { | ||
this.requestActivity = []; | ||
} | ||
|
||
public async onRequestCreated(_event: RequestCreated): Promise<void> { | ||
// TODO: implement | ||
return; | ||
} | ||
|
||
public async onResponseProposed(_event: ResponseDisputed): Promise<void> { | ||
// TODO: implement | ||
return; | ||
} | ||
|
||
public async onResponseDisputed(_event: ResponseDisputed): Promise<void> { | ||
// TODO: implement | ||
return; | ||
} | ||
|
||
private async proposeResponse(_response: Response): Promise<void> { | ||
// TODO: implement | ||
return; | ||
} | ||
|
||
private async disputeProposal(_dispute: Dispute): Promise<void> { | ||
// TODO: implement | ||
return; | ||
} | ||
|
||
private async isValidDispute(_dispute: Dispute): Promise<boolean> { | ||
// TODO: implement | ||
return true; | ||
} | ||
|
||
public async onFinalizeRequest(_event: RequestFinalizable): Promise<void> { | ||
// TODO: implement | ||
return; | ||
} | ||
|
||
public async onDisputeStatusChanged(_event: DisputeStatusChanged): Promise<void> { | ||
// TODO: implement | ||
return; | ||
} | ||
|
||
public async onDisputeEscalated(_event: Dispute): Promise<void> { | ||
return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { describe } from "vitest"; | ||
|
||
describe("EboActor", () => { | ||
describe.skip("onRequestCreated"); | ||
describe.skip("onResponseProposed"); | ||
describe.skip("onResponseDisputed"); | ||
describe.skip("onFinalizeRequest"); | ||
describe.skip("onDisputeStatusChanged"); | ||
describe.skip("onDisputeEscalated"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./services/index.js"; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.