@@ -187,7 +187,7 @@ describe('e2e_token_contract', () => {
187
187
188
188
afterEach ( async ( ) => {
189
189
await tokenSim . check ( ) ;
190
- } ) ;
190
+ } , 30_000 ) ;
191
191
192
192
describe ( 'Access controlled functions' , ( ) => {
193
193
it ( 'Set admin' , async ( ) => {
@@ -351,6 +351,7 @@ describe('e2e_token_contract', () => {
351
351
) => {
352
352
return await hashPayload ( [
353
353
caller . address . toField ( ) ,
354
+ asset . address . toField ( ) ,
354
355
FunctionSelector . fromSignature ( 'transfer_public((Field),(Field),Field,Field)' ) . toField ( ) ,
355
356
from . address . toField ( ) ,
356
357
to . address . toField ( ) ,
@@ -416,7 +417,7 @@ describe('e2e_token_contract', () => {
416
417
await txReplay . isMined ( ) ;
417
418
const receiptReplay = await txReplay . getReceipt ( ) ;
418
419
expect ( receiptReplay . status ) . toBe ( TxStatus . DROPPED ) ;
419
- } , 30_000 ) ;
420
+ } , 45_000 ) ;
420
421
421
422
describe ( 'failure cases' , ( ) => {
422
423
it ( 'transfer more than balance' , async ( ) => {
@@ -477,7 +478,7 @@ describe('e2e_token_contract', () => {
477
478
478
479
expect ( await asset . methods . balance_of_public ( { address : accounts [ 0 ] . address } ) . view ( ) ) . toEqual ( balance0 ) ;
479
480
expect ( await asset . methods . balance_of_public ( { address : accounts [ 1 ] . address } ) . view ( ) ) . toEqual ( balance1 ) ;
480
- } ) ;
481
+ } , 30_000 ) ;
481
482
482
483
it ( 'transfer on behalf of other, wrong designated caller' , async ( ) => {
483
484
const balance0 = await asset . methods . balance_of_public ( { address : accounts [ 0 ] . address } ) . view ( ) ;
@@ -523,6 +524,7 @@ describe('e2e_token_contract', () => {
523
524
) => {
524
525
return await hashPayload ( [
525
526
caller . address . toField ( ) ,
527
+ asset . address . toField ( ) ,
526
528
FunctionSelector . fromSignature ( 'transfer((Field),(Field),Field,Field)' ) . toField ( ) ,
527
529
from . address . toField ( ) ,
528
530
to . address . toField ( ) ,
@@ -541,7 +543,7 @@ describe('e2e_token_contract', () => {
541
543
const receipt = await tx . wait ( ) ;
542
544
expect ( receipt . status ) . toBe ( TxStatus . MINED ) ;
543
545
tokenSim . transferPrivate ( accounts [ 0 ] . address , accounts [ 1 ] . address , amount ) ;
544
- } ) ;
546
+ } , 30_000 ) ;
545
547
546
548
it ( 'transfer to self' , async ( ) => {
547
549
const balance0 = await asset . methods . balance_of_private ( { address : accounts [ 0 ] . address } ) . view ( ) ;
@@ -553,7 +555,7 @@ describe('e2e_token_contract', () => {
553
555
const receipt = await tx . wait ( ) ;
554
556
expect ( receipt . status ) . toBe ( TxStatus . MINED ) ;
555
557
tokenSim . transferPrivate ( accounts [ 0 ] . address , accounts [ 0 ] . address , amount ) ;
556
- } ) ;
558
+ } , 30_000 ) ;
557
559
558
560
it ( 'transfer on behalf of other' , async ( ) => {
559
561
const balance0 = await asset . methods . balance_of_private ( { address : accounts [ 0 ] . address } ) . view ( ) ;
@@ -695,6 +697,7 @@ describe('e2e_token_contract', () => {
695
697
) => {
696
698
return await hashPayload ( [
697
699
caller . address . toField ( ) ,
700
+ asset . address . toField ( ) ,
698
701
FunctionSelector . fromSignature ( 'shield((Field),Field,Field,Field)' ) . toField ( ) ,
699
702
from . address . toField ( ) ,
700
703
new Fr ( amount ) ,
@@ -733,7 +736,7 @@ describe('e2e_token_contract', () => {
733
736
await txClaimDoubleSpend . isMined ( ) ;
734
737
const receiptDoubleSpend = await txClaimDoubleSpend . getReceipt ( ) ;
735
738
expect ( receiptDoubleSpend . status ) . toBe ( TxStatus . DROPPED ) ;
736
- } ) ;
739
+ } , 30_000 ) ;
737
740
738
741
it ( 'on behalf of other' , async ( ) => {
739
742
const balancePub = await asset . methods . balance_of_public ( { address : accounts [ 0 ] . address } ) . view ( ) ;
@@ -783,7 +786,7 @@ describe('e2e_token_contract', () => {
783
786
await txClaimDoubleSpend . isMined ( ) ;
784
787
const receiptDoubleSpend = await txClaimDoubleSpend . getReceipt ( ) ;
785
788
expect ( receiptDoubleSpend . status ) . toBe ( TxStatus . DROPPED ) ;
786
- } , 30_000 ) ;
789
+ } , 60_000 ) ;
787
790
788
791
describe ( 'failure cases' , ( ) => {
789
792
it ( 'on behalf of self (more than balance)' , async ( ) => {
@@ -887,6 +890,7 @@ describe('e2e_token_contract', () => {
887
890
) => {
888
891
return await hashPayload ( [
889
892
caller . address . toField ( ) ,
893
+ asset . address . toField ( ) ,
890
894
FunctionSelector . fromSignature ( 'unshield((Field),(Field),Field,Field)' ) . toField ( ) ,
891
895
accounts [ 0 ] . address . toField ( ) ,
892
896
accounts [ 1 ] . address . toField ( ) ,
@@ -1017,6 +1021,7 @@ describe('e2e_token_contract', () => {
1017
1021
const burnMessageHash = async ( caller : CompleteAddress , from : CompleteAddress , amount : bigint , nonce : Fr ) => {
1018
1022
return await hashPayload ( [
1019
1023
caller . address . toField ( ) ,
1024
+ asset . address . toField ( ) ,
1020
1025
FunctionSelector . fromSignature ( 'burn_public((Field),Field,Field)' ) . toField ( ) ,
1021
1026
from . address . toField ( ) ,
1022
1027
new Fr ( amount ) ,
@@ -1153,6 +1158,7 @@ describe('e2e_token_contract', () => {
1153
1158
const burnMessageHash = async ( caller : CompleteAddress , from : CompleteAddress , amount : bigint , nonce : Fr ) => {
1154
1159
return await hashPayload ( [
1155
1160
caller . address . toField ( ) ,
1161
+ asset . address . toField ( ) ,
1156
1162
FunctionSelector . fromSignature ( 'burn((Field),Field,Field)' ) . toField ( ) ,
1157
1163
from . address . toField ( ) ,
1158
1164
new Fr ( amount ) ,
0 commit comments