-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add empty project skeleton #1
Merged
Merged
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f5a8614
feat: add empty project skeleton
kkirka c0d0876
chore: apply @coreyar's suggestions for CI
kkirka 8199448
feat: conditionally exclude external deployments when exporting
coreyar 8eaea1f
ci: exit script on error
coreyar 75ccbc0
ci: remove continue on error
coreyar 8a5651a
Revert "ci: exit script on error"
coreyar 4ed2b22
fix: use deployer private key for account exports
coreyar a688476
ci: fix failing steps to support skeleton setup
coreyar 1d5e285
chore: prettier
coreyar 4fa1829
feat: updating deployment files
coreyar 4fd87c2
docs: add readme
kkirka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,14 @@ | ||
# true or false | ||
FORK=false | ||
FORKED_NETWORK=bscmainnet | ||
|
||
## Archive nodes | ||
#ARCHIVE_NODE_bsctestnet=https://bsc-testnet.nodereal.io/v1/<YOUR_KEY_HERE> | ||
#ARCHIVE_NODE_bscmainnet=https://bsc-mainnet.nodereal.io/v1/<YOUR_KEY_HERE> | ||
#ARCHIVE_NODE_bscmainnet=http://127.0.0.1:1248 | ||
#ARCHIVE_NODE_sepolia=https://ethereum-sepolia.blockpi.network/v1/rpc/public | ||
#ARCHIVE_NODE_ethereum=https://eth-mainnet.nodereal.io/v1/<YOUR_KEY_HERE> | ||
#ARCHIVE_NODE_ethereum=http://127.0.0.1:1248 | ||
|
||
ETHERSCAN_API_KEY= | ||
REPORT_GAS= |
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 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": [ | ||
"tests", | ||
"docgen-templates", | ||
"commitlint.config.js" | ||
] | ||
} |
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,6 @@ | ||
node_modules | ||
artifacts | ||
cache | ||
coverage | ||
dist | ||
typechain |
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,53 @@ | ||
{ | ||
"env": { | ||
"browser": false, | ||
"es2021": true, | ||
"mocha": true, | ||
"node": true, | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"project": ".eslint-tsconfig", | ||
}, | ||
"root": true, | ||
"rules": { | ||
"@typescript-eslint/no-floating-promises": [ | ||
"error", | ||
{ | ||
"ignoreIIFE": true, | ||
"ignoreVoid": true, | ||
}, | ||
], | ||
"@typescript-eslint/no-inferrable-types": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"argsIgnorePattern": "_", | ||
"varsIgnorePattern": "_", | ||
}, | ||
], | ||
"spaced-comment": [ | ||
"error", | ||
"always", | ||
{ | ||
"line": { | ||
"exceptions": ["-", "+"], | ||
"markers": ["=", "!", "/"], | ||
}, | ||
"block": { | ||
"exceptions": ["-", "+"], | ||
"markers": ["=", "!", ":", "::"], | ||
"balanced": true | ||
} | ||
} | ||
] | ||
} | ||
} |
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 @@ | ||
* text eol=lf | ||
*.pdf binary | ||
*.sol linguist-language=Solidity |
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,38 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
cache: "yarn" | ||
|
||
- name: Install dependencies | ||
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error | ||
run: YARN_CHECKSUM_BEHAVIOR=update yarn | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.VENUS_TOOLS_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GIT_AUTHOR_NAME: Venus Tools | ||
GIT_AUTHOR_EMAIL: tools@venus.io | ||
GIT_COMMITTER_NAME: Venus Tools | ||
GIT_COMMITTER_EMAIL: tools@venus.io | ||
run: yarn semantic-release |
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,126 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: [main, develop] | ||
pull_request: | ||
branches: [main, develop] | ||
workflow_dispatch: | ||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
|
||
- name: Install dependencies | ||
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error | ||
run: YARN_CHECKSUM_BEHAVIOR=update yarn | ||
|
||
- name: Check linting of solidity and typescript | ||
run: yarn lint | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-22.04 | ||
env: | ||
NODE_OPTIONS: --max-old-space-size=4096 | ||
continue-on-error: ${{ matrix.experimental }} | ||
steps: | ||
kkirka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
|
||
- name: Install deps | ||
run: yarn | ||
|
||
- name: Run hardhat compile and tests coverage | ||
run: | | ||
source .env.example | ||
yarn hardhat:compile && yarn hardhat:coverage | ||
- name: Code Coverage Report | ||
uses: irongut/CodeCoverageSummary@v1.3.0 | ||
with: | ||
filename: coverage/**/cobertura-coverage.xml | ||
badge: true | ||
fail_below_min: false | ||
format: markdown | ||
hide_branch_rate: false | ||
hide_complexity: true | ||
indicators: true | ||
output: both | ||
thresholds: "50 80" | ||
|
||
- name: Add Coverage PR Comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
recreate: true | ||
path: code-coverage-results.md | ||
|
||
deploy: | ||
kkirka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
name: Deploy | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
|
||
- name: Install dependencies | ||
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error | ||
run: YARN_CHECKSUM_BEHAVIOR=update yarn | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Verify deployments work | ||
run: yarn hardhat deploy | ||
|
||
export-deployments: | ||
kkirka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
token: ${{ secrets.VENUS_TOOLS_TOKEN }} | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
|
||
- name: Install dependencies | ||
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error | ||
run: YARN_CHECKSUM_BEHAVIOR=update yarn | ||
|
||
- name: Export deployments | ||
continue-on-error: true | ||
run: | | ||
kkirka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
for NETWORK in bsctestnet bscmainnet ethereum sepolia opbnbtestnet opbnbmainnet; do | ||
EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json | ||
jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json | ||
done | ||
yarn prettier | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "feat: updating deployment files" | ||
file_pattern: "deployments/*.json" |
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,18 @@ | ||
node_modules | ||
.env | ||
coverage | ||
coverage.json | ||
typechain | ||
typechain-types | ||
|
||
# Hardhat files | ||
cache | ||
artifacts | ||
|
||
# yarn | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/releases | ||
!.yarn/plugins | ||
!.yarn/sdks | ||
!.yarn/versions |
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 @@ | ||
hardhat.config.ts | ||
scripts | ||
test |
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 @@ | ||
node_modules | ||
artifacts | ||
cache | ||
coverage* | ||
gasReporterOutput.json | ||
dist | ||
typechain | ||
contracts/third-party |
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,14 @@ | ||
{ | ||
"arrowParens": avoid, | ||
"bracketSpacing": true, | ||
"endOfLine": "auto", | ||
"importOrder": ["module-alias/register", "<THIRD_PARTY_MODULES>", "^[./]"], | ||
"importOrderParserPlugins": ["typescript"], | ||
"importOrderSeparation": true, | ||
"importOrderSortSpecifiers": true, | ||
"printWidth": 120, | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"trailingComma": all, | ||
"overrides": [{ "files": "*.sol", "options": { "tabWidth": 4 } }], | ||
} |
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,85 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "conventionalcommits", | ||
"releaseRules": [ | ||
{ | ||
"breaking": true, | ||
"release": "major" | ||
}, | ||
{ | ||
"type": "build", | ||
"release": false | ||
}, | ||
{ | ||
"type": "chore", | ||
"release": false | ||
}, | ||
{ | ||
"type": "docs", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "ci", | ||
"release": false | ||
}, | ||
{ | ||
"type": "feat", | ||
"release": "minor" | ||
}, | ||
{ | ||
"type": "fix", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "refactor", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "test", | ||
"release": false | ||
} | ||
], | ||
"parserOpts": { | ||
"noteKeywords": [ | ||
"BREAKING CHANGE", | ||
"BREAKING CHANGES" | ||
] | ||
} | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "conventionalcommits" | ||
} | ||
], | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"npmPublish": true | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"package.json", | ||
"CHANGELOG.md" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
] | ||
], | ||
"branches": [ | ||
{ | ||
"name": "main" | ||
}, | ||
{ | ||
"name": "develop", | ||
"prerelease": "dev" | ||
} | ||
] | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This job could probable get skipped and turned back on when tests are added