Can't use the "metadata" method from the Rust SDK

Consider the following piece of code:

        let metadata: Option<Metadata> = self.contract_name.methods()
            .metadata(asset, value)

Execution of the above returns an error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidType("Enums currently support only one level deep heap types.")

Seems to be the same/related to this
I’d love to know if there is any alternative ways to use “metdata” in this scenario through the Rust SDK?

Thank you!

Hey @Serafim let me ask the Rust SDK team and get back to you!

1 Like

Assuming you are still developing on the beta-5 network/toolchain (as the stable version of the devnet is not yet ready), there is no way to return the Metadata due to encoding limitations.

However, this will be possible with the new experimental encoding in Forc, which will become the default encoding for the testnet.

1 Like

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