Simplify creating and signing extrinsics (#490)

* WIP extrinsic api updates

* First pass done; now to get things compiling again

* document and tweak new structs/traits

* cargo check --all-targets now compiles without issue

* Polkadot and Substrate take different extra params; support both

* Fix transaction format (missing byte from AccountId -> Address) and fmt

* Tweak Signer trait

* Tweak comments and such in extrinsic params

* check all examples against newer polkadot, add new one with params, import path tweaks

* clippy fix, and save an allocation when signing

* Remove unnecessary Default clauses

* Tidy up and fix comments. Panic if payload size >4GB

* fix typo
This commit is contained in:
James Wilson
2022-03-30 18:53:54 +02:00
committed by GitHub
parent 82f304005b
commit 3d669f97c6
32 changed files with 2064 additions and 1114 deletions
+1 -2
View File
@@ -24,7 +24,6 @@ use crate::{
};
use assert_matches::assert_matches;
use sp_keyring::AccountKeyring;
use subxt::Signer;
#[async_std::test]
async fn storage_account() -> Result<(), subxt::Error<DispatchError>> {
@@ -52,7 +51,7 @@ async fn tx_remark_with_event() -> Result<(), subxt::Error<DispatchError>> {
.tx()
.system()
.remark_with_event(b"remarkable".to_vec())
.sign_and_submit_then_watch(&alice)
.sign_and_submit_then_watch_default(&alice)
.await?
.wait_for_finalized_success()
.await?