-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into m_develop_main
- Loading branch information
Showing
67 changed files
with
6,820 additions
and
4,669 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,6 @@ | ||
node_modules | ||
artifacts | ||
cache | ||
coverage | ||
gasReporterOutput.json | ||
**/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,51 @@ | ||
module.exports = { | ||
env: { | ||
browser: false, | ||
es2021: true, | ||
mocha: true, | ||
node: true, | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
extends: [ | ||
"standard", | ||
"plugin:prettier/recommended", | ||
"plugin:node/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:security/recommended", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features | ||
sourceType: "module", // Allows for the use of imports | ||
}, | ||
rules: { | ||
"node/no-unsupported-features/es-syntax": [ | ||
"error", | ||
{ ignores: ["modules"] }, | ||
], | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"node/no-missing-import": [ | ||
"error", | ||
{ | ||
allowModules: [], | ||
resolvePaths: ["test"], | ||
tryExtensions: [".js", ".json", ".node", ".ts"], | ||
}, | ||
], | ||
camelcase: [ | ||
"error", | ||
{ | ||
allow: [".*__factory"], | ||
}, | ||
], | ||
|
||
"node/no-unsupported-features/es-syntax": "off" | ||
// "@typescript-eslint/no-explicit-any": "error", | ||
// quotes: ["error", "double"], | ||
// "no-unused-vars": "error", | ||
// "no-console": "error", | ||
// "@typescript-eslint/no-unused-vars": "error", | ||
// "@typescript-eslint/explicit-function-return-type": "error", | ||
}, | ||
}; |
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,31 @@ | ||
## SDK Version | ||
|
||
<!-- Please specify the version of the SDK you are using. --> | ||
|
||
## Description | ||
<!-- Briefly describe the bug you are facing. --> | ||
|
||
## Steps to Reproduce | ||
|
||
1. | ||
2. | ||
3. | ||
<!-- Add any other context or screenshots about the feature request here. --> | ||
|
||
## Expected Behavior | ||
<!-- Describe what you expected to happen. --> | ||
|
||
## Actual Behavior | ||
<!-- Describe what actually happened. Include any error tracebacks if possible. --> | ||
|
||
## Possible Fix (optional) | ||
<!-- If you have an idea on how to fix this, please share! --> | ||
|
||
## Environment Details | ||
|
||
- **Browser Version**: | ||
- **Node.js Version**: | ||
- **NPM/Yarn Version**: | ||
|
||
## Additional Context | ||
<!-- Add any other details or context about the bug here. --> |
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,22 @@ | ||
--- | ||
name: Feature Request | ||
about: Propose an enhancement or new feature to improve the project | ||
title: "Feature: <Your Feature>" | ||
labels: feature-request, needs-review | ||
assignees: "" | ||
--- | ||
|
||
**Problem You're Facing** | ||
<!-- Briefly describe the problem you're trying to solve or the limitation you've encountered. --> | ||
|
||
**Proposed Solution** | ||
<!-- What would you like to see happen? --> | ||
|
||
**Alternatives Considered** | ||
<!-- Any other solutions or features you've considered. --> | ||
|
||
## Use Cases | ||
<!-- Help us understand the broader context by providing some typical use cases where this feature would be helpful. --> | ||
|
||
**Additional Info** | ||
<!-- Provide any additional details, context, or screenshots about the feature request. --> |
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,33 @@ | ||
# Summary | ||
|
||
<!-- Please provide a brief summary of the changes and the issue number this PR addresses. --> | ||
|
||
Related Issue: # (issue number) | ||
|
||
## Change Type | ||
|
||
- [ ] Bug Fix | ||
- [ ] Refactor | ||
- [ ] New Feature | ||
- [ ] Breaking Change | ||
- [ ] Documentation Update | ||
- [ ] Performance Improvement | ||
- [ ] Other | ||
|
||
# Checklist | ||
|
||
- [ ] My code follows this project's style guidelines | ||
- [ ] I've reviewed my own code | ||
- [ ] I've added comments for any hard-to-understand areas | ||
- [ ] I've updated the documentation if necessary | ||
- [ ] My changes generate no new warnings | ||
- [ ] I've added tests that prove my fix is effective or my feature works | ||
- [ ] All unit tests pass locally with my changes | ||
- [ ] Any dependent changes have been merged and published | ||
|
||
# Additional Information | ||
<!-- Any additional information or context about the PR. --> | ||
|
||
# Branch Naming | ||
<!-- Make sure your branch name follows the pattern: `features/`, `fixes/`, or `releases/`. --> | ||
<!-- **Note**: The person creating the PR is responsible for merging and deleting the branch. Ensure the code has been tested, commented, linted, and documents updated if needed. --> |
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,22 @@ | ||
name: Mark Inactive Issues and PRs | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/stale@v5 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-issue-message: "This issue has been inactive for 30 days. It will be closed due to inactivity. If this issue is still relevant, please comment to keep it open. Alternatively, you can create a new issue with updated information." | ||
stale-pr-message: "This PR has been inactive for 30 days. If it's waiting for a review, please reach out to the team. Otherwise, please update the PR or it will be closed due to inactivity." | ||
stale-issue-label: "inactive-issue" | ||
stale-pr-label: "inactive-pr" | ||
days-before-stale: 30 |
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,80 @@ | ||
name: Test workflow | ||
on: push | ||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-key: ${{ steps.cache-keys.outputs.cache-key }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get cache key | ||
id: cache-keys | ||
run: echo "::set-output name=cache-key::$(echo ${{ runner.os }}-node-$(cat yarn.lock | sha256sum | cut -d' ' -f1))" | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ steps.cache-keys.outputs.cache-key }} | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
lint: | ||
name: Lint sources | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ needs.setup.outputs.cache-key }} | ||
|
||
- name: Lint sources | ||
run: yarn lint:sol | ||
|
||
unit_test: | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ needs.setup.outputs.cache-key }} | ||
|
||
- name: Create a fake .secret file | ||
run: echo "primary twist rack vendor diagram image used route theme frown either will" > .secret | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Install foundry dependencies | ||
run: forge install | ||
|
||
- name: Build Typechain and Foundry | ||
run: yarn build | ||
|
||
- name: Run Forge and Hardhat Tests | ||
run: yarn 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 |
---|---|---|
@@ -1,4 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn lint |
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,42 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"rules": { | ||
"compiler-version": ["error", "0.8.17"], | ||
"func-visibility": ["warn", { "ignoreConstructors": true }], | ||
"reentrancy": "error", | ||
"state-visibility": "error", | ||
"quotes": ["error", "double"], | ||
"const-name-snakecase": "error", | ||
"contract-name-camelcase": "error", | ||
"event-name-camelcase": "error", | ||
"func-name-mixedcase": "error", | ||
"func-param-name-mixedcase": "error", | ||
"modifier-name-mixedcase": "error", | ||
"private-vars-leading-underscore": ["off", { "strict": true }], | ||
"use-forbidden-name": "error", | ||
"var-name-mixedcase": "error", | ||
"imports-on-top": "error", | ||
"ordering": "error", | ||
"visibility-modifier-order": "error", | ||
"code-complexity": ["error", 7], | ||
"function-max-lines": ["error", 80], | ||
"max-line-length": ["warn", 120], | ||
"max-states-count": ["error", 15], | ||
"no-empty-blocks": "error", | ||
"no-unused-vars": "error", | ||
"payable-fallback": "off", | ||
"constructor-syntax": "error", | ||
"explicit-types": "error", | ||
"no-unused-import": "error", | ||
"one-contract-per-file": "warn", | ||
"not-rely-on-time": "off", | ||
"reason-string": "warn", | ||
"no-inline-assembly": "off", | ||
"avoid-low-level-calls": "off", | ||
"custom-errors": "off", | ||
"no-complex-fallback": "off", | ||
"no-global-import": "off", | ||
"avoid-tx-origin": "off" | ||
}, | ||
"plugins": ["prettier"] | ||
} |
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 | ||
contracts/test | ||
contracts/libs | ||
contracts/token | ||
contracts/references |
Oops, something went wrong.