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{
self.id()
}
fn log_decoder(&self) -> LogDecoder{
self.log_decoder()
}
}
...
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] {
[contract]
}
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