>('encointer_getReputations', params);
+ return reputationsV1FromList(reputations);
+ }
+
/// Queries the rpc 'encointer_getReputations'.
///
/// Address must be SS58 encoded.
diff --git a/app/lib/service/tx/lib/src/send_tx_dart.dart b/app/lib/service/tx/lib/src/send_tx_dart.dart
index 6725bf57f..550c89b1a 100644
--- a/app/lib/service/tx/lib/src/send_tx_dart.dart
+++ b/app/lib/service/tx/lib/src/send_tx_dart.dart
@@ -127,7 +127,7 @@ class EWAuthorApi {
String? blockHashHex;
final sub = await submitAndWatchExtrinsic(extrinsic, (xtUpdate) async {
- Log.d('ExtrinsicUpdate: ${xtUpdate.type}');
+ Log.d('ExtrinsicUpdate: type: ${xtUpdate.type}, value: ${xtUpdate.value}');
if (xtUpdate.type == 'ready') {
Log.p('Xt is ready');
diff --git a/app/lib/service/tx/lib/src/submit_tx_wrappers.dart b/app/lib/service/tx/lib/src/submit_tx_wrappers.dart
index a634dc71c..8d428b932 100644
--- a/app/lib/service/tx/lib/src/submit_tx_wrappers.dart
+++ b/app/lib/service/tx/lib/src/submit_tx_wrappers.dart
@@ -78,7 +78,8 @@ Future submitClaimRewards(
onFinish: (BuildContext txPageContext, ExtrinsicReport report) {
// Claiming the rewards creates a new reputation if successful.
// Hence, we should update the state afterwards.
- store.dataUpdate.setInvalidated();
+ store.encointer.getEncointerBalance();
+ webApi.encointer.getReputations();
return report;
},
);
@@ -316,7 +317,11 @@ Future submitEncointerTransfer(
api,
OpaqueExtrinsic(xt),
TxNotification.encointerBalanceTransfer(context.l10n),
- onFinish: onFinish,
+ onFinish: (BuildContext txPageContext, ExtrinsicReport report) {
+ if (onFinish != null) onFinish(txPageContext, report);
+ store.encointer.getEncointerBalance();
+ return report;
+ },
onError: onError,
);
}
diff --git a/app/lib/service/tx/lib/src/tx_builder.dart b/app/lib/service/tx/lib/src/tx_builder.dart
index 31ecb5a96..cf7579461 100644
--- a/app/lib/service/tx/lib/src/tx_builder.dart
+++ b/app/lib/service/tx/lib/src/tx_builder.dart
@@ -31,8 +31,8 @@ class TxBuilder {
// fetch recent relevant data from chain
final runtimeVersion = await _getRuntimeVersion();
- final blockNumber = await _getBlockNumber();
- final blockHash = await _getBlockHash();
+ final finalizedHash = await _getLatestFinalizedHash();
+ final blockNumber = await _getBlockNumber(hash: finalizedHash);
final genesisHash = await _getBlockHash(blockNumber: 0);
final accountInfo = await encointerKusama.query.system.account(pair.publicKey.bytes);
@@ -49,7 +49,7 @@ class TxBuilder {
specVersion: runtimeVersion.specVersion,
transactionVersion: runtimeVersion.transactionVersion,
genesisHash: genesisHash,
- blockHash: blockHash,
+ blockHash: finalizedHash,
blockNumber: blockNumber,
eraPeriod: 64,
nonce: accountInfo.nonce,
@@ -85,8 +85,15 @@ class TxBuilder {
return hash.replaceFirst('0x', '');
}
- Future _getBlockNumber() async {
- final block = await provider.send('chain_getBlock', []);
+ Future _getLatestFinalizedHash() async {
+ final hash = (await provider.send('chain_getFinalizedHead', [])).result as String;
+ return hash.replaceFirst('0x', '');
+ }
+
+ Future _getBlockNumber({String? hash}) async {
+ final params = hash != null ? [hash.replaceFirst('0x', '')] : [];
+
+ final block = await provider.send('chain_getBlock', params);
// ignore: avoid_dynamic_calls
final blockNumber = int.parse(block.result['block']['header']['number'] as String);
diff --git a/app/lib/store/encointer/sub_stores/encointer_account_store/encointer_account_store.dart b/app/lib/store/encointer/sub_stores/encointer_account_store/encointer_account_store.dart
index f811bec24..1d1d1dcc0 100644
--- a/app/lib/store/encointer/sub_stores/encointer_account_store/encointer_account_store.dart
+++ b/app/lib/store/encointer/sub_stores/encointer_account_store/encointer_account_store.dart
@@ -56,8 +56,12 @@ abstract class _EncointerAccountStore with Store {
/// contain all potential reputation values: UnverifiedReputable, VerifiedUnlinked and VerifiedLinked.
///
/// Map: ceremony index -> CommunityReputation
+ ///
+ /// Note: must be nullable for json-deserialization of old stores.
@observable
- Map reputations = {};
+ Map? _reputationsV2;
+
+ Map get reputations => _reputationsV2 ?? {};
/// Returns all reputations associated with a meetup.
@computed
@@ -76,13 +80,27 @@ abstract class _EncointerAccountStore with Store {
@observable
int numberOfNewbieTicketsForReputable = 0;
- @computed
- int? get ceremonyIndexForNextProofOfAttendance {
+ int? ceremonyIndexForNextProofOfAttendance(int currentCeremonyIndex) {
if (verifiedReputations.isNotEmpty) {
try {
- return verifiedReputations.entries.firstWhere((e) => e.value.reputation == Reputation.VerifiedUnlinked).key;
+ // returns the first reputation that hasn't been linked, or has been linked to a non-current cIndex.
+ return verifiedReputations.entries.firstWhere((e) {
+ if (e.value.reputation.runtimeType == VerifiedUnlinked) {
+ Log.d('Found unlinked reputation with cIndex ${e.key}');
+ return true;
+ }
+
+ if (e.value.reputation.runtimeType == VerifiedLinked &&
+ (e.value.reputation as VerifiedLinked).value0 != currentCeremonyIndex) {
+ Log.d('Found linked reputation that has been linked to previous cycle with cIndex ${e.key}');
+ return true;
+ }
+
+ return false;
+ }).key;
} catch (e, s) {
- Log.e('$address has reputation, but none that has not been linked yet', 'EncointerAccountStore', s);
+ Log.e('$address has reputation, but none that has not been linked with the current cIndex',
+ 'EncointerAccountStore', s);
return 0;
}
} else {
@@ -125,7 +143,7 @@ abstract class _EncointerAccountStore with Store {
@action
Future setReputations(Map reps) async {
- reputations = reps;
+ _reputationsV2 = reps;
unawaited(writeToCache());
await getNumberOfNewbieTicketsForReputable();
}
diff --git a/app/lib/store/encointer/sub_stores/encointer_account_store/encointer_account_store.g.dart b/app/lib/store/encointer/sub_stores/encointer_account_store/encointer_account_store.g.dart
index c9362d88b..685400b02 100644
--- a/app/lib/store/encointer/sub_stores/encointer_account_store/encointer_account_store.g.dart
+++ b/app/lib/store/encointer/sub_stores/encointer_account_store/encointer_account_store.g.dart
@@ -13,9 +13,6 @@ EncointerAccountStore _$EncointerAccountStoreFromJson(Map json)
..balanceEntries = ObservableMap.of((json['balanceEntries'] as Map).map(
(k, e) => MapEntry(k, BalanceEntry.fromJson(e as Map)),
))
- ..reputations = (json['reputations'] as Map).map(
- (k, e) => MapEntry(int.parse(k), CommunityReputation.fromJson(e as Map)),
- )
..txsTransfer = ObservableList.of(
(json['txsTransfer'] as List).map((e) => TransferData.fromJson(e as Map)))
..numberOfNewbieTicketsForReputable = json['numberOfNewbieTicketsForReputable'] as int
@@ -27,7 +24,6 @@ Map _$EncointerAccountStoreToJson(EncointerAccountStore instanc
'network': instance.network,
'address': instance.address,
'balanceEntries': instance.balanceEntries.map((k, e) => MapEntry(k, e.toJson())),
- 'reputations': instance.reputations.map((k, e) => MapEntry(k.toString(), e.toJson())),
'txsTransfer': instance.txsTransfer.map((e) => e.toJson()).toList(),
'numberOfNewbieTicketsForReputable': instance.numberOfNewbieTicketsForReputable,
'lastProofOfAttendance': instance.lastProofOfAttendance?.toJson(),
@@ -53,13 +49,6 @@ mixin _$EncointerAccountStore on _EncointerAccountStore, Store {
int get verifiedReputationCount => (_$verifiedReputationCountComputed ??=
Computed(() => super.verifiedReputationCount, name: '_EncointerAccountStore.verifiedReputationCount'))
.value;
- Computed? _$ceremonyIndexForNextProofOfAttendanceComputed;
-
- @override
- int? get ceremonyIndexForNextProofOfAttendance => (_$ceremonyIndexForNextProofOfAttendanceComputed ??= Computed(
- () => super.ceremonyIndexForNextProofOfAttendance,
- name: '_EncointerAccountStore.ceremonyIndexForNextProofOfAttendance'))
- .value;
late final _$balanceEntriesAtom = Atom(name: '_EncointerAccountStore.balanceEntries', context: context);
@@ -76,18 +65,18 @@ mixin _$EncointerAccountStore on _EncointerAccountStore, Store {
});
}
- late final _$reputationsAtom = Atom(name: '_EncointerAccountStore.reputations', context: context);
+ late final _$_reputationsV2Atom = Atom(name: '_EncointerAccountStore._reputationsV2', context: context);
@override
- Map get reputations {
- _$reputationsAtom.reportRead();
- return super.reputations;
+ Map? get _reputationsV2 {
+ _$_reputationsV2Atom.reportRead();
+ return super._reputationsV2;
}
@override
- set reputations(Map value) {
- _$reputationsAtom.reportWrite(value, super.reputations, () {
- super.reputations = value;
+ set _reputationsV2(Map? value) {
+ _$_reputationsV2Atom.reportWrite(value, super._reputationsV2, () {
+ super._reputationsV2 = value;
});
}
@@ -213,13 +202,11 @@ mixin _$EncointerAccountStore on _EncointerAccountStore, Store {
String toString() {
return '''
balanceEntries: ${balanceEntries},
-reputations: ${reputations},
txsTransfer: ${txsTransfer},
numberOfNewbieTicketsForReputable: ${numberOfNewbieTicketsForReputable},
lastProofOfAttendance: ${lastProofOfAttendance},
verifiedReputations: ${verifiedReputations},
-verifiedReputationCount: ${verifiedReputationCount},
-ceremonyIndexForNextProofOfAttendance: ${ceremonyIndexForNextProofOfAttendance}
+verifiedReputationCount: ${verifiedReputationCount}
''';
}
}
diff --git a/app/pubspec.lock b/app/pubspec.lock
index 295359bb0..083bad93f 100644
--- a/app/pubspec.lock
+++ b/app/pubspec.lock
@@ -523,6 +523,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.4.0"
+ flutter_linkify:
+ dependency: "direct main"
+ description:
+ name: flutter_linkify
+ sha256: "74669e06a8f358fee4512b4320c0b80e51cffc496607931de68d28f099254073"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.0.0"
flutter_local_notifications:
dependency: "direct main"
description:
@@ -848,6 +856,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.9.0"
+ linkify:
+ dependency: transitive
+ description:
+ name: linkify
+ sha256: "4139ea77f4651ab9c315b577da2dd108d9aa0bd84b5d03d33323f1970c645832"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.0.0"
lists:
dependency: transitive
description:
diff --git a/app/pubspec.yaml b/app/pubspec.yaml
index 8501d4449..ad78306e1 100644
--- a/app/pubspec.yaml
+++ b/app/pubspec.yaml
@@ -14,7 +14,7 @@ description: EncointerWallet made with Flutter.
# bump version already while working on new release, bumping build number at the same time
# bump build number even more, if needed to clarify what's deployed
-version: 1.13.2+882
+version: 1.13.4+884
publish_to: none
@@ -63,6 +63,7 @@ dependencies:
provider: ^6.1.1
flutter_map_marker_popup: ^6.1.2
flutter_map: ^6.1.0
+ flutter_linkify: ^6.0.0 # Automatically transform http(s) links to inline links.
dart_geohash: ^2.0.2 # Todo: #1270: replace with alternative package
iconsax: ^0.0.8 # Todo: #1271: replace with alternative package
add_2_calendar: ^3.0.1
diff --git a/app/test/mock/data/mock_encointer_data.dart b/app/test/mock/data/mock_encointer_data.dart
index 3fc61da09..a374fd031 100644
--- a/app/test/mock/data/mock_encointer_data.dart
+++ b/app/test/mock/data/mock_encointer_data.dart
@@ -25,8 +25,8 @@ List testCommunities = [
CidName(cid3, buendnerBock),
];
-Map testReputations = {
- 1: CommunityReputation(cid, Reputation.VerifiedUnlinked),
+Map testReputations = {
+ 1: CommunityReputationV1(cid, ReputationV1.VerifiedUnlinked),
};
const Map communityMetadata = {
diff --git a/app/test/service/tx/lib/send_tx_dart_test.dart b/app/test/service/tx/lib/send_tx_dart_test.dart
index 6f34bd92e..7ea54de79 100644
--- a/app/test/service/tx/lib/send_tx_dart_test.dart
+++ b/app/test/service/tx/lib/send_tx_dart_test.dart
@@ -29,7 +29,8 @@ void main() {
// Checked that the encoded call matches the one from polkadot-js.
const oneERT = 1000000000000;
- final transfer = encointerKusama.tx.balances.transfer(dest: bob.multiAddress(), value: BigInt.from(oneERT));
+ final transfer =
+ encointerKusama.tx.balances.transferAllowDeath(dest: bob.multiAddress(), value: BigInt.from(oneERT));
final txBuilder = TxBuilder(provider);
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/encointer_kusama.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/encointer_kusama.dart
index 07d8c1556..c25970b14 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/encointer_kusama.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/encointer_kusama.dart
@@ -1,32 +1,33 @@
// ignore_for_file: no_leading_underscores_for_library_prefixes
-import 'dart:async' as _i27;
+import 'dart:async' as _i28;
import 'package:polkadart/polkadart.dart' as _i1;
import 'pallets/aura.dart' as _i9;
import 'pallets/aura_ext.dart' as _i10;
import 'pallets/balances.dart' as _i7;
-import 'pallets/collective.dart' as _i17;
+import 'pallets/collective.dart' as _i18;
import 'pallets/dmp_queue.dart' as _i13;
-import 'pallets/encointer_balances.dart' as _i22;
-import 'pallets/encointer_bazaar.dart' as _i23;
-import 'pallets/encointer_ceremonies.dart' as _i20;
-import 'pallets/encointer_communities.dart' as _i21;
-import 'pallets/encointer_faucet.dart' as _i25;
-import 'pallets/encointer_reputation_commitments.dart' as _i24;
-import 'pallets/encointer_scheduler.dart' as _i19;
-import 'pallets/membership.dart' as _i18;
+import 'pallets/encointer_balances.dart' as _i23;
+import 'pallets/encointer_bazaar.dart' as _i24;
+import 'pallets/encointer_ceremonies.dart' as _i21;
+import 'pallets/encointer_communities.dart' as _i22;
+import 'pallets/encointer_faucet.dart' as _i26;
+import 'pallets/encointer_reputation_commitments.dart' as _i25;
+import 'pallets/encointer_scheduler.dart' as _i20;
+import 'pallets/membership.dart' as _i19;
+import 'pallets/message_queue.dart' as _i14;
import 'pallets/parachain_info.dart' as _i6;
import 'pallets/parachain_system.dart' as _i3;
import 'pallets/polkadot_xcm.dart' as _i12;
-import 'pallets/proxy.dart' as _i15;
+import 'pallets/proxy.dart' as _i16;
import 'pallets/randomness_collective_flip.dart' as _i4;
-import 'pallets/scheduler.dart' as _i16;
+import 'pallets/scheduler.dart' as _i17;
import 'pallets/system.dart' as _i2;
import 'pallets/timestamp.dart' as _i5;
import 'pallets/transaction_payment.dart' as _i8;
-import 'pallets/treasury.dart' as _i14;
-import 'pallets/utility.dart' as _i26;
+import 'pallets/treasury.dart' as _i15;
+import 'pallets/utility.dart' as _i27;
import 'pallets/xcmp_queue.dart' as _i11;
class Queries {
@@ -43,18 +44,19 @@ class Queries {
xcmpQueue = _i11.Queries(api),
polkadotXcm = _i12.Queries(api),
dmpQueue = _i13.Queries(api),
- treasury = _i14.Queries(api),
- proxy = _i15.Queries(api),
- scheduler = _i16.Queries(api),
- collective = _i17.Queries(api),
- membership = _i18.Queries(api),
- encointerScheduler = _i19.Queries(api),
- encointerCeremonies = _i20.Queries(api),
- encointerCommunities = _i21.Queries(api),
- encointerBalances = _i22.Queries(api),
- encointerBazaar = _i23.Queries(api),
- encointerReputationCommitments = _i24.Queries(api),
- encointerFaucet = _i25.Queries(api);
+ messageQueue = _i14.Queries(api),
+ treasury = _i15.Queries(api),
+ proxy = _i16.Queries(api),
+ scheduler = _i17.Queries(api),
+ collective = _i18.Queries(api),
+ membership = _i19.Queries(api),
+ encointerScheduler = _i20.Queries(api),
+ encointerCeremonies = _i21.Queries(api),
+ encointerCommunities = _i22.Queries(api),
+ encointerBalances = _i23.Queries(api),
+ encointerBazaar = _i24.Queries(api),
+ encointerReputationCommitments = _i25.Queries(api),
+ encointerFaucet = _i26.Queries(api);
final _i2.Queries system;
@@ -80,29 +82,31 @@ class Queries {
final _i13.Queries dmpQueue;
- final _i14.Queries treasury;
+ final _i14.Queries messageQueue;
- final _i15.Queries proxy;
+ final _i15.Queries treasury;
- final _i16.Queries scheduler;
+ final _i16.Queries proxy;
- final _i17.Queries collective;
+ final _i17.Queries scheduler;
- final _i18.Queries membership;
+ final _i18.Queries collective;
- final _i19.Queries encointerScheduler;
+ final _i19.Queries membership;
- final _i20.Queries encointerCeremonies;
+ final _i20.Queries encointerScheduler;
- final _i21.Queries encointerCommunities;
+ final _i21.Queries encointerCeremonies;
- final _i22.Queries encointerBalances;
+ final _i22.Queries encointerCommunities;
- final _i23.Queries encointerBazaar;
+ final _i23.Queries encointerBalances;
- final _i24.Queries encointerReputationCommitments;
+ final _i24.Queries encointerBazaar;
- final _i25.Queries encointerFaucet;
+ final _i25.Queries encointerReputationCommitments;
+
+ final _i26.Queries encointerFaucet;
}
class Extrinsics {
@@ -120,33 +124,33 @@ class Extrinsics {
final _i12.Txs polkadotXcm = _i12.Txs();
- final _i13.Txs dmpQueue = _i13.Txs();
+ final _i14.Txs messageQueue = _i14.Txs();
- final _i26.Txs utility = _i26.Txs();
+ final _i27.Txs utility = _i27.Txs();
- final _i14.Txs treasury = _i14.Txs();
+ final _i15.Txs treasury = _i15.Txs();
- final _i15.Txs proxy = _i15.Txs();
+ final _i16.Txs proxy = _i16.Txs();
- final _i16.Txs scheduler = _i16.Txs();
+ final _i17.Txs scheduler = _i17.Txs();
- final _i17.Txs collective = _i17.Txs();
+ final _i18.Txs collective = _i18.Txs();
- final _i18.Txs membership = _i18.Txs();
+ final _i19.Txs membership = _i19.Txs();
- final _i19.Txs encointerScheduler = _i19.Txs();
+ final _i20.Txs encointerScheduler = _i20.Txs();
- final _i20.Txs encointerCeremonies = _i20.Txs();
+ final _i21.Txs encointerCeremonies = _i21.Txs();
- final _i21.Txs encointerCommunities = _i21.Txs();
+ final _i22.Txs encointerCommunities = _i22.Txs();
- final _i22.Txs encointerBalances = _i22.Txs();
+ final _i23.Txs encointerBalances = _i23.Txs();
- final _i23.Txs encointerBazaar = _i23.Txs();
+ final _i24.Txs encointerBazaar = _i24.Txs();
- final _i24.Txs encointerReputationCommitments = _i24.Txs();
+ final _i25.Txs encointerReputationCommitments = _i25.Txs();
- final _i25.Txs encointerFaucet = _i25.Txs();
+ final _i26.Txs encointerFaucet = _i26.Txs();
}
class Constants {
@@ -160,25 +164,29 @@ class Constants {
final _i8.Constants transactionPayment = _i8.Constants();
- final _i26.Constants utility = _i26.Constants();
+ final _i11.Constants xcmpQueue = _i11.Constants();
+
+ final _i14.Constants messageQueue = _i14.Constants();
+
+ final _i27.Constants utility = _i27.Constants();
- final _i14.Constants treasury = _i14.Constants();
+ final _i15.Constants treasury = _i15.Constants();
- final _i15.Constants proxy = _i15.Constants();
+ final _i16.Constants proxy = _i16.Constants();
- final _i16.Constants scheduler = _i16.Constants();
+ final _i17.Constants scheduler = _i17.Constants();
- final _i17.Constants collective = _i17.Constants();
+ final _i18.Constants collective = _i18.Constants();
- final _i19.Constants encointerScheduler = _i19.Constants();
+ final _i20.Constants encointerScheduler = _i20.Constants();
- final _i20.Constants encointerCeremonies = _i20.Constants();
+ final _i21.Constants encointerCeremonies = _i21.Constants();
- final _i21.Constants encointerCommunities = _i21.Constants();
+ final _i22.Constants encointerCommunities = _i22.Constants();
- final _i22.Constants encointerBalances = _i22.Constants();
+ final _i23.Constants encointerBalances = _i23.Constants();
- final _i25.Constants encointerFaucet = _i25.Constants();
+ final _i26.Constants encointerFaucet = _i26.Constants();
}
class Rpc {
@@ -243,11 +251,11 @@ class EncointerKusama {
final Registry registry;
- _i27.Future connect() async {
+ _i28.Future connect() async {
return await _provider.connect();
}
- _i27.Future disconnect() async {
+ _i28.Future disconnect() async {
return await _provider.disconnect();
}
}
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/aura_ext.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/aura_ext.dart
index 685571ef7..5a85316a1 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/aura_ext.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/aura_ext.dart
@@ -1,11 +1,13 @@
// ignore_for_file: no_leading_underscores_for_library_prefixes
-import 'dart:async' as _i4;
-import 'dart:typed_data' as _i5;
+import 'dart:async' as _i6;
+import 'dart:typed_data' as _i7;
import 'package:polkadart/polkadart.dart' as _i1;
import 'package:polkadart/scale_codec.dart' as _i3;
import '../types/sp_consensus_aura/sr25519/app_sr25519/public.dart' as _i2;
+import '../types/sp_consensus_slots/slot.dart' as _i5;
+import '../types/tuples.dart' as _i4;
class Queries {
const Queries(this.__api);
@@ -18,12 +20,21 @@ class Queries {
valueCodec: _i3.SequenceCodec<_i2.Public>(_i2.PublicCodec()),
);
+ final _i1.StorageValue<_i4.Tuple2<_i5.Slot, int>> _slotInfo = const _i1.StorageValue<_i4.Tuple2<_i5.Slot, int>>(
+ prefix: 'AuraExt',
+ storage: 'SlotInfo',
+ valueCodec: _i4.Tuple2Codec<_i5.Slot, int>(
+ _i5.SlotCodec(),
+ _i3.U32Codec.codec,
+ ),
+ );
+
/// Serves as cache for the authorities.
///
/// The authorities in AuRa are overwritten in `on_initialize` when we switch to a new session,
- /// but we require the old authorities to verify the seal when validating a PoV. This will always
- /// be updated to the latest AuRa authorities in `on_finalize`.
- _i4.Future> authorities({_i1.BlockHash? at}) async {
+ /// but we require the old authorities to verify the seal when validating a PoV. This will
+ /// always be updated to the latest AuRa authorities in `on_finalize`.
+ _i6.Future> authorities({_i1.BlockHash? at}) async {
final hashedKey = _authorities.hashedKey();
final bytes = await __api.getStorage(
hashedKey,
@@ -35,9 +46,30 @@ class Queries {
return []; /* Default */
}
+ /// Current slot paired with a number of authored blocks.
+ ///
+ /// Updated on each block initialization.
+ _i6.Future<_i4.Tuple2<_i5.Slot, int>?> slotInfo({_i1.BlockHash? at}) async {
+ final hashedKey = _slotInfo.hashedKey();
+ final bytes = await __api.getStorage(
+ hashedKey,
+ at: at,
+ );
+ if (bytes != null) {
+ return _slotInfo.decodeValue(bytes);
+ }
+ return null; /* Nullable */
+ }
+
/// Returns the storage key for `authorities`.
- _i5.Uint8List authoritiesKey() {
+ _i7.Uint8List authoritiesKey() {
final hashedKey = _authorities.hashedKey();
return hashedKey;
}
+
+ /// Returns the storage key for `slotInfo`.
+ _i7.Uint8List slotInfoKey() {
+ final hashedKey = _slotInfo.hashedKey();
+ return hashedKey;
+ }
}
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/balances.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/balances.dart
index 521ff6d3d..63d43e5e3 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/balances.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/balances.dart
@@ -5,9 +5,10 @@ import 'dart:typed_data' as _i9;
import 'package:polkadart/polkadart.dart' as _i1;
import 'package:polkadart/scale_codec.dart' as _i2;
-import '../types/encointer_runtime/runtime_call.dart' as _i10;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i10;
import '../types/pallet_balances/pallet/call.dart' as _i12;
import '../types/pallet_balances/types/account_data.dart' as _i4;
+import '../types/pallet_balances/types/adjustment_direction.dart' as _i13;
import '../types/pallet_balances/types/balance_lock.dart' as _i5;
import '../types/pallet_balances/types/id_amount.dart' as _i7;
import '../types/pallet_balances/types/reserve_data.dart' as _i6;
@@ -297,20 +298,6 @@ class Txs {
return _i10.RuntimeCall.values.balances(_call);
}
- /// See [`Pallet::set_balance_deprecated`].
- _i10.RuntimeCall setBalanceDeprecated({
- required _i11.MultiAddress who,
- required BigInt newFree,
- required BigInt oldReserved,
- }) {
- final _call = _i12.Call.values.setBalanceDeprecated(
- who: who,
- newFree: newFree,
- oldReserved: oldReserved,
- );
- return _i10.RuntimeCall.values.balances(_call);
- }
-
/// See [`Pallet::force_transfer`].
_i10.RuntimeCall forceTransfer({
required _i11.MultiAddress source,
@@ -367,18 +354,6 @@ class Txs {
return _i10.RuntimeCall.values.balances(_call);
}
- /// See [`Pallet::transfer`].
- _i10.RuntimeCall transfer({
- required _i11.MultiAddress dest,
- required BigInt value,
- }) {
- final _call = _i12.Call.values.transfer(
- dest: dest,
- value: value,
- );
- return _i10.RuntimeCall.values.balances(_call);
- }
-
/// See [`Pallet::force_set_balance`].
_i10.RuntimeCall forceSetBalance({
required _i11.MultiAddress who,
@@ -390,6 +365,18 @@ class Txs {
);
return _i10.RuntimeCall.values.balances(_call);
}
+
+ /// See [`Pallet::force_adjust_total_issuance`].
+ _i10.RuntimeCall forceAdjustTotalIssuance({
+ required _i13.AdjustmentDirection direction,
+ required BigInt delta,
+ }) {
+ final _call = _i12.Call.values.forceAdjustTotalIssuance(
+ direction: direction,
+ delta: delta,
+ );
+ return _i10.RuntimeCall.values.balances(_call);
+ }
}
class Constants {
@@ -412,9 +399,6 @@ class Constants {
/// The maximum number of named reserves that can exist on an account.
final int maxReserves = 50;
- /// The maximum number of holds that can exist on an account at any time.
- final int maxHolds = 0;
-
/// The maximum number of individual freeze locks that can exist on an account at any time.
final int maxFreezes = 0;
}
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/collective.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/collective.dart
index c980de8b2..0db5037bc 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/collective.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/collective.dart
@@ -5,7 +5,7 @@ import 'dart:typed_data' as _i8;
import 'package:polkadart/polkadart.dart' as _i1;
import 'package:polkadart/scale_codec.dart' as _i3;
-import '../types/encointer_runtime/runtime_call.dart' as _i4;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i4;
import '../types/pallet_collective/pallet/call.dart' as _i9;
import '../types/pallet_collective/votes.dart' as _i5;
import '../types/primitive_types/h256.dart' as _i2;
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/cumulus_xcm.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/cumulus_xcm.dart
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/cumulus_xcm.dart
@@ -0,0 +1 @@
+
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/dmp_queue.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/dmp_queue.dart
index 086e801fd..4e9bb24b5 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/dmp_queue.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/dmp_queue.dart
@@ -1,196 +1,38 @@
// ignore_for_file: no_leading_underscores_for_library_prefixes
-import 'dart:async' as _i6;
-import 'dart:typed_data' as _i8;
+import 'dart:async' as _i3;
+import 'dart:typed_data' as _i4;
import 'package:polkadart/polkadart.dart' as _i1;
-import 'package:polkadart/scale_codec.dart' as _i5;
-import '../types/cumulus_pallet_dmp_queue/config_data.dart' as _i2;
-import '../types/cumulus_pallet_dmp_queue/page_index_data.dart' as _i3;
-import '../types/cumulus_pallet_dmp_queue/pallet/call.dart' as _i10;
-import '../types/encointer_runtime/runtime_call.dart' as _i9;
-import '../types/sp_weights/weight_v2/weight.dart' as _i7;
-import '../types/tuples.dart' as _i4;
+import '../types/cumulus_pallet_dmp_queue/pallet/migration_state.dart' as _i2;
class Queries {
const Queries(this.__api);
final _i1.StateApi __api;
- final _i1.StorageValue<_i2.ConfigData> _configuration = const _i1.StorageValue<_i2.ConfigData>(
+ final _i1.StorageValue<_i2.MigrationState> _migrationStatus = const _i1.StorageValue<_i2.MigrationState>(
prefix: 'DmpQueue',
- storage: 'Configuration',
- valueCodec: _i2.ConfigData.codec,
+ storage: 'MigrationStatus',
+ valueCodec: _i2.MigrationState.codec,
);
- final _i1.StorageValue<_i3.PageIndexData> _pageIndex = const _i1.StorageValue<_i3.PageIndexData>(
- prefix: 'DmpQueue',
- storage: 'PageIndex',
- valueCodec: _i3.PageIndexData.codec,
- );
-
- final _i1.StorageMap>>> _pages =
- const _i1.StorageMap>>>(
- prefix: 'DmpQueue',
- storage: 'Pages',
- valueCodec: _i5.SequenceCodec<_i4.Tuple2>>(_i4.Tuple2Codec>(
- _i5.U32Codec.codec,
- _i5.U8SequenceCodec.codec,
- )),
- hasher: _i1.StorageHasher.blake2b128Concat(_i5.U32Codec.codec),
- );
-
- final _i1.StorageMap>> _overweight =
- const _i1.StorageMap>>(
- prefix: 'DmpQueue',
- storage: 'Overweight',
- valueCodec: _i4.Tuple2Codec>(
- _i5.U32Codec.codec,
- _i5.U8SequenceCodec.codec,
- ),
- hasher: _i1.StorageHasher.blake2b128Concat(_i5.U64Codec.codec),
- );
-
- final _i1.StorageValue _counterForOverweight = const _i1.StorageValue(
- prefix: 'DmpQueue',
- storage: 'CounterForOverweight',
- valueCodec: _i5.U32Codec.codec,
- );
-
- /// The configuration.
- _i6.Future<_i2.ConfigData> configuration({_i1.BlockHash? at}) async {
- final hashedKey = _configuration.hashedKey();
- final bytes = await __api.getStorage(
- hashedKey,
- at: at,
- );
- if (bytes != null) {
- return _configuration.decodeValue(bytes);
- }
- return _i2.ConfigData(
- maxIndividual: _i7.Weight(
- refTime: BigInt.from(10000000000),
- proofSize: BigInt.from(65536),
- )); /* Default */
- }
-
- /// The page index.
- _i6.Future<_i3.PageIndexData> pageIndex({_i1.BlockHash? at}) async {
- final hashedKey = _pageIndex.hashedKey();
+ /// The migration state of this pallet.
+ _i3.Future<_i2.MigrationState> migrationStatus({_i1.BlockHash? at}) async {
+ final hashedKey = _migrationStatus.hashedKey();
final bytes = await __api.getStorage(
hashedKey,
at: at,
);
if (bytes != null) {
- return _pageIndex.decodeValue(bytes);
+ return _migrationStatus.decodeValue(bytes);
}
- return _i3.PageIndexData(
- beginUsed: 0,
- endUsed: 0,
- overweightCount: BigInt.zero,
- ); /* Default */
+ return _i2.NotStarted(); /* Default */
}
- /// The queue pages.
- _i6.Future>>> pages(
- int key1, {
- _i1.BlockHash? at,
- }) async {
- final hashedKey = _pages.hashedKeyFor(key1);
- final bytes = await __api.getStorage(
- hashedKey,
- at: at,
- );
- if (bytes != null) {
- return _pages.decodeValue(bytes);
- }
- return []; /* Default */
- }
-
- /// The overweight messages.
- _i6.Future<_i4.Tuple2>?> overweight(
- BigInt key1, {
- _i1.BlockHash? at,
- }) async {
- final hashedKey = _overweight.hashedKeyFor(key1);
- final bytes = await __api.getStorage(
- hashedKey,
- at: at,
- );
- if (bytes != null) {
- return _overweight.decodeValue(bytes);
- }
- return null; /* Nullable */
- }
-
- /// Counter for the related counted storage map
- _i6.Future counterForOverweight({_i1.BlockHash? at}) async {
- final hashedKey = _counterForOverweight.hashedKey();
- final bytes = await __api.getStorage(
- hashedKey,
- at: at,
- );
- if (bytes != null) {
- return _counterForOverweight.decodeValue(bytes);
- }
- return 0; /* Default */
- }
-
- /// Returns the storage key for `configuration`.
- _i8.Uint8List configurationKey() {
- final hashedKey = _configuration.hashedKey();
- return hashedKey;
- }
-
- /// Returns the storage key for `pageIndex`.
- _i8.Uint8List pageIndexKey() {
- final hashedKey = _pageIndex.hashedKey();
+ /// Returns the storage key for `migrationStatus`.
+ _i4.Uint8List migrationStatusKey() {
+ final hashedKey = _migrationStatus.hashedKey();
return hashedKey;
}
-
- /// Returns the storage key for `pages`.
- _i8.Uint8List pagesKey(int key1) {
- final hashedKey = _pages.hashedKeyFor(key1);
- return hashedKey;
- }
-
- /// Returns the storage key for `overweight`.
- _i8.Uint8List overweightKey(BigInt key1) {
- final hashedKey = _overweight.hashedKeyFor(key1);
- return hashedKey;
- }
-
- /// Returns the storage key for `counterForOverweight`.
- _i8.Uint8List counterForOverweightKey() {
- final hashedKey = _counterForOverweight.hashedKey();
- return hashedKey;
- }
-
- /// Returns the storage map key prefix for `pages`.
- _i8.Uint8List pagesMapPrefix() {
- final hashedKey = _pages.mapPrefix();
- return hashedKey;
- }
-
- /// Returns the storage map key prefix for `overweight`.
- _i8.Uint8List overweightMapPrefix() {
- final hashedKey = _overweight.mapPrefix();
- return hashedKey;
- }
-}
-
-class Txs {
- const Txs();
-
- /// See [`Pallet::service_overweight`].
- _i9.RuntimeCall serviceOverweight({
- required BigInt index,
- required _i7.Weight weightLimit,
- }) {
- final _call = _i10.Call.values.serviceOverweight(
- index: index,
- weightLimit: weightLimit,
- );
- return _i9.RuntimeCall.values.dmpQueue(_call);
- }
}
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_balances.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_balances.dart
index b9f3f16d1..6e11e16be 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_balances.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_balances.dart
@@ -5,9 +5,9 @@ import 'dart:typed_data' as _i9;
import 'package:polkadart/polkadart.dart' as _i1;
import 'package:polkadart/scale_codec.dart' as _i6;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i10;
import '../types/encointer_primitives/balances/balance_entry.dart' as _i3;
import '../types/encointer_primitives/communities/community_identifier.dart' as _i2;
-import '../types/encointer_runtime/runtime_call.dart' as _i10;
import '../types/pallet_encointer_balances/pallet/call.dart' as _i11;
import '../types/sp_core/crypto/account_id32.dart' as _i4;
import '../types/substrate_fixed/fixed_i128.dart' as _i5;
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_bazaar.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_bazaar.dart
index 826b1b101..acb8abfd4 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_bazaar.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_bazaar.dart
@@ -5,11 +5,11 @@ import 'dart:typed_data' as _i9;
import 'package:polkadart/polkadart.dart' as _i1;
import 'package:polkadart/scale_codec.dart' as _i7;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i10;
import '../types/encointer_primitives/bazaar/business_data.dart' as _i4;
import '../types/encointer_primitives/bazaar/business_identifier.dart' as _i5;
import '../types/encointer_primitives/bazaar/offering_data.dart' as _i6;
import '../types/encointer_primitives/communities/community_identifier.dart' as _i2;
-import '../types/encointer_runtime/runtime_call.dart' as _i10;
import '../types/pallet_encointer_bazaar/pallet/call.dart' as _i11;
import '../types/sp_core/crypto/account_id32.dart' as _i3;
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_ceremonies.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_ceremonies.dart
index 819321f3f..b8ac13d20 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_ceremonies.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_ceremonies.dart
@@ -5,6 +5,7 @@ import 'dart:typed_data' as _i13;
import 'package:polkadart/polkadart.dart' as _i1;
import 'package:polkadart/scale_codec.dart' as _i4;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i14;
import '../types/encointer_primitives/ceremonies/assignment.dart' as _i7;
import '../types/encointer_primitives/ceremonies/assignment_count.dart' as _i6;
import '../types/encointer_primitives/ceremonies/assignment_params.dart' as _i12;
@@ -12,7 +13,6 @@ import '../types/encointer_primitives/ceremonies/meetup_result.dart' as _i10;
import '../types/encointer_primitives/ceremonies/proof_of_attendance.dart' as _i15;
import '../types/encointer_primitives/ceremonies/reputation.dart' as _i8;
import '../types/encointer_primitives/communities/community_identifier.dart' as _i2;
-import '../types/encointer_runtime/runtime_call.dart' as _i14;
import '../types/pallet_encointer_ceremonies/pallet/call.dart' as _i16;
import '../types/sp_core/crypto/account_id32.dart' as _i3;
import '../types/substrate_fixed/fixed_u128.dart' as _i9;
@@ -711,7 +711,7 @@ class Queries {
if (bytes != null) {
return _participantReputation.decodeValue(bytes);
}
- return _i8.Reputation.unverified; /* Default */
+ return _i8.Unverified(); /* Default */
}
_i11.Future reputationCount(
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_communities.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_communities.dart
index ca1f8684a..085880c16 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_communities.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_communities.dart
@@ -5,16 +5,16 @@ import 'dart:typed_data' as _i11;
import 'package:polkadart/polkadart.dart' as _i1;
import 'package:polkadart/scale_codec.dart' as _i4;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i12;
import '../types/encointer_primitives/communities/community_identifier.dart' as _i3;
import '../types/encointer_primitives/communities/community_metadata.dart' as _i7;
import '../types/encointer_primitives/communities/community_rules.dart' as _i10;
import '../types/encointer_primitives/communities/location.dart' as _i5;
-import '../types/encointer_runtime/runtime_call.dart' as _i12;
-import '../types/geohash/geo_hash.dart' as _i2;
import '../types/pallet_encointer_communities/pallet/call.dart' as _i14;
import '../types/sp_core/crypto/account_id32.dart' as _i6;
import '../types/substrate_fixed/fixed_i128.dart' as _i13;
import '../types/substrate_fixed/fixed_u128.dart' as _i8;
+import '../types/substrate_geohash/geo_hash.dart' as _i2;
class Queries {
const Queries(this.__api);
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_faucet.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_faucet.dart
index ffe6e1e0d..94c02108c 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_faucet.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_faucet.dart
@@ -5,9 +5,9 @@ import 'dart:typed_data' as _i6;
import 'package:polkadart/polkadart.dart' as _i1;
import 'package:polkadart/scale_codec.dart' as _i4;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i7;
import '../types/encointer_primitives/communities/community_identifier.dart' as _i8;
import '../types/encointer_primitives/faucet/faucet.dart' as _i3;
-import '../types/encointer_runtime/runtime_call.dart' as _i7;
import '../types/frame_support/pallet_id.dart' as _i10;
import '../types/pallet_encointer_faucet/pallet/call.dart' as _i9;
import '../types/sp_core/crypto/account_id32.dart' as _i2;
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_reputation_commitments.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_reputation_commitments.dart
index 51813bf17..b16dd4264 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_reputation_commitments.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_reputation_commitments.dart
@@ -5,8 +5,8 @@ import 'dart:typed_data' as _i8;
import 'package:polkadart/polkadart.dart' as _i1;
import 'package:polkadart/scale_codec.dart' as _i2;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i9;
import '../types/encointer_primitives/communities/community_identifier.dart' as _i4;
-import '../types/encointer_runtime/runtime_call.dart' as _i9;
import '../types/pallet_encointer_reputation_commitments/pallet/call.dart' as _i10;
import '../types/primitive_types/h256.dart' as _i6;
import '../types/sp_core/crypto/account_id32.dart' as _i5;
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_scheduler.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_scheduler.dart
index 368898c67..8fb390054 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_scheduler.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/encointer_scheduler.dart
@@ -5,8 +5,8 @@ import 'dart:typed_data' as _i5;
import 'package:polkadart/polkadart.dart' as _i1;
import 'package:polkadart/scale_codec.dart' as _i2;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i6;
import '../types/encointer_primitives/scheduler/ceremony_phase_type.dart' as _i3;
-import '../types/encointer_runtime/runtime_call.dart' as _i6;
import '../types/pallet_encointer_scheduler/pallet/call.dart' as _i7;
class Queries {
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/membership.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/membership.dart
index 9e517d77c..a2b16f8bf 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/membership.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/membership.dart
@@ -5,7 +5,7 @@ import 'dart:typed_data' as _i5;
import 'package:polkadart/polkadart.dart' as _i1;
import 'package:polkadart/scale_codec.dart' as _i3;
-import '../types/encointer_runtime/runtime_call.dart' as _i6;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i6;
import '../types/pallet_membership/pallet/call.dart' as _i8;
import '../types/sp_core/crypto/account_id32.dart' as _i2;
import '../types/sp_runtime/multiaddress/multi_address.dart' as _i7;
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/message_queue.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/message_queue.dart
new file mode 100644
index 000000000..8126a7182
--- /dev/null
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/message_queue.dart
@@ -0,0 +1,192 @@
+// ignore_for_file: no_leading_underscores_for_library_prefixes
+import 'dart:async' as _i6;
+import 'dart:typed_data' as _i7;
+
+import 'package:polkadart/polkadart.dart' as _i1;
+import 'package:polkadart/scale_codec.dart' as _i5;
+
+import '../types/cumulus_primitives_core/aggregate_message_origin.dart' as _i2;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i8;
+import '../types/pallet_message_queue/book_state.dart' as _i3;
+import '../types/pallet_message_queue/page.dart' as _i4;
+import '../types/pallet_message_queue/pallet/call.dart' as _i9;
+import '../types/sp_weights/weight_v2/weight.dart' as _i10;
+
+class Queries {
+ const Queries(this.__api);
+
+ final _i1.StateApi __api;
+
+ final _i1.StorageMap<_i2.AggregateMessageOrigin, _i3.BookState> _bookStateFor =
+ const _i1.StorageMap<_i2.AggregateMessageOrigin, _i3.BookState>(
+ prefix: 'MessageQueue',
+ storage: 'BookStateFor',
+ valueCodec: _i3.BookState.codec,
+ hasher: _i1.StorageHasher.twoxx64Concat(_i2.AggregateMessageOrigin.codec),
+ );
+
+ final _i1.StorageValue<_i2.AggregateMessageOrigin> _serviceHead = const _i1.StorageValue<_i2.AggregateMessageOrigin>(
+ prefix: 'MessageQueue',
+ storage: 'ServiceHead',
+ valueCodec: _i2.AggregateMessageOrigin.codec,
+ );
+
+ final _i1.StorageDoubleMap<_i2.AggregateMessageOrigin, int, _i4.Page> _pages =
+ const _i1.StorageDoubleMap<_i2.AggregateMessageOrigin, int, _i4.Page>(
+ prefix: 'MessageQueue',
+ storage: 'Pages',
+ valueCodec: _i4.Page.codec,
+ hasher1: _i1.StorageHasher.twoxx64Concat(_i2.AggregateMessageOrigin.codec),
+ hasher2: _i1.StorageHasher.twoxx64Concat(_i5.U32Codec.codec),
+ );
+
+ /// The index of the first and last (non-empty) pages.
+ _i6.Future<_i3.BookState> bookStateFor(
+ _i2.AggregateMessageOrigin key1, {
+ _i1.BlockHash? at,
+ }) async {
+ final hashedKey = _bookStateFor.hashedKeyFor(key1);
+ final bytes = await __api.getStorage(
+ hashedKey,
+ at: at,
+ );
+ if (bytes != null) {
+ return _bookStateFor.decodeValue(bytes);
+ }
+ return _i3.BookState(
+ begin: 0,
+ end: 0,
+ count: 0,
+ readyNeighbours: null,
+ messageCount: BigInt.zero,
+ size: BigInt.zero,
+ ); /* Default */
+ }
+
+ /// The origin at which we should begin servicing.
+ _i6.Future<_i2.AggregateMessageOrigin?> serviceHead({_i1.BlockHash? at}) async {
+ final hashedKey = _serviceHead.hashedKey();
+ final bytes = await __api.getStorage(
+ hashedKey,
+ at: at,
+ );
+ if (bytes != null) {
+ return _serviceHead.decodeValue(bytes);
+ }
+ return null; /* Nullable */
+ }
+
+ /// The map of page indices to pages.
+ _i6.Future<_i4.Page?> pages(
+ _i2.AggregateMessageOrigin key1,
+ int key2, {
+ _i1.BlockHash? at,
+ }) async {
+ final hashedKey = _pages.hashedKeyFor(
+ key1,
+ key2,
+ );
+ final bytes = await __api.getStorage(
+ hashedKey,
+ at: at,
+ );
+ if (bytes != null) {
+ return _pages.decodeValue(bytes);
+ }
+ return null; /* Nullable */
+ }
+
+ /// Returns the storage key for `bookStateFor`.
+ _i7.Uint8List bookStateForKey(_i2.AggregateMessageOrigin key1) {
+ final hashedKey = _bookStateFor.hashedKeyFor(key1);
+ return hashedKey;
+ }
+
+ /// Returns the storage key for `serviceHead`.
+ _i7.Uint8List serviceHeadKey() {
+ final hashedKey = _serviceHead.hashedKey();
+ return hashedKey;
+ }
+
+ /// Returns the storage key for `pages`.
+ _i7.Uint8List pagesKey(
+ _i2.AggregateMessageOrigin key1,
+ int key2,
+ ) {
+ final hashedKey = _pages.hashedKeyFor(
+ key1,
+ key2,
+ );
+ return hashedKey;
+ }
+
+ /// Returns the storage map key prefix for `bookStateFor`.
+ _i7.Uint8List bookStateForMapPrefix() {
+ final hashedKey = _bookStateFor.mapPrefix();
+ return hashedKey;
+ }
+
+ /// Returns the storage map key prefix for `pages`.
+ _i7.Uint8List pagesMapPrefix(_i2.AggregateMessageOrigin key1) {
+ final hashedKey = _pages.mapPrefix(key1);
+ return hashedKey;
+ }
+}
+
+class Txs {
+ const Txs();
+
+ /// See [`Pallet::reap_page`].
+ _i8.RuntimeCall reapPage({
+ required _i2.AggregateMessageOrigin messageOrigin,
+ required int pageIndex,
+ }) {
+ final _call = _i9.Call.values.reapPage(
+ messageOrigin: messageOrigin,
+ pageIndex: pageIndex,
+ );
+ return _i8.RuntimeCall.values.messageQueue(_call);
+ }
+
+ /// See [`Pallet::execute_overweight`].
+ _i8.RuntimeCall executeOverweight({
+ required _i2.AggregateMessageOrigin messageOrigin,
+ required int page,
+ required int index,
+ required _i10.Weight weightLimit,
+ }) {
+ final _call = _i9.Call.values.executeOverweight(
+ messageOrigin: messageOrigin,
+ page: page,
+ index: index,
+ weightLimit: weightLimit,
+ );
+ return _i8.RuntimeCall.values.messageQueue(_call);
+ }
+}
+
+class Constants {
+ Constants();
+
+ /// The size of the page; this implies the maximum message size which can be sent.
+ ///
+ /// A good value depends on the expected message sizes, their weights, the weight that is
+ /// available for processing them and the maximal needed message size. The maximal message
+ /// size is slightly lower than this as defined by [`MaxMessageLenOf`].
+ final int heapSize = 65536;
+
+ /// The maximum number of stale pages (i.e. of overweight messages) allowed before culling
+ /// can happen. Once there are more stale pages than this, then historical pages may be
+ /// dropped, even if they contain unprocessed overweight messages.
+ final int maxStale = 8;
+
+ /// The amount of weight (if any) which should be provided to the message queue for
+ /// servicing enqueued items.
+ ///
+ /// This may be legitimately `None` in the case that you will call
+ /// `ServiceQueues::service_queues` manually.
+ final _i10.Weight? serviceWeight = _i10.Weight(
+ refTime: BigInt.from(175000000000),
+ proofSize: BigInt.from(1835008),
+ );
+}
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/parachain_info.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/parachain_info.dart
index dfc909358..7fc011833 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/parachain_info.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/parachain_info.dart
@@ -4,7 +4,7 @@ import 'dart:typed_data' as _i4;
import 'package:polkadart/polkadart.dart' as _i1;
-import '../types/polkadot_parachain/primitives/id.dart' as _i2;
+import '../types/polkadot_parachain_primitives/primitives/id.dart' as _i2;
class Queries {
const Queries(this.__api);
diff --git a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/parachain_system.dart b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/parachain_system.dart
index 5cc0870b0..df6e194e3 100644
--- a/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/parachain_system.dart
+++ b/packages/ew_polkadart/lib/generated/encointer_kusama/pallets/parachain_system.dart
@@ -1,171 +1,226 @@
// ignore_for_file: no_leading_underscores_for_library_prefixes
-import 'dart:async' as _i13;
-import 'dart:typed_data' as _i14;
+import 'dart:async' as _i16;
+import 'dart:typed_data' as _i17;
import 'package:polkadart/polkadart.dart' as _i1;
-import 'package:polkadart/scale_codec.dart' as _i2;
-
-import '../types/cumulus_pallet_parachain_system/code_upgrade_authorization.dart' as _i12;
-import '../types/cumulus_pallet_parachain_system/pallet/call.dart' as _i17;
-import '../types/cumulus_pallet_parachain_system/relay_state_snapshot/messaging_state_snapshot.dart' as _i6;
-import '../types/cumulus_primitives_parachain_inherent/message_queue_chain.dart' as _i8;
-import '../types/cumulus_primitives_parachain_inherent/parachain_inherent_data.dart' as _i16;
-import '../types/encointer_runtime/runtime_call.dart' as _i15;
-import '../types/polkadot_core_primitives/outbound_hrmp_message.dart' as _i10;
-import '../types/polkadot_parachain/primitives/id.dart' as _i9;
-import '../types/polkadot_primitives/v5/abridged_host_configuration.dart' as _i7;
-import '../types/polkadot_primitives/v5/persisted_validation_data.dart' as _i3;
-import '../types/polkadot_primitives/v5/upgrade_restriction.dart' as _i4;
-import '../types/primitive_types/h256.dart' as _i18;
-import '../types/sp_trie/storage_proof/storage_proof.dart' as _i5;
-import '../types/sp_weights/weight_v2/weight.dart' as _i11;
+import 'package:polkadart/scale_codec.dart' as _i3;
+
+import '../types/cumulus_pallet_parachain_system/pallet/call.dart' as _i20;
+import '../types/cumulus_pallet_parachain_system/relay_state_snapshot/messaging_state_snapshot.dart' as _i9;
+import '../types/cumulus_pallet_parachain_system/unincluded_segment/ancestor.dart' as _i2;
+import '../types/cumulus_pallet_parachain_system/unincluded_segment/segment_tracker.dart' as _i4;
+import '../types/cumulus_primitives_parachain_inherent/message_queue_chain.dart' as _i11;
+import '../types/cumulus_primitives_parachain_inherent/parachain_inherent_data.dart' as _i19;
+import '../types/encointer_kusama_runtime/runtime_call.dart' as _i18;
+import '../types/polkadot_core_primitives/outbound_hrmp_message.dart' as _i13;
+import '../types/polkadot_parachain_primitives/primitives/id.dart' as _i12;
+import '../types/polkadot_primitives/v6/abridged_host_configuration.dart' as _i10;
+import '../types/polkadot_primitives/v6/persisted_validation_data.dart' as _i5;
+import '../types/polkadot_primitives/v6/upgrade_go_ahead.dart' as _i7;
+import '../types/polkadot_primitives/v6/upgrade_restriction.dart' as _i6;
+import '../types/primitive_types/h256.dart' as _i21;
+import '../types/sp_arithmetic/fixed_point/fixed_u128.dart' as _i14;
+import '../types/sp_trie/storage_proof/storage_proof.dart' as _i8;
+import '../types/sp_weights/weight_v2/weight.dart' as _i15;
class Queries {
const Queries(this.__api);
final _i1.StateApi __api;
+ final _i1.StorageValue> _unincludedSegment = const _i1.StorageValue>(
+ prefix: 'ParachainSystem',
+ storage: 'UnincludedSegment',
+ valueCodec: _i3.SequenceCodec<_i2.Ancestor>(_i2.Ancestor.codec),
+ );
+
+ final _i1.StorageValue<_i4.SegmentTracker> _aggregatedUnincludedSegment = const _i1.StorageValue<_i4.SegmentTracker>(
+ prefix: 'ParachainSystem',
+ storage: 'AggregatedUnincludedSegment',
+ valueCodec: _i4.SegmentTracker.codec,
+ );
+
final _i1.StorageValue> _pendingValidationCode = const _i1.StorageValue>(
prefix: 'ParachainSystem',
storage: 'PendingValidationCode',
- valueCodec: _i2.U8SequenceCodec.codec,
+ valueCodec: _i3.U8SequenceCodec.codec,
);
final _i1.StorageValue> _newValidationCode = const _i1.StorageValue>(
prefix: 'ParachainSystem',
storage: 'NewValidationCode',
- valueCodec: _i2.U8SequenceCodec.codec,
+ valueCodec: _i3.U8SequenceCodec.codec,
);
- final _i1.StorageValue<_i3.PersistedValidationData> _validationData =
- const _i1.StorageValue<_i3.PersistedValidationData>(
+ final _i1.StorageValue<_i5.PersistedValidationData> _validationData =
+ const _i1.StorageValue<_i5.PersistedValidationData>(
prefix: 'ParachainSystem',
storage: 'ValidationData',
- valueCodec: _i3.PersistedValidationData.codec,
+ valueCodec: _i5.PersistedValidationData.codec,
);
final _i1.StorageValue _didSetValidationCode = const _i1.StorageValue(
prefix: 'ParachainSystem',
storage: 'DidSetValidationCode',
- valueCodec: _i2.BoolCodec.codec,
+ valueCodec: _i3.BoolCodec.codec,
);
final _i1.StorageValue _lastRelayChainBlockNumber = const _i1.StorageValue(
prefix: 'ParachainSystem',
storage: 'LastRelayChainBlockNumber',
- valueCodec: _i2.U32Codec.codec,
+ valueCodec: _i3.U32Codec.codec,
);
- final _i1.StorageValue<_i4.UpgradeRestriction?> _upgradeRestrictionSignal =
- const _i1.StorageValue<_i4.UpgradeRestriction?>(
+ final _i1.StorageValue<_i6.UpgradeRestriction?> _upgradeRestrictionSignal =
+ const _i1.StorageValue<_i6.UpgradeRestriction?>(
prefix: 'ParachainSystem',
storage: 'UpgradeRestrictionSignal',
- valueCodec: _i2.OptionCodec<_i4.UpgradeRestriction>(_i4.UpgradeRestriction.codec),
+ valueCodec: _i3.OptionCodec<_i6.UpgradeRestriction>(_i6.UpgradeRestriction.codec),
);
- final _i1.StorageValue<_i5.StorageProof> _relayStateProof = const _i1.StorageValue<_i5.StorageProof>(
+ final _i1.StorageValue<_i7.UpgradeGoAhead?> _upgradeGoAhead = const _i1.StorageValue<_i7.UpgradeGoAhead?>(
+ prefix: 'ParachainSystem',
+ storage: 'UpgradeGoAhead',
+ valueCodec: _i3.OptionCodec<_i7.UpgradeGoAhead>(_i7.UpgradeGoAhead.codec),
+ );
+
+ final _i1.StorageValue<_i8.StorageProof> _relayStateProof = const _i1.StorageValue<_i8.StorageProof>(
prefix: 'ParachainSystem',
storage: 'RelayStateProof',
- valueCodec: _i5.StorageProof.codec,
+ valueCodec: _i8.StorageProof.codec,
);
- final _i1.StorageValue<_i6.MessagingStateSnapshot> _relevantMessagingState =
- const _i1.StorageValue<_i6.MessagingStateSnapshot>(
+ final _i1.StorageValue<_i9.MessagingStateSnapshot> _relevantMessagingState =
+ const _i1.StorageValue<_i9.MessagingStateSnapshot>(
prefix: 'ParachainSystem',
storage: 'RelevantMessagingState',
- valueCodec: _i6.MessagingStateSnapshot.codec,
+ valueCodec: _i9.MessagingStateSnapshot.codec,
);
- final _i1.StorageValue<_i7.AbridgedHostConfiguration> _hostConfiguration =
- const _i1.StorageValue<_i7.AbridgedHostConfiguration>(
+ final _i1.StorageValue<_i10.AbridgedHostConfiguration> _hostConfiguration =
+ const _i1.StorageValue<_i10.AbridgedHostConfiguration>(
prefix: 'ParachainSystem',
storage: 'HostConfiguration',
- valueCodec: _i7.AbridgedHostConfiguration.codec,
+ valueCodec: _i10.AbridgedHostConfiguration.codec,
);
- final _i1.StorageValue<_i8.MessageQueueChain> _lastDmqMqcHead = const _i1.StorageValue<_i8.MessageQueueChain>(
+ final _i1.StorageValue<_i11.MessageQueueChain> _lastDmqMqcHead = const _i1.StorageValue<_i11.MessageQueueChain>(
prefix: 'ParachainSystem',
storage: 'LastDmqMqcHead',
- valueCodec: _i8.MessageQueueChainCodec(),
+ valueCodec: _i11.MessageQueueChainCodec(),
);
- final _i1.StorageValue