Conversation
ihooni
left a comment
There was a problem hiding this comment.
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.
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.
ensure that this function should be simulated, not broadcast.
There was a problem hiding this comment.
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