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

feat(entropy): Entropy inspection #1588

Merged
merged 4 commits into from
May 22, 2024
Merged

feat(entropy): Entropy inspection #1588

merged 4 commits into from
May 22, 2024

Conversation

m30m
Copy link
Collaborator

@m30m m30m commented May 21, 2024

No description provided.

Copy link

vercel bot commented May 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
example-oracle-amm ⬜️ Ignored (Inspect) Visit Preview May 22, 2024 9:26am
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview May 22, 2024 9:26am

Some(ethers::contract::MULTICALL_ADDRESS),
)
.await?;
let batch_size = 100;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest putting this in InspectOptions with a default value, just in case it needs to be changed later.

@@ -66,6 +68,9 @@ pub enum Options {
/// Request a random number from the contract.
RequestRandomness(RequestRandomnessOptions),

/// Inspect recent requests and find unfulfilled requests with callback.
Inspect(InspectOptions),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question about this: how do I tell that the request didn't get a callback from the result? It seems like the output simply prints out all of the requests that have happened.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any request still stored in the contract is not fulfilled yet. We just iterate through the requests and find the ones where the callback flag is also true and print them out.

@@ -622,6 +633,52 @@ export class EvmEntropyContract extends Storable {
};
}

async getRequest(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: a 1 sentence doc comment on these methods would be nice. (esp for getUserRandomNumber, would be nice to explain how to get the block argument if you don't have it)

@m30m m30m merged commit 45a22d3 into main May 22, 2024
6 checks passed
@m30m m30m deleted the entropy-inspection branch May 22, 2024 09:39
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.

2 participants