@@ -29,6 +29,12 @@ contract EigenWrappingTests is Test {
29
29
/// @notice event emitted when a minter status is modified
30
30
event IsMinterModified (address indexed minterAddress , bool newStatus );
31
31
32
+ // EVENTS FROM Eigen.sol
33
+ /// @notice event emitted when bEIGEN tokens are wrapped into EIGEN
34
+ event TokenWrapped (address indexed account , uint amount );
35
+ /// @notice event emitted when EIGEN tokens are unwrapped into bEIGEN
36
+ event TokenUnwrapped (address indexed account , uint amount );
37
+
32
38
modifier filterAddress (address fuzzedAddress ) {
33
39
vm.assume (! fuzzedOutAddresses[fuzzedAddress]);
34
40
_;
@@ -54,11 +60,11 @@ contract EigenWrappingTests is Test {
54
60
bEIGEN.initialize (minter1);
55
61
56
62
// set minters (for future minting if needed)
57
- vm.expectEmit (true , false , false , false );
63
+ vm.expectEmit (true , true , true , true );
58
64
emit IsMinterModified (minter1, true );
59
65
bEIGEN.setIsMinter (minter1, true );
60
66
61
- vm.expectEmit (true , false , false , false );
67
+ vm.expectEmit (true , true , true , true );
62
68
emit IsMinterModified (minter2, true );
63
69
bEIGEN.setIsMinter (minter2, true );
64
70
@@ -69,13 +75,17 @@ contract EigenWrappingTests is Test {
69
75
vm.startPrank (minter1);
70
76
bEIGEN.mint (minter1, totalSupply / 2 );
71
77
bEIGEN.approve (address (eigen), totalSupply / 2 );
78
+ vm.expectEmit (true , true , true , true );
79
+ emit TokenWrapped (minter1, totalSupply / 2 );
72
80
eigen.wrap (totalSupply / 2 );
73
81
vm.stopPrank ();
74
82
75
83
// Mint and wrap tokens for minter2
76
84
vm.startPrank (minter2);
77
85
bEIGEN.mint (minter2, totalSupply / 2 );
78
86
bEIGEN.approve (address (eigen), totalSupply / 2 );
87
+ vm.expectEmit (true , true , true , true );
88
+ emit TokenWrapped (minter2, totalSupply / 2 );
79
89
eigen.wrap (totalSupply / 2 );
80
90
vm.stopPrank ();
81
91
@@ -106,6 +116,8 @@ contract EigenWrappingTests is Test {
106
116
// unwrap amount should be less than minter1 balance
107
117
unwrapAmount = unwrapAmount % minter1Balance;
108
118
vm.prank (unwrapper);
119
+ vm.expectEmit (true , false , false , false );
120
+ emit TokenUnwrapped (unwrapper, unwrapAmount);
109
121
eigen.unwrap (unwrapAmount);
110
122
111
123
// check total supply and balance changes
@@ -145,6 +157,8 @@ contract EigenWrappingTests is Test {
145
157
// approve bEIGEN
146
158
bEIGEN.approve (address (eigen), wrapAmount);
147
159
// wrap
160
+ vm.expectEmit (true , false , false , false );
161
+ emit TokenWrapped (wrapper, wrapAmount);
148
162
eigen.wrap (wrapAmount);
149
163
vm.stopPrank ();
150
164
0 commit comments