mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 22:41:06 +00:00
Check docs and run clippy on PRs (#326)
* Check docs, clippy, test run * test parallel CI adapted from other package; is it faster? * Remember to download substrate * Nightly for cargo fmt * Standardise CI names * fix clippy complaints * Ensure docs are valid and export publicly accessible types * all-targets clippy, and fix additional lint errors * newline in ci file
This commit is contained in:
@@ -51,13 +51,13 @@ async fn tx_basic_transfer() {
|
||||
let alice_pre = api
|
||||
.storage()
|
||||
.system()
|
||||
.account(alice.account_id().clone().into(), None)
|
||||
.account(alice.account_id().clone(), None)
|
||||
.await
|
||||
.unwrap();
|
||||
let bob_pre = api
|
||||
.storage()
|
||||
.system()
|
||||
.account(bob.account_id().clone().into(), None)
|
||||
.account(bob.account_id().clone(), None)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -74,7 +74,7 @@ async fn tx_basic_transfer() {
|
||||
.unwrap();
|
||||
let _extrinsic_success = result
|
||||
.find_event::<system::events::ExtrinsicSuccess>()
|
||||
.expect("Failed to decode ExtrinisicSuccess".into())
|
||||
.expect("Failed to decode ExtrinisicSuccess")
|
||||
.expect("Failed to find ExtrinisicSuccess");
|
||||
|
||||
let expected_event = balances::events::Transfer(
|
||||
@@ -87,13 +87,13 @@ async fn tx_basic_transfer() {
|
||||
let alice_post = api
|
||||
.storage()
|
||||
.system()
|
||||
.account(alice.account_id().clone().into(), None)
|
||||
.account(alice.account_id().clone(), None)
|
||||
.await
|
||||
.unwrap();
|
||||
let bob_post = api
|
||||
.storage()
|
||||
.system()
|
||||
.account(bob.account_id().clone().into(), None)
|
||||
.account(bob.account_id().clone(), None)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -200,7 +200,7 @@ async fn transfer_subscription() {
|
||||
let cxt = test_context().await;
|
||||
let sub = cxt.client().rpc().subscribe_events().await.unwrap();
|
||||
let decoder = cxt.client().events_decoder();
|
||||
let mut sub = EventSubscription::<DefaultConfig>::new(sub, &decoder);
|
||||
let mut sub = EventSubscription::<DefaultConfig>::new(sub, decoder);
|
||||
sub.filter_event::<balances::events::Transfer>();
|
||||
|
||||
cxt.api
|
||||
|
||||
@@ -56,7 +56,7 @@ impl ContractsTestContext {
|
||||
}
|
||||
|
||||
fn client(&self) -> &Client<DefaultConfig> {
|
||||
&self.cxt.client()
|
||||
self.cxt.client()
|
||||
}
|
||||
|
||||
fn contracts_tx(&self) -> TransactionApi<DefaultConfig> {
|
||||
@@ -172,7 +172,7 @@ async fn tx_instantiate() {
|
||||
let ctx = ContractsTestContext::init().await;
|
||||
let (code_hash, _) = ctx.instantiate_with_code().await.unwrap();
|
||||
|
||||
let instantiated = ctx.instantiate(code_hash.into(), vec![], vec![1u8]).await;
|
||||
let instantiated = ctx.instantiate(code_hash, vec![], vec![1u8]).await;
|
||||
|
||||
assert!(
|
||||
instantiated.is_ok(),
|
||||
|
||||
@@ -32,7 +32,7 @@ type BalancesCall = runtime_types::pallet_balances::pallet::Call;
|
||||
#[async_std::test]
|
||||
async fn test_sudo() {
|
||||
let alice = PairSigner::<DefaultConfig, _>::new(AccountKeyring::Alice.pair());
|
||||
let bob = AccountKeyring::Bob.to_account_id().clone().into();
|
||||
let bob = AccountKeyring::Bob.to_account_id().into();
|
||||
let cxt = test_context().await;
|
||||
|
||||
let call = Call::Balances(BalancesCall::transfer {
|
||||
|
||||
@@ -37,7 +37,7 @@ async fn storage_account() {
|
||||
.api
|
||||
.storage()
|
||||
.system()
|
||||
.account(alice.account_id().clone().into(), None)
|
||||
.account(alice.account_id().clone(), None)
|
||||
.await;
|
||||
assert_matches!(account_info, Ok(_))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user