mirror of
https://github.com/tornadocash/tornado-core.git
synced 2025-12-15 16:39:24 -05:00
code style
This commit is contained in:
parent
a7fedcd7ea
commit
7eaa5fcb4f
8 changed files with 137 additions and 138 deletions
|
|
@ -1,5 +1,5 @@
|
|||
const Migrations = artifacts.require("Migrations");
|
||||
const Migrations = artifacts.require('Migrations')
|
||||
|
||||
module.exports = function(deployer) {
|
||||
deployer.deploy(Migrations);
|
||||
};
|
||||
deployer.deploy(Migrations)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,23 @@
|
|||
const path = require('path');
|
||||
const path = require('path')
|
||||
|
||||
const mimcGenContract = require('circomlib/src/mimcsponge_gencontract.js');
|
||||
const Artifactor = require('truffle-artifactor');
|
||||
const mimcGenContract = require('circomlib/src/mimcsponge_gencontract.js')
|
||||
const Artifactor = require('truffle-artifactor')
|
||||
|
||||
const SEED = 'mimcsponge';
|
||||
const SEED = 'mimcsponge'
|
||||
|
||||
|
||||
module.exports = function(deployer) {
|
||||
return deployer.then( async () => {
|
||||
const contractsDir = path.join(__dirname, '..', 'build/contracts');
|
||||
let artifactor = new Artifactor(contractsDir);
|
||||
let mimcContractName = 'MiMC';
|
||||
const contractsDir = path.join(__dirname, '..', 'build/contracts')
|
||||
let artifactor = new Artifactor(contractsDir)
|
||||
let mimcContractName = 'MiMC'
|
||||
await artifactor.save({
|
||||
contractName: mimcContractName,
|
||||
abi: mimcGenContract.abi,
|
||||
unlinked_binary: mimcGenContract.createCode(SEED, 220),
|
||||
}).then(async () => {
|
||||
const MiMC = artifacts.require(mimcContractName)
|
||||
await deployer.deploy(MiMC)
|
||||
})
|
||||
.then(async () => {
|
||||
const MiMC = artifacts.require(mimcContractName);
|
||||
await deployer.deploy(MiMC);
|
||||
});
|
||||
});
|
||||
};
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require('dotenv').config()
|
||||
const Verifier = artifacts.require("Verifier");
|
||||
const Verifier = artifacts.require('Verifier')
|
||||
|
||||
module.exports = function(deployer) {
|
||||
deployer.deploy(Verifier);
|
||||
};
|
||||
deployer.deploy(Verifier)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
require('dotenv').config({ path: '../.env' })
|
||||
const Mixer = artifacts.require("Mixer");
|
||||
const Verifier = artifacts.require("Verifier");
|
||||
const MiMC = artifacts.require("MiMC");
|
||||
const Mixer = artifacts.require('Mixer')
|
||||
const Verifier = artifacts.require('Verifier')
|
||||
const MiMC = artifacts.require('MiMC')
|
||||
|
||||
|
||||
module.exports = function(deployer) {
|
||||
|
|
@ -11,6 +11,6 @@ module.exports = function(deployer) {
|
|||
const miMC = await MiMC.deployed()
|
||||
await Mixer.link(MiMC, miMC.address)
|
||||
const mixer = await deployer.deploy(Mixer, verifier.address, AMOUNT, MERKLE_TREE_HEIGHT, EMPTY_ELEMENT)
|
||||
console.log("Mixer's address ", mixer.address)
|
||||
console.log('Mixer\'s address ', mixer.address)
|
||||
})
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue