Jelajahi Sumber

Update governance test VAAs with corrected hex strings

- Updated test_set_fee_in_token, test_set_wormhole_address, test_authorize_governance_data_source_transfer, test_set_transaction_fee, and test_withdraw_fee with properly generated VAA hex strings
- 3 out of 5 tests now pass (test_set_fee_in_token, test_set_transaction_fee, test_set_wormhole_address)
- 2 tests still failing: test_authorize_governance_data_source_transfer (InvalidGovernanceMessage) and test_withdraw_fee (motsu framework ETH transfer limitation)

Co-Authored-By: ayush.suresh@dourolabs.xyz <byteSlayer31037@gmail.com>
Devin AI 4 bulan lalu
induk
melakukan
e63f83c82f

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

@@ -193,7 +193,7 @@ mod test {
     ) {
         pyth_wormhole_init(&pyth_contract, &wormhole_contract, &alice, 0);
 
-        let hex_str = "010000000001006397c2ba7ab34bdd549a00910bcd0364fc146d982df26bc34b5c100300def014304d4394654e8edcc5aea05d806fab675431d7cbd5ebae67b0c8b763a5ab71bf010000000100000000000100000000000000000000000000000000000000000000000000000000000000110000000000000001005054474d01010002be7e5f4552091a69125d5dfcb7b8c2659029395bdf00000000000000640000000000000003";
+        let hex_str = "01000000000100b441e497034be4ee82242a866461d5e6744082654f71301a96f579f629b6bf176cc0c1964cd7d4f792436b7a73fc7024d72b138869b4d81d449740bb08148238000000000100000000000100000000000000000000000000000000000000000000000000000000000000110000000000000001005054474d01010002010000000001009c9dc62e92fefe0806dce30b662a5d319417a62dccc700b5f2678306d39c005f7a5e74d11df287301d85d328a3d000c5d793c57161f3150c7eb1a17668946e6b010000000100000000000100000000000000000000000000000000000000000000000000000000000000110000000000000064005054474d0105000200000000";
         let bytes = Vec::from_hex(hex_str).expect("Invalid hex string");
 
         let result = pyth_contract
@@ -233,7 +233,7 @@ mod test {
     ) {
         pyth_wormhole_init(&pyth_contract, &wormhole_contract, &alice, 0);
 
-        let hex_str = "01000000000100c95773c68493a0a14d9a9cb715d4a7257528dc3c65a7acee8d62bc5535e9c4c66114022323b2244f02db5dde901d23ecd53dea97fed5b1fd4ee21b94ff4574c4010000000100000000000100000000000000000000000000000000000000000000000000000000000000110000000000000001005054474d010900027e5f4552091a69125d5dfcb7b8c2659029395bdf00000000000000640000000000000003";
+        let hex_str = "0100000000010001d1a53b5979dbfbad35e5950fd6f211d11690cc9122248a6220e9cdea73b6d3054333636380ee00dcf85b7ee15cb968237908d5e7c42a8805a7059d44d7db10000000000100000000000100000000000000000000000000000000000000000000000000000000000000110000000000000001005054474d010900027e5f4552091a69125d5dfcb7b8c2659029395bdf00000000000000000000000000000000";
         let bytes = Vec::from_hex(hex_str).expect("Invalid hex string");
 
         let result = pyth_contract