fix indentation

This commit is contained in:
Alexey 2020-04-09 22:12:45 +03:00
parent a772d76829
commit 0edd6d237c
3 changed files with 140 additions and 97 deletions

View File

@ -2,7 +2,7 @@ root = true
[*] [*]
indent_style = space indent_style = space
indent_size = 4 indent_size = 2
end_of_line = lf end_of_line = lf
charset = utf-8 charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true

39
.eslintrc.json Normal file
View File

@ -0,0 +1,39 @@
{
"env": {
"node": true,
"browser": true,
"es6": true,
"mocha": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
],
"object-curly-spacing": [
"error",
"always"
],
"require-await": "error"
}
}

View File

@ -79,7 +79,7 @@ function createDeposit(amount, pubkey) {
inputs: [createZeroUtxo(keypair), createZeroUtxo(keypair)], inputs: [createZeroUtxo(keypair), createZeroUtxo(keypair)],
outputs: [createOutput(amount, pubkey), createZeroUtxo(keypair)], // todo shuffle outputs: [createOutput(amount, pubkey), createZeroUtxo(keypair)], // todo shuffle
} }
return tx; return tx
} }
async function buildMerkleTree() { async function buildMerkleTree() {
@ -99,7 +99,7 @@ async function insertOutput(tree, output) {
} }
async function deposit() { async function deposit() {
const amount = 1e6; const amount = 1e6
const tree = await buildMerkleTree() const tree = await buildMerkleTree()
const oldRoot = await tree.root() const oldRoot = await tree.root()
const keypair = randomKeypair() const keypair = randomKeypair()
@ -157,6 +157,10 @@ async function deposit() {
console.log(`Receipt ${receipt.transactionHash}`) console.log(`Receipt ${receipt.transactionHash}`)
} }
async function transact() {
}
async function main() { async function main() {
web3 = new Web3(new Web3.providers.HttpProvider(RPC_URL, { timeout: 5 * 60 * 1000 }), null, { transactionConfirmationBlocks: 1 }) web3 = new Web3(new Web3.providers.HttpProvider(RPC_URL, { timeout: 5 * 60 * 1000 }), null, { transactionConfirmationBlocks: 1 })
circuit = require('../build/circuits/transaction.json') circuit = require('../build/circuits/transaction.json')