-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create requests #42
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 💯
export type Epoch = { | ||
epoch: bigint; | ||
epochFirstBlockNumber: bigint; | ||
epochStartTimestamp: Timestamp; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export type Epoch = { | |
epoch: bigint; | |
epochFirstBlockNumber: bigint; | |
epochStartTimestamp: Timestamp; | |
}; | |
export type Epoch = { | |
count: bigint; | |
firstBlockNumber: bigint; | |
startTimestamp: Timestamp; | |
}; |
What do you think if we do it this way. I noticed some places that u did Epoch["epoch"] and i think Epoch["count"]
or Epoch["number"]
might be more descriptive and cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ended up using number
, on the basis of having epoch.number
and also block.number
. count
feels a little bit more like there are elements inside the Epoch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a types comment
@@ -53,6 +54,8 @@ const EBO_EVENT_COMPARATOR = (e1: EboEvent<EboEventName>, e2: EboEvent<EboEventN | |||
return e1.logIndex - e2.logIndex; | |||
}; | |||
|
|||
export type ActorRequest = { id: RequestId; epoch: bigint; chainId: Caip2ChainId }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you meant to put this in types file?
import { RequestId } from "../types/prophet.js"; | ||
import { EboActor } from "./eboActor.js"; | ||
import { RequestId } from "../types/index.js"; | ||
import { ActorRequest, EboActor } from "./eboActor.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah maybe the types should be moved and imported from index.js since we're using them in a couple files
🤖 Linear
Closes GRT-171
Description
Epoch
type created