Skip to content

Commit

Permalink
gsn v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Pedemonte committed Aug 11, 2020
1 parent 7d05de4 commit 03b847e
Show file tree
Hide file tree
Showing 259 changed files with 19,042 additions and 16,249 deletions.
68 changes: 25 additions & 43 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,46 @@ jobs: # a collection of steps
build: # runs not using Workflows must have a `build` job as entry point
working_directory: ~/gls # directory where steps will run
docker: # run the steps with Docker
- image: tabookey/eth-tools:1.0
- image: circleci/node:13.11.0

steps: # a collection of executable commands
- checkout # special step to check out source code to working directory

- restore_cache: # special step to restore the dependency cache
key: dependency-cache-{{ checksum "package.json" }}-yarn1
key: dependency-cache-{{ checksum "package.json" }}-yarn2
- run:
name: yarn-install
command: yarn

- save_cache: # special step to save the dependency cache
key: dependency-cache-{{ checksum "package.json" }}-yarn1
key: dependency-cache-{{ checksum "package.json" }}-yarn2
paths:
- ./node_modules

- restore_cache: # special step to restore the dependency cache
key: dependency-cache-go-get1
- run:
name: preload go-sources
command: make -C server go-get
- save_cache: # special step to save the dependency cache
key: dependency-cache-go-get1
paths:
- ./server/src/github.com/ethereum
- ./server/src/code.cloudfoundry.org

- run:
name: compile
command: make

- run:
name: lint
command: npm run lint

- run: # run tests
name: test
command: npm test | tee /tmp/test-results.log

- restore_cache: # special cache for coverage test
key: last-coverage
paths:
- ./coverage

- run: # run coverage. update "coverage/covsig.txt" if successful run.
# use last coverage report if no test/contract was changed.
name: coverage
command: npm run coverage-if-changed

- save_cache: # special cache for coverage test
key: last-coverage
paths:
- ./coverage

- store_artifacts: # special step to save test results as as artifact
path: ./coverage
- store_artifacts:
path: ./coverage.html
command: yarn test | tee /tmp/test-results.log

#coverage is broken (doesn't cover all contracts). disabled for now..
# - restore_cache: # special cache for coverage test
# key: last-coverage
# paths:
# - ./coverage

# - run: # run coverage. update "coverage/covsig.txt" if successful run.
# # use last coverage report if no test/contract was changed.
# name: coverage
# command: yarn run coverage-if-changed

# - save_cache: # special cache for coverage test
# key: last-coverage
# paths:
# - ./coverage

# - store_artifacts: # special step to save test results as as artifact
# path: ./coverage
# - store_artifacts:
# path: ./coverage.html

- store_test_results: # special step to upload test results for display in Test Summary
path: /tmp/test-results.log
Expand Down
75 changes: 56 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,59 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"jest": true,
"mocha": true,
"node": true,
env: {
browser: true,
es6: true,
jest: true,
mocha: true,
node: true
},
globals: {
artifacts: false,
assert: false,
contract: false,
web3: false
},
extends:
[
'standard-with-typescript'
],
// This is needed to add configuration to rules with type information
parser: '@typescript-eslint/parser',
parserOptions: {
// The 'tsconfig.eslint.json' is needed to add all JavaScript files to the project
project: ['./tsconfig.json', './tsconfig.eslint.json']
},
ignorePatterns: [
'types/truffle-contracts',
'dist/'
],
rules: {
'no-console': 'off'
},
overrides: [
{
files: ['*.test.js', '*.test.ts'],
rules: {
'no-unused-expressions': 'off',
// chai assertions trigger this rule
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-non-null-assertion': 'off'
}
},
"globals" : {
"artifacts": false,
"assert": false,
"contract": false,
"web3": false,
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2017
},
"rules": {
"no-console": "off",
{
// otherwise it will raise an error in every JavaScript file
files: ['*.ts'],
rules: {
'@typescript-eslint/prefer-ts-expect-error': 'off',
// allow using '${val}' with numbers, bool and null types
'@typescript-eslint/restrict-template-expressions': [
'error',
{
allowNumber: true,
allowBoolean: true,
allowNullable: true
}
]
}
}
};
]
}
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#https://help.github.com/en/articles/about-code-owners

* @tabookey/dev
* @openeth-dev/dev
32 changes: 20 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
/build/
.DS_Store
/node_modules/
/server/src/github.com/ethereum/go-ethereum/
/metacoin/
tabookey-gasless-*.tgz
node_modules
/.vscode/settings.json
/.idea/
/server/pkg/darwin_amd64/
/server/pkg/linux_amd64/
/server/bin/
/serverdock/version
/.idea/*
!/.idea/dictionaries/
/secret_mnemonic
/.0x-artifacts/
/coverage/
/coverage.json
/artifacts/
/webtools/tabookey-webtools.pack.js
/singleton/
/webtools/openeth-webtools.pack.js
/.eslintcache
/src/common/interfaces/
/ganache.pid
/types/truffle-contracts/
/dist/
cache
/src/cli/compiled/
/opengsn-gsn-*.tgz
/RelayClient.ts
/RelayProvider.ts
/GSNConfigurator.ts
/GsnTestEnvironment.ts
artifacts
/yarn-error.log
/jsrelay/gsndata/
/jsrelay/dist/relayserver.js
70 changes: 70 additions & 0 deletions .idea/dictionaries/alexf.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "solhint:recommended",
"rules": {
"compiler-version": ["error","^0.6.2"],
"mark-callable-contracts": ["off"]
}
}
1 change: 1 addition & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
contracts/0x
41 changes: 0 additions & 41 deletions .vscode/launch.json

This file was deleted.

3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
MIT License

Original work Copyright (c) 2018 Tabookey
Modified work Copyright (c) 2019 IOVLabs
Copyright (c) 2020 OpenGSN

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 0 additions & 10 deletions Makefile

This file was deleted.

Loading

0 comments on commit 03b847e

Please sign in to comment.