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 bc56f97
Showing
29 changed files
with
910 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,3 @@ | ||
{ | ||
"presets": ["env","es2015", "stage-2", "stage-3"] | ||
} |
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,37 @@ | ||
# Javascript Node CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | ||
# | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
# specify the version you desire here | ||
- image: circleci/node:8.4.0 | ||
|
||
# Specify service dependencies here if necessary | ||
# CircleCI maintains a library of pre-built images | ||
# documented at https://circleci.com/docs/2.0/circleci-images/ | ||
# - image: circleci/mongo:3.4.4 | ||
|
||
working_directory: ~/repo | ||
|
||
steps: | ||
- checkout | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: npm install | ||
|
||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package.json" }} | ||
|
||
# run tests! | ||
- run: npm run test-ci |
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,2 @@ | ||
RINKEBY_PRIVATE_KEY="df7ebe6c9601adf4e911faac9da547686e6453a11cf13264d895fc2979a6bec2" | ||
ROPSTEN_PRIVATE_KEY="192f175c2f5e5a9437fdbc12043404763f96ccbcd6fc32b1d61dbb61e14e6f34" |
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,4 @@ | ||
tmp/** | ||
build/** | ||
node_modules/** | ||
contracts/** |
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,102 @@ | ||
module.exports = { | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
generators: true, | ||
experimentalObjectRestSpread: true | ||
}, | ||
sourceType: 'module', | ||
allowImportExportEverywhere: false | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:import/errors', | ||
'plugin:import/warnings', | ||
'plugin:promise/recommended', | ||
'plugin:security/recommended' | ||
], | ||
plugins: [ | ||
'compat', | ||
'prettier', | ||
'promise', | ||
'security' | ||
], | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx', '.json', '.css'], | ||
paths: './src' | ||
} | ||
}, | ||
polyfills: ['fetch', 'promises'] | ||
}, | ||
env: { | ||
node: true, | ||
}, | ||
globals: { | ||
__DEV__: true, | ||
__dirname: true, | ||
after: true, | ||
afterAll: true, | ||
afterEach: true, | ||
artifacts: true, | ||
assert: true, | ||
before: true, | ||
beforeAll: true, | ||
beforeEach: true, | ||
console: true, | ||
contract: true, | ||
describe: true, | ||
expect: true, | ||
fetch: true, | ||
global: true, | ||
it: true, | ||
module: true, | ||
process: true, | ||
Promise: true, | ||
require: true, | ||
setTimeout: true, | ||
test: true, | ||
xdescribe: true, | ||
xit: true, | ||
web3: true | ||
}, | ||
rules: { | ||
'compat/compat': 'error', | ||
'import/first': 'error', | ||
'import/no-anonymous-default-export': 'error', | ||
'import/no-unassigned-import': 'error', | ||
'import/prefer-default-export': 'error', | ||
'import/no-named-as-default': 'off', | ||
'import/no-unresolved': 'error', | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
semi: false, | ||
singleQuote: true, | ||
trailingComma: 'none' | ||
} | ||
], | ||
'promise/avoid-new': 'off', | ||
'security/detect-object-injection': 'off', | ||
'arrow-body-style': 'off', | ||
'lines-between-class-members': ['error', 'always'], | ||
'no-console': ['warn', { allow: ['assert'] }], | ||
'no-shadow': 'error', | ||
'no-var': 'error', | ||
|
||
'padding-line-between-statements': [ | ||
'error', | ||
{ blankLine: 'always', prev: 'class', next: '*' }, | ||
{ blankLine: 'always', prev: 'do', next: '*' }, | ||
{ blankLine: 'always', prev: '*', next: 'export' }, | ||
{ blankLine: 'always', prev: 'for', next: '*' }, | ||
{ blankLine: 'always', prev: 'if', next: '*' }, | ||
{ blankLine: 'always', prev: 'switch', next: '*' }, | ||
{ blankLine: 'always', prev: 'try', next: '*' }, | ||
{ blankLine: 'always', prev: 'while', next: '*' }, | ||
{ blankLine: 'always', prev: 'with', next: '*' } | ||
], | ||
'prefer-const': 'error' | ||
} | ||
} |
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 @@ | ||
*.sol linguist-language=Solidity |
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,35 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,106 @@ | ||
|
||
# Created by https://www.gitignore.io/api/solidity,soliditytruffle | ||
|
||
### Solidity ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless | ||
|
||
### SolidityTruffle ### | ||
# depedencies | ||
node_modules | ||
|
||
# testing | ||
|
||
# production | ||
build | ||
build_webpack | ||
|
||
# misc | ||
.DS_Store | ||
npm-debug.log | ||
.truffle-solidity-loader | ||
.vagrant/** | ||
blockchain/geth/** | ||
blockchain/keystore/** | ||
blockchain/history | ||
|
||
#truffle | ||
.tern-port | ||
yarn.lock | ||
package-lock.json | ||
|
||
|
||
# End of https://www.gitignore.io/api/solidity,soliditytruffle | ||
|
||
test-results/ |
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 @@ | ||
package.json |
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,5 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "none" | ||
} |
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,6 @@ | ||
module.exports = { | ||
port: 9545, | ||
testrpcOptions: | ||
'-p 9545 -m "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"', | ||
copyNodeModules: false | ||
} |
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,2 @@ | ||
node_modules | ||
contracts/Migrations.sol |
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,27 @@ | ||
{ | ||
"extends": "solium:all", | ||
"plugins": ["security"], | ||
"rules": { | ||
"arg-overflow": "error", | ||
"array-declarations": "error", | ||
"blank-lines": "error", | ||
"camelcase": "error", | ||
"comma-whitespace": "error", | ||
"deprecated-suicide": "error", | ||
"function-whitespace": "error", | ||
"imports-on-top": "error", | ||
"indentation": ["error", 4], | ||
"lbrace": "error", | ||
"mixedcase": "error", | ||
"no-empty-blocks": "error", | ||
"no-unused-vars": "error", | ||
"operator-whitespace": "error", | ||
"pragma-on-top": "error", | ||
"quotes": ["error", "double"], | ||
"security/no-inline-assembly": "off", | ||
"semicolon-whitespace": "error", | ||
"uppercase": "off", | ||
"variable-declarations": "error", | ||
"whitespace": "error" | ||
} | ||
} |
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,21 @@ | ||
sudo: required | ||
language: node_js | ||
node_js: | ||
- "9" | ||
cache: | ||
directories: | ||
- node_modules | ||
install: | ||
- npm install -g truffle@beta | ||
- npm install -g ganache-cli | ||
- npm install | ||
script: | ||
- npm run lint | ||
- npm run solium | ||
- npm run ganache | ||
- sleep 5 | ||
- truffle migrate --network test | ||
- truffle test | ||
- npm run stop | ||
after_script: | ||
- npm run coverage && cat coverage/lcov.info | coveralls |
Oops, something went wrong.