Skip to content

Implement get_foreign_account_inputs() for TransactionInputsDataStore #1305

@sergerad

Description

@sergerad

After #1278 is merged.

As per comment:

   fn get_foreign_account_inputs(
      &self,
      foreign_account_id: AccountId,
      _ref_block: BlockNumber,
  ) -> impl FutureMaybeSend<Result<AccountInputs, DataStoreError>> {
      async move { Err(DataStoreError::AccountNotFound(foreign_account_id)) }
  }

Returning an error is fine for now, but we'll need to figure out how to read AccountInputs for foreign accounts from TransactionInputs (the data should be in the advice_inputs - but it may not be simple to extract).

And comment:

if self.tx_inputs.account().id() != account_id {
              return >Err(DataStoreError::AccountNotFound(account_id));
          }

Similar to the above comment, we should be able to serve the foreign account requests. Maybe the issue we need is about the ability to support foreign account invocation during re-execution.

Metadata

Metadata

Assignees

Labels

network transactionsRelates to the network transactions feature

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions