styling final

This commit is contained in:
Alexey 2019-07-16 23:49:45 +03:00
parent 7eaa5fcb4f
commit b0c896c681
9 changed files with 14 additions and 7 deletions

View File

@ -1,6 +1,7 @@
{ {
"env": { "env": {
"node": true, "node": true,
"browser": true,
"es6": true, "es6": true,
"mocha": true "mocha": true
}, },

6
cli.js
View File

@ -140,19 +140,19 @@ if (inBrowser) {
switch (args[0]) { switch (args[0]) {
case 'deposit': case 'deposit':
if (args.length === 1) { if (args.length === 1) {
init().then(async () => deposit()).then(() => process.exit(0)).catch(err => {console.log(err); process.exit(1)}) init().then(() => deposit()).then(() => process.exit(0)).catch(err => {console.log(err); process.exit(1)})
} }
else else
printHelp(1) printHelp(1)
break break
case 'balance': case 'balance':
if (args.length === 2 && /^0x[0-9a-fA-F]{40}$/.test(args[1])) { if (args.length === 2 && /^0x[0-9a-fA-F]{40}$/.test(args[1])) {
init().then(async () => getBalance(args[1])).then(() => process.exit(0)).catch(err => {console.log(err); process.exit(1)}) init().then(() => getBalance(args[1])).then(() => process.exit(0)).catch(err => {console.log(err); process.exit(1)})
} }
break break
case 'withdraw': case 'withdraw':
if (args.length === 3 && /^0x[0-9a-fA-F]{128}$/.test(args[1]) && /^0x[0-9a-fA-F]{40}$/.test(args[2])) { if (args.length === 3 && /^0x[0-9a-fA-F]{128}$/.test(args[1]) && /^0x[0-9a-fA-F]{40}$/.test(args[2])) {
init().then(async () => withdraw(args[1], args[2])).then(() => process.exit(0)).catch(err => {console.log(err); process.exit(1)}) init().then(() => withdraw(args[1], args[2])).then(() => process.exit(0)).catch(err => {console.log(err); process.exit(1)})
} }
else else
printHelp(1) printHelp(1)

View File

@ -1,3 +1,4 @@
/* global artifacts */
const Migrations = artifacts.require('Migrations') const Migrations = artifacts.require('Migrations')
module.exports = function(deployer) { module.exports = function(deployer) {

View File

@ -1,3 +1,4 @@
/* global artifacts */
const path = require('path') const path = require('path')
const mimcGenContract = require('circomlib/src/mimcsponge_gencontract.js') const mimcGenContract = require('circomlib/src/mimcsponge_gencontract.js')

View File

@ -1,3 +1,4 @@
/* global artifacts */
require('dotenv').config() require('dotenv').config()
const Verifier = artifacts.require('Verifier') const Verifier = artifacts.require('Verifier')

View File

@ -1,3 +1,4 @@
/* global artifacts */
require('dotenv').config({ path: '../.env' }) require('dotenv').config({ path: '../.env' })
const Mixer = artifacts.require('Mixer') const Mixer = artifacts.require('Mixer')
const Verifier = artifacts.require('Verifier') const Verifier = artifacts.require('Verifier')

View File

@ -13,7 +13,8 @@
"test": "npx truffle test", "test": "npx truffle test",
"migrate": "npx truffle migrate --network kovan --reset", "migrate": "npx truffle migrate --network kovan --reset",
"migrate:dev": "npx truffle migrate --network development --reset", "migrate:dev": "npx truffle migrate --network development --reset",
"browserify": "npx browserify cli.js -o index.js --exclude worker_threads" "browserify": "npx browserify cli.js -o index.js --exclude worker_threads",
"eslint": "npx eslint ."
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",

View File

@ -1,4 +1,5 @@
let bigInt = require('snarkjs/src/bigint') let bigInt = require('snarkjs/src/bigint')
const utils = require('../scripts/utils')
const express = require('express') const express = require('express')
const app = express() const app = express()