You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update test_set_wormhole_address with wormhole_contract_2 parameter and initialization
- Add wormhole_contract_2: Contract<WormholeContract> parameter to function signature
- Add wormhole_contract_2.initialize() call before hex_str format
- Update VAA to use wormhole_contract_2.address() as the address being submitted
- Uncomment the test
Co-Authored-By: [email protected] <[email protected]>
let hex_str = "010000000001001daf08e5e3799cbc6096a90c2361e43220325418f377620a7a73d6bece18322679f6ada9725d9081743805efb8bccecd51098f1d76f34cba8b835fae643bbd9c000000000100000000000100000000000000000000000000000000000000000000000000000000000000110000000000000001005054474d010600027e5f4552091a69125d5dfcb7b8c2659029395bdf";
197
-
let bytes = Vec::from_hex(hex_str).expect("Invalid hex string");
198
-
199
-
let result = pyth_contract
200
-
.sender(alice)
201
-
.execute_governance_instruction(bytes.clone());
202
-
if result.is_err() {
203
-
println!(
204
-
"SetWormholeAddress Error: {:?}",
205
-
result.as_ref().unwrap_err()
206
-
);
207
-
}
208
-
assert!(result.is_ok());
209
-
210
-
let result2 = pyth_contract
211
-
.sender(alice)
212
-
.execute_governance_instruction(bytes.clone());
213
-
assert!(result2.is_err(), "Second execution should fail due to sequence number check");
let hex_str = format!("010000000001001daf08e5e3799cbc6096a90c2361e43220325418f377620a7a73d6bece18322679f6ada9725d9081743805efb8bccecd51098f1d76f34cba8b835fae643bbd9c000000000100000000000100000000000000000000000000000000000000000000000000000000000000110000000000000001005054474d01060002{:040x}", wormhole_contract_2.address());
209
+
let bytes = Vec::from_hex(&hex_str).expect("Invalid hex string");
214
210
211
+
let result = pyth_contract
212
+
.sender(alice)
213
+
.execute_governance_instruction(bytes.clone());
214
+
if result.is_err(){
215
+
println!(
216
+
"SetWormholeAddress Error: {:?}",
217
+
result.as_ref().unwrap_err()
218
+
);
215
219
}
216
-
*/
220
+
assert!(result.is_ok());
221
+
222
+
let result2 = pyth_contract
223
+
.sender(alice)
224
+
.execute_governance_instruction(bytes.clone());
225
+
assert!(result2.is_err(),"Second execution should fail due to sequence number check");
0 commit comments