@@ -48,7 +48,7 @@ pub fn good_update1() -> ByteArray {
48
48
226866843267230707879834616967256711063296411939069440476882347301771901839 ,
49
49
95752383404870925303422787 ,
50
50
];
51
- ByteArrayImpl :: new (array_try_into ( bytes ) , 11 )
51
+ ByteArrayImpl :: new (bytes , 11 )
52
52
}
53
53
54
54
// A wormhole VAA from a random update pulled from Hermes.
@@ -86,7 +86,7 @@ pub fn good_vm1() -> ByteArray {
86
86
52685537088250779930155363779405986390839624071318818148325576008719597568 ,
87
87
14615204155786886573933667335033405822686404253588533 ,
88
88
];
89
- ByteArrayImpl :: new (array_try_into ( bytes ) , 22 )
89
+ ByteArrayImpl :: new (bytes , 22 )
90
90
}
91
91
92
92
// A first update for a certain timestamp pulled from Hermes.
@@ -134,7 +134,7 @@ pub fn unique_update1() -> ByteArray {
134
134
28583007876111384456149499846085318299326698960792831530075402396150538907 ,
135
135
126290914008245563820443505 ,
136
136
];
137
- ByteArrayImpl :: new (array_try_into ( bytes ) , 11 )
137
+ ByteArrayImpl :: new (bytes , 11 )
138
138
}
139
139
140
140
// An actual mainnet wormhole governance VAA from https://github.com/pyth-network/pyth-crosschain/blob/main/contract_manager/src/contracts/wormhole.ts#L32-L37
@@ -159,7 +159,7 @@ pub fn mainnet_guardian_set_upgrade1() -> ByteArray {
159
159
55852237138651071644815135002358067220635692701051811455610533875912981641 ,
160
160
190413173566657072516608762222993749133 ,
161
161
];
162
- ByteArrayImpl :: new (array_try_into ( bytes ) , 16 )
162
+ ByteArrayImpl :: new (bytes , 16 )
163
163
}
164
164
165
165
// An actual mainnet wormhole governance VAA from https://github.com/pyth-network/pyth-crosschain/blob/main/contract_manager/src/contracts/wormhole.ts#L32-L37
@@ -210,7 +210,7 @@ pub fn mainnet_guardian_set_upgrade2() -> ByteArray {
210
210
75218391584551901010047495874303520775865073092730040058902770251005073864 ,
211
211
13453 ,
212
212
];
213
- ByteArrayImpl :: new (array_try_into ( bytes ) , 2 )
213
+ ByteArrayImpl :: new (bytes , 2 )
214
214
}
215
215
216
216
// An actual mainnet wormhole governance VAA from https://github.com/pyth-network/pyth-crosschain/blob/main/contract_manager/src/contracts/wormhole.ts#L32-L37
@@ -261,7 +261,7 @@ pub fn mainnet_guardian_set_upgrade3() -> ByteArray {
261
261
75218391584551901010047495874303520775865073092730040058902770251005073864 ,
262
262
13453 ,
263
263
];
264
- ByteArrayImpl :: new (array_try_into ( bytes ) , 2 )
264
+ ByteArrayImpl :: new (bytes , 2 )
265
265
}
266
266
267
267
// An actual mainnet wormhole governance VAA from https://github.com/pyth-network/pyth-crosschain/blob/main/contract_manager/src/contracts/wormhole.ts#L32-L37
@@ -312,7 +312,7 @@ pub fn mainnet_guardian_set_upgrade4() -> ByteArray {
312
312
75218391584551901010047495874303520775865073092730040058902770251005073864 ,
313
313
13453 ,
314
314
];
315
- ByteArrayImpl :: new (array_try_into ( bytes ) , 2 )
315
+ ByteArrayImpl :: new (bytes , 2 )
316
316
}
317
317
318
318
pub const TEST_GUARDIAN_ADDRESS1 : felt252 = 0x686b9ea8e3237110eaaba1f1b7467559a3273819 ;
@@ -328,7 +328,7 @@ pub fn empty_set_upgrade() -> ByteArray {
328
328
1131377253 ,
329
329
210141960835432704 ,
330
330
];
331
- ByteArrayImpl :: new (array_try_into ( bytes ) , 8 )
331
+ ByteArrayImpl :: new (bytes , 8 )
332
332
}
333
333
334
334
// A wormhole guardian set upgrade instruction with emitter not expected by the test.
@@ -341,7 +341,7 @@ pub fn wrong_emitter_upgrade() -> ByteArray {
341
341
1131377253 ,
342
342
307122819832911374634462256129025725147663742791077927773782095897 ,
343
343
];
344
- ByteArrayImpl :: new (array_try_into ( bytes ) , 28 )
344
+ ByteArrayImpl :: new (bytes , 28 )
345
345
}
346
346
347
347
// A wormhole guardian set upgrade instruction with set index = 3 not expected by the test.
@@ -354,7 +354,7 @@ pub fn wrong_index_upgrade() -> ByteArray {
354
354
1131377253 ,
355
355
210624583337115497886730203944140689990237281548333499058561169433 ,
356
356
];
357
- ByteArrayImpl :: new (array_try_into ( bytes ) , 28 )
357
+ ByteArrayImpl :: new (bytes , 28 )
358
358
}
359
359
360
360
// A wormhole governance guardian set upgrade instruction signed by test guardian #1 containing test guardian #2 as the new guardian set.
@@ -367,7 +367,7 @@ pub fn upgrade_to_test2() -> ByteArray {
367
367
1131377253 ,
368
368
210624583337114749311237613435643962969294824395451022190048752713 ,
369
369
];
370
- ByteArrayImpl :: new (array_try_into ( bytes ) , 28 )
370
+ ByteArrayImpl :: new (bytes , 28 )
371
371
}
372
372
373
373
// A Pyth governance instruction to set fee signed by the test guardian #1.
@@ -379,7 +379,7 @@ pub fn pyth_set_fee() -> ByteArray {
379
379
49565958604199796163020368 ,
380
380
8072278384728444780182694421117884443886221966887092226 ,
381
381
];
382
- ByteArrayImpl :: new (array_try_into ( bytes ) , 23 )
382
+ ByteArrayImpl :: new (bytes , 23 )
383
383
}
384
384
385
385
// A Pyth governance instruction to set data sources signed by the test guardian #1.
@@ -393,7 +393,7 @@ pub fn pyth_set_data_sources() -> ByteArray {
393
393
223938022913800988696085410923418445187967252047785407181969631814277398528 ,
394
394
301 ,
395
395
];
396
- ByteArrayImpl :: new (array_try_into ( bytes ) , 14 )
396
+ ByteArrayImpl :: new (bytes , 14 )
397
397
}
398
398
399
399
// A Pyth governance instruction to set wormhole address signed by the test guardian #1.
@@ -406,7 +406,7 @@ pub fn pyth_set_wormhole() -> ByteArray {
406
406
148907253456057279176930315687485033494639386197985334929728922792833758561 ,
407
407
3789456330195130818 ,
408
408
];
409
- ByteArrayImpl :: new (array_try_into ( bytes ) , 8 )
409
+ ByteArrayImpl :: new (bytes , 8 )
410
410
}
411
411
412
412
// A Pyth governance instruction to request governance data source transfer signed by the test guardian #1.
@@ -418,7 +418,7 @@ pub fn pyth_request_transfer() -> ByteArray {
418
418
51983810243429054512432720 ,
419
419
101886477340929157123538945 ,
420
420
];
421
- ByteArrayImpl :: new (array_try_into ( bytes ) , 11 )
421
+ ByteArrayImpl :: new (bytes , 11 )
422
422
}
423
423
424
424
// A Pyth governance instruction to authorize governance data source transfer signed by the test guardian #1.
@@ -434,7 +434,7 @@ pub fn pyth_auth_transfer() -> ByteArray {
434
434
721420288 ,
435
435
20782639266000304984163621011457 ,
436
436
];
437
- ByteArrayImpl :: new (array_try_into ( bytes ) , 18 )
437
+ ByteArrayImpl :: new (bytes , 18 )
438
438
}
439
439
440
440
// A Pyth governance instruction to set fee with alternative emitter signed by the test guardian #1.
@@ -446,7 +446,7 @@ pub fn pyth_set_fee_alt_emitter() -> ByteArray {
446
446
51983810243429054512498256 ,
447
447
8072278384728444780182694421117884443886221966887092226 ,
448
448
];
449
- ByteArrayImpl :: new (array_try_into ( bytes ) , 23 )
449
+ ByteArrayImpl :: new (bytes , 23 )
450
450
}
451
451
452
452
// A Pyth governance instruction to upgrade the contract signed by the test guardian #1.
@@ -459,7 +459,7 @@ pub fn pyth_upgrade_fake1() -> ByteArray {
459
459
148907253453589022320407306335457538262203456299261498528172020674942501293 ,
460
460
9624434269354675143 ,
461
461
];
462
- ByteArrayImpl :: new (array_try_into ( bytes ) , 8 )
462
+ ByteArrayImpl :: new (bytes , 8 )
463
463
}
464
464
465
465
// A Pyth governance instruction to upgrade the contract signed by the test guardian #1.
@@ -472,7 +472,7 @@ pub fn pyth_upgrade_not_pyth() -> ByteArray {
472
472
148907253453589022305803196061110108233921773465491227564264876752079119569 ,
473
473
6736708290019375278 ,
474
474
];
475
- ByteArrayImpl :: new (array_try_into ( bytes ) , 8 )
475
+ ByteArrayImpl :: new (bytes , 8 )
476
476
}
477
477
478
478
// A Pyth governance instruction to upgrade the contract signed by the test guardian #1.
@@ -485,7 +485,7 @@ pub fn pyth_upgrade_wrong_magic() -> ByteArray {
485
485
148907253453589022340563264373887392414227070562033595690783947835630084766 ,
486
486
5698494087895763928 ,
487
487
];
488
- ByteArrayImpl :: new (array_try_into ( bytes ) , 8 )
488
+ ByteArrayImpl :: new (bytes , 8 )
489
489
}
490
490
491
491
// A Pyth governance instruction to upgrade the contract signed by the test guardian #1.
@@ -498,7 +498,7 @@ pub fn pyth_upgrade_invalid_hash() -> ByteArray {
498
498
148907253453589022218037939353255655322518022029545083499057126097303896064 ,
499
499
505 ,
500
500
];
501
- ByteArrayImpl :: new (array_try_into ( bytes ) , 8 )
501
+ ByteArrayImpl :: new (bytes , 8 )
502
502
}
503
503
504
504
// An update pulled from Hermes and re-signed by the test guardian #1.
@@ -520,7 +520,7 @@ pub fn test_price_update1() -> ByteArray {
520
520
87135893730137265929093180553063146337041045646221968026289709394440932141 ,
521
521
245333243912241114598596888050489286502591033459250287888834 ,
522
522
];
523
- ByteArrayImpl :: new (array_try_into ( bytes ) , 25 )
523
+ ByteArrayImpl :: new (bytes , 25 )
524
524
}
525
525
526
526
// An update pulled from Hermes and re-signed by the test guardian #1.
@@ -542,7 +542,7 @@ pub fn test_price_update2() -> ByteArray {
542
542
370855179649505412564259994413632062925303311800103998016489412083011059699 ,
543
543
1182295126766215829784496273374889928477877265080355104888778 ,
544
544
];
545
- ByteArrayImpl :: new (array_try_into ( bytes ) , 25 )
545
+ ByteArrayImpl :: new (bytes , 25 )
546
546
}
547
547
548
548
// An update pulled from Hermes and re-signed by the test guardian #1 with another emitter address.
@@ -564,7 +564,7 @@ pub fn test_update2_alt_emitter() -> ByteArray {
564
564
370855179649505412564259994413632062925303311800103998016489412083011059699 ,
565
565
1182295126766215829784496273374889928477877265080355104888778 ,
566
566
];
567
- ByteArrayImpl :: new (array_try_into ( bytes ) , 25 )
567
+ ByteArrayImpl :: new (bytes , 25 )
568
568
}
569
569
570
570
// An update pulled from Hermes and re-signed by the test guardian #2.
@@ -586,5 +586,5 @@ pub fn test_update2_set2() -> ByteArray {
586
586
370855179649505412564259994413632062925303311800103998016489412083011059699 ,
587
587
1182295126766215829784496273374889928477877265080355104888778 ,
588
588
];
589
- ByteArrayImpl :: new (array_try_into ( bytes ) , 25 )
589
+ ByteArrayImpl :: new (bytes , 25 )
590
590
}
0 commit comments