@@ -23,7 +23,7 @@ const MAX_INT128 = 2n ** 127n - 1n;
23
23
const MAX_UINT128 = 2n ** 128n - 1n ;
24
24
25
25
// @TODO : test reentrancy attacks
26
- describe ( "StakingVault" , ( ) => {
26
+ describe . only ( "StakingVault" , ( ) => {
27
27
let vaultOwner : HardhatEthersSigner ;
28
28
let operator : HardhatEthersSigner ;
29
29
let stranger : HardhatEthersSigner ;
@@ -32,7 +32,6 @@ describe("StakingVault", () => {
32
32
let vaultHubSigner : HardhatEthersSigner ;
33
33
34
34
let stakingVault : StakingVault ;
35
- let depositLogistics : DepositLogistics ;
36
35
let stakingVaultImplementation : StakingVault ;
37
36
let depositContract : DepositContract__MockForStakingVault ;
38
37
let vaultHub : VaultHub__MockForStakingVault ;
@@ -50,7 +49,7 @@ describe("StakingVault", () => {
50
49
51
50
before ( async ( ) => {
52
51
[ vaultOwner , operator , elRewardsSender , stranger ] = await ethers . getSigners ( ) ;
53
- [ stakingVault , vaultHub , vaultFactory , stakingVaultImplementation , depositContract , depositLogistics ] =
52
+ [ stakingVault , vaultHub , vaultFactory , stakingVaultImplementation , depositContract ] =
54
53
await deployStakingVaultBehindBeaconProxy ( ) ;
55
54
ethRejector = await ethers . deployContract ( "EthRejector" ) ;
56
55
@@ -84,25 +83,13 @@ describe("StakingVault", () => {
84
83
} ) ;
85
84
86
85
it ( "reverts on construction if the vault hub address is zero" , async ( ) => {
87
- await expect (
88
- ethers . deployContract ( "StakingVault" , [ ZeroAddress , depositContractAddress ] , {
89
- libraries : {
90
- DepositLogistics : depositLogistics ,
91
- } ,
92
- } ) ,
93
- )
86
+ await expect ( ethers . deployContract ( "StakingVault" , [ ZeroAddress , depositContractAddress ] ) )
94
87
. to . be . revertedWithCustomError ( stakingVaultImplementation , "ZeroArgument" )
95
88
. withArgs ( "_vaultHub" ) ;
96
89
} ) ;
97
90
98
91
it ( "reverts on construction if the deposit contract address is zero" , async ( ) => {
99
- await expect (
100
- ethers . deployContract ( "StakingVault" , [ vaultHubAddress , ZeroAddress ] , {
101
- libraries : {
102
- DepositLogistics : depositLogistics ,
103
- } ,
104
- } ) ,
105
- )
92
+ await expect ( ethers . deployContract ( "StakingVault" , [ vaultHubAddress , ZeroAddress ] ) )
106
93
. to . be . revertedWithCustomError ( stakingVaultImplementation , "ZeroArgument" )
107
94
. withArgs ( "_beaconChainDepositContract" ) ;
108
95
} ) ;
@@ -479,18 +466,12 @@ describe("StakingVault", () => {
479
466
VaultFactory__MockForStakingVault ,
480
467
StakingVault ,
481
468
DepositContract__MockForStakingVault ,
482
- DepositLogistics ,
483
469
]
484
470
> {
485
471
// deploying implementation
486
472
const vaultHub_ = await ethers . deployContract ( "VaultHub__MockForStakingVault" ) ;
487
473
const depositContract_ = await ethers . deployContract ( "DepositContract__MockForStakingVault" ) ;
488
- const depositLogistics = await ethers . deployContract ( "DepositLogistics" ) ;
489
- const stakingVaultImplementation_ = await ethers . deployContract ( "StakingVault" , [ vaultHub_ , depositContract_ ] , {
490
- libraries : {
491
- DepositLogistics : depositLogistics ,
492
- } ,
493
- } ) ;
474
+ const stakingVaultImplementation_ = await ethers . deployContract ( "StakingVault" , [ vaultHub_ , depositContract_ ] ) ;
494
475
495
476
// deploying factory/beacon
496
477
const vaultFactory_ = await ethers . deployContract ( "VaultFactory__MockForStakingVault" , [
@@ -509,7 +490,7 @@ describe("StakingVault", () => {
509
490
const stakingVault_ = StakingVault__factory . connect ( vaultCreatedEvent . args . vault , vaultOwner ) ;
510
491
expect ( await stakingVault_ . owner ( ) ) . to . equal ( await vaultOwner . getAddress ( ) ) ;
511
492
512
- return [ stakingVault_ , vaultHub_ , vaultFactory_ , stakingVaultImplementation_ , depositContract_ , depositLogistics ] ;
493
+ return [ stakingVault_ , vaultHub_ , vaultFactory_ , stakingVaultImplementation_ , depositContract_ ] ;
513
494
}
514
495
515
496
function computeDepositDataRoot ( creds : string , pubkey : string , signature : string , size : string ) {
0 commit comments