U32::from_be_bytes -> No method named "from_be_bytes" found for type "u32"

Download GitHub - cctdaniel/pyth-fuel at governance and run forc build

You should get a couple of these errors:

87 |         let target_chain_id = u16::from_be_bytes([
   |                                    ^^^^^^^^^^^^^ No method named "from_be_bytes" found for type "u16".
88 |             encoded_instruction.get(index).unwrap(),
89 |             encoded_instruction.get(index + 1).unwrap(),

which is weird because I am working off GitHub - FuelLabs/Pyth-integration and the repo also uses u32::from_be_bytes and even in my fork itself u32::from_be_bytes work well in batch_attestation_update.sw, any idea what might be the issue here?

This problem is solved.

1 Like