DEVREL-155: Auto populate Register.sol#51
Merged
andrejrakic merged 4 commits intodevelopfrom Jan 14, 2026
Merged
Conversation
- Added script to query CCIP API and update Register.sol constructor - Updated Register.sol with latest contents
- Added npm script to update the register contract - Added pre script that updates the register contract whenever generate-docs is called
andrejrakic
approved these changes
Jan 12, 2026
package.json
Outdated
| "generate-docs": "npm run generate-solidity && npm run generate-jsdoc && npm run generate-index && npm run prettier", | ||
| "update-register": "node scripts/ccip/updateRegisterContract.js", | ||
| "update-register:testnet": "node scripts/ccip/updateRegisterContract.js testnet", | ||
| "update-register:mainnet": "node scripts/ccip/updateRegisterContract.js mainnet" |
Collaborator
There was a problem hiding this comment.
running this overwrites testnets' details. i think it should keep both
Collaborator
Author
There was a problem hiding this comment.
I have updated the script to grab both testnet and mainnet on execute
- Updated updateRegisterContract.js to include both mainnet and testnet networks in Register.sol - Updated Register.sol with latest contents for both mainnet and testnet networks - Updated package.json scripts to reflect the changes
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.
Summary
This PR adds automated tooling to fetch and update CCIP network details from Chainlink's API, ensuring the
Register.solcontract always contains the latest network configurations.Changes
1. Added CCIP Network Details Update Script (
scripts/ccip/updateRegisterContract.js)Register.solwith hardcoded network details in the constructor2. Added NPM Scripts (
package.json)update-register- Updates Register.sol with testnet data (default)update-register:testnet- Explicitly updates with testnet dataupdate-register:mainnet- Updates with mainnet datapregenerate-docs- Automatically runsupdate-register:testnetbefore generating documentation3. Updated Register.sol
Benefits
Usage
Update Register.sol with testnet data (default)
npm run update-register
Update with testnet data explicitly
npm run update-register:testnet
Update with mainnet data
npm run update-register:mainnet
Generate docs (automatically updates Register.sol first)
npm run generate-docs
Testing