From 4539719da37a7a18d15ec194592a144d7499745d Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 19 Oct 2021 11:09:04 +0300 Subject: [PATCH] initialize proxy during deploy --- test/full.test.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/full.test.js b/test/full.test.js index e3effc9..c157145 100644 --- a/test/full.test.js +++ b/test/full.test.js @@ -50,18 +50,20 @@ describe('TornadoPool', function () { l1ChainId, ) + const { data } = await tornadoPoolImpl.populateTransaction.initialize( + MINIMUM_WITHDRAWAL_AMOUNT, + MAXIMUM_DEPOSIT_AMOUNT, + ) const proxy = await deploy( 'CrossChainUpgradeableProxy', tornadoPoolImpl.address, gov.address, - [], + data, amb.address, l1ChainId, ) - const TornadoPool = await ethers.getContractFactory('TornadoPool') - const tornadoPool = TornadoPool.attach(proxy.address) - await tornadoPool.initialize(MINIMUM_WITHDRAWAL_AMOUNT, MAXIMUM_DEPOSIT_AMOUNT) + const tornadoPool = tornadoPoolImpl.attach(proxy.address) await token.approve(tornadoPool.address, utils.parseEther('10000'))