mirror of
https://github.com/tornadocash/tornado-relayer.git
synced 2024-10-01 08:25:37 -04:00
20 lines
641 B
JavaScript
20 lines
641 B
JavaScript
const fs = require('fs')
|
|
const { Controller } = require('tornado-cash-anonymity-mining')
|
|
const { web3 } = require('./instances')
|
|
const { farmingAddress, farmingMerkleTreeHeight } = require('../config')
|
|
|
|
const contract = web3.eth.contract(require('../abis/mining.abi.json'), farmingAddress)
|
|
const provingKeys = {
|
|
treeUpdateCircuit: require('.../keys/TreeUpdate.json'),
|
|
treeUpdateProvingKey: fs.readFileSync('../keys/TreeUpdate_proving_key.bin').buffer,
|
|
}
|
|
const controller = new Controller({
|
|
contract,
|
|
provingKeys,
|
|
merkleTreeHeight: farmingMerkleTreeHeight,
|
|
})
|
|
|
|
|
|
// await controller.init()
|
|
// await controller.treeUpdate(commitment)
|