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

**URL:** <https://forum.fuel.network/t/how-to-convert-bech32contractid-to-dyn-settablecontract/1531>\
**Category:** Rust SDK\
**Tags:** faqs\
**Created:** [January 19, 2023, 12:23pm UTC](https://forum.fuel.network/t/how-to-convert-bech32contractid-to-dyn-settablecontract/1531 "2023-01-19T12:23:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fuel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/fuel/32/1677_2.png) [@fuel](https://forum.fuel.network/u/fuel)\
**Post date:** [January 19, 2023, 12:23pm UTC](https://forum.fuel.network/t/how-to-convert-bech32contractid-to-dyn-settablecontract/1531/1 "2023-01-19T12:23:18Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![fuel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/fuel/32/1677_2.png) [@fuel](https://forum.fuel.network/u/fuel)\
**Post date:** [January 19, 2023, 12:44pm UTC](https://forum.fuel.network/t/how-to-convert-bech32contractid-to-dyn-settablecontract/1531/2 "2023-01-19T12:44:04Z")

</div>

Tried like that, but have conflict

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

...

let contracts = [&oracle];

```

Will try more…

---

<div class="post-metadata">

**Author:** ![fuel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/fuel/32/1677_2.png) [@fuel](https://forum.fuel.network/u/fuel)\
**Post date:** [January 19, 2023, 12:54pm UTC](https://forum.fuel.network/t/how-to-convert-bech32contractid-to-dyn-settablecontract/1531/3 "2023-01-19T12:54:55Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![sarah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/sarah/32/13_2.png) [@sarah](https://forum.fuel.network/u/sarah)\
**Post date:** [January 19, 2023, 4:05pm UTC](https://forum.fuel.network/t/how-to-convert-bech32contractid-to-dyn-settablecontract/1531/4 "2023-01-19T16:05:15Z")

</div>

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](https://github.com/FuelLabs/fuels-rs/releases/tag/v0.34.0)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/5/57d5a345cc15a64b636e0d56e042857f8a0e80b1.png) [@system](https://forum.fuel.network/u/system)\
**Post date:** [February 9, 2023, 12:05pm UTC](https://forum.fuel.network/t/how-to-convert-bech32contractid-to-dyn-settablecontract/1531/5 "2023-02-09T12:05:41Z")

</div>

Closed on February 9, 2023, 12:05pm UTC

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