Skip to content
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

[Sui Framework] Expose getter for current epoch number #1977

Merged
merged 1 commit into from
May 16, 2022

Conversation

sblackshear
Copy link
Collaborator

Also expose a test-only function for advancing the epoch number. This is useful for contracts that need time, at least until we have a more fine-grained timestamping scheme.

Also expose a test-only function for advancing the epoch number. This is useful for contracts that need time, at least until we have a more fine-grained timestamping scheme.
@sblackshear sblackshear marked this pull request as ready for review May 16, 2022 05:01
@lxfind
Copy link
Contributor

lxfind commented May 16, 2022

Although I don't mind adding the getter, I think this might be the wrong way to expose epoch: anyone who wants to access epoch number has to pass in a shared object. Should we add epoch to TxContext?

@damirka
Copy link
Contributor

damirka commented May 16, 2022

Agree wıth @lxfind, TxContext does seem like the best place.

@sblackshear
Copy link
Collaborator Author

Yep, great call on TxContext--fully agree. I filed #1980 for this

@sblackshear sblackshear merged commit 99426cd into MystenLabs:main May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants