use sp_core::crypto::AccountId32;
use sp_core::crypto::Ss58Codec;
use subxt::{

    runtime_metadata_path = "./artifacts/metadata.scale",
    derive_for_all_types = "Clone, Debug, Eq, PartialEq"
pub mod polkadot {}

let account_id32 = AccountId32::from_string(&account_id).unwrap();
let account_id32_clone = account_id32.clone();

let client = subxt::client::OnlineClient::<PolkadotConfig>::from_url(NODE_URL)
let balance_storage = polkadot::storage().system().account(account_id32_clone);
let balance_details = client

if let Some(balance_details) = balance_details {

It was working before subxt upgrade to subxt 0.26.0

But now it gives error:

 let balance_storage = polkadot::storage().system().account(account_id32_clone);
   |                                                                    ------- ^^^^^^^^^^^^^^^^^^ the trait `Borrow<subxt::utils::AccountId32>` is not implemented for `sp_core::crypto::AccountId32`
   |                                                                    |
   |                                                                    required by a bound introduced by this call

I am using sp-core = { version = "7.0.0", default-features = false }

1 Answer 1



use subxt::utils::AccountId32;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.