mirror of
https://github.com/tornadocash/tornado-core.git
synced 2025-06-25 06:30:39 -04:00
change dir structure
This commit is contained in:
parent
0c6e638852
commit
23543683f3
12 changed files with 24 additions and 84 deletions
21
scripts/compileHasher.js
Normal file
21
scripts/compileHasher.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Generates Hasher artifact at compile-time using Truffle's external compiler
|
||||
// mechanism
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const genContract = require('circomlib/src/mimcsponge_gencontract.js')
|
||||
|
||||
// where Truffle will expect to find the results of the external compiler
|
||||
// command
|
||||
const outputPath = path.join(__dirname, '..', 'build', 'Hasher.json')
|
||||
|
||||
function main() {
|
||||
const contract = {
|
||||
contractName: 'Hasher',
|
||||
abi: genContract.abi,
|
||||
bytecode: genContract.createCode('mimcsponge', 220),
|
||||
}
|
||||
|
||||
fs.writeFileSync(outputPath, JSON.stringify(contract))
|
||||
}
|
||||
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue