-
Notifications
You must be signed in to change notification settings - Fork 54
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
0 parents
commit 36f87e3
Showing
89 changed files
with
164,632 additions
and
0 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,12 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
|
||
[*.sol] | ||
indent_size = 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,9 @@ | ||
# network specific node uri : `"ETH_NODE_URI_" + networkName.toUpperCase()` | ||
ETH_NODE_URI_MAINNET=https://eth-mainnet.alchemyapi.io/v2/<apiKey> | ||
# generic node uri (if no specific found) : | ||
ETH_NODE_URI=https://{{networkName}}.infura.io/v3/<apiKey> | ||
|
||
# network specific mnemonic : `"MNEMONIC_ " + networkName.toUpperCase()` | ||
MNEMONIC_MAINNET=<mnemonic for mainnet> | ||
# generic mnemonic (if no specific found): | ||
MNEMONIC=<mnemonic> |
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 @@ | ||
export/ | ||
deployments/ | ||
artifacts/ | ||
cache/ | ||
coverage/ | ||
node_modules/ | ||
package.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,22 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features | ||
sourceType: 'module', // Allows for the use of imports | ||
}, | ||
env: { | ||
commonjs: true, | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
], | ||
rules: { | ||
'no-empty': 'off', | ||
'no-empty-function': 'off', | ||
'@typescript-eslint/no-empty-function': '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 @@ | ||
* text=auto eol=lf |
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: CI | ||
on: push | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Installing dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Linting | ||
run: yarn lint | ||
|
||
- name: Formatting | ||
run: yarn format | ||
|
||
- name: Running tests | ||
run: yarn test | ||
env: | ||
MNEMONIC: ${{ secrets.MNEMONIC }} | ||
ETH_NODE_URI: ${{ secrets.ETH_NODE_URI }} | ||
ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }} |
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,19 @@ | ||
cache/ | ||
artifacts/ | ||
|
||
coverage* | ||
typechain/ | ||
|
||
.vscode/* | ||
!.vscode/settings.json.default | ||
!.vscode/launch.json.default | ||
!.vscode/extensions.json.default | ||
|
||
node_modules/ | ||
.env | ||
|
||
.yalc | ||
yalc.lock | ||
|
||
contractsInfo.json | ||
deployments/ |
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,16 @@ | ||
'use strict' | ||
process.env.TS_NODE_FILES = true | ||
module.exports = { | ||
'allow-uncaught': true, | ||
diff: true, | ||
extension: ['ts'], | ||
recursive: true, | ||
reporter: 'spec', | ||
require: ['ts-node/register', 'hardhat/register'], // ['ts-node/register/transpile-only'], (for yarn link <plugin>) | ||
slow: 300, | ||
spec: 'test/**/*.test.ts', | ||
timeout: 30000, | ||
ui: 'bdd', | ||
watch: false, | ||
'watch-files': ['src/**/*.sol', 'test/**/*.ts'], | ||
} |
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 @@ | ||
export/ | ||
deployments/ | ||
artifacts/ | ||
cache/ | ||
coverage/ | ||
node_modules/ | ||
package.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,16 @@ | ||
module.exports = { | ||
singleQuote: true, | ||
bracketSpacing: true, | ||
semi: false, | ||
overrides: [ | ||
{ | ||
files: '*.sol', | ||
options: { | ||
printWidth: 120, | ||
tabWidth: 4, | ||
singleQuote: false, | ||
explicitTypes: 'always', | ||
}, | ||
}, | ||
], | ||
} |
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,16 @@ | ||
#!/usr/bin/env node | ||
const fs = require('fs') | ||
function copyFromDefault(p) { | ||
if (!fs.existsSync(p)) { | ||
const defaultFile = `${p}.default` | ||
if (fs.existsSync(defaultFile)) { | ||
fs.copyFileSync(`${p}.default`, p) | ||
} | ||
} | ||
} | ||
|
||
;[ | ||
'.vscode/settings.json', | ||
'.vscode/extensions.json', | ||
'.vscode/launch.json', | ||
].map(copyFromDefault) |
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 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"endOfLine": "auto" | ||
} | ||
], | ||
"code-complexity": ["error", 7], | ||
"compiler-version": ["error", "^0.8.7"], | ||
"const-name-snakecase": "off", | ||
"func-name-mixedcase": "off", | ||
"constructor-syntax": "error", | ||
"func-visibility": ["error", {"ignoreConstructors": true}], | ||
"not-rely-on-time": "off", | ||
"reason-string": ["warn", {"maxLength": 64}] | ||
} | ||
} |
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,7 @@ | ||
export/ | ||
deployments/ | ||
artifacts/ | ||
cache/ | ||
coverage/ | ||
node_modules/ | ||
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,10 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"editorconfig.editorconfig", | ||
"esbenp.prettier-vscode", | ||
"hbenl.vscode-mocha-test-adapter", | ||
"juanblanco.solidity" | ||
], | ||
"unwantedRecommendations": [] | ||
} |
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 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "hardhat node", | ||
"skipFiles": ["<node_internals>/**"], | ||
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/hardhat", | ||
"args": ["node"], | ||
"cwd": "${workspaceFolder}" | ||
} | ||
] | ||
} |
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,19 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true | ||
}, | ||
"solidity.linter": "solhint", | ||
"solidity.defaultCompiler": "remote", | ||
"solidity.compileUsingRemoteVersion": "v0.8.7+commit.e28d00a7", | ||
"solidity.packageDefaultDependenciesContractsDirectory": "", | ||
"solidity.enabledAsYouTypeCompilationErrorCheck": true, | ||
"solidity.validationDelay": 1500, | ||
"solidity.packageDefaultDependenciesDirectory": "node_modules", | ||
"mochaExplorer.env": { | ||
"HARDHAT_CONFIG": "hardhat.config.ts", | ||
"HARDHAT_COMPILE": "true" | ||
}, | ||
"mochaExplorer.require": ["ts-node/register/transpile-only"] | ||
} |
Oops, something went wrong.