Skip to content

Commit 50ca713

Browse files
committed
temp stash
1 parent 8367d4a commit 50ca713

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

target_chains/stylus/contracts/pyth-receiver/src/pyth_governance_test.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mod test {
33
use crate::error::PythReceiverError;
44
use crate::test_data::*;
55
use crate::PythReceiver;
6-
use alloy_primitives::{Address, U256};
6+
use alloy_primitives::{address, Address, U256};
77
use mock_instant::global::MockClock;
88
use motsu::prelude::*;
99
use pythnet_sdk::wire::v1::{AccumulatorUpdateData, Proof};
@@ -50,9 +50,7 @@ mod test {
5050
alice: &Address,
5151
) {
5252
let guardians = vec![
53-
Address::new([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]),
54-
Address::new([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02]),
55-
Address::new([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03]),
53+
address!("0x6579c588be2026d866231cccc364881cc1219c56")
5654
];
5755

5856
let governance_contract =
@@ -97,15 +95,16 @@ mod test {
9795
) {
9896
pyth_wormhole_init(&pyth_contract, &wormhole_contract, &alice);
9997

100-
let hex_str = "01000000000100a53d7675143a514fa10756ef19e1281648aec03be2ea071c139f241839cb01206ce5c7f3673fc446a045cab2d4f97ef0de01de70269ab2678bba76b41c3a60ce010000000100000000000100000000000000000000000000000000000000000000000000000000000000110000000000000001005054474d010200020100010000000000000000000000000000000000000000000000000000000000001111";
98+
let hex_str = "0x010000000001008eb96d664888b3424e81758b7015c4cc42f20cb03891ed9335724b779262c5571de6ad26372cff8300ba2767239f1f9d412b007118731e62ed7b888cab0c9ac701499602d200000000000100000000000000000000000000000000000000000000000000000000000000110000000000000001005054474d010300020100010000000000000000000000000000000000000000000000000000000000001111";
10199
let bytes = Vec::from_hex(hex_str).expect("Invalid hex string");
102100

101+
println!("Executing set_data_sources with bytes: {:?}", bytes);
102+
103103
let result = pyth_contract.sender(alice).execute_governance_instruction(bytes.clone());
104104
if let Err(e) = &result {
105105
println!("Governance instruction failed with error: {:?}", e);
106106
}
107-
108-
println!("{:?}", result);
107+
109108
assert!(result.is_ok());
110109
}
111110

0 commit comments

Comments
 (0)