Skip to content
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

[DRAFT] Release 2.0.0 #120

Draft
wants to merge 14 commits into
base: mainnet
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .circleci/config.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .editorconfig
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
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export/
deployments/
artifacts/
cache/
coverage/
node_modules/
typechain/
22 changes: 22 additions & 0 deletions .eslintrc.js
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',
},
};
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*.sol linguist-language=Solidity
* text=auto eol=lf
19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE

This file was deleted.

17 changes: 0 additions & 17 deletions .github/PULL_REQUEST_TEMPLATE

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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: 12.18.0

- 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 coverage

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
20 changes: 17 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
# Node / NPM / Yarn
node_modules
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Build / test artifacts
coverage
dist
coverage*
artifacts/
cache/
dist/
coverageEnv
coverage.json
.coveralls.yml
.coverage_artifacts
.coverage_contracts
*output.log
typechain/
contractsInfo.json
deployments/hardhat
deployments/localhost

# Configuration files
*.env
Expand All @@ -30,3 +36,11 @@ build/development
local_*
bindings.go
types

.vscode/*
!.vscode/settings.json.default
!.vscode/launch.json.default
!.vscode/extensions.json.default

.yalc
yalc.lock
44 changes: 0 additions & 44 deletions .npmignore

This file was deleted.

7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export/
deployments/
artifacts/
cache/
coverage/
node_modules/
typechain/
15 changes: 15 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
singleQuote: true,
bracketSpacing: false,
overrides: [
{
files: '*.sol',
options: {
printWidth: 120,
tabWidth: 4,
singleQuote: false,
explicitTypes: 'always',
},
},
],
};
33 changes: 0 additions & 33 deletions .solcover.js

This file was deleted.

20 changes: 20 additions & 0 deletions .solhint.json
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}]
}
}
7 changes: 7 additions & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export/
deployments/
artifacts/
cache/
coverage/
node_modules/
typechain/
10 changes: 10 additions & 0 deletions .vscode/extensions.json.default
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": []
}
14 changes: 14 additions & 0 deletions .vscode/launch.json.default
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}"
}
]
}
20 changes: 18 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
{
"solidity.packageDefaultDependenciesContractsDirectory": ""
}
"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"]
}
Loading