docs(entropy): add how-to guide for testing with MockEntropy #871
+341
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a comprehensive how-to guide for using the MockEntropy contract to test Entropy integrations locally. The guide covers installation, basic usage patterns, advanced testing scenarios, key differences from the production Entropy contract, and best practices.
This documentation corresponds to the MockEntropy contract added in pyth-crosschain PR #3121, which was requested by Jayant in this Slack thread.
Type of Change
Areas Affected
pages/entropy/test-with-mock-entropy.mdx
(new file - 327 lines)pages/entropy/_meta.json
(added navigation entry)Changes Made
New Documentation Page
Created
test-with-mock-entropy.mdx
with the following sections:Navigation Update
Added "Test with MockEntropy" to the How-To Guides section in
_meta.json
.Checklist
pre-commit run --all-files
to check for linting errorsImportant Review Points
Dependency on pyth-crosschain PR #3121: This documentation describes the MockEntropy contract from PR #3121. The PRs should be coordinated so this docs PR is only merged after (or simultaneously with) the MockEntropy PR to avoid publishing docs for unavailable features.
Code Examples: The Solidity code examples are based on the test file from pyth-crosschain. Please verify they are syntactically correct and accurately represent the MockEntropy API.
Version Number: The guide states MockEntropy is available in
@pythnetwork/entropy-sdk-solidity
v2.1.0+. Please confirm this version number is accurate or will be accurate when the pyth-crosschain PR merges.GitHub Source Links: The guide links to
MockEntropy.sol
andMockEntropy.t.sol
using/main/
branch URLs. These links won't work until PR #3121 is merged to main.Technical Accuracy: The "Key Differences from Real Entropy" section describes five important limitations. Please verify these are accurate, especially:
Related Issues
Relates to pyth-crosschain PR #3121
Additional Notes
Testing Limitations: The repository's test script is not available (
npm test
command missing), so I verified the page renders correctly in the development server but could not run automated tests. The linting passed successfully.Screenshots:
Contributor Information