mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Merge branch 'master' into aj/update-substrate-crates
This commit is contained in:
@@ -101,12 +101,12 @@ async fn tx_dynamic_transfer() -> Result<(), subxt::Error> {
|
||||
let alice_account_addr = subxt::dynamic::storage(
|
||||
"System",
|
||||
"Account",
|
||||
vec![Value::from_bytes(&alice.account_id())],
|
||||
vec![Value::from_bytes(alice.account_id())],
|
||||
);
|
||||
let bob_account_addr = subxt::dynamic::storage(
|
||||
"System",
|
||||
"Account",
|
||||
vec![Value::from_bytes(&bob.account_id())],
|
||||
vec![Value::from_bytes(bob.account_id())],
|
||||
);
|
||||
|
||||
let alice_pre = api
|
||||
@@ -122,7 +122,7 @@ async fn tx_dynamic_transfer() -> Result<(), subxt::Error> {
|
||||
"Balances",
|
||||
"transfer",
|
||||
vec![
|
||||
Value::unnamed_variant("Id", vec![Value::from_bytes(&bob.account_id())]),
|
||||
Value::unnamed_variant("Id", vec![Value::from_bytes(bob.account_id())]),
|
||||
Value::u128(10_000u128),
|
||||
],
|
||||
);
|
||||
@@ -145,11 +145,11 @@ async fn tx_dynamic_transfer() -> Result<(), subxt::Error> {
|
||||
let expected_fields = Composite::Named(vec![
|
||||
(
|
||||
"from".into(),
|
||||
Value::unnamed_composite(vec![Value::from_bytes(&alice.account_id())]),
|
||||
Value::unnamed_composite(vec![Value::from_bytes(alice.account_id())]),
|
||||
),
|
||||
(
|
||||
"to".into(),
|
||||
Value::unnamed_composite(vec![Value::from_bytes(&bob.account_id())]),
|
||||
Value::unnamed_composite(vec![Value::from_bytes(bob.account_id())]),
|
||||
),
|
||||
("amount".into(), Value::u128(10_000)),
|
||||
]);
|
||||
|
||||
@@ -242,7 +242,7 @@ async fn storage_current_era() -> Result<(), Error> {
|
||||
async fn storage_era_reward_points() -> Result<(), Error> {
|
||||
let ctx = test_context().await;
|
||||
let api = ctx.client();
|
||||
let reward_points_addr = node_runtime::storage().staking().eras_reward_points(&0);
|
||||
let reward_points_addr = node_runtime::storage().staking().eras_reward_points(0);
|
||||
let current_era_result = api.storage().fetch(&reward_points_addr, None).await;
|
||||
assert!(current_era_result.is_ok());
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ async fn storage_n_mapish_key_is_properly_created() -> Result<(), subxt::Error>
|
||||
bytes.extend(&sp_core::twox_128("KeyOwner".as_bytes())[..]);
|
||||
// twox64_concat a *tuple* of the args expected:
|
||||
let suffix = (KeyTypeId([1, 2, 3, 4]), vec![5u8, 6, 7, 8]).encode();
|
||||
bytes.extend(&sp_core::twox_64(&suffix));
|
||||
bytes.extend(sp_core::twox_64(&suffix));
|
||||
bytes.extend(&suffix);
|
||||
bytes
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user