forked from smartcontractkit/chainlink-starknet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add versioning and release with changesets (#22)
* Caigo package * Relay client caigo integration * Config Tracker: fetch latest config details * Gw calls: billing details, latest config details, latest config * OCR2 types builders * Adjusting contract reader to the client changes * parseConfigEvent into a separate file * Relay structure refactoring * CallOps for calling the contract * Using DecodeBytes to decode offchain config * Checking for stake config + config values from db * Parsing RelayConfig, propagating contract id further into providers * Fixing tests * Relay restructuring: chainlink subfolder and root component * Fixing tests * Restructing for Relayer module rebase * Add versioning * Run prettier * Revert prettier * Add package for core components * Update chainlink-starknet package description Co-authored-by: Kristijan Rebernisak <[email protected]> * Add contributing file * Split releases from changesets * Create release workflow folder, make root package public * Root package must be private * Add changelog index * Use nix * Fix links to packages * Remove link to root * Move relayer into sub directory * Revert /relayer subdirectory * Move /starknet and /chainlink into /relayer * Remove duplicate code * Sync aggregator-test.ts with base branch * Change to network-component-protocol notation * Rename starknet gauntlet cli release workflow * Try different gauntlet-core version * Revert gauntlet-core to 0.3.0 * Rebase on config tracker branch * Fix pkg path in relay test workflow * Update module name * Set up cairo venv before testing * Remove redundant python initialization * Remove nix from gauntlet_run_tests * Add nix to gauntlet_run_tests * Fix gauntlet path in changelog.md * Godepgraph script to generate png of module dependencies * Wrapping all errors for better context * Removing OCR2 prefix from reading funcs * Renaming LatestConfig -> ConfigFromEventAt * Fixing tests + cleanup * Integrate blueprint into starknet initial commit * improvements set config * move test network utils to tests * update deps * update config with latest core version * Fix starknet-devnet in Nix environment * Starkgate tests (#23) * npm starkgate and test * test clean * required changes fixed * format fixe * fix format with prettier * bump libocr (#39) * bump libocr * go mod tidy * Using DecodeBytes to decode offchain config * Remove owner from deployment input in ocr2 test * Update hard hat version in contracts package * Use string array as input to offchain_config * Replace smartcontractkit/chainlink-starknet with local version * Move ops folder into relayer folder * Change offchain_config from BN[] to string[] in setConfig * Removing go.work build dependency * Fix Relayer CI workflow * Fix relayer workflow NIX working dir * Try to fix CI * fixup * Update nix action * Fix test * Rename directories to match package names Co-authored-by: Sergei Drugalev <[email protected]> Co-authored-by: Kristijan Rebernisak <[email protected]> Co-authored-by: Akhil Chainani <[email protected]> Co-authored-by: RodrigoAD <[email protected]> Co-authored-by: Blaž Hrastnik <[email protected]> Co-authored-by: Aaron Lu <[email protected]>
- Loading branch information
1 parent
0cd4e98
commit 0bdad78
Showing
172 changed files
with
1,176 additions
and
184 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Changesets | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
changesets: | ||
name: Changesets | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout this repository | ||
- name: Checkout Repo | ||
uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1 | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
# Get tool versions | ||
- name: Get tool versions | ||
uses: smartcontractkit/[email protected] | ||
id: tool-versions | ||
# Install nix | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@v17 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
# Set up Node.js | ||
- name: Setup Node.js ${{ steps.tool-versions.outputs.nodejs_version }} | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: ${{ steps.tool-versions.outputs.nodejs_version }} | ||
# Install dependencies using yarn | ||
- name: Install Dependencies | ||
run: nix develop -c yarn install --frozen-lockfile | ||
# Create PR that will update versions or trigger publish | ||
- name: Create Release Pull Request | ||
uses: changesets/action@master | ||
id: changesets | ||
with: | ||
publish: nix develop -c yarn release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,7 @@ jobs: | |
${{ runner.os }}-go- | ||
- name: Download Go Vendor Packages | ||
if: steps.cache-packages.outputs.cache-hit != 'true' | ||
run: go mod download | ||
run: cd integration-tests && go mod download | ||
- name: Install Ginkgo CLI | ||
run: go install github.com/onsi/ginkgo/v2/[email protected] | ||
- name: Run Tests | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Starknet Gauntlet CLI Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "@chainlink/starknet-gauntlet-cli@[0-9]+.[0-9]+.[0-9]" | ||
|
||
jobs: | ||
starknet-gauntlet-cli-release: | ||
name: Starknet Gauntlet CLI Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout this repository | ||
- name: Checkout Repo | ||
uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1 | ||
# Get tool versions | ||
- name: Get tool versions | ||
uses: smartcontractkit/[email protected] | ||
id: tool-versions | ||
# Install nix | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@v17 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
# Set up Node.js | ||
- name: Setup Node.js ${{ steps.tool-versions.outputs.nodejs_version }} | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: ${{ steps.tool-versions.outputs.nodejs_version }} | ||
# Install dependencies using yarn | ||
- name: Install Dependencies | ||
run: nix develop -c yarn install --frozen-lockfile | ||
# Build gauntlet binary | ||
- name: Build Gauntlet | ||
run: nix develop -c yarn bundle | ||
# Store gauntlet-cli version | ||
- name: Set Env Variables | ||
run: echo "STARKNET_GAUNTLET_CLI=$(npm info @chainlink/starknet-gauntlet-cli version)" >> $GITHUB_ENV | ||
# Upload gauntlet binary to gauntlet-cli release | ||
- name: Upload Gauntlet Binary | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: bin/chainlink-starknet-* | ||
file_glob: true | ||
tag: | | ||
@chainlink/starknet-gauntlet-cli@${{ env.STARKNET_GAUNTLET_CLI }} | ||
overwrite: false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Starknet Relayer Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "@chainlink/starknet-relayer@[0-9]+.[0-9]+.[0-9]" | ||
|
||
jobs: | ||
starknet-relayer-release: | ||
name: Release Starknet Relayer | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout this repository | ||
- name: Checkout Repo | ||
uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1 | ||
# Store starknet version | ||
- name: Set Env Variables | ||
run: echo "STARKNET_RELAYER=$(npm info @chainlink/starknet-relayer version)" >> $GITHUB_ENV | ||
# Release code under vX.X.X | ||
- name: Release Code | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: relayer/v${{ env.STARKNET_RELAYER }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,3 +145,6 @@ dmypy.json | |
|
||
# vscode project settings | ||
.vscode/ | ||
|
||
# go workspace settings | ||
go.work |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Changelog Index | ||
|
||
This repository adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
Chainlink-Starknet contains a number of projects, all individually versioned and released. Please consult the following changelogs for more information: | ||
|
||
- [@chainlink/starknet-relayer](/relayer/) | ||
- [@chainlink/starknet-gauntlet](/packages-ts/starknet-gauntlet/) | ||
- [@chainlink/starknet-gauntlet-cli](/packages-ts/starknet-gauntlet-cli/) | ||
- [@chainlink/starknet-gauntlet-ocr2](/packages-ts/starknet-gauntlet-ocr2/) | ||
- [@chainlink/starknet-gauntlet-oz](/packages-ts/starknet-gauntlet-oz/) | ||
- [@chainlink/starknet-gauntlet-argent](/packages-ts/starknet-gauntlet-argent/) | ||
- [@chainlink/starknet-gauntlet-starkgate](/packages-ts/starknet-gauntlet-starkgate/) | ||
- [@chainlink/starknet-contracts](/contracts/) | ||
- [@chainlink/starknet-integration-tests](/integration-tests/) | ||
|
||
If a project is pre-v1.0, minor version bumps may cause breaking changes. All breaking changes are noted in changelogs. | ||
|
||
Official project releases can be found here: https://github.com/smartcontractkit/chainlink-starknet/releases |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Chainlink Starknet monorepo contributing guide | ||
|
||
🎈 Thanks for your help improving the project! We are so happy to have you! | ||
|
||
## Workflow for Pull Requests | ||
|
||
🚨 Before making any non-trivial change, please first open an issue describing the change to solicit feedback and guidance. This will increase the likelihood of the PR getting merged. | ||
|
||
In general, the smaller the diff the easier it will be for us to review quickly. | ||
|
||
In order to contribute, fork the appropriate branch, for non-breaking changes to production that is `develop` and for the next release that is normally `release/X.X.X` branch. | ||
|
||
Additionally, if you are writing a new feature, please ensure you add appropriate test cases. | ||
|
||
Follow the [Getting Started](./docs/getting-started.md) guide to set up your local development environment. | ||
|
||
We recommend using the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format on commit messages. | ||
|
||
Unless your PR is ready for immediate review and merging, please mark it as 'draft' (or simply do not open a PR yet). | ||
|
||
**Bonus:** Add comments to the diff under the "Files Changed" tab on the PR page to clarify any sections where you think we might have questions about the approach taken. | ||
|
||
### Response time: | ||
|
||
We aim to provide a meaningful response to all PRs and issues from external contributors within 5 business days. | ||
|
||
### Changesets | ||
|
||
We use [changesets](https://github.com/atlassian/changesets) to manage releases of our various packages. | ||
You _must_ include a `changeset` file in your PR when making a change that would require a new package release. | ||
|
||
Adding a `changeset` file is easy: | ||
|
||
1. Navigate to the root of the monorepo. | ||
2. Run `yarn changeset`. You'll be prompted to select packages to include in the changeset. Use the arrow keys to move the cursor up and down, hit the `spacebar` to select a package, and hit `enter` to confirm your selection. Select _all_ packages that require a new release as a result of your PR. | ||
3. Once you hit `enter` you'll be prompted to decide whether your selected packages need a `major`, `minor`, or `patch` release. We follow the [Semantic Versioning](https://semver.org/) scheme. Please avoid using `major` releases for any packages that are still in version `0.y.z`. | ||
4. Commit your changeset and push it into your PR. The changeset bot will notice your changeset file and leave a little comment to this effect on GitHub. | ||
|
||
### Rebasing | ||
|
||
We use the `git rebase` command to keep our commit history tidy. | ||
Rebasing is an easy way to make sure that each PR includes a series of clean commits with descriptive commit messages | ||
See [this tutorial](https://docs.gitlab.com/ee/topics/git/git_rebase.html) for a detailed explanation of `git rebase` and how you should use it to maintain a clean commit history. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "@chainlink/starknet-integration-tests", | ||
"version": "0.0.1", | ||
"license": "MIT", | ||
"dependencies": {}, | ||
"devDependencies": {} | ||
} |
This file contains 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
Oops, something went wrong.