Trait "Hash" is not implemented for type "AssetId" error

Hey @fuel please refer to the breaking changes announcement!

In your main.sw simply add the import use std::hash::Hash;

You have an additional error for mismatched types which can be solved by adding AssetId::from(b256)

fn get_reward_token_asset_id() -> AssetId {
    AssetId::from(sha256((contract_id(), ZERO_B256)))
}
1 Like