How to convert &[Bech32ContractId] to &[&dyn SettableContract]?

Hey guys!!
I just updated my fuels package to the new 0.34 version and noticed in the .set_contracts have been updated types from &[Bech32ContractId] to &[&dyn SettableContract].
Can you explain please how to convert it?

Tried like that, but have conflict

impl SettableContract for OracleContract{
    fn id(&self) -> Bech32ContractId{
    fn log_decoder(&self) -> LogDecoder{


let contracts = [&oracle];

Will try more…

Added func get_as_settable_contract in the file with abigen, that works for me

  pub fn get_as_settable_contract(contract: &OracleContract) -> [&dyn SettableContract; 1] {

I’m glad you solved it, thanks for posting! For more context, you can see the full breaking changes and steps for upgrading to version 0.34 of the Rust SDK here: Release v0.34.0 · FuelLabs/fuels-rs · GitHub

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.