-
Notifications
You must be signed in to change notification settings - Fork 4
add semantic versioning to contracts #10
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After approved, i'll upload broadcast files for GIWA Sepolia
| (bool success,) = proxy.staticcall(abi.encodeWithSelector(ISemver.version.selector)); | ||
| if (!success) { | ||
| return true; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if version() interface is not implemented, needs to upgrade.
| (VmSafe.CallerMode m,,) = vm.readCallers(); | ||
| require(m == VmSafe.CallerMode.None, "Only offchain"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ensure that this function should be simulated, not broadcast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces semantic versioning to all Dojang contracts using a standardized ISemver interface and version string format. The implementation enables version-aware contract upgrades through an automated upgrade script that checks semantic version differences.
- Added ISemver interface defining a standard version() function returning string
- Updated all contracts to implement semantic versioning with "0.2.0" version
- Created upgrade infrastructure with version comparison logic to prevent unnecessary upgrades
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/interfaces/ISemver.sol | New interface defining semantic versioning standard |
| src/SchemaBook.sol | Added ISemver implementation with version "0.2.0" |
| src/DojangScroll.sol | Added ISemver implementation with version "0.2.0" |
| src/DojangAttesterBook.sol | Added ISemver implementation with version "0.2.0" |
| src/BalanceDojangResolver.sol | Moved version function and updated to semantic versioning |
| src/AttestationIndexer.sol | Added ISemver implementation with version "0.2.0" |
| src/AddressDojangResolver.sol | Moved version function and updated to semantic versioning |
| script/utils/DeployConfig.s.sol | New utility for reading deployment configuration |
| script/upgrade/Upgrade.s.sol | New upgrade script with semantic version comparison |
| package.json | Updated package version to match contract versions |
| foundry.toml | Added filesystem permissions for deploy config |
| deploy-config/91342.json | New deployment configuration for testnet |
| test files | Updated test assertions to match new version strings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
This PR introduces semantic versioning to all Dojang contracts to improve version tracking and maintainability.
Each contract now exposes a
version()function.In addition, upgrade script has been added that performs contracts upgrades only when the semantic version has changed, ensuring cleaner and more intentional upgrade processes.
Related Issue
Closes #5