DEVREL-549 docs: example READMEs specs + examples/oft README revamp - #1596
Merged
Conversation
nazreen
marked this pull request as draft
July 2, 2025 10:07
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new specs document for example READMEs and applies those specs by revamping the READMEs across multiple example projects. It also adjusts CI test scripts, workspace configuration, and adds mock deployment scripts.
- Add a
docs/EXAMPLES_SPECS.mdto define example README structure. - Revamp README.md files for
oft,oft-adapter,oft-upgradeable,oapp, andmint-burn-oft-adapterexamples. - Update CI tests, workspace, lint-staged configuration, and introduce mock deployment scripts.
Reviewed Changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests-user/tests/create-lz-oapp.bats | Adjusted lint steps order in CI tests |
| pnpm-workspace.yaml | Added docs package to workspace |
| package.json | Changed lint-staged to run prettier directly |
| examples/oft/tasks/utils.ts | Removed unused logger import and tightened JSON typing |
| examples/oft/layerzero.config.ts | Reduced mesh to two chains; updated contractName to MyOFTMock |
| examples/oft/hardhat.config.ts | Removed avalanche-testnet network |
| examples/oft/deploy/MyOFTMock.ts | Added mock OFT deploy script |
| examples/oft/deploy/MyOFT.ts | Clarified example network comment |
| examples/oft/README.md | Full README revamp following new specs |
| examples/oft-upgradeable/tasks/utils.ts | Added utility functions with proper typing |
| examples/oft-upgradeable/layerzero.config.ts | Switched to metadata-tools generator and defined pathways |
| examples/oft-upgradeable/hardhat.config.ts | Imported sendOFT task and removed obsolete networks |
| examples/oft-upgradeable/deploy/MyOFTUpgradeableMock.ts | Added upgradeable mock deploy script |
| examples/oft-upgradeable/README.md | Complete README revamp |
| examples/oft-adapter/tasks/utils.ts | Removed unused logger import and tightened JSON typing |
| examples/oft-adapter/layerzero.config.ts | Reduced mesh to two chains; updated pathways |
| examples/oft-adapter/hardhat.config.ts | Removed avalanche-testnet network |
| examples/oft-adapter/deploy/MyERC20Mock.ts | Renamed variables for clarity in mock ERC20 deployment |
| examples/oft-adapter/README.md | Aligned README with new specs |
| examples/oapp/package.json | Added @layerzerolabs/io-devtools dependency |
| examples/oapp/README.md | Full README revamp |
| examples/mint-burn-oft-adapter/tasks/utils.ts | Removed unused logger import and tightened JSON typing |
| docs/package.json | Initialized docs project stub |
| docs/EXAMPLES_SPECS.md | New document defining example README structure |
| README.md | Minor repository structure update |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (3)
package.json:32
- Consider using
pnpm exec prettierinstead of callingprettierdirectly to ensure the project uses the locally installed version.
"prettier --write --ignore-unknown",
tests-user/tests/create-lz-oapp.bats:133
- [nitpick] The compile/test/lint sequence is repeated in multiple tests. Consider extracting it into a helper function to reduce duplication and simplify maintenance.
pnpm compile
examples/oapp/package.json:26
- [nitpick] You added
@layerzerolabs/io-devtoolsas a dependency. Ensure it's actually imported and used in this example (e.g.,createLogger), or remove it if unused.
"@layerzerolabs/io-devtools": "~0.2.0",
10xKelly
previously approved these changes
Jul 4, 2025
ItsAdel
approved these changes
Jul 4, 2025
nazreen
dismissed
St0rmBr3w’s stale review
July 4, 2025 21:50
feedback resolved, need to merge so hackers for Cannes will get updated README
also briefed IRL to Krak on this PR's changes
main change that needed discussion was switching order of lint:fix and that was agreed upon IRL
shankars99
pushed a commit
that referenced
this pull request
Jul 20, 2025
mattsse
pushed a commit
to mattsse/devtools
that referenced
this pull request
Aug 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR
Currently depends on #1561 for the
lz:oft:sendcommand. Alternatively, revert the example instruction in this PR to not depend on that.For
tests-user/tests/create-lz-oapp.bats(what defines the "User Tests" CI job), the order of commands were changed:pnpm lint:fixmoved to beforepnpm:lintdue to inconsistent README.md linting behavior for examples. This was deemed as acceptable given we have another CI job specifically for linting.Proof of tests
examples/oft
https://testnet.layerzeroscan.com/tx/0xe1cfc9ac18fae768c1e3ec626695fa403caf1e73db0580f134806ed60e14f950
examples/oft-adapter
https://testnet.layerzeroscan.com/tx/0x7231e3f7df87c69265bb94a7448aac51463ba1b6779b2786ce6a270a0ceb68f4
examples/oft-upgradeable
https://testnet.layerzeroscan.com/tx/0xe10a4e6de4b454dd63fda1c44a7ac2013caf8713a1548dfb82f8a3b0df72dd9a
examples/oapp
https://testnet.layerzeroscan.com/tx/0xc6185188bc62ef04a3918f426d8f0d0abb3d3987e1f0301e620e72320c21fa06
Detailed Changes
examples/oft
examples/oft-adapter
examples/oft-upgradeable
examples/oapp
@layerzerolabs/io-devtools