Skip to content
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

Update libraries #6

Merged
merged 4 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
[submodule "lib/solady"]
path = lib/solady
url = https://github.com/vectorized/solady
[submodule "lib/deployment-log-generator"]
path = lib/deployment-log-generator
url = https://github.com/0xPolygon/deployment-log-generator
[submodule "lib/contract-deployer-template"]
path = lib/contract-deployer-template
url = https://github.com/0xPolygon/contract-deployer-template
[submodule "lib/storage-layout-checker"]
path = lib/storage-layout-checker
url = https://github.com/0xPolygon/storage-layout-checker
[submodule "lib/storage-delta"]
path = lib/storage-delta
url = https://github.com/0xPolygon/storage-delta
[submodule "lib/deployer-kit"]
path = lib/deployer-kit
url = https://github.com/0xPolygon/deployer-kit
[submodule "lib/forge-chronicles"]
path = lib/forge-chronicles
url = https://github.com/0xPolygon/forge-chronicles
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,23 @@ Interfaces should be the entrypoint for all contracts. When exploring the a cont

## Versioning

This repo utilizes [semantic versioning](https://semver.org/) for smart contracts. An `IVersioned` interface is included in the [interfaces directory](src/interface/IVersioned.sol) exposing a unified versioning interface for all contracts. This version MUST be included in all contracts, whether they are upgradeable or not, to be able to easily match deployed versions. For example, in the case of a non-upgradeable contract one version could be deployed to a network and later a new version might be deployed to another network. The exposed `version()` function is also used by the [Deployment Log Generator](https://github.com/0xPolygon/deployment-log-generator#readme) to extract information about the version.
This repo utilizes [semantic versioning](https://semver.org/) for smart contracts. An `IVersioned` interface is included in the [interfaces directory](src/interface/IVersioned.sol) exposing a unified versioning interface for all contracts. This version MUST be included in all contracts, whether they are upgradeable or not, to be able to easily match deployed versions. For example, in the case of a non-upgradeable contract one version could be deployed to a network and later a new version might be deployed to another network. The exposed `version()` function is also used by the [Deployment Log Generator](https://github.com/0xPolygon/forge-chronicles#readme) to extract information about the version.

Whenever contracts are modified, only the version of the changed contracts should be updated. Unmodified contracts should remain on the version of their last change.

## Testing

### Deployer Template

This repo provides a deployer template library for consistency between scripts and unit tests. For more information on how to use the template, check [here](https://github.com/0xPolygon/contract-deployer-template#readme).
This repo provides a deployer template library for consistency between scripts and unit tests. For more information on how to use the template, check [here](https://github.com/0xPolygon/deployer-kit#readme).

## Deployment

This repo utilizes versioned deployments. Any changes to a contract should update the version of this specific contract. A script is provided that extracts deployment information from the `run-latest.json` file within the `broadcast` directory generated while the forge script runs. From this information a JSON and markdown file is generated containing various information about the deployment itself as well as past deployments.

### Deployer Template

This repo provides a deployer template library for consistency between scripts and unit tests. For more information on how to use the template, check [here](https://github.com/0xPolygon/contract-deployer-template#readme).
This repo provides a deployer template library for consistency between scripts and unit tests. For more information on how to use the template, check [here](https://github.com/0xPolygon/deployer-kit#readme).

### Deployment

Expand Down
1 change: 0 additions & 1 deletion lib/contract-deployer-template
Submodule contract-deployer-template deleted from 3101af
1 change: 1 addition & 0 deletions lib/deployer-kit
Submodule deployer-kit added at 5ed82d
1 change: 0 additions & 1 deletion lib/deployment-log-generator
Submodule deployment-log-generator deleted from f3fc0b
1 change: 1 addition & 0 deletions lib/forge-chronicles
Submodule forge-chronicles added at c2be7a
1 change: 1 addition & 0 deletions lib/storage-delta
Submodule storage-delta added at 936c4b
1 change: 0 additions & 1 deletion lib/storage-layout-checker
Submodule storage-layout-checker deleted from 7e29a3
Loading