Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit 5f58d6b

Browse files
committed
Improve project infrastructure
1 parent ac4ecc0 commit 5f58d6b

25 files changed

Lines changed: 841 additions & 8799 deletions

.env.example

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# network specific node uri : `"ETH_NODE_URI_" + networkName.toUpperCase()`
2+
ETH_NODE_URI_MAINNET=https://eth-mainnet.alchemyapi.io/v2/<apiKey>
3+
ETH_NODE_URI=https://{{networkName}}.infura.io/v3/<apiKey>
4+
5+
6+
# coinmarketcap api key for gas report
7+
COINMARKETCAP_API_KEY=
8+
TENDERLY_USERNAME=
9+
ETHERSCAN_KEY=
10+
11+
12+
# LOCAL
13+
ETH_NODE_URI_LOCALHOST=http://localhost:9545
14+
MNEMONIC_LOCALHOST=test test test test test test test test test test test junk
15+
16+
# LOCAL OPTIMISM
17+
ETH_NODE_URI_OPTIMISTIC_LOCALHOST=http://localhost:8545
18+
MNEMONIC_OPTIMISTIC_LOCALHOST=test test test test test test test test test test test junk

.eslintignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export/
2+
deployments/
3+
artifacts/
4+
cache/
5+
coverage/
6+
node_modules/
7+
package.json
8+
typechain/
9+
dapp_test/test.sol
10+
_lib/
11+
.dappp
12+
*.json
13+
.yalc

.eslintrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
parserOptions: {
5+
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
6+
sourceType: 'module', // Allows for the use of imports
7+
},
8+
env: {
9+
commonjs: true,
10+
},
11+
plugins: ['@typescript-eslint'],
12+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
13+
rules: {
14+
'no-empty': 'off',
15+
'no-empty-function': 'off',
16+
'@typescript-eslint/no-empty-function': 'off',
17+
},
18+
};

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
node-version: ${{ matrix.node-version }}
2020

2121
- run: npm install
22-
- run: npm run test
22+
- run: npm run gas

.gitignore

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
1-
node_modules
2-
31
#Hardhat files
4-
cache
5-
artifacts
2+
cache/
3+
artifacts/
4+
dist/
65

76
# local deployments
8-
local.deployments.json
7+
local.deployments.json
8+
9+
coverage*
10+
typechain/
11+
12+
.vscode/*
13+
!.vscode/settings.json.default
14+
!.vscode/launch.json.default
15+
!.vscode/extensions.json.default
16+
17+
node_modules/
18+
.env
19+
20+
.yalc
21+
yalc.lock
22+
yarn-error.log
23+
package-lock.json
24+
25+
contractsInfo.json
26+
deployments/hardhat
27+
deployments/localhost

.mocharc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use strict';
2+
process.env.TS_NODE_FILES = true;
3+
module.exports = {
4+
'allow-uncaught': true,
5+
diff: true,
6+
extension: ['ts'],
7+
recursive: true,
8+
reporter: 'spec',
9+
require: ['ts-node/register', 'hardhat/register'], // ['ts-node/register/transpile-only'], (for yarn link <plugin>)
10+
slow: 300,
11+
spec: 'test/**/*.test.ts',
12+
timeout: 20000,
13+
ui: 'bdd',
14+
watch: false,
15+
'watch-files': ['src/**/*.sol', 'test/**/*.ts'],
16+
};

.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
hardhat.config.ts
2+
scripts
3+
utils
4+
test

.prettierignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export/
2+
deployments/
3+
artifacts/
4+
cache/
5+
coverage/
6+
node_modules/
7+
typechain/
8+
dapp_test/test.sol
9+
_lib/
10+
*.json
11+
.yalc

.prettierrc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
singleQuote: true,
3+
bracketSpacing: false,
4+
printWidth: 120,
5+
overrides: [
6+
{
7+
files: '*.sol',
8+
options: {
9+
printWidth: 120,
10+
tabWidth: 4,
11+
singleQuote: false,
12+
explicitTypes: 'always',
13+
},
14+
},
15+
],
16+
plugins: [require.resolve('prettier-plugin-solidity')],
17+
};

.solhint.json

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
11
{
2-
"extends": "solhint:default"
2+
"extends": "solhint:recommended",
3+
"plugins": [
4+
"prettier"
5+
],
6+
"rules": {
7+
"prettier/prettier": [
8+
"error",
9+
{
10+
"endOfLine": "auto"
11+
}
12+
],
13+
"code-complexity": [
14+
"error",
15+
7
16+
],
17+
"compiler-version": [
18+
"error",
19+
"^0.8.9"
20+
],
21+
"const-name-snakecase": "off",
22+
"func-name-mixedcase": "off",
23+
"constructor-syntax": "error",
24+
"func-visibility": [
25+
"error",
26+
{
27+
"ignoreConstructors": true
28+
}
29+
],
30+
"not-rely-on-time": "off",
31+
"reason-string": [
32+
"warn",
33+
{
34+
"maxLength": 64
35+
}
36+
]
37+
}
338
}

0 commit comments

Comments
 (0)