mirror of
https://github.com/arnaucube/circomlib.git
synced 2026-02-06 18:56:43 +01:00
Some format and fixes from the last version
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
const TestRPC = require("ganache-cli");
|
const ganache = require("ganache-cli");
|
||||||
const Web3 = require("web3");
|
const Web3 = require("web3");
|
||||||
const chai = require("chai");
|
const chai = require("chai");
|
||||||
const mimcGenContract = require("../src/mimcsponge_gencontract.js");
|
const mimcGenContract = require("../src/mimcsponge_gencontract.js");
|
||||||
@@ -17,20 +17,10 @@ describe("MiMC Sponge Smart contract test", () => {
|
|||||||
let accounts;
|
let accounts;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
testrpc = TestRPC.server({
|
web3 = new Web3(ganache.provider(), null, { transactionConfirmationBlocks: 1 });
|
||||||
ws: true,
|
|
||||||
gasLimit: 5800000,
|
|
||||||
total_accounts: 10,
|
|
||||||
});
|
|
||||||
|
|
||||||
testrpc.listen(8546, "127.0.0.1");
|
|
||||||
|
|
||||||
web3 = new Web3("ws://127.0.0.1:8546");
|
|
||||||
accounts = await web3.eth.getAccounts();
|
accounts = await web3.eth.getAccounts();
|
||||||
});
|
});
|
||||||
|
|
||||||
after(async () => testrpc.close());
|
|
||||||
|
|
||||||
it("Should deploy the contract", async () => {
|
it("Should deploy the contract", async () => {
|
||||||
const C = new web3.eth.Contract(mimcGenContract.abi);
|
const C = new web3.eth.Contract(mimcGenContract.abi);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user