From 517d4ae97722faaca748cd3b86dd125e8c15e1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9B=E6=B6=9B=E6=B6=9B?= <15700059289@163.com> Date: Wed, 6 Jan 2021 10:17:43 +0800 Subject: [PATCH] update crowdpooling test context --- test/utils/CrowdPoolingContext.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/test/utils/CrowdPoolingContext.ts b/test/utils/CrowdPoolingContext.ts index fd3475d..c8710a9 100644 --- a/test/utils/CrowdPoolingContext.ts +++ b/test/utils/CrowdPoolingContext.ts @@ -76,18 +76,21 @@ export class CPContext { [ cloneFactory.options.address, dvmTemplate.options.address, - "0x0000000000000000000000000000000000000000", - feeRateModel.options.address, - "0x0000000000000000000000000000000000000000", - defaultGasSource.options.address, this.Maintainer, feeRateModel.options.address, - permissionManager.options.address ] ) this.CP = await contracts.newContract(contracts.CROWD_POOLING_NAME) - this.BASE.methods.mint(this.CP.options.address, config.totalBase).send(this.sendParam(this.Deployer)) + this.BASE.methods.mint(this.CP.options.address, config.totalBase).send(this.sendParam(this.Deployer)); + + await this.Web3.eth.sendTransaction( { + from: this.Deployer, + to:this.CP.options.address, + gas: process.env["COVERAGE"] ? 10000000000 : 7000000, + gasPrice: mweiStr("1000"), + value: decimalStr("0.2"), + }); this.CP.methods.init( [ @@ -132,4 +135,4 @@ export class CPContext { async mintTestToken(to: string, token: Contract, amount: string) { await token.methods.mint(to, amount).send(this.sendParam(this.Deployer)); } -} \ No newline at end of file +}