-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* setup hardhart project * bumped up to 0.8x and using latest oz deps * setup unit tests * checked in yarn release * code review fix * deleted flattened geyser files
- Loading branch information
1 parent
82e761c
commit 2c08ab2
Showing
54 changed files
with
156,772 additions
and
42,368 deletions.
There are no files selected for viewing
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 @@ | ||
node_modules | ||
artifacts | ||
cache | ||
coverage |
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,68 +1,46 @@ | ||
module.exports = { | ||
"extends": ["google", "standard", "plugin:prettier/recommended", "mocha"], | ||
"env": { | ||
"mocha": true, | ||
"node": true, | ||
"es6": true, | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 8, | ||
}, | ||
"globals": { | ||
"artifacts": true, | ||
"assert": true, | ||
"contract": true, | ||
"expect": true, | ||
"Promise": true, | ||
"web3": true, | ||
}, | ||
"plugins": ["prettier", "spellcheck", "chai-friendly"], | ||
"rules": { | ||
"prettier/prettier": 0, | ||
"require-jsdoc": 0, | ||
"semi": [2, "always"], | ||
"prefer-const": 2, | ||
"no-unused-expressions": 0, | ||
"chai-friendly/no-unused-expressions": 2, | ||
"spellcheck/spell-checker": [ | ||
2, | ||
{ | ||
"comments": true, | ||
"strings": true, | ||
"identifiers": true, | ||
"lang": "en_US", | ||
"skipWords": [ | ||
// misc | ||
"deployer", "http", "https", "github", "chai", "argv", "evm", | ||
"jsonrpc", "timestamp", "uint256", "erc20", "bignumber", "lodash", | ||
"arg", "npm", "seedrandom", "eql", "sinon", "yaml", "posix", "promisify", | ||
"passcode", "geth", "rpc", "rpcmsg","stdev", "stochasm", "aggregator", | ||
"whitelist", "ethereum", "npx", "testrpc", "solc", "whitelisted", | ||
"unlockable", "openzeppelin", "checksum", "unstakes", "txfee", | ||
"relayer", "gsn", 'struct', | ||
|
||
// shorthand | ||
"eth", "args", "util", "utils", "msg", "prev", "bal", | ||
"init", "params", "mul", "async", "vals", "fns", "addrs", | ||
"fns", "num", "dev", "pre","abi", "gte","rnd", "chk", "bals", "lte", | ||
"addr", "perc", "opcode", "aprox", "str", | ||
|
||
// project-specific | ||
"rebase", "gons", "frg", "rng", "blockchain", "minlot", | ||
"redemptions", "rebased", "ganache", "ethclient", | ||
"bytecode", "Binance", "ampl", "unstake", "unstaked", "unstaking", | ||
"ampls", "staker", "ownable", | ||
|
||
// names | ||
"nithin", "naguib" | ||
], | ||
"skipIfMatch": [ | ||
"http(s)?://[^s]*", | ||
"Sha3", | ||
"0x*", | ||
], | ||
"minLength": 3 | ||
} | ||
], | ||
}, | ||
env: { | ||
browser: false, | ||
es2021: true, | ||
mocha: true, | ||
node: true, | ||
}, | ||
plugins: ["@typescript-eslint", "no-only-tests", "unused-imports"], | ||
extends: ["standard", "plugin:prettier/recommended", "plugin:node/recommended"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
warnOnUnsupportedTypeScriptVersion: false, | ||
}, | ||
rules: { | ||
"node/no-unsupported-features/es-syntax": ["error", { ignores: ["modules"] }], | ||
"node/no-missing-import": [ | ||
"error", | ||
{ | ||
tryExtensions: [".ts", ".js", ".json"], | ||
}, | ||
], | ||
"node/no-unpublished-import": [ | ||
"error", | ||
{ | ||
allowModules: [ | ||
"hardhat", | ||
"ethers", | ||
"@openzeppelin/upgrades-core", | ||
"chai", | ||
"@nomicfoundation/hardhat-ethers", | ||
"@nomicfoundation/hardhat-chai-matchers", | ||
"@nomicfoundation/hardhat-verify", | ||
"@nomicfoundation/hardhat-toolbox", | ||
"@openzeppelin/hardhat-upgrades", | ||
"solidity-coverage", | ||
"hardhat-gas-reporter", | ||
"dotenv", | ||
], | ||
}, | ||
], | ||
"no-only-tests/no-only-tests": "error", | ||
"unused-imports/no-unused-imports": "error", | ||
"unused-imports/no-unused-vars": ["warn", { vars: "all" }], | ||
}, | ||
}; |
File renamed without changes.
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 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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 @@ | ||
name: Nightly | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [20.x] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Setup Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Uses node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install | ||
run: yarn install --immutable | ||
|
||
- name: Seutp | ||
run: yarn compile | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Test | ||
run: yarn coverage | ||
|
||
- name: spot-contracts report coverage | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: "./coverage/lcov.info" |
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 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Setup Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Uses node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install | ||
run: yarn install --immutable | ||
|
||
- name: Seutp | ||
run: yarn compile | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Test | ||
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,76 +1,16 @@ | ||
# Generated files | ||
build | ||
dist | ||
node_modules | ||
.env | ||
|
||
### Emacs ## | ||
*~ | ||
\#*\# | ||
.\#* | ||
# Hardhat files | ||
/cache | ||
/artifacts | ||
|
||
# | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
# | ||
# TypeChain files | ||
/typechain | ||
/typechain-types | ||
|
||
# User-specific stuff: | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/dictionaries | ||
# solidity-coverage files | ||
/coverage | ||
/coverage.json | ||
|
||
# Sensitive or high-churn files: | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
|
||
# Gradle: | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
|
||
# CMake | ||
cmake-build-debug/ | ||
cmake-build-release/ | ||
|
||
# Mongo Explorer plugin: | ||
.idea/**/mongoSettings.xml | ||
|
||
## File-based project format: | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Cursive Clojure plugin | ||
.idea/replstate.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
# NodeJS dependencies | ||
node_modules/* | ||
|
||
# ES-Lint | ||
.eslintcache | ||
|
||
# Solidity-Coverage | ||
allFiredEvents | ||
scTopics | ||
scDebugLog | ||
coverage.json | ||
coverage/ | ||
coverageEnv/ | ||
|
||
.openzeppelin |
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 @@ | ||
20 |
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,12 @@ | ||
# folders | ||
artifacts/ | ||
build/ | ||
cache/ | ||
coverage/ | ||
dist/ | ||
lib/ | ||
node_modules/ | ||
typechain/ | ||
|
||
# files | ||
coverage.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,17 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"endOfLine":"auto", | ||
"printWidth": 90, | ||
"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 |
---|---|---|
@@ -1,7 +1,3 @@ | ||
module.exports = { | ||
norpc: true, | ||
testCommand: 'npm test', | ||
compileCommand: 'npm run compile-contracts', | ||
copyPackages: ['openzeppelin-eth', 'openzeppelin-solidity', 'uFragments'], | ||
skipFiles: ['IStaking.sol'], | ||
skipFiles: ["_test", "_interfaces", "_external"], | ||
}; |
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,7 +1,11 @@ | ||
{ | ||
"extends": "solhint:default", | ||
"extends": "solhint:recommended", | ||
"rules": { | ||
"compiler-version": ["warn", "^0.8.0"], | ||
"func-visibility": ["warn", { "ignoreConstructors": true }], | ||
"reason-string": ["warn", { "maxLength": 64 }], | ||
"not-rely-on-time": "off", | ||
"indent": ["warn", 4] | ||
"max-states-count": ["warn", 17], | ||
"custom-errors": "off" | ||
} | ||
} |
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 @@ | ||
node_modules |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.