Skip to content

Conversation

aditya520
Copy link
Member

Summary

Rationale

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Copy link

vercel bot commented Sep 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
component-library Ready Ready Preview Comment Sep 10, 2025 9:33pm
developer-hub Ready Ready Preview Comment Sep 10, 2025 9:33pm
5 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
api-reference Skipped Skipped Sep 10, 2025 9:33pm
entropy-explorer Skipped Skipped Sep 10, 2025 9:33pm
insights Skipped Skipped Sep 10, 2025 9:33pm
proposals Skipped Skipped Sep 10, 2025 9:33pm
staking Skipped Skipped Sep 10, 2025 9:33pm

@aditya520 aditya520 marked this pull request as ready for review September 9, 2025 19:27
@aditya520 aditya520 requested a review from a team as a code owner September 9, 2025 19:27
@vercel vercel bot temporarily deployed to Preview – insights September 9, 2025 19:27 Inactive
@vercel vercel bot temporarily deployed to Preview – staking September 9, 2025 19:27 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-explorer September 9, 2025 19:27 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference September 9, 2025 19:28 Inactive
@vercel vercel bot temporarily deployed to Preview – proposals September 9, 2025 19:28 Inactive
Comment on lines 41 to 49

<DynamicCodeBlock
lang="solidity"
code={`\
function generateAttributes(bytes32 randomNumber) internal {
int256 strength = mapRandomNumber(
keccak256(abi.encodePacked(randomNumber, "strength")),
15,
20
Copy link
Contributor

Choose a reason for hiding this comment

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

feel free to ignore but I'm curious if this would work with just doing the triple quotes like ```solidity ....

Feels a bit cumbersome to have to use <DynamicCodeBlock .../> every time we write code

Copy link
Contributor

Choose a reason for hiding this comment

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

this is the same thing that we were discussing yesterday @aditya520 as in don't see any difference in the look and feel of these two methods.

Copy link
Member Author

Choose a reason for hiding this comment

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

This component support shiki styles. I want to experiment with them in future.

@alexcambose
Copy link
Contributor

Nice!

"error-codes",
"[Example Applications](https://github.com/pyth-network/pyth-examples/tree/main/entropy)",
"[Entropy Explorer](https://entropy-explorer.pyth.network/)",
"[Fortuna API Reference](https://fortuna.dourolabs.app/docs/)",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the icons for these links don't clearly indicate that they open a new page. I think the up-right arrow should go after the text.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree, but that is the fumadocs default behaviour. I would need to override that component byone of our component, which will take some time.

## Migration Guide

If you're upgrading from Entropy v1 to v2:
(TODO: Add links to the interface)
Copy link
Contributor

Choose a reason for hiding this comment

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

the content on this page needs some work imo

  1. Multiple Request Variants -- this doesn't seem like a benefit. I think the real user benefit is "configurable gas limits". Forget about explaining the other variants of Request Callback -- no one cares about anything besides the default variant and the one that lets you set a gas limit.

  2. Improved Fee structure -- this is wrong. these fee calculation methods correspond to request methods. Just delete this section

  3. Entropy Debugger / Enhanced Callback Status -- theses should be the same item. Also should be called Entropy Explorer. Point here being that there's a tool that people can use to see the status of their request / callback.

  4. Gas optimization -- i don't think we actually did this

Copy link
Member Author

Choose a reason for hiding this comment

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

Enhanced callback status should be a separate section IMO. The new flag passed under callback event enables user to have a better safeguard against callback failures.

- [Foundry](https://book.getfoundry.sh/getting-started/installation)
- [Node.js](https://nodejs.org/en/download) (version >= v18.0.0)
- [Foundry](https://book.getfoundry.sh/getting-started/installation).
- [Node](https://nodejs.org/en/download). Run `node -v{:js}` to confirm. You should get an output with version >= `v18.0.0`.
Copy link
Contributor

Choose a reason for hiding this comment

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

the {:js} postfix is appearing in the guide. this is true for all similar instances below

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that needed to be fixed. @alexcambose I would need your help here.

```bash
This will create a new directory in `coin-flip{:bash}` named `contracts/src`, which will contain the smart contract code.

<DynamicCodeBlock
Copy link
Contributor

Choose a reason for hiding this comment

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

the copy icon on these should be visible by default. Not clear to the reader that these are easily copyable right now.

Copy link
Collaborator

@cprussin cprussin left a comment

Choose a reason for hiding this comment

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

Overall lgtm, I have some small suggestions.

Comment on lines +338 to +349
/* Global typography: tighten line spacing in docs content */
:where(.prose) {
line-height: 1.5;
}

:where(.prose) :where(p, li) {
line-height: 1.5;
}

:where(.prose) :where(h1, h2, h3, h4, h5, h6) {
line-height: 1.2;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I very strongly recommend against setting global styles; instead we should be scoping styles to components.

Copy link
Member Author

Choose a reason for hiding this comment

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

@alexcambose
Can you please fix this in your next PR?

@vercel vercel bot temporarily deployed to Preview – entropy-explorer September 10, 2025 21:30 Inactive
@vercel vercel bot temporarily deployed to Preview – insights September 10, 2025 21:30 Inactive
@vercel vercel bot temporarily deployed to Preview – staking September 10, 2025 21:30 Inactive
@vercel vercel bot temporarily deployed to Preview – proposals September 10, 2025 21:30 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference September 10, 2025 21:30 Inactive
@aditya520 aditya520 merged commit acd29ac into main Sep 10, 2025
10 checks passed
@aditya520 aditya520 deleted the chore(dev-hub)-Entropy-improvements branch September 10, 2025 21:41
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.

5 participants