From 210e32579d0de3398c258d3319aa6659488dfd1f Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Wed, 15 Jul 2020 23:09:57 -0700 Subject: [PATCH] add some debug --- test/BalancerContractHandler.ts | 9 +++++---- test/unit/balancer/Balancer.test.ts | 8 +++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/test/BalancerContractHandler.ts b/test/BalancerContractHandler.ts index f4260e6f..9333413c 100644 --- a/test/BalancerContractHandler.ts +++ b/test/BalancerContractHandler.ts @@ -57,18 +57,19 @@ export class BalancerContractHandler { public async SdeployContracts(minter: string) { let estGas - + console.log('Trying to deploy SPool') + console.log("Bytecode size:"+this.poolBytecode.length) estGas = await this.pool .deploy({ data: this.poolBytecode, arguments: [] }) .estimateGas({ from: minter, gas: 9007199254740991 }, function (err, estGas) { - if (err) console.log('DeployContracts: ' + err) + if (err) console.log('Pool deploy estimate gas: ' + err) return estGas }) // deploy the contract and get it's address - console.log('estGas:' + estGas) + console.log('Pool estGas:' + estGas) this.poolAddress = await this.pool .deploy({ data: this.poolBytecode, @@ -82,7 +83,7 @@ export class BalancerContractHandler { .then(function (contract) { return contract.options.address }) - + console.log("Pool deployed:"+this.poolAddress) estGas = await this.factory .deploy({ data: this.factoryBytecode, diff --git a/test/unit/balancer/Balancer.test.ts b/test/unit/balancer/Balancer.test.ts index 04745f58..f17010db 100644 --- a/test/unit/balancer/Balancer.test.ts +++ b/test/unit/balancer/Balancer.test.ts @@ -89,14 +89,12 @@ describe('Balancer flow', () => { ) await OceanPoolContracts.getAccounts() owner = OceanPoolContracts.accounts[0] - console.log('Owner:' + owner) + await OceanPoolContracts.deployContracts(owner) OceanPoolFactoryAddress = OceanPoolContracts.factoryAddress assert(OceanPoolFactoryAddress !== null) }) - - - it('Deploy SFactory', async () => { + it('Deploy Spool/SFactory', async () => { const SContracts = new BalancerContractHandler( SFactory.abi, SFactory.bytecode, @@ -106,7 +104,7 @@ describe('Balancer flow', () => { ) await SContracts.getAccounts() owner = SContracts.accounts[0] - console.log('Owner:' + owner) + await SContracts.SdeployContracts(owner) const SFactoryAddress = SContracts.factoryAddress assert(SFactoryAddress !== null)