@@ -24,7 +24,7 @@ describe("OtcEscrow", () => {
24
24
let owner : Account ;
25
25
let indexGov : Account ;
26
26
let investor : Account ;
27
-
27
+
28
28
let deployer : DeployHelper ;
29
29
let index : IndexToken ;
30
30
let usdc : StandardTokenMock ;
@@ -33,15 +33,15 @@ describe("OtcEscrow", () => {
33
33
[
34
34
owner ,
35
35
indexGov ,
36
- investor
36
+ investor ,
37
37
] = await getAccounts ( ) ;
38
38
39
39
deployer = new DeployHelper ( owner . wallet ) ;
40
40
41
41
index = await deployer . token . deployIndexToken ( owner . address ) ;
42
42
await index . transfer ( indexGov . address , ether ( 1000 ) ) ;
43
43
usdc = await deployer . mocks . deployStandardTokenMock ( owner . address , 6 ) ;
44
- await usdc . transfer ( investor . address , BigNumber . from ( 1_000_000 * 10 ** 6 ) ) ;
44
+ await usdc . transfer ( investor . address , BigNumber . from ( 1_000_000 * 10 ** 6 ) ) ;
45
45
} ) ;
46
46
47
47
addSnapshotBeforeRestoreAfterEach ( ) ;
@@ -55,11 +55,11 @@ describe("OtcEscrow", () => {
55
55
let subjectIndexAmount : BigNumber ;
56
56
57
57
beforeEach ( async ( ) => {
58
- const now = await getLastBlockTimestamp ( )
58
+ const now = await getLastBlockTimestamp ( ) ;
59
59
subjectVestingStart = now ;
60
60
subjectVestingCliff = now . add ( 60 * 60 * 24 * 183 ) ;
61
61
subjectVestingEnd = now . add ( 60 * 60 * 24 * 547 ) ;
62
- subjectUSDCAmount = BigNumber . from ( 100_000 * 10 ** 6 ) ;
62
+ subjectUSDCAmount = BigNumber . from ( 100_000 * 10 ** 6 ) ;
63
63
subjectIndexAmount = ether ( 100 ) ;
64
64
} ) ;
65
65
@@ -102,11 +102,11 @@ describe("OtcEscrow", () => {
102
102
let subjectIndexAmount : BigNumber ;
103
103
104
104
beforeEach ( async ( ) => {
105
- const now = await getLastBlockTimestamp ( )
105
+ const now = await getLastBlockTimestamp ( ) ;
106
106
subjectVestingStart = now . add ( 10 ) ;
107
107
subjectVestingCliff = now . add ( 60 * 60 * 24 * 183 ) ;
108
108
subjectVestingEnd = now . add ( 60 * 60 * 24 * 547 ) ;
109
- subjectUSDCAmount = BigNumber . from ( 100_000 * 10 ** 6 ) ;
109
+ subjectUSDCAmount = BigNumber . from ( 100_000 * 10 ** 6 ) ;
110
110
subjectIndexAmount = ether ( 100 ) ;
111
111
112
112
subjectOtcEscrow = await deployer . token . deployOtcEscrow (
@@ -120,7 +120,7 @@ describe("OtcEscrow", () => {
120
120
usdc . address ,
121
121
index . address
122
122
) ;
123
-
123
+
124
124
await index . connect ( indexGov . wallet ) . transfer ( subjectOtcEscrow . address , subjectIndexAmount ) ;
125
125
await usdc . connect ( investor . wallet ) . approve ( subjectOtcEscrow . address , subjectUSDCAmount ) ;
126
126
} ) ;
@@ -149,6 +149,7 @@ describe("OtcEscrow", () => {
149
149
it ( "it should transfer index to the vesting contract" , async ( ) => {
150
150
await subject ( ) ;
151
151
152
+ // tslint:disable-next-line:no-null-keyword
152
153
const vestingDeployed = ( await subjectOtcEscrow . queryFilter ( subjectOtcEscrow . filters . VestingDeployed ( null ) ) ) [ 0 ] ;
153
154
const vestingAddress = vestingDeployed . args ?. vesting ;
154
155
@@ -158,6 +159,7 @@ describe("OtcEscrow", () => {
158
159
it ( "it should set the state variables of the vesting contract correctly" , async ( ) => {
159
160
await subject ( ) ;
160
161
162
+ // tslint:disable-next-line:no-null-keyword
161
163
const vestingDeployed = ( await subjectOtcEscrow . queryFilter ( subjectOtcEscrow . filters . VestingDeployed ( null ) ) ) [ 0 ] ;
162
164
const vestingAddress = vestingDeployed . args ?. vesting ;
163
165
@@ -202,7 +204,7 @@ describe("OtcEscrow", () => {
202
204
usdc . address ,
203
205
index . address
204
206
) ;
205
-
207
+
206
208
await index . connect ( indexGov . wallet ) . transfer ( subjectOtcEscrow . address , ether ( 50 ) ) ;
207
209
await usdc . connect ( investor . wallet ) . approve ( subjectOtcEscrow . address , subjectUSDCAmount ) ;
208
210
} ) ;
@@ -224,9 +226,9 @@ describe("OtcEscrow", () => {
224
226
} ) ;
225
227
226
228
context ( "when the sender does not have enough USDC" , async ( ) => {
227
-
229
+
228
230
beforeEach ( async ( ) => {
229
-
231
+
230
232
subjectOtcEscrow = await deployer . token . deployOtcEscrow (
231
233
await getRandomAddress ( ) ,
232
234
indexGov . address ,
@@ -238,7 +240,7 @@ describe("OtcEscrow", () => {
238
240
usdc . address ,
239
241
index . address
240
242
) ;
241
-
243
+
242
244
await index . connect ( indexGov . wallet ) . transfer ( subjectOtcEscrow . address , subjectIndexAmount ) ;
243
245
await usdc . connect ( investor . wallet ) . approve ( subjectOtcEscrow . address , subjectUSDCAmount ) ;
244
246
} ) ;
@@ -259,7 +261,7 @@ describe("OtcEscrow", () => {
259
261
}
260
262
261
263
it ( "should revert" , async ( ) => {
262
-
264
+
263
265
await expect ( subject ( ) ) . to . be . revertedWith ( "swap already executed" ) ;
264
266
} ) ;
265
267
} ) ;
@@ -275,11 +277,11 @@ describe("OtcEscrow", () => {
275
277
let subjectIndexAmount : BigNumber ;
276
278
277
279
beforeEach ( async ( ) => {
278
- const now = await getLastBlockTimestamp ( )
280
+ const now = await getLastBlockTimestamp ( ) ;
279
281
subjectVestingStart = now . add ( 10 ) ;
280
282
subjectVestingCliff = now . add ( 60 * 60 * 24 * 183 ) ;
281
283
subjectVestingEnd = now . add ( 60 * 60 * 24 * 547 ) ;
282
- subjectUSDCAmount = BigNumber . from ( 100_000 * 10 ** 6 ) ;
284
+ subjectUSDCAmount = BigNumber . from ( 100_000 * 10 ** 6 ) ;
283
285
subjectIndexAmount = ether ( 100 ) ;
284
286
285
287
subjectOtcEscrow = await deployer . token . deployOtcEscrow (
@@ -293,7 +295,7 @@ describe("OtcEscrow", () => {
293
295
usdc . address ,
294
296
index . address
295
297
) ;
296
-
298
+
297
299
await index . connect ( indexGov . wallet ) . transfer ( subjectOtcEscrow . address , subjectIndexAmount ) ;
298
300
await usdc . connect ( investor . wallet ) . approve ( subjectOtcEscrow . address , subjectUSDCAmount ) ;
299
301
} ) ;
@@ -337,11 +339,11 @@ describe("OtcEscrow", () => {
337
339
let subjectIndexAmount : BigNumber ;
338
340
339
341
beforeEach ( async ( ) => {
340
- const now = await getLastBlockTimestamp ( )
342
+ const now = await getLastBlockTimestamp ( ) ;
341
343
subjectVestingStart = now . add ( 10 ) ;
342
344
subjectVestingCliff = now . add ( 60 * 60 * 24 * 183 ) ;
343
345
subjectVestingEnd = now . add ( 60 * 60 * 24 * 547 ) ;
344
- subjectUSDCAmount = BigNumber . from ( 100_000 * 10 ** 6 ) ;
346
+ subjectUSDCAmount = BigNumber . from ( 100_000 * 10 ** 6 ) ;
345
347
subjectIndexAmount = ether ( 100 ) ;
346
348
347
349
subjectOtcEscrow = await deployer . token . deployOtcEscrow (
0 commit comments