-
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.
- Loading branch information
1 parent
03fe0ae
commit 4fd74e3
Showing
16 changed files
with
6,007 additions
and
3,603 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,30 @@ | ||
runs: | ||
using: 'Composite' | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time | ||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 8.5.1 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: | | ||
**/node_modules | ||
${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- |
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,56 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
types: [opened] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
setup: | ||
name: Setup | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: pnpm setup composite | ||
uses: ./.github/actions/pnpm-setup | ||
|
||
- name: Install Deps | ||
run: pnpm install --frozen-lockfile | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
needs: | ||
- setup | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: pnpm setup composite | ||
uses: ./.github/actions/pnpm-setup | ||
|
||
- name: build | ||
run: pnpm build | ||
|
||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
needs: | ||
- setup | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: pnpm setup composite | ||
uses: ./.github/actions/pnpm-setup | ||
|
||
- name: lint | ||
uses: reviewdog/action-eslint@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
eslint_flags: "--max-warnings=0 src/**/{*.js,*.jsx,*.ts,*.tsx,}" | ||
fail_on_error: "true" | ||
reporter: github-pr-review |
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit "$1" |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) microverse inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,37 @@ | ||
# Hardhat Google Cloud KMS Signer | ||
|
||
This plugin signs Ethereum transaction using KMS key during deployments. | ||
|
||
- Inspired by [@rumblefishdev/hardhat-kms-signer](https://github.com/rumblefishdev/hardhat-kms-signer) | ||
|
||
## Usage | ||
|
||
It's assumed that you have AWS access configured and your role perform kms:sign using KMS key. | ||
|
||
In `hardhat.config.ts` do: | ||
|
||
``` | ||
import "@microverse-dev/hardhat-gcp-kms-signer"; | ||
... | ||
const config: HardhatUserConfig = { | ||
... | ||
networks: { | ||
goerli: { | ||
url: "https://goerli.infura.io/v3/{infura-key}", | ||
kmsResourceName: "projects/{project}/locations/asia1/keyRings/{key-ring-name}/cryptoKeys/{key-name}/cryptoKeyVersions/{version}", | ||
chainId: 5, | ||
}, | ||
} | ||
... | ||
} | ||
``` | ||
|
||
## License | ||
|
||
- hardhat: MIT - See [LICENSE][hardhet-license] for more information. | ||
- @microverse-dev/hardhat-gcp-kms-signer: MIT - See [LICENSE][license] for more information. | ||
|
||
[hardhet-license]: https://github.com/NomicFoundation/hardhat/blob/main/LICENSE | ||
[license]: LICENSE |
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,3 @@ | ||
module.exports = { | ||
extends: ["@commitlint/config-conventional"], | ||
}; |
Empty file.
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 |
---|---|---|
@@ -1,19 +1,25 @@ | ||
{ | ||
"name": "@microverse-dev/hardhat-gcp-kms-signer", | ||
"version": "0.1.0", | ||
"name": "@microverse-dev/hardhat-kms-signer", | ||
"version": "0.0.0", | ||
"description": "Hardhat plugin for GCP KMS Signer", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"author": "h-hara@microverse.co.jp", | ||
"author": "microverse inc", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:microverse-dev/hardhat-gcp-kms-signer.git" | ||
"url": "[email protected]:microverse-dev/hardhat-kms-signer.git" | ||
}, | ||
"publishConfig": { | ||
"registry": "https://npm.pkg.github.com/", | ||
"access": "restricted" | ||
"access": "public", | ||
"registry": "https://registry.npmjs.org" | ||
}, | ||
"release": { | ||
"branches": [ | ||
"main" | ||
] | ||
}, | ||
"packageManager": "[email protected]", | ||
"files": [ | ||
"dist" | ||
], | ||
|
@@ -25,10 +31,17 @@ | |
"key-encoder": "2.0.3" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.7.1", | ||
"@commitlint/config-conventional": "^17.7.0", | ||
"@semantic-release/changelog": "^6.0.3", | ||
"@semantic-release/git": "^10.0.1", | ||
"@trivago/prettier-plugin-sort-imports": "4.0.0", | ||
"@types/node": "18.11.18", | ||
"@types/bn.js": "^5.1.1", | ||
"@types/node": "18.17.6", | ||
"hardhat": "2.12.6", | ||
"prettier": "2.8.3", | ||
"husky": "^8.0.3", | ||
"prettier": "2.8.8", | ||
"semantic-release": "^21.1.1", | ||
"ts-node": "10.9.1", | ||
"typescript": "4.9.5" | ||
}, | ||
|
@@ -37,6 +50,9 @@ | |
"hardhat": "2.12.0" | ||
}, | ||
"scripts": { | ||
"build": "tsc" | ||
"prepare": "husky install", | ||
"preinstall": "npx only-allow pnpm", | ||
"build": "tsc", | ||
"semantic:publish": "sh ./publish.sh" | ||
} | ||
} |
Oops, something went wrong.