We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since subxt introduced encoding SubmittableExtrinsic we can directly enqueue signed SubmittableExtrinsic bytes in tx-queue and then later execute it.
SubmittableExtrinsic
For more details https://github.com/paritytech/subxt/blob/master/CHANGELOG.md#0250---2022-11-16
let acknowledge_proposal_tx = tx_api.acknowledge_proposal( nonce.clone(), src_chain_id, ResourceId(resource_id.into_bytes()), BoundedVec(proposal.to_vec()), ); let signer = &self.pair; let signed_acknowledge_proposal_tx = self .client .tx() .create_signed(&acknowledge_proposal_tx, signer, Default::default()) .await?; // Enqueue transaction in substrate transaction queue QueueStore::<Vec<u8>>::enqueue_item( &self.store, tx_key, signed_acknowledge_proposal_tx.into_encoded(), )?;
// dequeue signed transaction let maybe_call_data = store.dequeue_item( SledQueueKey::from_substrate_chain_id(chain_id), )?; if let Some(payload) = maybe_call_data { let signed_extrinsic = SubmittableExtrinsic::from_bytes( client.clone(), payload, ); // dry run test let dry_run_outcome = signed_extrinsic.dry_run(None).await; // watch_extrinsic submits and returns transaction subscription let mut progress = signed_extrinsic .submit_and_watch() .map_err(Into::into) .map_err(backoff::Error::transient) .await?;
The text was updated successfully, but these errors were encountered:
This actually could also solve #474.
Sorry, something went wrong.
salman01zp
Successfully merging a pull request may close this issue.
Overview
Since subxt introduced encoding
SubmittableExtrinsic
we can directly enqueue signed SubmittableExtrinsic bytes in tx-queue and then later execute it.For more details
https://github.com/paritytech/subxt/blob/master/CHANGELOG.md#0250---2022-11-16
Enqueue Transaction
Dequeue and execute Transaction
Checklist
The text was updated successfully, but these errors were encountered: