在块构建器中访问 Substrate 外部数据

问题描述

在从 block-builder 中的外部数据构建块期间,我需要访问各个外部数据,即签名者的 AccointId 和随机数。我假设这些数据是 SignaturePayload 特征的 Extrinsic 的一部分,但找不到获取这些数据的方法

pub fn build(mut self) -> Result<BuiltBlock<Block,backend::StateBackendFor<B,Block>>,Error> {
    let extrinsics = self.extrinsics.clone();
    extrinsics.into_iter().for_each(|xt| {
        // Here I'm trying to get the data from the extrinsic,something like:
        // let nonce = xt.nonce;
        // let account_id = xt.account_id;
    }

    // The rest of the build function logic
}

如何在此处获取签名者的 AccountId 和 nonce?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)