Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Jul 29, 2021
0 parents commit 7601f0a
Show file tree
Hide file tree
Showing 21 changed files with 10,627 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier', 'mocha-no-only'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
rules: {
'comma-spacing': ['error', { before: false, after: true }],
'prettier/prettier': 'error',
'mocha-no-only/mocha-no-only': ['error'],
},
};
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches: '*'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 14
- name: Cache
uses: actions/cache@v2
id: cache
with:
path: '**/node_modules'
key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn --immutable
if: steps.cache.outputs.cache-hit != 'true'
- name: Lint
run: yarn lint

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 14
- name: Cache
uses: actions/cache@v2
id: cache
with:
path: '**/node_modules'
key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn --immutable
if: steps.cache.outputs.cache-hit != 'true'
- name: Build
run: yarn build

# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Install node
# uses: actions/setup-node@v1
# with:
# node-version: 14
# - name: Cache
# uses: actions/cache@v2
# id: cache
# with:
# path: "**/node_modules"
# key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
# - name: Install
# run: yarn --immutable
# if: steps.cache.outputs.cache-hit != 'true'
# - name: Compile
# run: yarn build
# - name: Test
# run: yarn test

env:
CI: true
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
yarn-debug.log*
yarn-error.log*

# IDE
.vscode/

# Dependency directories
node_modules/

# Yarn
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*

# Hardhat artifacts
artifacts/
cache/

# Build artifacts
dist/

# typechain artifacts
typechain/
6 changes: 6 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extension": ["ts"],
"timeout": 20000,
"recursive": "test",
"slow": 500
}
29 changes: 29 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"bracketSpacing": true,
"explicitTypes": "always",
"newline-before-return": true,
"no-duplicate-variable": [true, "check-parameters"],
"no-var-keyword": true,
"printWidth": 120,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,

"overrides": [
{
"files": "*.sol",
"options": {
"singleQuote": false,
"tabWidth": 4
}
},
{
"files": "*.md",
"options": {
"printWidth": 80
}
}
]
}
14 changes: 14 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "solhint:recommended",
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error",
"max-line-length": ["error", 120],
"func-param-name-mixedcase": "error",
"modifier-name-mixedcase": "error",
"private-vars-leading-underscore": "error",
"reason-string": ["error", {"maxLength": 64}],
"func-visibility": ["error", {"ignoreConstructors": true}],
"compiler-version": ["off"]
}
}
1 change: 1 addition & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
contracts/test/
Loading

0 comments on commit 7601f0a

Please sign in to comment.