Skip to content

Commit a67fe2c

Browse files
author
Yash Agrawal
committed
feat: update test cases
1 parent ec0db25 commit a67fe2c

File tree

1 file changed

+0
-192
lines changed

1 file changed

+0
-192
lines changed

test/SBTProxy.test.ts

Lines changed: 0 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -221,30 +221,6 @@ describe('SBTProxy', () => {
221221
expect(
222222
await sbtProxy.connect(signers.proxyAdmin).callStatic.implementation()
223223
).to.eq(sbtImplementation.address)
224-
await expect(
225-
sbtProxy.connect(signers.proxyAdminB).callStatic.implementation()
226-
).to.reverted
227-
await expect(
228-
sbtProxy.connect(signers.userA).callStatic.implementation()
229-
).to.reverted
230-
await expect(
231-
sbtProxy.connect(signers.userB).callStatic.implementation()
232-
).to.reverted
233-
await expect(
234-
sbtProxy.connect(signers.minterUpdater).callStatic.implementation()
235-
).to.reverted
236-
await expect(
237-
sbtProxy.connect(signers.minterA).callStatic.implementation()
238-
).to.reverted
239-
await expect(
240-
sbtProxy.connect(signers.minterB).callStatic.implementation()
241-
).to.reverted
242-
await expect(
243-
sbtProxy.connect(signers.minterC).callStatic.implementation()
244-
).to.reverted
245-
await expect(
246-
sbtProxy.connect(signers.deployer).callStatic.implementation()
247-
).to.reverted
248224

249225
await expect(
250226
sbtProxy
@@ -257,30 +233,6 @@ describe('SBTProxy', () => {
257233
expect(
258234
await sbtProxy.connect(signers.proxyAdmin).callStatic.implementation()
259235
).to.eq(sbtImplementationB.address)
260-
await expect(
261-
sbtProxy.connect(signers.proxyAdminB).callStatic.implementation()
262-
).to.reverted
263-
await expect(
264-
sbtProxy.connect(signers.userA).callStatic.implementation()
265-
).to.reverted
266-
await expect(
267-
sbtProxy.connect(signers.userB).callStatic.implementation()
268-
).to.reverted
269-
await expect(
270-
sbtProxy.connect(signers.minterUpdater).callStatic.implementation()
271-
).to.reverted
272-
await expect(
273-
sbtProxy.connect(signers.minterA).callStatic.implementation()
274-
).to.reverted
275-
await expect(
276-
sbtProxy.connect(signers.minterB).callStatic.implementation()
277-
).to.reverted
278-
await expect(
279-
sbtProxy.connect(signers.minterC).callStatic.implementation()
280-
).to.reverted
281-
await expect(
282-
sbtProxy.connect(signers.deployer).callStatic.implementation()
283-
).to.reverted
284236
})
285237

286238
it('Should not upgradeTo correctly if signer is not proxyAdmin', async () => {
@@ -291,30 +243,6 @@ describe('SBTProxy', () => {
291243
expect(
292244
await sbtProxy.connect(signers.proxyAdmin).callStatic.implementation()
293245
).to.eq(sbtImplementation.address)
294-
await expect(
295-
sbtProxy.connect(signers.proxyAdminB).callStatic.implementation()
296-
).to.reverted
297-
await expect(
298-
sbtProxy.connect(signers.userA).callStatic.implementation()
299-
).to.reverted
300-
await expect(
301-
sbtProxy.connect(signers.userB).callStatic.implementation()
302-
).to.reverted
303-
await expect(
304-
sbtProxy.connect(signers.minterUpdater).callStatic.implementation()
305-
).to.reverted
306-
await expect(
307-
sbtProxy.connect(signers.minterA).callStatic.implementation()
308-
).to.reverted
309-
await expect(
310-
sbtProxy.connect(signers.minterB).callStatic.implementation()
311-
).to.reverted
312-
await expect(
313-
sbtProxy.connect(signers.minterC).callStatic.implementation()
314-
).to.reverted
315-
await expect(
316-
sbtProxy.connect(signers.deployer).callStatic.implementation()
317-
).to.reverted
318246

319247
await expect(
320248
sbtProxy
@@ -372,30 +300,6 @@ describe('SBTProxy', () => {
372300
expect(
373301
await sbtProxy.connect(signers.proxyAdmin).callStatic.implementation()
374302
).to.eq(sbtImplementation.address)
375-
await expect(
376-
sbtProxy.connect(signers.proxyAdminB).callStatic.implementation()
377-
).to.reverted
378-
await expect(
379-
sbtProxy.connect(signers.userA).callStatic.implementation()
380-
).to.reverted
381-
await expect(
382-
sbtProxy.connect(signers.userB).callStatic.implementation()
383-
).to.reverted
384-
await expect(
385-
sbtProxy.connect(signers.minterUpdater).callStatic.implementation()
386-
).to.reverted
387-
await expect(
388-
sbtProxy.connect(signers.minterA).callStatic.implementation()
389-
).to.reverted
390-
await expect(
391-
sbtProxy.connect(signers.minterB).callStatic.implementation()
392-
).to.reverted
393-
await expect(
394-
sbtProxy.connect(signers.minterC).callStatic.implementation()
395-
).to.reverted
396-
await expect(
397-
sbtProxy.connect(signers.deployer).callStatic.implementation()
398-
).to.reverted
399303
})
400304
})
401305

@@ -408,30 +312,6 @@ describe('SBTProxy', () => {
408312
expect(
409313
await sbtProxy.connect(signers.proxyAdmin).callStatic.implementation()
410314
).to.eq(sbtImplementation.address)
411-
await expect(
412-
sbtProxy.connect(signers.proxyAdminB).callStatic.implementation()
413-
).to.reverted
414-
await expect(
415-
sbtProxy.connect(signers.userA).callStatic.implementation()
416-
).to.reverted
417-
await expect(
418-
sbtProxy.connect(signers.userB).callStatic.implementation()
419-
).to.reverted
420-
await expect(
421-
sbtProxy.connect(signers.minterUpdater).callStatic.implementation()
422-
).to.reverted
423-
await expect(
424-
sbtProxy.connect(signers.minterA).callStatic.implementation()
425-
).to.reverted
426-
await expect(
427-
sbtProxy.connect(signers.minterB).callStatic.implementation()
428-
).to.reverted
429-
await expect(
430-
sbtProxy.connect(signers.minterC).callStatic.implementation()
431-
).to.reverted
432-
await expect(
433-
sbtProxy.connect(signers.deployer).callStatic.implementation()
434-
).to.reverted
435315

436316
const encodedData = sbtImplementationB
437317
.connect(signers.minterUpdater)
@@ -459,30 +339,6 @@ describe('SBTProxy', () => {
459339
expect(
460340
await sbtProxy.connect(signers.proxyAdmin).callStatic.implementation()
461341
).to.eq(sbtImplementationB.address)
462-
await expect(
463-
sbtProxy.connect(signers.proxyAdminB).callStatic.implementation()
464-
).to.reverted
465-
await expect(
466-
sbtProxy.connect(signers.userA).callStatic.implementation()
467-
).to.reverted
468-
await expect(
469-
sbtProxy.connect(signers.userB).callStatic.implementation()
470-
).to.reverted
471-
await expect(
472-
sbtProxy.connect(signers.minterUpdater).callStatic.implementation()
473-
).to.reverted
474-
await expect(
475-
sbtProxy.connect(signers.minterA).callStatic.implementation()
476-
).to.reverted
477-
await expect(
478-
sbtProxy.connect(signers.minterB).callStatic.implementation()
479-
).to.reverted
480-
await expect(
481-
sbtProxy.connect(signers.minterC).callStatic.implementation()
482-
).to.reverted
483-
await expect(
484-
sbtProxy.connect(signers.deployer).callStatic.implementation()
485-
).to.reverted
486342
})
487343

488344
it('Should not upgradeToAndCall (upgrade and initialize smart-contract) correctly if signer is not proxyAdmin', async () => {
@@ -493,30 +349,6 @@ describe('SBTProxy', () => {
493349
expect(
494350
await sbtProxy.connect(signers.proxyAdmin).callStatic.implementation()
495351
).to.eq(sbtImplementation.address)
496-
await expect(
497-
sbtProxy.connect(signers.proxyAdminB).callStatic.implementation()
498-
).to.reverted
499-
await expect(
500-
sbtProxy.connect(signers.userA).callStatic.implementation()
501-
).to.reverted
502-
await expect(
503-
sbtProxy.connect(signers.userB).callStatic.implementation()
504-
).to.reverted
505-
await expect(
506-
sbtProxy.connect(signers.minterUpdater).callStatic.implementation()
507-
).to.reverted
508-
await expect(
509-
sbtProxy.connect(signers.minterA).callStatic.implementation()
510-
).to.reverted
511-
await expect(
512-
sbtProxy.connect(signers.minterB).callStatic.implementation()
513-
).to.reverted
514-
await expect(
515-
sbtProxy.connect(signers.minterC).callStatic.implementation()
516-
).to.reverted
517-
await expect(
518-
sbtProxy.connect(signers.deployer).callStatic.implementation()
519-
).to.reverted
520352

521353
const encodedData = sbtImplementationB
522354
.connect(signers.minterUpdater)
@@ -597,30 +429,6 @@ describe('SBTProxy', () => {
597429
expect(
598430
await sbtProxy.connect(signers.proxyAdmin).callStatic.implementation()
599431
).to.eq(sbtImplementation.address)
600-
await expect(
601-
sbtProxy.connect(signers.proxyAdminB).callStatic.implementation()
602-
).to.reverted
603-
await expect(
604-
sbtProxy.connect(signers.userA).callStatic.implementation()
605-
).to.reverted
606-
await expect(
607-
sbtProxy.connect(signers.userB).callStatic.implementation()
608-
).to.reverted
609-
await expect(
610-
sbtProxy.connect(signers.minterUpdater).callStatic.implementation()
611-
).to.reverted
612-
await expect(
613-
sbtProxy.connect(signers.minterA).callStatic.implementation()
614-
).to.reverted
615-
await expect(
616-
sbtProxy.connect(signers.minterB).callStatic.implementation()
617-
).to.reverted
618-
await expect(
619-
sbtProxy.connect(signers.minterC).callStatic.implementation()
620-
).to.reverted
621-
await expect(
622-
sbtProxy.connect(signers.deployer).callStatic.implementation()
623-
).to.reverted
624432
})
625433
})
626434
})

0 commit comments

Comments
 (0)