From 37564f04250f183d539b07ae09604af9a29d5ba9 Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 14:08:02 +0800 Subject: [PATCH 01/18] feat: finish approve proposal flow from multisig account --- mobile-app/lib/l10n/app_en.arb | 30 +++- mobile-app/lib/l10n/app_id.arb | 8 +- mobile-app/lib/l10n/app_localizations.dart | 42 ++++- mobile-app/lib/l10n/app_localizations_en.dart | 21 ++- mobile-app/lib/l10n/app_localizations_id.dart | 21 ++- .../multisig_approval_toast_provider.dart | 26 ++++ .../pending_multisig_approvals_provider.dart | 64 ++++++++ .../multisig_approval_polling_service.dart | 114 ++++++++++++++ .../multisig_approval_reconciliation.dart | 10 ++ .../transaction_submission_service.dart | 56 +++++++ .../multisig_approval_toast_listener.dart | 28 ++++ .../lib/v2/screens/home/home_screen.dart | 7 +- .../multisig_approve_confirm_sheet.dart | 143 +++++++++++++++++ .../multisig_proposal_detail_sheet.dart | 144 +++++++++++++----- .../lib/v2/screens/multisig/proposal_row.dart | 54 ++++++- quantus_sdk/lib/quantus_sdk.dart | 1 + .../lib/src/constants/app_constants.dart | 16 +- .../pending_multisig_approval_event.dart | 52 +++++++ .../lib/src/services/multisig_service.dart | 26 ++++ quantus_sdk/test/multisig_service_test.dart | 20 +++ 20 files changed, 822 insertions(+), 61 deletions(-) create mode 100644 mobile-app/lib/providers/multisig_approval_toast_provider.dart create mode 100644 mobile-app/lib/providers/pending_multisig_approvals_provider.dart create mode 100644 mobile-app/lib/services/multisig_approval_polling_service.dart create mode 100644 mobile-app/lib/services/multisig_approval_reconciliation.dart create mode 100644 mobile-app/lib/v2/components/multisig_approval_toast_listener.dart create mode 100644 mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart create mode 100644 quantus_sdk/lib/src/models/pending_multisig_approval_event.dart diff --git a/mobile-app/lib/l10n/app_en.arb b/mobile-app/lib/l10n/app_en.arb index 80993643..06a2cb9c 100644 --- a/mobile-app/lib/l10n/app_en.arb +++ b/mobile-app/lib/l10n/app_en.arb @@ -464,7 +464,11 @@ }, "multisigStatusApproved": "APPROVED", "@multisigStatusApproved": { - "description": "Proposal status chip when approved or executed" + "description": "Proposal status chip when the current signer has approved" + }, + "multisigStatusProposed": "PROPOSED", + "@multisigStatusProposed": { + "description": "Proposal status chip when the current signer has not approved yet" }, "multisigStatusExpired": "EXPIRED", "@multisigStatusExpired": { @@ -625,9 +629,29 @@ }, "multisigProposalSigningSoonNote": "Signing will be available soon.", "@multisigProposalSigningSoonNote": { - "description": "Note shown under the disabled sign button" + "description": "Deprecated; kept for generated l10n compatibility" + }, + "multisigProposalApprovingLabel": "Approving…", + "@multisigProposalApprovingLabel": { + "description": "Disabled approve button while approval is pending indexer confirmation" + }, + "multisigProposalApprovingNote": "Your approval is being confirmed on-chain.", + "@multisigProposalApprovingNote": { + "description": "Note under the button while approval is pending" + }, + "multisigApproveUnavailableNote": "This proposal can no longer be approved.", + "@multisigApproveUnavailableNote": { + "description": "Note when approve is unavailable (expired or closed)" + }, + "activityTxApproving": "Approving…", + "@activityTxApproving": { + "description": "Trailing label on proposal row while approval is pending" + }, + "multisigApprovalTimeoutToast": "Approval confirmation is taking longer than expected. Check the chain or try again.", + "@multisigApprovalTimeoutToast": { + "description": "Toast when approval indexer polling times out" }, - "multisigProposalAlreadySignedNote": "You've already signed this proposal.", + "multisigProposalAlreadySignedNote": "You've already approved this proposal.", "@multisigProposalAlreadySignedNote": { "description": "Note shown when the current member already approved" }, diff --git a/mobile-app/lib/l10n/app_id.arb b/mobile-app/lib/l10n/app_id.arb index 390e2c18..55d41f1d 100644 --- a/mobile-app/lib/l10n/app_id.arb +++ b/mobile-app/lib/l10n/app_id.arb @@ -110,6 +110,7 @@ "multisigLoadFailed": "Gagal memuat: {error}", "multisigProposalToAddress": "ke {address}", "multisigStatusApproved": "DISETUJUI", + "multisigStatusProposed": "DIAJUKAN", "multisigStatusExpired": "KEDALUWARSA", "multisigStatusCancelled": "DIBATALKAN", "multisigProposeSelectRecipientTo": "Transfer ke", @@ -142,7 +143,12 @@ "multisigProposalNotFound": "Proposal tidak ditemukan.", "multisigProposalSignButton": "Tanda Tangan", "multisigProposalSigningSoonNote": "Penandatanganan akan segera tersedia.", - "multisigProposalAlreadySignedNote": "Anda sudah menandatangani proposal ini.", + "multisigProposalApprovingLabel": "Menyetujui…", + "multisigProposalApprovingNote": "Persetujuan Anda sedang dikonfirmasi di chain.", + "multisigApproveUnavailableNote": "Proposal ini tidak dapat disetujui lagi.", + "activityTxApproving": "Menyetujui…", + "multisigApprovalTimeoutToast": "Konfirmasi persetujuan membutuhkan waktu lebih lama. Periksa chain atau coba lagi.", + "multisigProposalAlreadySignedNote": "Anda sudah menyetujui proposal ini.", "multisigProposalProposerLabel": "PENGAJU", "multisigProposalStatusLabel": "STATUS", "multisigProposalDepositLabel": "DEPOSIT", diff --git a/mobile-app/lib/l10n/app_localizations.dart b/mobile-app/lib/l10n/app_localizations.dart index b1a04f01..915a2fed 100644 --- a/mobile-app/lib/l10n/app_localizations.dart +++ b/mobile-app/lib/l10n/app_localizations.dart @@ -686,12 +686,18 @@ abstract class AppLocalizations { /// **'to {address}'** String multisigProposalToAddress(String address); - /// Proposal status chip when approved or executed + /// Proposal status chip when the current signer has approved /// /// In en, this message translates to: /// **'APPROVED'** String get multisigStatusApproved; + /// Proposal status chip when the current signer has not approved yet + /// + /// In en, this message translates to: + /// **'PROPOSED'** + String get multisigStatusProposed; + /// Proposal status chip when expired /// /// In en, this message translates to: @@ -878,16 +884,46 @@ abstract class AppLocalizations { /// **'Sign'** String get multisigProposalSignButton; - /// Note shown under the disabled sign button + /// Deprecated; kept for generated l10n compatibility /// /// In en, this message translates to: /// **'Signing will be available soon.'** String get multisigProposalSigningSoonNote; + /// Disabled approve button while approval is pending indexer confirmation + /// + /// In en, this message translates to: + /// **'Approving…'** + String get multisigProposalApprovingLabel; + + /// Note under the button while approval is pending + /// + /// In en, this message translates to: + /// **'Your approval is being confirmed on-chain.'** + String get multisigProposalApprovingNote; + + /// Note when approve is unavailable (expired or closed) + /// + /// In en, this message translates to: + /// **'This proposal can no longer be approved.'** + String get multisigApproveUnavailableNote; + + /// Trailing label on proposal row while approval is pending + /// + /// In en, this message translates to: + /// **'Approving…'** + String get activityTxApproving; + + /// Toast when approval indexer polling times out + /// + /// In en, this message translates to: + /// **'Approval confirmation is taking longer than expected. Check the chain or try again.'** + String get multisigApprovalTimeoutToast; + /// Note shown when the current member already approved /// /// In en, this message translates to: - /// **'You\'ve already signed this proposal.'** + /// **'You\'ve already approved this proposal.'** String get multisigProposalAlreadySignedNote; /// Proposer row label on proposal detail diff --git a/mobile-app/lib/l10n/app_localizations_en.dart b/mobile-app/lib/l10n/app_localizations_en.dart index 306bc13a..32e27a87 100644 --- a/mobile-app/lib/l10n/app_localizations_en.dart +++ b/mobile-app/lib/l10n/app_localizations_en.dart @@ -332,6 +332,9 @@ class AppLocalizationsEn extends AppLocalizations { @override String get multisigStatusApproved => 'APPROVED'; + @override + String get multisigStatusProposed => 'PROPOSED'; + @override String get multisigStatusExpired => 'EXPIRED'; @@ -442,7 +445,23 @@ class AppLocalizationsEn extends AppLocalizations { String get multisigProposalSigningSoonNote => 'Signing will be available soon.'; @override - String get multisigProposalAlreadySignedNote => 'You\'ve already signed this proposal.'; + String get multisigProposalApprovingLabel => 'Approving…'; + + @override + String get multisigProposalApprovingNote => 'Your approval is being confirmed on-chain.'; + + @override + String get multisigApproveUnavailableNote => 'This proposal can no longer be approved.'; + + @override + String get activityTxApproving => 'Approving…'; + + @override + String get multisigApprovalTimeoutToast => + 'Approval confirmation is taking longer than expected. Check the chain or try again.'; + + @override + String get multisigProposalAlreadySignedNote => 'You\'ve already approved this proposal.'; @override String get multisigProposalProposerLabel => 'PROPOSER'; diff --git a/mobile-app/lib/l10n/app_localizations_id.dart b/mobile-app/lib/l10n/app_localizations_id.dart index ef7f7c39..ed761bff 100644 --- a/mobile-app/lib/l10n/app_localizations_id.dart +++ b/mobile-app/lib/l10n/app_localizations_id.dart @@ -334,6 +334,9 @@ class AppLocalizationsId extends AppLocalizations { @override String get multisigStatusApproved => 'DISETUJUI'; + @override + String get multisigStatusProposed => 'DIAJUKAN'; + @override String get multisigStatusExpired => 'KEDALUWARSA'; @@ -444,7 +447,23 @@ class AppLocalizationsId extends AppLocalizations { String get multisigProposalSigningSoonNote => 'Penandatanganan akan segera tersedia.'; @override - String get multisigProposalAlreadySignedNote => 'Anda sudah menandatangani proposal ini.'; + String get multisigProposalApprovingLabel => 'Menyetujui…'; + + @override + String get multisigProposalApprovingNote => 'Persetujuan Anda sedang dikonfirmasi di chain.'; + + @override + String get multisigApproveUnavailableNote => 'Proposal ini tidak dapat disetujui lagi.'; + + @override + String get activityTxApproving => 'Menyetujui…'; + + @override + String get multisigApprovalTimeoutToast => + 'Konfirmasi persetujuan membutuhkan waktu lebih lama. Periksa chain atau coba lagi.'; + + @override + String get multisigProposalAlreadySignedNote => 'Anda sudah menyetujui proposal ini.'; @override String get multisigProposalProposerLabel => 'PENGAJU'; diff --git a/mobile-app/lib/providers/multisig_approval_toast_provider.dart b/mobile-app/lib/providers/multisig_approval_toast_provider.dart new file mode 100644 index 00000000..d2ac92ee --- /dev/null +++ b/mobile-app/lib/providers/multisig_approval_toast_provider.dart @@ -0,0 +1,26 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +enum MultisigApprovalToastKind { timeout, submitFailed } + +class MultisigApprovalToastEvent { + const MultisigApprovalToastEvent(this.kind); + + final MultisigApprovalToastKind kind; +} + +class MultisigApprovalToastNotifier extends Notifier { + @override + MultisigApprovalToastEvent? build() => null; + + void show(MultisigApprovalToastKind kind) { + state = MultisigApprovalToastEvent(kind); + } + + void clear() { + state = null; + } +} + +final multisigApprovalToastProvider = NotifierProvider( + MultisigApprovalToastNotifier.new, +); diff --git a/mobile-app/lib/providers/pending_multisig_approvals_provider.dart b/mobile-app/lib/providers/pending_multisig_approvals_provider.dart new file mode 100644 index 00000000..29eade95 --- /dev/null +++ b/mobile-app/lib/providers/pending_multisig_approvals_provider.dart @@ -0,0 +1,64 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; + +/// Approvals submitted on-chain but not yet visible in the indexer. +class PendingMultisigApprovalsNotifier extends Notifier> { + @override + List build() => []; + + void add(PendingMultisigApprovalEvent event) { + state = [...state, event]; + } + + void update(String id, {String? extrinsicHash}) { + state = [ + for (final event in state) + if (event.id == id) event.copyWith(extrinsicHash: extrinsicHash) else event, + ]; + } + + void remove(String id) { + state = state.where((e) => e.id != id).toList(); + } + + void clear() { + state = []; + } +} + +final pendingMultisigApprovalsProvider = + NotifierProvider>( + PendingMultisigApprovalsNotifier.new, + ); + +PendingMultisigApprovalEvent? findPendingApprovalForProposal( + List all, + String multisigAddress, + int proposalId, +) { + for (final event in all) { + if (event.multisigAddress == multisigAddress && event.proposalId == proposalId) { + return event; + } + } + return null; +} + +void addPendingMultisigApproval(Ref ref, PendingMultisigApprovalEvent event) { + ref.read(pendingMultisigApprovalsProvider.notifier).add(event); +} + +void updatePendingMultisigApproval(Ref ref, String id, {String? extrinsicHash}) { + ref.read(pendingMultisigApprovalsProvider.notifier).update(id, extrinsicHash: extrinsicHash); +} + +void removePendingMultisigApproval(Ref ref, String id) { + ref.read(pendingMultisigApprovalsProvider.notifier).remove(id); +} + +PendingMultisigApprovalEvent? findPendingMultisigApproval(Ref ref, String id) { + for (final event in ref.read(pendingMultisigApprovalsProvider)) { + if (event.id == id) return event; + } + return null; +} diff --git a/mobile-app/lib/services/multisig_approval_polling_service.dart b/mobile-app/lib/services/multisig_approval_polling_service.dart new file mode 100644 index 00000000..be882b5c --- /dev/null +++ b/mobile-app/lib/services/multisig_approval_polling_service.dart @@ -0,0 +1,114 @@ +import 'dart:async'; + +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/providers/multisig_approval_toast_provider.dart'; +import 'package:resonance_network_wallet/providers/multisig_providers.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_approvals_provider.dart'; +import 'package:resonance_network_wallet/services/multisig_approval_reconciliation.dart'; +import 'package:resonance_network_wallet/shared/utils/print.dart'; + +/// Polls the indexer until a freshly submitted approval is reflected on the +/// proposal, then clears the pending overlay and refreshes proposal state. +class MultisigApprovalPollingService { + final Ref _ref; + final Map _timers = {}; + final Set _inFlight = {}; + static const _searchInterval = Duration(seconds: 5); + static const _timeout = Duration(minutes: 5); + + MultisigApprovalPollingService(this._ref); + + void startPolling(MultisigAccount msig, PendingMultisigApprovalEvent pending) { + final key = pending.id; + if (pending.extrinsicHash == null) { + quantusDebugPrint( + '[MultisigApprovalPoller] ERROR: cannot poll $key — no extrinsicHash. ' + 'Waiting for submission to complete.', + ); + return; + } + + quantusDebugPrint('[MultisigApprovalPoller] startPolling $key hash=${pending.extrinsicHash}'); + + stopPolling(key); + final startTime = DateTime.now(); + + final timer = Timer.periodic(_searchInterval, (_) { + if (DateTime.now().difference(startTime) > _timeout) { + quantusDebugPrint('[MultisigApprovalPoller] timeout for $key'); + stopPolling(key); + unawaited(_handleTimeout(msig, pending)); + return; + } + unawaited(_search(msig, pending)); + }); + + _timers[key] = timer; + unawaited(_search(msig, pending)); + } + + void stopPolling(String id) { + _timers.remove(id)?.cancel(); + } + + Future _search(MultisigAccount msig, PendingMultisigApprovalEvent pending) async { + final key = pending.id; + if (pending.extrinsicHash == null) return; + if (!_inFlight.add(key)) return; + + try { + final confirmed = await _confirmIfIndexed(msig, pending); + if (!confirmed) { + quantusDebugPrint('[MultisigApprovalPoller] not indexed yet: $key'); + } + } catch (e) { + quantusDebugPrint('[MultisigApprovalPoller] search error for $key: $e'); + } finally { + _inFlight.remove(key); + } + } + + Future _handleTimeout(MultisigAccount msig, PendingMultisigApprovalEvent pending) async { + final key = pending.id; + try { + quantusDebugPrint('[MultisigApprovalPoller] final indexer check before timeout for $key'); + final confirmed = await _confirmIfIndexed(msig, pending); + if (confirmed) return; + } catch (e) { + quantusDebugPrint('[MultisigApprovalPoller] final check error for $key: $e'); + } + + if (findPendingMultisigApproval(_ref, key) == null) return; + + quantusDebugPrint('[MultisigApprovalPoller] giving up on $key'); + removePendingMultisigApproval(_ref, key); + _ref.read(multisigApprovalToastProvider.notifier).show(MultisigApprovalToastKind.timeout); + } + + Future _confirmIfIndexed(MultisigAccount msig, PendingMultisigApprovalEvent pending) async { + final key = pending.id; + final service = _ref.read(multisigServiceProvider); + final proposal = await service.getProposal(msig, pending.proposalId); + if (proposal == null || !proposal.didApprove(pending.approverId)) return false; + + quantusDebugPrint('[MultisigApprovalPoller] confirmed $key proposal ${pending.proposalId}'); + stopPolling(key); + removePendingMultisigApproval(_ref, key); + await reconcileIndexedApproval(_ref, msig, pending.approverId); + return true; + } + + void dispose() { + for (final timer in _timers.values) { + timer.cancel(); + } + _timers.clear(); + } +} + +final multisigApprovalPollingServiceProvider = Provider((ref) { + final service = MultisigApprovalPollingService(ref); + ref.onDispose(service.dispose); + return service; +}); diff --git a/mobile-app/lib/services/multisig_approval_reconciliation.dart b/mobile-app/lib/services/multisig_approval_reconciliation.dart new file mode 100644 index 00000000..169a3984 --- /dev/null +++ b/mobile-app/lib/services/multisig_approval_reconciliation.dart @@ -0,0 +1,10 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/providers/multisig_providers.dart'; +import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; + +/// Refreshes proposal-related state after indexer confirms an approval. +Future reconcileIndexedApproval(Ref ref, MultisigAccount msig, String approverId) async { + invalidateMultisigProposals(ref, msig); + invalidateAccountBalances(ref, {approverId}); +} diff --git a/mobile-app/lib/services/transaction_submission_service.dart b/mobile-app/lib/services/transaction_submission_service.dart index 234f14d8..75c35a38 100644 --- a/mobile-app/lib/services/transaction_submission_service.dart +++ b/mobile-app/lib/services/transaction_submission_service.dart @@ -8,10 +8,13 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/account_providers.dart'; import 'package:resonance_network_wallet/providers/notification_provider.dart'; +import 'package:resonance_network_wallet/providers/multisig_approval_toast_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_proposal_toast_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_approvals_provider.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_proposals_provider.dart'; import 'package:resonance_network_wallet/providers/pending_transactions_provider.dart'; +import 'package:resonance_network_wallet/services/multisig_approval_polling_service.dart'; import 'package:resonance_network_wallet/services/multisig_proposal_polling_service.dart'; import 'package:resonance_network_wallet/services/pending_transaction_polling_service.dart'; import 'package:resonance_network_wallet/services/telemetry_service.dart'; @@ -168,6 +171,59 @@ class TransactionSubmissionService { ); } + /// Submits a multisig proposal approval, tracks it optimistically, and polls + /// the indexer until the approval appears on the proposal. + Future approveProposal({ + required MultisigAccount msig, + required Account signer, + required MultisigProposal proposal, + }) async { + final pending = PendingMultisigApprovalEvent.create( + multisigAddress: msig.accountId, + proposalId: proposal.id, + approverId: signer.accountId, + ); + + addPendingMultisigApproval(_ref, pending); + + TelemetryService().sendEvent('multisig_approve'); + + unawaited( + _submitApproveBackground( + msig: msig, + signer: signer, + proposalId: proposal.id, + pending: pending, + ), + ); + } + + Future _submitApproveBackground({ + required MultisigAccount msig, + required Account signer, + required int proposalId, + required PendingMultisigApprovalEvent pending, + }) async { + try { + final service = _ref.read(multisigServiceProvider); + final hashBytes = await service.submitApproveExtrinsic( + msig: msig, + signer: signer, + proposalId: proposalId, + ); + final extrinsicHash = '0x${hex.encode(hashBytes)}'; + quantusDebugPrint('[Approve] submitted: $extrinsicHash'); + + updatePendingMultisigApproval(_ref, pending.id, extrinsicHash: extrinsicHash); + final updated = findPendingMultisigApproval(_ref, pending.id) ?? pending.copyWith(extrinsicHash: extrinsicHash); + _ref.read(multisigApprovalPollingServiceProvider).startPolling(msig, updated); + } catch (e, stackTrace) { + quantusDebugPrint('[Approve] submit failed: $e\n$stackTrace'); + removePendingMultisigApproval(_ref, pending.id); + _ref.read(multisigApprovalToastProvider.notifier).show(MultisigApprovalToastKind.submitFailed); + } + } + Future _submitProposalBackground({ required MultisigAccount msig, required Account signer, diff --git a/mobile-app/lib/v2/components/multisig_approval_toast_listener.dart b/mobile-app/lib/v2/components/multisig_approval_toast_listener.dart new file mode 100644 index 00000000..74f33ff2 --- /dev/null +++ b/mobile-app/lib/v2/components/multisig_approval_toast_listener.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:resonance_network_wallet/providers/l10n_provider.dart'; +import 'package:resonance_network_wallet/providers/multisig_approval_toast_provider.dart'; +import 'package:resonance_network_wallet/shared/extensions/toaster_extensions.dart'; + +/// Shows toasts for background multisig approval confirmation events. +class MultisigApprovalToastListener extends ConsumerWidget { + const MultisigApprovalToastListener({super.key, required this.child}); + + final Widget child; + + @override + Widget build(BuildContext context, WidgetRef ref) { + ref.listen(multisigApprovalToastProvider, (previous, next) { + if (next == null) return; + final l10n = ref.read(l10nProvider); + final message = switch (next.kind) { + MultisigApprovalToastKind.timeout => l10n.multisigApprovalTimeoutToast, + MultisigApprovalToastKind.submitFailed => l10n.multisigApproveFailed, + }; + context.showErrorToaster(message: message); + ref.read(multisigApprovalToastProvider.notifier).clear(); + }); + + return child; + } +} diff --git a/mobile-app/lib/v2/screens/home/home_screen.dart b/mobile-app/lib/v2/screens/home/home_screen.dart index 7e3c71fc..4a6d4c93 100644 --- a/mobile-app/lib/v2/screens/home/home_screen.dart +++ b/mobile-app/lib/v2/screens/home/home_screen.dart @@ -37,6 +37,7 @@ import 'package:resonance_network_wallet/providers/wallet_providers.dart'; import 'package:resonance_network_wallet/v2/components/scaffold_base.dart'; import 'package:resonance_network_wallet/v2/theme/app_colors.dart'; import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart'; +import 'package:resonance_network_wallet/v2/components/multisig_approval_toast_listener.dart'; import 'package:resonance_network_wallet/v2/components/multisig_creation_toast_listener.dart'; import 'package:resonance_network_wallet/v2/components/multisig_proposal_toast_listener.dart'; import 'package:resonance_network_wallet/v2/screens/home/activity_section.dart'; @@ -140,8 +141,9 @@ class _HomeScreenState extends ConsumerState { final text = context.themeText; return MultisigCreationToastListener( - child: MultisigProposalToastListener( - child: accountAsync.when( + child: MultisigApprovalToastListener( + child: MultisigProposalToastListener( + child: accountAsync.when( loading: () => const ScaffoldBase(mainContent: Center(child: Loader())), error: (e, _) => ScaffoldBase( mainContent: Center( @@ -166,6 +168,7 @@ class _HomeScreenState extends ConsumerState { ); }, ), + ), ), ); } diff --git a/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart new file mode 100644 index 00000000..59718b68 --- /dev/null +++ b/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart @@ -0,0 +1,143 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/providers/account_providers.dart'; +import 'package:resonance_network_wallet/providers/wallet_providers.dart'; +import 'package:resonance_network_wallet/providers/l10n_provider.dart'; +import 'package:resonance_network_wallet/providers/multisig_providers.dart'; +import 'package:resonance_network_wallet/services/local_auth_service.dart'; +import 'package:resonance_network_wallet/services/transaction_submission_service.dart'; +import 'package:resonance_network_wallet/v2/components/bottom_sheet_container.dart'; +import 'package:resonance_network_wallet/v2/components/quantus_button.dart'; +import 'package:resonance_network_wallet/v2/theme/app_colors.dart'; +import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart'; + +void showMultisigApproveConfirmSheet( + BuildContext context, { + required MultisigAccount msig, + required MultisigProposal proposal, +}) { + BottomSheetContainer.show( + context, + builder: (_) => _MultisigApproveConfirmSheet(msig: msig, proposal: proposal), + ); +} + +class _MultisigApproveConfirmSheet extends ConsumerStatefulWidget { + final MultisigAccount msig; + final MultisigProposal proposal; + + const _MultisigApproveConfirmSheet({required this.msig, required this.proposal}); + + @override + ConsumerState<_MultisigApproveConfirmSheet> createState() => _MultisigApproveConfirmSheetState(); +} + +class _MultisigApproveConfirmSheetState extends ConsumerState<_MultisigApproveConfirmSheet> { + bool _submitting = false; + String? _errorMessage; + + Future _confirm() async { + setState(() { + _submitting = true; + _errorMessage = null; + }); + + final l10n = ref.read(l10nProvider); + final authed = await LocalAuthService().authenticate(localizedReason: l10n.multisigApproveAuthReason); + if (!authed || !mounted) { + setState(() { + _submitting = false; + _errorMessage = l10n.multisigApproveAuthRequired; + }); + return; + } + + try { + final signer = ref + .read(accountsProvider) + .value + ?.firstWhere( + (a) => a.accountId == widget.msig.myMemberAccountId, + orElse: () => throw Exception('Member account not found in local wallet'), + ); + if (signer == null) throw Exception('No signer account available'); + + await ref.read(transactionSubmissionServiceProvider).approveProposal( + msig: widget.msig, + signer: signer, + proposal: widget.proposal, + ); + + if (!mounted) return; + ref.invalidate(multisigOpenProposalsProvider(widget.msig)); + ref.invalidate(multisigCurrentBlockProvider); + Navigator.pop(context); + } catch (e, st) { + debugPrint('Approve submit error: $e $st'); + if (!mounted) return; + setState(() { + _submitting = false; + _errorMessage = l10n.multisigApproveFailed; + }); + } + } + + @override + Widget build(BuildContext context) { + final l10n = ref.watch(l10nProvider); + final colors = context.colors; + final text = context.themeText; + final fmt = ref.watch(numberFormattingServiceProvider); + final amountText = l10n.commonAmountBalance( + fmt.formatBalance(widget.proposal.amount, maxDecimals: AppConstants.decimals), + AppConstants.tokenSymbol, + ); + final recipient = AddressFormattingService.formatActivityDetailAddress(widget.proposal.recipient); + + return BottomSheetContainer( + title: l10n.multisigApproveConfirmTitle, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisSize: MainAxisSize.min, + children: [ + const SizedBox(height: 16), + Text( + l10n.multisigApproveConfirmBody, + style: text.paragraph?.copyWith(color: colors.textPrimary), + ), + const SizedBox(height: 8), + Text(amountText, style: text.smallTitle?.copyWith(color: colors.textPrimary)), + const SizedBox(height: 8), + Text( + l10n.multisigApproveConfirmTo(recipient), + style: text.smallParagraph?.copyWith(color: colors.textTertiary), + ), + if (_errorMessage != null) ...[ + const SizedBox(height: 16), + Text( + _errorMessage!, + style: text.detail?.copyWith(color: colors.textError), + ), + ], + const SizedBox(height: 24), + QuantusButton.simple( + label: l10n.multisigApproveConfirmYes, + isDisabled: _submitting, + onTap: _submitting ? null : _confirm, + ), + const SizedBox(height: 12), + QuantusButton.simple( + label: l10n.multisigApproveConfirmNo, + variant: ButtonVariant.secondary, + isDisabled: _submitting, + onTap: _submitting ? null : () => Navigator.pop(context), + ), + const SizedBox(height: 8), + ], + ), + ); + } +} diff --git a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart index 2c2f7fad..3c429908 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart @@ -3,9 +3,11 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/features/components/dotted_border.dart'; import 'package:resonance_network_wallet/l10n/app_localizations.dart'; +import 'package:resonance_network_wallet/providers/account_providers.dart'; import 'package:resonance_network_wallet/providers/currency_display_provider.dart'; import 'package:resonance_network_wallet/providers/l10n_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_approvals_provider.dart'; import 'package:resonance_network_wallet/providers/wallet_providers.dart'; import 'package:resonance_network_wallet/v2/components/multisig_expiry_value.dart'; import 'package:resonance_network_wallet/routes.dart'; @@ -15,13 +17,11 @@ import 'package:resonance_network_wallet/v2/components/amount_display_with_conve import 'package:resonance_network_wallet/v2/components/bottom_sheet_container.dart'; import 'package:resonance_network_wallet/v2/components/detail_summary_row.dart'; import 'package:resonance_network_wallet/v2/components/quantus_button.dart'; +import 'package:resonance_network_wallet/v2/screens/multisig/multisig_approve_confirm_sheet.dart'; import 'package:resonance_network_wallet/v2/theme/app_colors.dart'; import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart'; -/// Shows a read-only detail sheet for a multisig [proposal]. -/// -/// Signing is not yet wired: the action button is disabled and a note explains -/// the current state (already signed, or signing coming soon). +/// Shows proposal detail with approve action for eligible co-signers. void showMultisigProposalDetailSheet( BuildContext context, { required MultisigAccount msig, @@ -44,6 +44,22 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { const _MultisigProposalDetailSheet({required this.msig, required this.proposal}); + MultisigProposal _resolveLiveProposal(WidgetRef ref) { + final open = ref.watch(multisigOpenProposalsProvider(msig)).value; + if (open == null) return proposal; + for (final p in open) { + if (p.id == proposal.id && p.multisigAddress == proposal.multisigAddress) { + return p; + } + } + return proposal; + } + + bool _hasLocalSigner(WidgetRef ref) { + final accounts = ref.watch(accountsProvider).value ?? const []; + return accounts.any((a) => a.accountId == msig.myMemberAccountId); + } + @override Widget build(BuildContext context, WidgetRef ref) { final l10n = ref.watch(l10nProvider); @@ -52,7 +68,12 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { final fmt = ref.watch(numberFormattingServiceProvider); final currentBlock = ref.watch(multisigCurrentBlockProvider).value; final multisigService = ref.watch(multisigServiceProvider); - final didApprove = proposal.didApprove(msig.myMemberAccountId); + final liveProposal = _resolveLiveProposal(ref); + final pendingApprovals = ref.watch(pendingMultisigApprovalsProvider); + final pendingApproval = findPendingApprovalForProposal(pendingApprovals, msig.accountId, liveProposal.id); + final didApprove = liveProposal.didApprove(msig.myMemberAccountId); + final hasLocalSigner = _hasLocalSigner(ref); + final isActionable = currentBlock != null && liveProposal.isActionable(currentBlock); return BottomSheetContainer( title: l10n.multisigProposalTitle, @@ -61,11 +82,11 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { mainAxisSize: MainAxisSize.min, children: [ const SizedBox(height: 16), - _AmountSection(proposal: proposal), + _AmountSection(proposal: liveProposal), const SizedBox(height: 20), DetailSummaryRow( label: l10n.multisigProposalStatusLabel, - valueWidget: _statusChip(l10n, colors, text, currentBlock), + valueWidget: _statusChip(l10n, colors, text, currentBlock, liveProposal), ), const SizedBox(height: 8), DottedBorder( @@ -75,14 +96,24 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { child: const SizedBox(width: double.infinity, height: 1), ), const SizedBox(height: 8), - _summary(l10n, colors, text, fmt, multisigService, currentBlock), + _summary(l10n, colors, text, fmt, multisigService, currentBlock, liveProposal), const SizedBox(height: 24), - _signers(l10n, colors, text), + _signers(l10n, colors, text, liveProposal), const SizedBox(height: 24), - _signSection(l10n, colors, text, didApprove), + _signSection( + context, + l10n, + colors, + text, + liveProposal: liveProposal, + didApprove: didApprove, + pendingApproval: pendingApproval, + hasLocalSigner: hasLocalSigner, + isActionable: isActionable, + ), const SizedBox(height: 24), Center( - child: _ExplorerLink(proposal: proposal, colors: colors, text: text), + child: _ExplorerLink(proposal: liveProposal, colors: colors, text: text), ), const SizedBox(height: 8), ], @@ -104,11 +135,12 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { NumberFormattingService fmt, MultisigService multisigService, int? currentBlock, + MultisigProposal liveProposal, ) { - final recipient = AddressFormattingService.formatActivityDetailAddress(proposal.recipient); + final recipient = AddressFormattingService.formatActivityDetailAddress(liveProposal.recipient); final expiryParts = resolveMultisigExpiryParts( l10n: l10n, - expiryBlock: proposal.expiryBlock, + expiryBlock: liveProposal.expiryBlock, multisigService: multisigService, currentBlock: currentBlock, ); @@ -126,28 +158,28 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { ), DetailSummaryRow( label: l10n.multisigProposalProposerLabel, - value: AddressFormattingService.formatActivityDetailAddress(proposal.proposer), + value: AddressFormattingService.formatActivityDetailAddress(liveProposal.proposer), ), DetailSummaryRow( label: l10n.multisigProposalThresholdLabel, - value: l10n.multisigThresholdOf(proposal.threshold, proposal.signerCount), + value: l10n.multisigThresholdOf(liveProposal.threshold, liveProposal.signerCount), ), DetailSummaryRow( label: l10n.multisigProposalApprovalsLabel, - value: l10n.multisigApprovalsOf(proposal.approvalCount, proposal.threshold), + value: l10n.multisigApprovalsOf(liveProposal.approvalCount, liveProposal.threshold), ), - DetailSummaryRow(label: l10n.multisigProposalFeeRowLabel, value: _formatBalance(l10n, fmt, proposal.palletFee)), - DetailSummaryRow(label: l10n.multisigProposalDepositLabel, value: _formatBalance(l10n, fmt, proposal.deposit)), - if (proposal.networkFee != null && proposal.networkFee != BigInt.zero) + DetailSummaryRow(label: l10n.multisigProposalFeeRowLabel, value: _formatBalance(l10n, fmt, liveProposal.palletFee)), + DetailSummaryRow(label: l10n.multisigProposalDepositLabel, value: _formatBalance(l10n, fmt, liveProposal.deposit)), + if (liveProposal.networkFee != null && liveProposal.networkFee != BigInt.zero) DetailSummaryRow( label: l10n.activityDetailNetworkFee, - value: _formatBalance(l10n, fmt, proposal.networkFee!), + value: _formatBalance(l10n, fmt, liveProposal.networkFee!), ), ], ); } - Widget _signers(AppLocalizations l10n, AppColorsV2 colors, AppTextTheme text) { + Widget _signers(AppLocalizations l10n, AppColorsV2 colors, AppTextTheme text, MultisigProposal liveProposal) { return Container( padding: const EdgeInsets.all(20), decoration: BoxDecoration(color: colors.surfaceDeep, borderRadius: BorderRadius.circular(14)), @@ -157,7 +189,7 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { Text(l10n.multisigProposalSignersLabel, style: text.receiveLabel?.copyWith(color: colors.textLabel)), const SizedBox(height: 12), ...msig.signers.map((s) { - final approved = proposal.approvals.contains(s); + final approved = liveProposal.approvals.contains(s); final isYou = s == msig.myMemberAccountId; return Padding( padding: const EdgeInsets.symmetric(vertical: 6), @@ -206,30 +238,68 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { ); } - Widget _signSection(AppLocalizations l10n, AppColorsV2 colors, AppTextTheme text, bool didApprove) { - final note = didApprove ? l10n.multisigProposalAlreadySignedNote : l10n.multisigProposalSigningSoonNote; + Widget _signSection( + BuildContext context, + AppLocalizations l10n, + AppColorsV2 colors, + AppTextTheme text, { + required MultisigProposal liveProposal, + required bool didApprove, + required PendingMultisigApprovalEvent? pendingApproval, + required bool hasLocalSigner, + required bool isActionable, + }) { + final isPending = pendingApproval != null; + final canApprove = isActionable && !didApprove && !isPending && hasLocalSigner; + + final (label, isDisabled, onTap) = switch ((didApprove, isPending, canApprove)) { + (true, _, _) => (l10n.multisigAlreadyApproved, true, null), + (_, true, _) => (l10n.multisigProposalApprovingLabel, true, null), + (_, _, true) => ( + l10n.multisigApproveButton, + false, + () => showMultisigApproveConfirmSheet(context, msig: msig, proposal: liveProposal), + ), + _ => (l10n.multisigApproveButton, true, null), + }; + + final note = switch ((didApprove, isPending, isActionable, hasLocalSigner)) { + (true, _, _, _) => l10n.multisigProposalAlreadySignedNote, + (_, true, _, _) => l10n.multisigProposalApprovingNote, + (_, _, false, _) => l10n.multisigApproveUnavailableNote, + (_, _, _, false) => l10n.multisigApproveUnavailableNote, + _ => '', + }; + return Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ QuantusButton.simple( - label: didApprove ? l10n.multisigAlreadyApproved : l10n.multisigProposalSignButton, - variant: ButtonVariant.success, - isDisabled: true, - onTap: null, - ), - const SizedBox(height: 12), - Text( - note, - textAlign: TextAlign.center, - style: text.detail?.copyWith(color: colors.textTertiary), + label: label, + isDisabled: isDisabled, + onTap: onTap, ), + if (note.isNotEmpty) ...[ + const SizedBox(height: 12), + Text( + note, + textAlign: TextAlign.center, + style: text.detail?.copyWith(color: colors.textTertiary), + ), + ], ], ); } - Widget _statusChip(AppLocalizations l10n, AppColorsV2 colors, AppTextTheme text, int? currentBlock) { - final isExpired = currentBlock != null && proposal.expired(currentBlock); - final (label, color) = switch (proposal.status) { + Widget _statusChip( + AppLocalizations l10n, + AppColorsV2 colors, + AppTextTheme text, + int? currentBlock, + MultisigProposal liveProposal, + ) { + final isExpired = currentBlock != null && liveProposal.expired(currentBlock); + final (label, color) = switch (liveProposal.status) { MultisigProposalStatus.active => isExpired ? (l10n.multisigStatusExpired, colors.textTertiary) : (l10n.multisigStatusActive, colors.checksum), MultisigProposalStatus.approved => diff --git a/mobile-app/lib/v2/screens/multisig/proposal_row.dart b/mobile-app/lib/v2/screens/multisig/proposal_row.dart index 577621bf..4c7d5fad 100644 --- a/mobile-app/lib/v2/screens/multisig/proposal_row.dart +++ b/mobile-app/lib/v2/screens/multisig/proposal_row.dart @@ -3,6 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/l10n/app_localizations.dart'; import 'package:resonance_network_wallet/providers/l10n_provider.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_approvals_provider.dart'; import 'package:resonance_network_wallet/v2/components/proposal_list_tile.dart'; import 'package:resonance_network_wallet/v2/theme/app_colors.dart'; import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart'; @@ -20,16 +21,36 @@ class ProposalRow extends ConsumerWidget { final colors = context.colors; final text = context.themeText; final didApprove = proposal.didApprove(myAccountId); + final pendingApprovals = ref.watch(pendingMultisigApprovalsProvider); + final pendingApproval = findPendingApprovalForProposal( + pendingApprovals, + proposal.multisigAddress, + proposal.id, + ); + final isApproving = pendingApproval != null; return ProposalListTile( amount: proposal.amount, recipientAddress: proposal.recipient, + highlighted: isApproving, onTap: onTap, trailing: Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ - _statusChip(l10n, colors, text), - if (proposal.isOpen && didApprove) ...[const SizedBox(height: 6), _approvedPill(l10n, colors, text)], + if (isApproving) + Text( + l10n.activityTxApproving, + style: text.detail?.copyWith(color: colors.checksum, fontWeight: FontWeight.w600, letterSpacing: 0.4), + ) + else + _statusChip(l10n, colors, text), + if (proposal.isOpen && !isApproving) ...[ + const SizedBox(height: 6), + if (didApprove) + _approvedPill(l10n, colors, text) + else + _proposedPill(l10n, colors, text), + ], ], ), ); @@ -71,13 +92,36 @@ class ProposalRow extends ConsumerWidget { } Widget _approvedPill(AppLocalizations l10n, AppColorsV2 colors, AppTextTheme text) { + return _statusPill( + label: l10n.multisigStatusApproved, + background: colors.success, + foreground: colors.background, + text: text, + ); + } + + Widget _proposedPill(AppLocalizations l10n, AppColorsV2 colors, AppTextTheme text) { + return _statusPill( + label: l10n.multisigStatusProposed, + background: colors.checksum.useOpacity(0.18), + foreground: colors.checksum, + text: text, + ); + } + + Widget _statusPill({ + required String label, + required Color background, + required Color foreground, + required AppTextTheme text, + }) { return Container( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3), - decoration: BoxDecoration(color: colors.success, borderRadius: BorderRadius.circular(4)), + decoration: BoxDecoration(color: background, borderRadius: BorderRadius.circular(4)), child: Text( - l10n.multisigStatusApproved, + label, style: text.detail?.copyWith( - color: colors.background, + color: foreground, fontSize: 10, fontWeight: FontWeight.w700, letterSpacing: 0.8, diff --git a/quantus_sdk/lib/quantus_sdk.dart b/quantus_sdk/lib/quantus_sdk.dart index 0a6a101b..13359c6d 100644 --- a/quantus_sdk/lib/quantus_sdk.dart +++ b/quantus_sdk/lib/quantus_sdk.dart @@ -80,6 +80,7 @@ export 'src/models/multisig_create_submission.dart'; export 'src/models/multisig_proposal.dart'; export 'src/models/multisig_proposal_event.dart'; export 'src/models/multisig_proposal_created_event.dart'; +export 'src/models/pending_multisig_approval_event.dart'; export 'src/models/propose_fee_breakdown.dart'; export 'src/models/multisig_signer.dart'; export 'src/services/multisig_service.dart'; diff --git a/quantus_sdk/lib/src/constants/app_constants.dart b/quantus_sdk/lib/src/constants/app_constants.dart index 94b75f44..a1a1a3f3 100644 --- a/quantus_sdk/lib/src/constants/app_constants.dart +++ b/quantus_sdk/lib/src/constants/app_constants.dart @@ -8,16 +8,16 @@ class AppConstants { static const String emailSupport = 'support@quantus.com'; static const String telegramHandle = '@quantusnetwork'; - // static const List rpcEndpoints = ['ws://127.0.0.1:9944']; // local testing - // static const List graphQlEndpoints = ['http://127.0.0.1:4350']; // local testing + static const List rpcEndpoints = ['http://127.0.0.1:9944']; // local testing + static const List graphQlEndpoints = ['http://127.0.0.1:4350/v1/graphql']; // local testing static const stillOnTestnet = true; - static const List rpcEndpoints = [ - 'https://a1-planck.quantus.cat', - 'https://a2-planck.quantus.cat', - 'https://matcha-latte.quantus.com', - ]; - static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; + // static const List rpcEndpoints = [ + // 'https://a1-planck.quantus.cat', + // 'https://a2-planck.quantus.cat', + // 'https://matcha-latte.quantus.com', + // ]; + // static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; // local test android use special ip // static const String taskMasterEndpoint = 'http://10.0.2.2:3000/api'; diff --git a/quantus_sdk/lib/src/models/pending_multisig_approval_event.dart b/quantus_sdk/lib/src/models/pending_multisig_approval_event.dart new file mode 100644 index 00000000..d3430ca7 --- /dev/null +++ b/quantus_sdk/lib/src/models/pending_multisig_approval_event.dart @@ -0,0 +1,52 @@ +import 'package:flutter/foundation.dart'; + +/// An approval submitted on-chain but not yet reflected in the indexer. +@immutable +class PendingMultisigApprovalEvent { + final String id; + final String multisigAddress; + final int proposalId; + final String approverId; + final String? extrinsicHash; + final DateTime submittedAt; + + const PendingMultisigApprovalEvent({ + required this.id, + required this.multisigAddress, + required this.proposalId, + required this.approverId, + this.extrinsicHash, + required this.submittedAt, + }); + + PendingMultisigApprovalEvent copyWith({String? extrinsicHash}) { + return PendingMultisigApprovalEvent( + id: id, + multisigAddress: multisigAddress, + proposalId: proposalId, + approverId: approverId, + extrinsicHash: extrinsicHash ?? this.extrinsicHash, + submittedAt: submittedAt, + ); + } + + factory PendingMultisigApprovalEvent.create({ + required String multisigAddress, + required int proposalId, + required String approverId, + }) { + return PendingMultisigApprovalEvent( + id: 'pending_approval_${DateTime.now().millisecondsSinceEpoch}', + multisigAddress: multisigAddress, + proposalId: proposalId, + approverId: approverId, + submittedAt: DateTime.now(), + ); + } + + @override + String toString() { + return 'PendingMultisigApprovalEvent{id: $id, multisig: $multisigAddress, ' + 'proposalId: $proposalId, approver: $approverId}'; + } +} diff --git a/quantus_sdk/lib/src/services/multisig_service.dart b/quantus_sdk/lib/src/services/multisig_service.dart index 57f2301b..158c7d4e 100644 --- a/quantus_sdk/lib/src/services/multisig_service.dart +++ b/quantus_sdk/lib/src/services/multisig_service.dart @@ -358,6 +358,32 @@ class MultisigService { return _substrateService.submitExtrinsic(signer, call); } + /// Builds the `multisig.approve` runtime call for [proposalId]. + Multisig buildApproveCall({required MultisigAccount msig, required int proposalId}) { + return const Txs().approve(multisigAddress: getAccountId32(msig.accountId), proposalId: proposalId); + } + + /// Estimates the network fee for approving [proposalId]. + Future estimateApproveFee({ + required MultisigAccount msig, + required Account signer, + required int proposalId, + }) async { + final call = buildApproveCall(msig: msig, proposalId: proposalId); + final feeData = await _substrateService.getFeeForCall(signer, call); + return feeData.fee; + } + + /// Submits `multisig.approve` signed by [signer]. Returns extrinsic hash bytes. + Future submitApproveExtrinsic({ + required MultisigAccount msig, + required Account signer, + required int proposalId, + }) async { + final call = buildApproveCall(msig: msig, proposalId: proposalId); + return _substrateService.submitExtrinsic(signer, call); + } + /// Number of blocks that approximately span [duration] at average block time. int blocksForDuration(Duration duration) { return (duration.inSeconds / _avgBlockTimeSeconds).round(); diff --git a/quantus_sdk/test/multisig_service_test.dart b/quantus_sdk/test/multisig_service_test.dart index d6b6ffa0..cb619258 100644 --- a/quantus_sdk/test/multisig_service_test.dart +++ b/quantus_sdk/test/multisig_service_test.dart @@ -418,6 +418,26 @@ void main() { }); }); + group('MultisigService.buildApproveCall', () { + const signerA = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'; + const signerB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty'; + const multisigAddress = '5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy'; + + final msig = MultisigAccount( + name: 'Team', + accountId: multisigAddress, + signers: [signerA, signerB], + threshold: 2, + nonce: BigInt.zero, + myMemberAccountId: signerB, + ); + + test('returns a Multisig runtime call for valid params', () { + final call = MultisigService().buildApproveCall(msig: msig, proposalId: 3); + expect(call.encode().isNotEmpty, isTrue); + }); + }); + group('MultisigService.proposalCreationFee', () { final service = MultisigService(); final base = service.proposalFee; From b5581ef7cdd2532490165be433ba639a2b149e84 Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 14:31:39 +0800 Subject: [PATCH 02/18] feat: show approve event in signer account --- mobile-app/lib/l10n/app_en.arb | 8 + mobile-app/lib/l10n/app_id.arb | 2 + mobile-app/lib/l10n/app_localizations.dart | 12 ++ mobile-app/lib/l10n/app_localizations_en.dart | 6 + mobile-app/lib/l10n/app_localizations_id.dart | 6 + .../multisig_approval_polling_service.dart | 14 +- .../multisig_approval_reconciliation.dart | 19 ++- .../transaction_event_extension.dart | 2 + .../activity/transaction_detail_sheet.dart | 50 +++++- .../lib/v2/screens/activity/tx_item.dart | 19 +++ quantus_sdk/lib/quantus_sdk.dart | 1 + .../multisig_proposal_approved_event.dart | 154 ++++++++++++++++++ .../src/services/chain_history_service.dart | 75 ++++++++- .../lib/src/services/multisig_graphql.dart | 24 +++ .../test/chain_history_service_test.dart | 78 ++++++++- 15 files changed, 458 insertions(+), 12 deletions(-) create mode 100644 quantus_sdk/lib/src/models/multisig_proposal_approved_event.dart diff --git a/mobile-app/lib/l10n/app_en.arb b/mobile-app/lib/l10n/app_en.arb index 06a2cb9c..8c822a2a 100644 --- a/mobile-app/lib/l10n/app_en.arb +++ b/mobile-app/lib/l10n/app_en.arb @@ -695,6 +695,10 @@ "@activityTxProposalCreated": { "description": "Activity row label for a confirmed multisig proposal creation on the proposer account" }, + "activityTxProposalApproved": "Proposal approved", + "@activityTxProposalApproved": { + "description": "Activity row label for a confirmed multisig proposal approval on the approver account" + }, "multisigApproveButton": "Approve", "@multisigApproveButton": { "description": "Approve button on proposal detail" @@ -1296,6 +1300,10 @@ "@activityDetailTitleProposalCreated": { "description": "Detail sheet title for a confirmed multisig proposal creation" }, + "activityDetailTitleProposalApproved": "Proposal approved", + "@activityDetailTitleProposalApproved": { + "description": "Detail sheet title for a confirmed multisig proposal approval" + }, "activityDetailTitleProposing": "Proposing", "@activityDetailTitleProposing": { "description": "Detail sheet title while a multisig proposal is confirming on-chain" diff --git a/mobile-app/lib/l10n/app_id.arb b/mobile-app/lib/l10n/app_id.arb index 55d41f1d..1919ae21 100644 --- a/mobile-app/lib/l10n/app_id.arb +++ b/mobile-app/lib/l10n/app_id.arb @@ -159,6 +159,7 @@ "activityTxProposal": "Proposal", "activityTxProposing": "Mengajukan", "activityTxProposalCreated": "Proposal dibuat", + "activityTxProposalApproved": "Proposal disetujui", "multisigApproveButton": "Setujui", "multisigAlreadyApproved": "Sudah Disetujui", "multisigCancelProposalButton": "Batalkan Proposal", @@ -299,6 +300,7 @@ "activityDetailTitleMultisigCreated": "Multisig dibuat", "activityDetailTitleMultisigCreating": "Membuat multisig", "activityDetailTitleProposalCreated": "Proposal dibuat", + "activityDetailTitleProposalApproved": "Proposal disetujui", "activityDetailTitleProposing": "Mengajukan", "activityDetailProposalTransferAmount": "JUMLAH TRANSFER", "activityDetailStatusInProcess": "Diproses", diff --git a/mobile-app/lib/l10n/app_localizations.dart b/mobile-app/lib/l10n/app_localizations.dart index 915a2fed..1d1ac6bc 100644 --- a/mobile-app/lib/l10n/app_localizations.dart +++ b/mobile-app/lib/l10n/app_localizations.dart @@ -986,6 +986,12 @@ abstract class AppLocalizations { /// **'Proposal created'** String get activityTxProposalCreated; + /// Activity row label for a confirmed multisig proposal approval on the approver account + /// + /// In en, this message translates to: + /// **'Proposal approved'** + String get activityTxProposalApproved; + /// Approve button on proposal detail /// /// In en, this message translates to: @@ -1742,6 +1748,12 @@ abstract class AppLocalizations { /// **'Proposal created'** String get activityDetailTitleProposalCreated; + /// Detail sheet title for a confirmed multisig proposal approval + /// + /// In en, this message translates to: + /// **'Proposal approved'** + String get activityDetailTitleProposalApproved; + /// Detail sheet title while a multisig proposal is confirming on-chain /// /// In en, this message translates to: diff --git a/mobile-app/lib/l10n/app_localizations_en.dart b/mobile-app/lib/l10n/app_localizations_en.dart index 32e27a87..99a993af 100644 --- a/mobile-app/lib/l10n/app_localizations_en.dart +++ b/mobile-app/lib/l10n/app_localizations_en.dart @@ -493,6 +493,9 @@ class AppLocalizationsEn extends AppLocalizations { @override String get activityTxProposalCreated => 'Proposal created'; + @override + String get activityTxProposalApproved => 'Proposal approved'; + @override String get multisigApproveButton => 'Approve'; @@ -899,6 +902,9 @@ class AppLocalizationsEn extends AppLocalizations { @override String get activityDetailTitleProposalCreated => 'Proposal created'; + @override + String get activityDetailTitleProposalApproved => 'Proposal approved'; + @override String get activityDetailTitleProposing => 'Proposing'; diff --git a/mobile-app/lib/l10n/app_localizations_id.dart b/mobile-app/lib/l10n/app_localizations_id.dart index ed761bff..a49f2e6b 100644 --- a/mobile-app/lib/l10n/app_localizations_id.dart +++ b/mobile-app/lib/l10n/app_localizations_id.dart @@ -495,6 +495,9 @@ class AppLocalizationsId extends AppLocalizations { @override String get activityTxProposalCreated => 'Proposal dibuat'; + @override + String get activityTxProposalApproved => 'Proposal disetujui'; + @override String get multisigApproveButton => 'Setujui'; @@ -901,6 +904,9 @@ class AppLocalizationsId extends AppLocalizations { @override String get activityDetailTitleProposalCreated => 'Proposal dibuat'; + @override + String get activityDetailTitleProposalApproved => 'Proposal disetujui'; + @override String get activityDetailTitleProposing => 'Mengajukan'; diff --git a/mobile-app/lib/services/multisig_approval_polling_service.dart b/mobile-app/lib/services/multisig_approval_polling_service.dart index be882b5c..dac034ff 100644 --- a/mobile-app/lib/services/multisig_approval_polling_service.dart +++ b/mobile-app/lib/services/multisig_approval_polling_service.dart @@ -5,6 +5,7 @@ import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/multisig_approval_toast_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_approvals_provider.dart'; +import 'package:resonance_network_wallet/providers/wallet_providers.dart'; import 'package:resonance_network_wallet/services/multisig_approval_reconciliation.dart'; import 'package:resonance_network_wallet/shared/utils/print.dart'; @@ -88,14 +89,21 @@ class MultisigApprovalPollingService { Future _confirmIfIndexed(MultisigAccount msig, PendingMultisigApprovalEvent pending) async { final key = pending.id; - final service = _ref.read(multisigServiceProvider); - final proposal = await service.getProposal(msig, pending.proposalId); + final hash = pending.extrinsicHash; + if (hash == null) return false; + + final multisigService = _ref.read(multisigServiceProvider); + final proposal = await multisigService.getProposal(msig, pending.proposalId); if (proposal == null || !proposal.didApprove(pending.approverId)) return false; + final historyService = _ref.read(chainHistoryServiceProvider); + final indexed = await historyService.searchSignerApprovedByExtrinsicHash(extrinsicHash: hash); + if (indexed == null) return false; + quantusDebugPrint('[MultisigApprovalPoller] confirmed $key proposal ${pending.proposalId}'); stopPolling(key); removePendingMultisigApproval(_ref, key); - await reconcileIndexedApproval(_ref, msig, pending.approverId); + await reconcileIndexedApproval(_ref, msig, indexed); return true; } diff --git a/mobile-app/lib/services/multisig_approval_reconciliation.dart b/mobile-app/lib/services/multisig_approval_reconciliation.dart index 169a3984..075d550f 100644 --- a/mobile-app/lib/services/multisig_approval_reconciliation.dart +++ b/mobile-app/lib/services/multisig_approval_reconciliation.dart @@ -1,10 +1,21 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; -import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; +import 'package:resonance_network_wallet/services/account_activity_reconciliation.dart'; -/// Refreshes proposal-related state after indexer confirms an approval. -Future reconcileIndexedApproval(Ref ref, MultisigAccount msig, String approverId) async { +/// Refreshes proposal state and appends the approval to the approver's activity. +Future reconcileIndexedApproval( + Ref ref, + MultisigAccount msig, + MultisigProposalApprovedEvent indexed, +) async { invalidateMultisigProposals(ref, msig); - invalidateAccountBalances(ref, {approverId}); + + await appendConfirmedEventToHistory( + ref: ref, + accountId: indexed.approverId, + event: indexed, + includeForFilter: (filter) => filter != TransactionFilter.receive, + isDuplicate: (tx) => tx is MultisigProposalApprovedEvent && tx.isSameApprovalAs(indexed), + ); } diff --git a/mobile-app/lib/shared/extensions/transaction_event_extension.dart b/mobile-app/lib/shared/extensions/transaction_event_extension.dart index 6ac0a417..96024cfc 100644 --- a/mobile-app/lib/shared/extensions/transaction_event_extension.dart +++ b/mobile-app/lib/shared/extensions/transaction_event_extension.dart @@ -29,6 +29,8 @@ extension TransactionEventExtension on TransactionEvent { bool get isMultisigProposalCreated => this is MultisigProposalCreatedEvent; + bool get isMultisigProposalApproved => this is MultisigProposalApprovedEvent; + bool get isPendingMultisigProposal => this is PendingMultisigProposalEvent; bool get isProposalCreation => this is MultisigProposalCreatedEvent || this is PendingMultisigProposalEvent; diff --git a/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart b/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart index 4f69e058..b470effd 100644 --- a/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart +++ b/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart @@ -32,7 +32,10 @@ class _TransactionDetailSheet extends ConsumerWidget { const _TransactionDetailSheet({required this.tx, required this.activeAccountId}); bool get _isSend { - if (_isPendingMultisigProposal || _isMultisigProposalCreated || tx is MultisigProposalEvent) { + if (_isPendingMultisigProposal || + _isMultisigProposalCreated || + tx.isMultisigProposalApproved || + tx is MultisigProposalEvent) { return true; } return tx.from == activeAccountId; @@ -42,11 +45,13 @@ class _TransactionDetailSheet extends ConsumerWidget { bool get _isMultisigCreated => tx.isMultisigCreated; bool get _isPendingMultisigCreation => tx.isPendingMultisigCreation; bool get _isMultisigProposalCreated => tx.isMultisigProposalCreated; + bool get _isMultisigProposalApproved => tx.isMultisigProposalApproved; bool get _isPendingMultisigProposal => tx.isPendingMultisigProposal; String _title(AppLocalizations l10n) { if (_isPendingMultisigProposal) return l10n.activityDetailTitleProposing; if (_isMultisigProposalCreated) return l10n.activityDetailTitleProposalCreated; + if (_isMultisigProposalApproved) return l10n.activityDetailTitleProposalApproved; if (_isPendingMultisigCreation) return l10n.activityDetailTitleMultisigCreating; if (_isMultisigCreated) return l10n.activityDetailTitleMultisigCreated; if (_isPending) return l10n.activityDetailTitleSending; @@ -132,6 +137,8 @@ class _AmountSection extends ConsumerWidget { PendingMultisigCreationEvent(:final totalCost) => (totalCost, colors.checksum), MultisigCreatedEvent(:final totalCost, :final creatorId) when creatorId != activeAccountId => (null, null), MultisigCreatedEvent(:final totalCost) => (totalCost, colors.textPrimary), + MultisigProposalApprovedEvent(:final fee) when fee == null || fee == BigInt.zero => (null, null), + MultisigProposalApprovedEvent(:final fee) => (fee!, colors.textPrimary), _ => (tx.amount, isSend ? colors.textPrimary : colors.success), }; @@ -183,6 +190,10 @@ class _DetailsSection extends ConsumerWidget { return _proposalCreatedDetails(tx as MultisigProposalCreatedEvent, l10n, formattingService); } + if (tx is MultisigProposalApprovedEvent) { + return _proposalApprovedDetails(tx as MultisigProposalApprovedEvent, l10n, formattingService); + } + if (pendingMultisig is PendingMultisigCreationEvent) { return _pendingMultisigDetails(pendingMultisig, l10n, formattingService); } @@ -237,6 +248,38 @@ class _DetailsSection extends ConsumerWidget { ); } + Widget _proposalApprovedDetails( + MultisigProposalApprovedEvent event, + AppLocalizations l10n, + NumberFormattingService formattingService, + ) { + final multisig = AddressFormattingService.formatActivityDetailAddress(event.multisigAddress); + final recipientAddress = AddressFormattingService.formatActivityDetailAddress(event.recipient); + final dateTime = DatetimeFormattingService.formatTxDateTime(event.timestamp); + final transferAmount = _formatBalance(l10n, formattingService, event.amount); + final networkFeeValue = event.networkFee != BigInt.zero + ? _formatBalance(l10n, formattingService, event.networkFee) + : null; + final txHash = event.extrinsicHash != null + ? AddressFormattingService.formatActivityDetailExtrinsicHash(event.extrinsicHash!) + : null; + final approvalsLabel = + event.approvalsOfSignersLabel(l10n.multisigApprovalsOf) ?? event.approvalsCount.toString(); + + return Column( + children: [ + _DetailRow(label: l10n.activityDetailMultisigAddress, value: multisig, colors: colors), + _DetailRow(label: l10n.activityDetailTo, value: recipientAddress, colors: colors), + _DetailRow(label: l10n.activityDetailProposalTransferAmount, value: transferAmount, colors: colors), + _DetailRow(label: l10n.multisigProposalApprovalsLabel, value: approvalsLabel, colors: colors), + if (networkFeeValue != null) + _DetailRow(label: l10n.activityDetailNetworkFee, value: networkFeeValue, colors: colors), + _DetailRow(label: l10n.activityDetailDate, value: dateTime, colors: colors), + if (txHash != null) _DetailRow(label: l10n.activityDetailTxHash, value: txHash, colors: colors), + ], + ); + } + Widget _proposalCreatedDetails( MultisigProposalCreatedEvent event, AppLocalizations l10n, @@ -434,9 +477,12 @@ class _ExplorerLink extends ConsumerWidget { final isMinerReward = tx.isMinerReward; final isMultisigCreated = tx.isMultisigCreated; final isProposalCreated = tx.isProposalCreation; + final isProposalApproved = tx.isMultisigProposalApproved; String transactionType; - if (isProposalCreated) { + if (isProposalApproved) { + transactionType = 'multisig-signer-approved'; + } else if (isProposalCreated) { transactionType = 'multisig-proposal-created'; } else if (isMultisigCreated) { transactionType = 'multisig-created'; diff --git a/mobile-app/lib/v2/screens/activity/tx_item.dart b/mobile-app/lib/v2/screens/activity/tx_item.dart index 9fc31fa4..e1fbfada 100644 --- a/mobile-app/lib/v2/screens/activity/tx_item.dart +++ b/mobile-app/lib/v2/screens/activity/tx_item.dart @@ -71,6 +71,25 @@ class TxItemData { ); } + if (tx is MultisigProposalApprovedEvent) { + final recipient = AddressFormattingService.formatAddress(tx.recipient, prefix: 5, postFix: 3); + final fee = tx.networkFee; + return TxItemData( + label: l10n.activityTxProposalApproved, + timeLabel: _timeAgo(tx.timestamp, l10n), + iconBg: Colors.transparent, + iconColor: colors.txItemIconDefault, + labelColor: colors.textPrimary, + amountColor: colors.textPrimary, + borderColor: colors.txItemBorderDefault, + isSend: true, + amount: fee, + hideAmount: fee == BigInt.zero, + counterpartyAddr: recipient, + customIcon: Icons.how_to_vote_outlined, + ); + } + if (tx is MultisigProposalEvent) { return TxItemData( label: l10n.activityTxProposal, diff --git a/quantus_sdk/lib/quantus_sdk.dart b/quantus_sdk/lib/quantus_sdk.dart index 13359c6d..59aa1a53 100644 --- a/quantus_sdk/lib/quantus_sdk.dart +++ b/quantus_sdk/lib/quantus_sdk.dart @@ -80,6 +80,7 @@ export 'src/models/multisig_create_submission.dart'; export 'src/models/multisig_proposal.dart'; export 'src/models/multisig_proposal_event.dart'; export 'src/models/multisig_proposal_created_event.dart'; +export 'src/models/multisig_proposal_approved_event.dart'; export 'src/models/pending_multisig_approval_event.dart'; export 'src/models/propose_fee_breakdown.dart'; export 'src/models/multisig_signer.dart'; diff --git a/quantus_sdk/lib/src/models/multisig_proposal_approved_event.dart b/quantus_sdk/lib/src/models/multisig_proposal_approved_event.dart new file mode 100644 index 00000000..60a54d25 --- /dev/null +++ b/quantus_sdk/lib/src/models/multisig_proposal_approved_event.dart @@ -0,0 +1,154 @@ +import 'package:quantus_sdk/src/models/json_dynamic_parse.dart'; +import 'package:quantus_sdk/src/models/multisig_account.dart'; +import 'package:quantus_sdk/src/models/multisig_proposal.dart'; +import 'package:quantus_sdk/src/models/transaction_event.dart'; + +/// On-chain multisig proposal approval shown in the approver's activity history. +/// +/// [amount] is the proposed transfer amount (context). [fee] is the extrinsic +/// network fee paid by the approver. +class MultisigProposalApprovedEvent extends TransactionEvent { + final String approverId; + final String multisigAddress; + final String recipient; + final BigInt? fee; + final int proposalId; + final int approvalsCount; + final MultisigProposal? proposal; + + MultisigProposalApprovedEvent({ + required super.id, + required this.approverId, + required this.multisigAddress, + required this.recipient, + required super.amount, + required this.proposalId, + required this.approvalsCount, + required super.timestamp, + required super.blockNumber, + required super.blockHash, + this.fee, + this.proposal, + super.extrinsicHash, + }) : super(from: approverId, to: recipient); + + bool isApprover(String accountId) => approverId == accountId; + + /// Network fee paid by the approver; zero when indexer did not record one. + BigInt get networkFee => fee ?? BigInt.zero; + + /// Stable key for deduplicating this approval in activity history. + String get activityDedupKey { + if (extrinsicHash != null) return 'hash:$extrinsicHash'; + return 'approval:$multisigAddress|$proposalId|$approverId'; + } + + /// Whether [other] describes the same approval as this event. + bool isSameApprovalAs(MultisigProposalApprovedEvent other) { + if (extrinsicHash != null && other.extrinsicHash != null && extrinsicHash == other.extrinsicHash) { + return true; + } + return id == other.id; + } + + factory MultisigProposalApprovedEvent.fromAccountEvent(Map event) { + final approved = jsonMapRequired(event['multisigSignerApproved'], 'multisigSignerApproved'); + final eventTimestamp = event['timestamp']; + return MultisigProposalApprovedEvent.fromSignerApprovedGraphql( + approved: approved, + accountEventId: stringFromJson(event['id']), + accountEventTimestamp: eventTimestamp != null ? dateTimeFromJson(eventTimestamp) : null, + ); + } + + factory MultisigProposalApprovedEvent.fromSignerApprovedGraphql({ + required Map approved, + String? accountEventId, + DateTime? accountEventTimestamp, + }) { + final proposalJson = jsonMapOrNull(approved['proposal']); + MultisigProposal? proposal; + String approverId = nestedAccountId(approved['approver']); + String multisigAddress = ''; + String recipient = ''; + BigInt amount = BigInt.zero; + var proposalId = 0; + + if (proposalJson != null) { + final msig = _minimalMultisigFromProposalJson(proposalJson, approverId); + multisigAddress = msig.accountId; + proposal = MultisigProposal.fromIndexerJson(proposalJson, msig: msig); + recipient = proposal.recipient; + amount = proposal.amount; + proposalId = proposal.id; + } + + final approvalsCountRaw = approved['approvals_count'] ?? approved['approvalsCount']; + final approvalsCount = approvalsCountRaw is int + ? approvalsCountRaw + : approvalsCountRaw is num + ? approvalsCountRaw.toInt() + : int.tryParse(approvalsCountRaw?.toString() ?? '') ?? proposal?.approvalCount ?? 0; + + final block = jsonMapOrNull(approved['block']); + final feeRaw = approved['fee']; + + return MultisigProposalApprovedEvent( + id: accountEventId ?? stringFromJson(approved['id']), + approverId: approverId, + multisigAddress: multisigAddress, + recipient: recipient, + amount: amount, + proposalId: proposalId, + approvalsCount: approvalsCount, + fee: feeRaw != null ? bigIntFromJson(feeRaw) : null, + timestamp: accountEventTimestamp ?? dateTimeFromJson(approved['timestamp']), + blockNumber: blockHeightFromJsonMap(block), + blockHash: blockHashFromJsonMap(block), + extrinsicHash: optionalExtrinsicHash(approved), + proposal: proposal, + ); + } + + static MultisigAccount _minimalMultisigFromProposalJson( + Map proposalJson, + String myMemberAccountId, + ) { + final multisigJson = jsonMapOrNull(proposalJson['multisig']); + final address = nestedAccountId(multisigJson ?? proposalJson['multisig_id']); + final signersRaw = multisigJson?['signers']; + final signers = signersRaw is List ? signersRaw.map((e) => e.toString()).toList() : []; + final threshold = _thresholdFromMultisigJson(multisigJson, signers); + + final nonceRaw = multisigJson?['nonce']; + return MultisigAccount( + name: '', + accountId: address, + signers: signers, + threshold: threshold, + nonce: nonceRaw != null ? bigIntFromJson(nonceRaw) : BigInt.zero, + myMemberAccountId: myMemberAccountId, + ); + } + + /// Approval count formatted against total signer count when known. + String? approvalsOfSignersLabel(String Function(int count, int total) formatter) { + final total = proposal?.signerCount ?? 0; + if (total <= 0) return null; + return formatter(approvalsCount, total); + } + + static int _thresholdFromMultisigJson(Map? multisigJson, List signers) { + if (signers.isNotEmpty && multisigJson?['threshold'] != null) { + return multisigThresholdFromJson(multisigJson!['threshold'], signerCount: signers.length); + } + if (signers.isNotEmpty) return signers.length; + return 1; + } + + @override + String toString() { + return 'MultisigProposalApproved{id: $id, approver: $approverId, ' + 'multisig: $multisigAddress, proposalId: $proposalId, fee: $fee}'; + } +} diff --git a/quantus_sdk/lib/src/services/chain_history_service.dart b/quantus_sdk/lib/src/services/chain_history_service.dart index a77fdb4a..d675f7a8 100644 --- a/quantus_sdk/lib/src/services/chain_history_service.dart +++ b/quantus_sdk/lib/src/services/chain_history_service.dart @@ -121,9 +121,10 @@ query ScheduledReversibleTransfersByAccounts(\$accounts: [String!]!, \$limit: In final String multisigField = MultisigGraphql.accountEventSelection; final String proposalCreatedField = MultisigGraphql.proposalCreatedAccountEventSelection; + final String signerApprovedField = MultisigGraphql.signerApprovedAccountEventSelection; const String multisigSendClause = - ', {multisig_id: {_is_null: false}}, {multisig_proposal_created_id: {_is_null: false}}'; + ', {multisig_id: {_is_null: false}}, {multisig_proposal_created_id: {_is_null: false}}, {multisig_signer_approved_id: {_is_null: false}}'; final String whereClause; @@ -208,7 +209,7 @@ query AccountEvents(\$accounts: [String!]!, \$limit: Int!, \$offset: Int!) { } scheduledAt: scheduled_at } - }$minerRewardField$multisigField$proposalCreatedField + }$minerRewardField$multisigField$proposalCreatedField$signerApprovedField } } '''; @@ -396,6 +397,21 @@ query SearchProposalCreatedByExtrinsicHash(\$extrinsicHash: String!) { ${MultisigGraphql.proposalCreatedAccountEventSelection} } } +'''; + + final String _searchSignerApprovedByExtrinsicHashQuery = + ''' +query SearchSignerApprovedByExtrinsicHash(\$extrinsicHash: String!) { + accountEvents: account_event( + limit: 1 + where: {multisigSignerApproved: {extrinsic: {id: {_eq: \$extrinsicHash}}}} + order_by: {timestamp: desc} + ) { + id + timestamp +${MultisigGraphql.signerApprovedAccountEventSelection} + } +} '''; void printTiming(String label, int milliseconds) { @@ -467,6 +483,18 @@ ${MultisigGraphql.proposalCreatedAccountEventSelection} return null; } } + if (eventMap['multisigSignerApproved'] != null) { + try { + return MultisigProposalApprovedEvent.fromAccountEvent(eventMap); + } catch (e, stackTrace) { + _log( + 'WARNING: failed to parse multisigSignerApproved, id: ${eventMap['id']}, error: $e', + error: e, + stackTrace: stackTrace, + ); + return null; + } + } final id = eventMap['id'] as String?; if (id != null && _isSkippedMultisigAccountEventId(id)) { // Known multisig-related rows we don't render in activity yet. @@ -482,6 +510,7 @@ ${MultisigGraphql.proposalCreatedAccountEventSelection} /// are not shown in activity yet. static bool _isSkippedMultisigAccountEventId(String id) { if (id.startsWith('ae-ms-proposal-created-')) return false; + if (id.startsWith('ae-ms-signer-approved-')) return false; return id.startsWith('ae-multisig-') || id.startsWith('ae-ms-'); } @@ -683,6 +712,48 @@ ${MultisigGraphql.proposalCreatedAccountEventSelection} ); } + /// Searches for a confirmed multisig proposal approval by extrinsic hash. + Future searchSignerApprovedByExtrinsicHash({required String extrinsicHash}) async { + _log('Searching signer approved by extrinsic hash: $extrinsicHash'); + final Map requestBody = { + 'query': _searchSignerApprovedByExtrinsicHashQuery, + 'variables': {'extrinsicHash': extrinsicHash}, + }; + + try { + final http.Response response = await _graphQlEndpointService.post(body: jsonEncode(requestBody)); + + if (response.statusCode != 200) { + throw Exception('GraphQL request failed with status: ${response.statusCode}. Body: ${response.body}'); + } + + final Map responseBody = jsonDecode(response.body); + + if (responseBody['errors'] != null) { + _log('GraphQL errors in response: ${responseBody['errors']}'); + throw Exception('GraphQL errors: ${responseBody['errors'].toString()}'); + } + + final List? events = responseBody['data']?['accountEvents']; + if (events == null || events.isEmpty) { + _log('No matching signer approval found for hash $extrinsicHash'); + return null; + } + + final parsed = tryParseOtherTransferEvent(events.first); + if (parsed is MultisigProposalApprovedEvent) { + _log('Found signer approval at block ${parsed.blockNumber}'); + return parsed; + } + + _log('Extrinsic hash matched account_event but payload was not MultisigProposalApprovedEvent'); + return null; + } catch (e, stackTrace) { + _log('Error searching signer approved by hash: $e', error: e, stackTrace: stackTrace); + rethrow; + } + } + /// Searches for a confirmed multisig proposal creation by extrinsic hash. Future searchProposalCreatedByExtrinsicHash({required String extrinsicHash}) async { _log('Searching proposal created by extrinsic hash: $extrinsicHash'); diff --git a/quantus_sdk/lib/src/services/multisig_graphql.dart b/quantus_sdk/lib/src/services/multisig_graphql.dart index 3df77bf6..0dd5aeb9 100644 --- a/quantus_sdk/lib/src/services/multisig_graphql.dart +++ b/quantus_sdk/lib/src/services/multisig_graphql.dart @@ -61,6 +61,27 @@ $indexerFields ${MultisigProposalGraphql.fields} } }'''; + /// Nested selection for `account_event.multisigSignerApproved`. + static const String signerApprovedAccountEventSelection = + ''' multisigSignerApproved { + id + fee + approvals_count + timestamp + block { + height + hash + } + extrinsic { + id + } + approver { + id + } + proposal { +${MultisigProposalGraphql.fields} } + }'''; + static const String byPkQuery = r''' query MultisigByPk($id: String!) { @@ -151,6 +172,9 @@ class MultisigProposalGraphql { } multisig { id + threshold + signers + nonce } createdAtBlock { height diff --git a/quantus_sdk/test/chain_history_service_test.dart b/quantus_sdk/test/chain_history_service_test.dart index be73510e..cd451c9d 100644 --- a/quantus_sdk/test/chain_history_service_test.dart +++ b/quantus_sdk/test/chain_history_service_test.dart @@ -94,9 +94,85 @@ void main() { }, }; + const signerApprovedAccountEventFixture = { + 'id': 'ae-ms-signer-approved-0000000256-c9dc5-000005-qzk2', + 'timestamp': '2026-06-03T11:00:00.000+00:00', + 'multisigSignerApproved': { + 'id': 'ms-signer-approved-256', + 'fee': '25000000000', + 'approvals_count': 2, + 'timestamp': '2026-06-03T11:00:00.000+00:00', + 'block': {'height': 257, 'hash': '0xdef'}, + 'extrinsic': {'id': '0xapprovehash'}, + 'approver': {'id': 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y'}, + 'proposal': { + 'id': 'proposal-entity-1', + 'proposal_id': 5, + 'created_at': '2026-06-03T10:00:00.000+00:00', + 'pallet': 'Balances', + 'call': 'transfer_allow_death', + 'call_raw': '0x', + 'transfer_amount': '2000000000000', + 'status': 'ACTIVE', + 'expiry_block': 1000, + 'deposit': '10000000000000', + 'approvals': [ + 'qzk1Nxai3dZD9Cn5kwGcgL6mKxsfxwqdis7kDQJ52aJS2vSn7', + 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y', + ], + 'proposer': {'id': 'qzk1Nxai3dZD9Cn5kwGcgL6mKxsfxwqdis7kDQJ52aJS2vSn7'}, + 'transferTo': {'id': 'qzpyxSr48YN9EQe2ito734iCReTXjnungmNCSY4Yph1YznEda'}, + 'multisig': { + 'id': 'qzo4qS1Lw6J66JuXcxLEWgzBLX2sBe3Ak3kmN1oA17pXLKCFH', + 'threshold': 2, + 'nonce': '0', + 'signers': [ + 'qzk1Nxai3dZD9Cn5kwGcgL6mKxsfxwqdis7kDQJ52aJS2vSn7', + 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y', + ], + }, + }, + }, + }; + group('ChainHistoryService.tryParseOtherTransferEvent', () { test('returns null for unhandled multisig indexer account events', () { - expect(service.tryParseOtherTransferEvent({'id': 'ae-ms-signer-approved-0000000256-qzk1'}), isNull); + expect(service.tryParseOtherTransferEvent({'id': 'ae-ms-proposal-ready-0000000256-qzk1'}), isNull); + }); + + test('parses multisig signer approved account events', () { + final result = service.tryParseOtherTransferEvent(signerApprovedAccountEventFixture); + expect(result, isA()); + + final event = result! as MultisigProposalApprovedEvent; + expect(event.approverId, 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y'); + expect(event.multisigAddress, 'qzo4qS1Lw6J66JuXcxLEWgzBLX2sBe3Ak3kmN1oA17pXLKCFH'); + expect(event.recipient, 'qzpyxSr48YN9EQe2ito734iCReTXjnungmNCSY4Yph1YznEda'); + expect(event.amount, BigInt.parse('2000000000000')); + expect(event.fee, BigInt.parse('25000000000')); + expect(event.proposalId, 5); + expect(event.approvalsCount, 2); + expect(event.extrinsicHash, '0xapprovehash'); + expect(event.proposal, isNotNull); + expect(event.proposal!.signerCount, 2); + expect(event.proposal!.threshold, 2); + expect(event.approvalsOfSignersLabel((c, t) => '$c of $t'), '2 of 2'); + }); + + test('parses signer approved with sparse multisig without wrong threshold', () { + final sparse = Map.from(signerApprovedAccountEventFixture); + final approved = Map.from( + sparse['multisigSignerApproved'] as Map, + ); + final proposal = Map.from(approved['proposal'] as Map); + proposal['multisig'] = {'id': 'qzo4qS1Lw6J66JuXcxLEWgzBLX2sBe3Ak3kmN1oA17pXLKCFH'}; + approved['proposal'] = proposal; + sparse['multisigSignerApproved'] = approved; + + final result = service.tryParseOtherTransferEvent(sparse); + final event = result! as MultisigProposalApprovedEvent; + expect(event.proposal!.signerCount, 0); + expect(event.approvalsOfSignersLabel((c, t) => '$c of $t'), isNull); }); test('parses live indexer proposal created shape with sparse multisig', () { From c6c5a3d3b16d4ee36c8390f8f9b03c773c1577d5 Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 14:53:24 +0800 Subject: [PATCH 03/18] feat: resolve DRY and simplicity issues --- .../pending_extrinsic_events_notifier.dart | 66 +++++++++ .../pending_multisig_approvals_provider.dart | 48 +++--- .../pending_multisig_proposals_provider.dart | 43 +++--- .../extrinsic_indexer_polling_service.dart | 115 +++++++++++++++ .../multisig_approval_polling_service.dart | 137 +++++------------ .../multisig_proposal_polling_service.dart | 139 +++++------------- .../multisig_approve_confirm_sheet.dart | 58 ++++++++ .../multisig_proposal_detail_sheet.dart | 7 +- .../lib/v2/screens/multisig/proposal_row.dart | 1 + 9 files changed, 351 insertions(+), 263 deletions(-) create mode 100644 mobile-app/lib/providers/pending_extrinsic_events_notifier.dart create mode 100644 mobile-app/lib/services/extrinsic_indexer_polling_service.dart diff --git a/mobile-app/lib/providers/pending_extrinsic_events_notifier.dart b/mobile-app/lib/providers/pending_extrinsic_events_notifier.dart new file mode 100644 index 00000000..c8943778 --- /dev/null +++ b/mobile-app/lib/providers/pending_extrinsic_events_notifier.dart @@ -0,0 +1,66 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +/// Shared list mutations for extrinsics submitted but not yet indexed. +abstract class PendingExtrinsicEventsNotifier extends Notifier> { + @override + List build() => []; + + String idOf(T event); + + T withExtrinsicHash(T event, String? extrinsicHash); + + void add(T event) { + state = [...state, event]; + } + + void update(String id, {String? extrinsicHash}) { + state = [ + for (final event in state) + if (idOf(event) == id) withExtrinsicHash(event, extrinsicHash) else event, + ]; + } + + void remove(String id) { + state = state.where((event) => idOf(event) != id).toList(); + } + + void clear() { + state = []; + } +} + +T? findPendingExtrinsicEventById( + List events, + String id, + String Function(T event) idOf, +) { + for (final event in events) { + if (idOf(event) == id) return event; + } + return null; +} + +void addPendingExtrinsicEvent( + Ref ref, + NotifierProvider, List> provider, + T event, +) { + ref.read(provider.notifier).add(event); +} + +void updatePendingExtrinsicEvent( + Ref ref, + NotifierProvider, List> provider, + String id, { + String? extrinsicHash, +}) { + ref.read(provider.notifier).update(id, extrinsicHash: extrinsicHash); +} + +void removePendingExtrinsicEvent( + Ref ref, + NotifierProvider, List> provider, + String id, +) { + ref.read(provider.notifier).remove(id); +} diff --git a/mobile-app/lib/providers/pending_multisig_approvals_provider.dart b/mobile-app/lib/providers/pending_multisig_approvals_provider.dart index 29eade95..e50814fc 100644 --- a/mobile-app/lib/providers/pending_multisig_approvals_provider.dart +++ b/mobile-app/lib/providers/pending_multisig_approvals_provider.dart @@ -1,28 +1,18 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/providers/pending_extrinsic_events_notifier.dart'; /// Approvals submitted on-chain but not yet visible in the indexer. -class PendingMultisigApprovalsNotifier extends Notifier> { +class PendingMultisigApprovalsNotifier extends PendingExtrinsicEventsNotifier { @override - List build() => []; + String idOf(PendingMultisigApprovalEvent event) => event.id; - void add(PendingMultisigApprovalEvent event) { - state = [...state, event]; - } - - void update(String id, {String? extrinsicHash}) { - state = [ - for (final event in state) - if (event.id == id) event.copyWith(extrinsicHash: extrinsicHash) else event, - ]; - } - - void remove(String id) { - state = state.where((e) => e.id != id).toList(); - } - - void clear() { - state = []; + @override + PendingMultisigApprovalEvent withExtrinsicHash( + PendingMultisigApprovalEvent event, + String? extrinsicHash, + ) { + return event.copyWith(extrinsicHash: extrinsicHash); } } @@ -35,9 +25,12 @@ PendingMultisigApprovalEvent? findPendingApprovalForProposal( List all, String multisigAddress, int proposalId, + String approverId, ) { for (final event in all) { - if (event.multisigAddress == multisigAddress && event.proposalId == proposalId) { + if (event.multisigAddress == multisigAddress && + event.proposalId == proposalId && + event.approverId == approverId) { return event; } } @@ -45,20 +38,21 @@ PendingMultisigApprovalEvent? findPendingApprovalForProposal( } void addPendingMultisigApproval(Ref ref, PendingMultisigApprovalEvent event) { - ref.read(pendingMultisigApprovalsProvider.notifier).add(event); + addPendingExtrinsicEvent(ref, pendingMultisigApprovalsProvider, event); } void updatePendingMultisigApproval(Ref ref, String id, {String? extrinsicHash}) { - ref.read(pendingMultisigApprovalsProvider.notifier).update(id, extrinsicHash: extrinsicHash); + updatePendingExtrinsicEvent(ref, pendingMultisigApprovalsProvider, id, extrinsicHash: extrinsicHash); } void removePendingMultisigApproval(Ref ref, String id) { - ref.read(pendingMultisigApprovalsProvider.notifier).remove(id); + removePendingExtrinsicEvent(ref, pendingMultisigApprovalsProvider, id); } PendingMultisigApprovalEvent? findPendingMultisigApproval(Ref ref, String id) { - for (final event in ref.read(pendingMultisigApprovalsProvider)) { - if (event.id == id) return event; - } - return null; + return findPendingExtrinsicEventById( + ref.read(pendingMultisigApprovalsProvider), + id, + (event) => event.id, + ); } diff --git a/mobile-app/lib/providers/pending_multisig_proposals_provider.dart b/mobile-app/lib/providers/pending_multisig_proposals_provider.dart index fd66a6ce..cf448b79 100644 --- a/mobile-app/lib/providers/pending_multisig_proposals_provider.dart +++ b/mobile-app/lib/providers/pending_multisig_proposals_provider.dart @@ -1,28 +1,18 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/providers/pending_extrinsic_events_notifier.dart'; /// Transfer proposals submitted on-chain but not yet visible in the indexer. -class PendingMultisigProposalsNotifier extends Notifier> { +class PendingMultisigProposalsNotifier extends PendingExtrinsicEventsNotifier { @override - List build() => []; + String idOf(PendingMultisigProposalEvent event) => event.id; - void add(PendingMultisigProposalEvent event) { - state = [...state, event]; - } - - void update(String id, {String? extrinsicHash}) { - state = [ - for (final event in state) - if (event.id == id) event.copyWith(extrinsicHash: extrinsicHash) else event, - ]; - } - - void remove(String id) { - state = state.where((e) => e.id != id).toList(); - } - - void clear() { - state = []; + @override + PendingMultisigProposalEvent withExtrinsicHash( + PendingMultisigProposalEvent event, + String? extrinsicHash, + ) { + return event.copyWith(extrinsicHash: extrinsicHash); } } @@ -48,15 +38,15 @@ List pendingProposalsExcludingMultisig( } void addPendingMultisigProposal(Ref ref, PendingMultisigProposalEvent event) { - ref.read(pendingMultisigProposalsProvider.notifier).add(event); + addPendingExtrinsicEvent(ref, pendingMultisigProposalsProvider, event); } void updatePendingMultisigProposal(Ref ref, String id, {String? extrinsicHash}) { - ref.read(pendingMultisigProposalsProvider.notifier).update(id, extrinsicHash: extrinsicHash); + updatePendingExtrinsicEvent(ref, pendingMultisigProposalsProvider, id, extrinsicHash: extrinsicHash); } void removePendingMultisigProposal(Ref ref, String id) { - ref.read(pendingMultisigProposalsProvider.notifier).remove(id); + removePendingExtrinsicEvent(ref, pendingMultisigProposalsProvider, id); } void clearPendingMultisigProposals(Ref ref) { @@ -64,8 +54,9 @@ void clearPendingMultisigProposals(Ref ref) { } PendingMultisigProposalEvent? findPendingMultisigProposal(Ref ref, String id) { - for (final event in ref.read(pendingMultisigProposalsProvider)) { - if (event.id == id) return event; - } - return null; + return findPendingExtrinsicEventById( + ref.read(pendingMultisigProposalsProvider), + id, + (event) => event.id, + ); } diff --git a/mobile-app/lib/services/extrinsic_indexer_polling_service.dart b/mobile-app/lib/services/extrinsic_indexer_polling_service.dart new file mode 100644 index 00000000..bc45a718 --- /dev/null +++ b/mobile-app/lib/services/extrinsic_indexer_polling_service.dart @@ -0,0 +1,115 @@ +import 'dart:async'; + +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:resonance_network_wallet/shared/utils/print.dart'; + +/// Configuration for polling the indexer until a submitted extrinsic appears. +class ExtrinsicIndexerPollingConfig { + const ExtrinsicIndexerPollingConfig({ + required this.logPrefix, + required this.getId, + required this.getExtrinsicHash, + required this.isStillPending, + required this.removePending, + required this.showTimeoutToast, + required this.confirmIfIndexed, + }); + + final String logPrefix; + final String Function(TPending pending) getId; + final String? Function(TPending pending) getExtrinsicHash; + final bool Function(Ref ref, String id) isStillPending; + final void Function(Ref ref, String id) removePending; + final void Function(Ref ref) showTimeoutToast; + final Future Function(Ref ref, TContext context, TPending pending) confirmIfIndexed; +} + +/// Polls the indexer on an interval until [confirmIfIndexed] succeeds or times out. +class ExtrinsicIndexerPollingService { + ExtrinsicIndexerPollingService(this._ref, this._config); + + final Ref _ref; + final ExtrinsicIndexerPollingConfig _config; + final Map _timers = {}; + final Set _inFlight = {}; + static const _searchInterval = Duration(seconds: 5); + static const _timeout = Duration(minutes: 5); + + void startPolling(TContext context, TPending pending) { + final key = _config.getId(pending); + if (_config.getExtrinsicHash(pending) == null) { + quantusDebugPrint( + '${_config.logPrefix} ERROR: cannot poll $key — no extrinsicHash. ' + 'Waiting for submission to complete.', + ); + return; + } + + quantusDebugPrint( + '${_config.logPrefix} startPolling $key hash=${_config.getExtrinsicHash(pending)}', + ); + + stopPolling(key); + final startTime = DateTime.now(); + + final timer = Timer.periodic(_searchInterval, (_) { + if (DateTime.now().difference(startTime) > _timeout) { + quantusDebugPrint('${_config.logPrefix} timeout for $key'); + stopPolling(key); + unawaited(_handleTimeout(context, pending)); + return; + } + unawaited(_search(context, pending)); + }); + + _timers[key] = timer; + unawaited(_search(context, pending)); + } + + void stopPolling(String id) { + _timers.remove(id)?.cancel(); + } + + Future _search(TContext context, TPending pending) async { + final key = _config.getId(pending); + if (_config.getExtrinsicHash(pending) == null) return; + if (!_inFlight.add(key)) return; + + try { + final confirmed = await _config.confirmIfIndexed(_ref, context, pending); + if (confirmed) { + stopPolling(key); + return; + } + quantusDebugPrint('${_config.logPrefix} not indexed yet: $key'); + } catch (e) { + quantusDebugPrint('${_config.logPrefix} search error for $key: $e'); + } finally { + _inFlight.remove(key); + } + } + + Future _handleTimeout(TContext context, TPending pending) async { + final key = _config.getId(pending); + try { + quantusDebugPrint('${_config.logPrefix} final indexer check before timeout for $key'); + final confirmed = await _config.confirmIfIndexed(_ref, context, pending); + if (confirmed) return; + } catch (e) { + quantusDebugPrint('${_config.logPrefix} final check error for $key: $e'); + } + + if (!_config.isStillPending(_ref, key)) return; + + quantusDebugPrint('${_config.logPrefix} giving up on $key'); + _config.removePending(_ref, key); + _config.showTimeoutToast(_ref); + } + + void dispose() { + for (final timer in _timers.values) { + timer.cancel(); + } + _timers.clear(); + } +} diff --git a/mobile-app/lib/services/multisig_approval_polling_service.dart b/mobile-app/lib/services/multisig_approval_polling_service.dart index dac034ff..bc11a90d 100644 --- a/mobile-app/lib/services/multisig_approval_polling_service.dart +++ b/mobile-app/lib/services/multisig_approval_polling_service.dart @@ -1,122 +1,51 @@ -import 'dart:async'; - import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/multisig_approval_toast_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_approvals_provider.dart'; import 'package:resonance_network_wallet/providers/wallet_providers.dart'; +import 'package:resonance_network_wallet/services/extrinsic_indexer_polling_service.dart'; import 'package:resonance_network_wallet/services/multisig_approval_reconciliation.dart'; -import 'package:resonance_network_wallet/shared/utils/print.dart'; - -/// Polls the indexer until a freshly submitted approval is reflected on the -/// proposal, then clears the pending overlay and refreshes proposal state. -class MultisigApprovalPollingService { - final Ref _ref; - final Map _timers = {}; - final Set _inFlight = {}; - static const _searchInterval = Duration(seconds: 5); - static const _timeout = Duration(minutes: 5); - - MultisigApprovalPollingService(this._ref); - - void startPolling(MultisigAccount msig, PendingMultisigApprovalEvent pending) { - final key = pending.id; - if (pending.extrinsicHash == null) { - quantusDebugPrint( - '[MultisigApprovalPoller] ERROR: cannot poll $key — no extrinsicHash. ' - 'Waiting for submission to complete.', - ); - return; - } - - quantusDebugPrint('[MultisigApprovalPoller] startPolling $key hash=${pending.extrinsicHash}'); - - stopPolling(key); - final startTime = DateTime.now(); - - final timer = Timer.periodic(_searchInterval, (_) { - if (DateTime.now().difference(startTime) > _timeout) { - quantusDebugPrint('[MultisigApprovalPoller] timeout for $key'); - stopPolling(key); - unawaited(_handleTimeout(msig, pending)); - return; - } - unawaited(_search(msig, pending)); - }); - - _timers[key] = timer; - unawaited(_search(msig, pending)); - } - - void stopPolling(String id) { - _timers.remove(id)?.cancel(); - } - - Future _search(MultisigAccount msig, PendingMultisigApprovalEvent pending) async { - final key = pending.id; - if (pending.extrinsicHash == null) return; - if (!_inFlight.add(key)) return; - - try { - final confirmed = await _confirmIfIndexed(msig, pending); - if (!confirmed) { - quantusDebugPrint('[MultisigApprovalPoller] not indexed yet: $key'); - } - } catch (e) { - quantusDebugPrint('[MultisigApprovalPoller] search error for $key: $e'); - } finally { - _inFlight.remove(key); - } - } - - Future _handleTimeout(MultisigAccount msig, PendingMultisigApprovalEvent pending) async { - final key = pending.id; - try { - quantusDebugPrint('[MultisigApprovalPoller] final indexer check before timeout for $key'); - final confirmed = await _confirmIfIndexed(msig, pending); - if (confirmed) return; - } catch (e) { - quantusDebugPrint('[MultisigApprovalPoller] final check error for $key: $e'); - } - - if (findPendingMultisigApproval(_ref, key) == null) return; - - quantusDebugPrint('[MultisigApprovalPoller] giving up on $key'); - removePendingMultisigApproval(_ref, key); - _ref.read(multisigApprovalToastProvider.notifier).show(MultisigApprovalToastKind.timeout); - } - Future _confirmIfIndexed(MultisigAccount msig, PendingMultisigApprovalEvent pending) async { - final key = pending.id; - final hash = pending.extrinsicHash; - if (hash == null) return false; +typedef MultisigApprovalPollingService = + ExtrinsicIndexerPollingService; - final multisigService = _ref.read(multisigServiceProvider); - final proposal = await multisigService.getProposal(msig, pending.proposalId); - if (proposal == null || !proposal.didApprove(pending.approverId)) return false; +Future _confirmIndexedApproval( + Ref ref, + MultisigAccount msig, + PendingMultisigApprovalEvent pending, +) async { + final hash = pending.extrinsicHash; + if (hash == null) return false; - final historyService = _ref.read(chainHistoryServiceProvider); - final indexed = await historyService.searchSignerApprovedByExtrinsicHash(extrinsicHash: hash); - if (indexed == null) return false; + final multisigService = ref.read(multisigServiceProvider); + final proposal = await multisigService.getProposal(msig, pending.proposalId); + if (proposal == null || !proposal.didApprove(pending.approverId)) return false; - quantusDebugPrint('[MultisigApprovalPoller] confirmed $key proposal ${pending.proposalId}'); - stopPolling(key); - removePendingMultisigApproval(_ref, key); - await reconcileIndexedApproval(_ref, msig, indexed); - return true; - } + final historyService = ref.read(chainHistoryServiceProvider); + final indexed = await historyService.searchSignerApprovedByExtrinsicHash(extrinsicHash: hash); + if (indexed == null) return false; - void dispose() { - for (final timer in _timers.values) { - timer.cancel(); - } - _timers.clear(); - } + removePendingMultisigApproval(ref, pending.id); + await reconcileIndexedApproval(ref, msig, indexed); + return true; } final multisigApprovalPollingServiceProvider = Provider((ref) { - final service = MultisigApprovalPollingService(ref); + final service = ExtrinsicIndexerPollingService( + ref, + ExtrinsicIndexerPollingConfig( + logPrefix: '[MultisigApprovalPoller]', + getId: (pending) => pending.id, + getExtrinsicHash: (pending) => pending.extrinsicHash, + isStillPending: (ref, id) => findPendingMultisigApproval(ref, id) != null, + removePending: removePendingMultisigApproval, + showTimeoutToast: (ref) { + ref.read(multisigApprovalToastProvider.notifier).show(MultisigApprovalToastKind.timeout); + }, + confirmIfIndexed: _confirmIndexedApproval, + ), + ); ref.onDispose(service.dispose); return service; }); diff --git a/mobile-app/lib/services/multisig_proposal_polling_service.dart b/mobile-app/lib/services/multisig_proposal_polling_service.dart index 626feed6..77241b38 100644 --- a/mobile-app/lib/services/multisig_proposal_polling_service.dart +++ b/mobile-app/lib/services/multisig_proposal_polling_service.dart @@ -1,119 +1,48 @@ -import 'dart:async'; - import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/multisig_proposal_toast_provider.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_proposals_provider.dart'; import 'package:resonance_network_wallet/providers/wallet_providers.dart'; +import 'package:resonance_network_wallet/services/extrinsic_indexer_polling_service.dart'; import 'package:resonance_network_wallet/services/multisig_proposal_reconciliation.dart'; import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; -import 'package:resonance_network_wallet/shared/utils/print.dart'; - -/// Polls the indexer until a freshly submitted proposal becomes visible, then -/// clears the pending overlay and refreshes proposal state. -class MultisigProposalPollingService { - final Ref _ref; - final Map _timers = {}; - final Set _inFlight = {}; - static const _searchInterval = Duration(seconds: 5); - static const _timeout = Duration(minutes: 5); - - MultisigProposalPollingService(this._ref); - - void startPolling(MultisigAccount msig, PendingMultisigProposalEvent pending) { - final key = pending.id; - if (pending.extrinsicHash == null) { - quantusDebugPrint( - '[MultisigProposalPoller] ERROR: cannot poll $key — no extrinsicHash. ' - 'Waiting for submission to complete.', - ); - return; - } - - quantusDebugPrint('[MultisigProposalPoller] startPolling $key hash=${pending.extrinsicHash}'); - - stopPolling(key); - final startTime = DateTime.now(); - - final timer = Timer.periodic(_searchInterval, (_) { - if (DateTime.now().difference(startTime) > _timeout) { - quantusDebugPrint('[MultisigProposalPoller] timeout for $key'); - stopPolling(key); - unawaited(_handleTimeout(msig, pending)); - return; - } - unawaited(_search(msig, pending)); - }); - - _timers[key] = timer; - unawaited(_search(msig, pending)); - } - - void stopPolling(String id) { - _timers.remove(id)?.cancel(); - } - - Future _search(MultisigAccount msig, PendingMultisigProposalEvent pending) async { - final key = pending.id; - if (pending.extrinsicHash == null) return; - if (!_inFlight.add(key)) return; - - try { - final confirmed = await _confirmIfIndexed(msig, pending); - if (!confirmed) { - quantusDebugPrint('[MultisigProposalPoller] not indexed yet: $key'); - } - } catch (e) { - quantusDebugPrint('[MultisigProposalPoller] search error for $key: $e'); - } finally { - _inFlight.remove(key); - } - } - - Future _handleTimeout(MultisigAccount msig, PendingMultisigProposalEvent pending) async { - final key = pending.id; - try { - quantusDebugPrint('[MultisigProposalPoller] final indexer check before timeout for $key'); - final confirmed = await _confirmIfIndexed(msig, pending); - if (confirmed) return; - } catch (e) { - quantusDebugPrint('[MultisigProposalPoller] final check error for $key: $e'); - } - - if (findPendingMultisigProposal(_ref, key) == null) return; - - quantusDebugPrint('[MultisigProposalPoller] giving up on $key'); - removePendingMultisigProposal(_ref, key); - _ref.read(multisigProposalToastProvider.notifier).show(MultisigProposalToastKind.timeout); - } - - Future _confirmIfIndexed(MultisigAccount msig, PendingMultisigProposalEvent pending) async { - final key = pending.id; - final hash = pending.extrinsicHash; - if (hash == null) return false; - - final historyService = _ref.read(chainHistoryServiceProvider); - final indexed = await historyService.searchProposalCreatedByExtrinsicHash(extrinsicHash: hash); - if (indexed == null) return false; - - quantusDebugPrint('[MultisigProposalPoller] confirmed $key at block ${indexed.blockNumber}'); - stopPolling(key); - removePendingMultisigProposal(_ref, key); - await reconcileIndexedProposalCreation(_ref, msig, indexed); - invalidateAccountBalances(_ref, {pending.proposerId}); - return true; - } - void dispose() { - for (final timer in _timers.values) { - timer.cancel(); - } - _timers.clear(); - } +typedef MultisigProposalPollingService = + ExtrinsicIndexerPollingService; + +Future _confirmIndexedProposal( + Ref ref, + MultisigAccount msig, + PendingMultisigProposalEvent pending, +) async { + final hash = pending.extrinsicHash; + if (hash == null) return false; + + final historyService = ref.read(chainHistoryServiceProvider); + final indexed = await historyService.searchProposalCreatedByExtrinsicHash(extrinsicHash: hash); + if (indexed == null) return false; + + removePendingMultisigProposal(ref, pending.id); + await reconcileIndexedProposalCreation(ref, msig, indexed); + invalidateAccountBalances(ref, {pending.proposerId}); + return true; } final multisigProposalPollingServiceProvider = Provider((ref) { - final service = MultisigProposalPollingService(ref); + final service = ExtrinsicIndexerPollingService( + ref, + ExtrinsicIndexerPollingConfig( + logPrefix: '[MultisigProposalPoller]', + getId: (pending) => pending.id, + getExtrinsicHash: (pending) => pending.extrinsicHash, + isStillPending: (ref, id) => findPendingMultisigProposal(ref, id) != null, + removePending: removePendingMultisigProposal, + showTimeoutToast: (ref) { + ref.read(multisigProposalToastProvider.notifier).show(MultisigProposalToastKind.timeout); + }, + confirmIfIndexed: _confirmIndexedProposal, + ), + ); ref.onDispose(service.dispose); return service; }); diff --git a/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart index 59718b68..cb8ae8de 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart @@ -3,6 +3,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/l10n/app_localizations.dart'; import 'package:resonance_network_wallet/providers/account_providers.dart'; import 'package:resonance_network_wallet/providers/wallet_providers.dart'; import 'package:resonance_network_wallet/providers/l10n_provider.dart'; @@ -10,6 +11,7 @@ import 'package:resonance_network_wallet/providers/multisig_providers.dart'; import 'package:resonance_network_wallet/services/local_auth_service.dart'; import 'package:resonance_network_wallet/services/transaction_submission_service.dart'; import 'package:resonance_network_wallet/v2/components/bottom_sheet_container.dart'; +import 'package:resonance_network_wallet/v2/components/detail_summary_row.dart'; import 'package:resonance_network_wallet/v2/components/quantus_button.dart'; import 'package:resonance_network_wallet/v2/theme/app_colors.dart'; import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart'; @@ -38,6 +40,43 @@ class _MultisigApproveConfirmSheet extends ConsumerStatefulWidget { class _MultisigApproveConfirmSheetState extends ConsumerState<_MultisigApproveConfirmSheet> { bool _submitting = false; String? _errorMessage; + BigInt? _networkFee; + bool _loadingFee = true; + + @override + void initState() { + super.initState(); + unawaited(_loadNetworkFee()); + } + + Future _loadNetworkFee() async { + try { + final signer = ref + .read(accountsProvider) + .value + ?.firstWhere( + (a) => a.accountId == widget.msig.myMemberAccountId, + orElse: () => throw Exception('Member account not found in local wallet'), + ); + if (signer == null) throw Exception('No signer account available'); + + final fee = await ref.read(multisigServiceProvider).estimateApproveFee( + msig: widget.msig, + signer: signer, + proposalId: widget.proposal.id, + ); + + if (!mounted) return; + setState(() { + _networkFee = fee; + _loadingFee = false; + }); + } catch (e, st) { + debugPrint('Approve fee estimate error: $e $st'); + if (!mounted) return; + setState(() => _loadingFee = false); + } + } Future _confirm() async { setState(() { @@ -85,17 +124,28 @@ class _MultisigApproveConfirmSheetState extends ConsumerState<_MultisigApproveCo } } + String? _networkFeeLabel(AppLocalizations l10n, NumberFormattingService fmt) { + if (_loadingFee) return '…'; + if (_networkFee == null) return null; + return l10n.commonAmountBalance( + fmt.formatBalance(_networkFee!, maxDecimals: AppConstants.decimals), + AppConstants.tokenSymbol, + ); + } + @override Widget build(BuildContext context) { final l10n = ref.watch(l10nProvider); final colors = context.colors; final text = context.themeText; final fmt = ref.watch(numberFormattingServiceProvider); + final valueStyle = text.transactionDetailRowLabel; final amountText = l10n.commonAmountBalance( fmt.formatBalance(widget.proposal.amount, maxDecimals: AppConstants.decimals), AppConstants.tokenSymbol, ); final recipient = AddressFormattingService.formatActivityDetailAddress(widget.proposal.recipient); + final networkFeeLabel = _networkFeeLabel(l10n, fmt); return BottomSheetContainer( title: l10n.multisigApproveConfirmTitle, @@ -115,6 +165,14 @@ class _MultisigApproveConfirmSheetState extends ConsumerState<_MultisigApproveCo l10n.multisigApproveConfirmTo(recipient), style: text.smallParagraph?.copyWith(color: colors.textTertiary), ), + if (networkFeeLabel != null) ...[ + const SizedBox(height: 16), + DetailSummaryRow.review( + label: l10n.sendReviewNetworkFee, + value: networkFeeLabel, + valueStyle: valueStyle, + ), + ], if (_errorMessage != null) ...[ const SizedBox(height: 16), Text( diff --git a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart index 3c429908..031073b0 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart @@ -70,7 +70,12 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { final multisigService = ref.watch(multisigServiceProvider); final liveProposal = _resolveLiveProposal(ref); final pendingApprovals = ref.watch(pendingMultisigApprovalsProvider); - final pendingApproval = findPendingApprovalForProposal(pendingApprovals, msig.accountId, liveProposal.id); + final pendingApproval = findPendingApprovalForProposal( + pendingApprovals, + msig.accountId, + liveProposal.id, + msig.myMemberAccountId, + ); final didApprove = liveProposal.didApprove(msig.myMemberAccountId); final hasLocalSigner = _hasLocalSigner(ref); final isActionable = currentBlock != null && liveProposal.isActionable(currentBlock); diff --git a/mobile-app/lib/v2/screens/multisig/proposal_row.dart b/mobile-app/lib/v2/screens/multisig/proposal_row.dart index 4c7d5fad..22baecd9 100644 --- a/mobile-app/lib/v2/screens/multisig/proposal_row.dart +++ b/mobile-app/lib/v2/screens/multisig/proposal_row.dart @@ -26,6 +26,7 @@ class ProposalRow extends ConsumerWidget { pendingApprovals, proposal.multisigAddress, proposal.id, + myAccountId, ); final isApproving = pendingApproval != null; From c926cd8f31875fdf49ccb58594246aa7a7195787 Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 16:29:43 +0800 Subject: [PATCH 04/18] feat: best effort timout and balance refresh --- .../extrinsic_indexer_polling_service.dart | 20 ++++++++++ .../multisig_approval_polling_service.dart | 38 +++++++++++++++++++ .../multisig_approval_reconciliation.dart | 3 ++ 3 files changed, 61 insertions(+) diff --git a/mobile-app/lib/services/extrinsic_indexer_polling_service.dart b/mobile-app/lib/services/extrinsic_indexer_polling_service.dart index bc45a718..b7ae52e5 100644 --- a/mobile-app/lib/services/extrinsic_indexer_polling_service.dart +++ b/mobile-app/lib/services/extrinsic_indexer_polling_service.dart @@ -13,6 +13,7 @@ class ExtrinsicIndexerPollingConfig { required this.removePending, required this.showTimeoutToast, required this.confirmIfIndexed, + this.tryResolveTimeout, }); final String logPrefix; @@ -22,6 +23,10 @@ class ExtrinsicIndexerPollingConfig { final void Function(Ref ref, String id) removePending; final void Function(Ref ref) showTimeoutToast; final Future Function(Ref ref, TContext context, TPending pending) confirmIfIndexed; + + /// When polling times out, attempt to reconcile from chain state without a + /// timeout toast. Return true when resolved. + final Future Function(Ref ref, TContext context, TPending pending)? tryResolveTimeout; } /// Polls the indexer on an interval until [confirmIfIndexed] succeeds or times out. @@ -101,6 +106,21 @@ class ExtrinsicIndexerPollingService { if (!_config.isStillPending(_ref, key)) return; + final tryResolveTimeout = _config.tryResolveTimeout; + if (tryResolveTimeout != null) { + try { + final resolved = await tryResolveTimeout(_ref, context, pending); + if (resolved) { + quantusDebugPrint('${_config.logPrefix} timeout resolved on-chain for $key'); + return; + } + } catch (e) { + quantusDebugPrint('${_config.logPrefix} timeout resolve error for $key: $e'); + } + } + + if (!_config.isStillPending(_ref, key)) return; + quantusDebugPrint('${_config.logPrefix} giving up on $key'); _config.removePending(_ref, key); _config.showTimeoutToast(_ref); diff --git a/mobile-app/lib/services/multisig_approval_polling_service.dart b/mobile-app/lib/services/multisig_approval_polling_service.dart index bc11a90d..58921283 100644 --- a/mobile-app/lib/services/multisig_approval_polling_service.dart +++ b/mobile-app/lib/services/multisig_approval_polling_service.dart @@ -6,6 +6,8 @@ import 'package:resonance_network_wallet/providers/pending_multisig_approvals_pr import 'package:resonance_network_wallet/providers/wallet_providers.dart'; import 'package:resonance_network_wallet/services/extrinsic_indexer_polling_service.dart'; import 'package:resonance_network_wallet/services/multisig_approval_reconciliation.dart'; +import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; +import 'package:resonance_network_wallet/shared/utils/print.dart'; typedef MultisigApprovalPollingService = ExtrinsicIndexerPollingService; @@ -31,6 +33,41 @@ Future _confirmIndexedApproval( return true; } +/// When the indexer account event lags but the proposal already reflects the +/// approval, clear pending state and refresh without a timeout toast. +Future _tryResolveApprovalTimeout( + Ref ref, + MultisigAccount msig, + PendingMultisigApprovalEvent pending, +) async { + final multisigService = ref.read(multisigServiceProvider); + final proposal = await multisigService.getProposal(msig, pending.proposalId); + if (proposal == null || !proposal.didApprove(pending.approverId)) { + return false; + } + + removePendingMultisigApproval(ref, pending.id); + invalidateMultisigProposals(ref, msig); + + final hash = pending.extrinsicHash; + if (hash != null) { + try { + final indexed = await ref + .read(chainHistoryServiceProvider) + .searchSignerApprovedByExtrinsicHash(extrinsicHash: hash); + if (indexed != null) { + await reconcileIndexedApproval(ref, msig, indexed); + return true; + } + } catch (e) { + quantusDebugPrint('[MultisigApprovalPoller] soft timeout reconcile error: $e'); + } + } + + invalidateAccountBalances(ref, {pending.approverId}); + return true; +} + final multisigApprovalPollingServiceProvider = Provider((ref) { final service = ExtrinsicIndexerPollingService( ref, @@ -44,6 +81,7 @@ final multisigApprovalPollingServiceProvider = Provider reconcileIndexedApproval( @@ -18,4 +19,6 @@ Future reconcileIndexedApproval( includeForFilter: (filter) => filter != TransactionFilter.receive, isDuplicate: (tx) => tx is MultisigProposalApprovedEvent && tx.isSameApprovalAs(indexed), ); + + invalidateAccountBalances(ref, {indexed.approverId}); } From baf0261ed3c73906ed44555663b437a5376c2d7a Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 16:32:44 +0800 Subject: [PATCH 05/18] chore: formatting --- .../pending_extrinsic_events_notifier.dart | 6 +-- .../pending_multisig_approvals_provider.dart | 15 ++----- .../pending_multisig_proposals_provider.dart | 11 +---- .../extrinsic_indexer_polling_service.dart | 4 +- .../multisig_approval_polling_service.dart | 15 ++----- .../multisig_approval_reconciliation.dart | 6 +-- .../multisig_proposal_polling_service.dart | 9 +--- .../transaction_submission_service.dart | 15 +------ .../activity/transaction_detail_sheet.dart | 3 +- .../lib/v2/screens/home/home_screen.dart | 44 +++++++++---------- .../multisig_approve_confirm_sheet.dart | 32 ++++---------- .../multisig_proposal_detail_sheet.dart | 16 ++++--- .../lib/v2/screens/multisig/proposal_row.dart | 12 +---- .../multisig_proposal_approved_event.dart | 5 +-- .../test/chain_history_service_test.dart | 4 +- 15 files changed, 60 insertions(+), 137 deletions(-) diff --git a/mobile-app/lib/providers/pending_extrinsic_events_notifier.dart b/mobile-app/lib/providers/pending_extrinsic_events_notifier.dart index c8943778..43bf793d 100644 --- a/mobile-app/lib/providers/pending_extrinsic_events_notifier.dart +++ b/mobile-app/lib/providers/pending_extrinsic_events_notifier.dart @@ -29,11 +29,7 @@ abstract class PendingExtrinsicEventsNotifier extends Notifier> { } } -T? findPendingExtrinsicEventById( - List events, - String id, - String Function(T event) idOf, -) { +T? findPendingExtrinsicEventById(List events, String id, String Function(T event) idOf) { for (final event in events) { if (idOf(event) == id) return event; } diff --git a/mobile-app/lib/providers/pending_multisig_approvals_provider.dart b/mobile-app/lib/providers/pending_multisig_approvals_provider.dart index e50814fc..066c4437 100644 --- a/mobile-app/lib/providers/pending_multisig_approvals_provider.dart +++ b/mobile-app/lib/providers/pending_multisig_approvals_provider.dart @@ -8,10 +8,7 @@ class PendingMultisigApprovalsNotifier extends PendingExtrinsicEventsNotifier event.id; @override - PendingMultisigApprovalEvent withExtrinsicHash( - PendingMultisigApprovalEvent event, - String? extrinsicHash, - ) { + PendingMultisigApprovalEvent withExtrinsicHash(PendingMultisigApprovalEvent event, String? extrinsicHash) { return event.copyWith(extrinsicHash: extrinsicHash); } } @@ -28,9 +25,7 @@ PendingMultisigApprovalEvent? findPendingApprovalForProposal( String approverId, ) { for (final event in all) { - if (event.multisigAddress == multisigAddress && - event.proposalId == proposalId && - event.approverId == approverId) { + if (event.multisigAddress == multisigAddress && event.proposalId == proposalId && event.approverId == approverId) { return event; } } @@ -50,9 +45,5 @@ void removePendingMultisigApproval(Ref ref, String id) { } PendingMultisigApprovalEvent? findPendingMultisigApproval(Ref ref, String id) { - return findPendingExtrinsicEventById( - ref.read(pendingMultisigApprovalsProvider), - id, - (event) => event.id, - ); + return findPendingExtrinsicEventById(ref.read(pendingMultisigApprovalsProvider), id, (event) => event.id); } diff --git a/mobile-app/lib/providers/pending_multisig_proposals_provider.dart b/mobile-app/lib/providers/pending_multisig_proposals_provider.dart index cf448b79..e57cc4e6 100644 --- a/mobile-app/lib/providers/pending_multisig_proposals_provider.dart +++ b/mobile-app/lib/providers/pending_multisig_proposals_provider.dart @@ -8,10 +8,7 @@ class PendingMultisigProposalsNotifier extends PendingExtrinsicEventsNotifier event.id; @override - PendingMultisigProposalEvent withExtrinsicHash( - PendingMultisigProposalEvent event, - String? extrinsicHash, - ) { + PendingMultisigProposalEvent withExtrinsicHash(PendingMultisigProposalEvent event, String? extrinsicHash) { return event.copyWith(extrinsicHash: extrinsicHash); } } @@ -54,9 +51,5 @@ void clearPendingMultisigProposals(Ref ref) { } PendingMultisigProposalEvent? findPendingMultisigProposal(Ref ref, String id) { - return findPendingExtrinsicEventById( - ref.read(pendingMultisigProposalsProvider), - id, - (event) => event.id, - ); + return findPendingExtrinsicEventById(ref.read(pendingMultisigProposalsProvider), id, (event) => event.id); } diff --git a/mobile-app/lib/services/extrinsic_indexer_polling_service.dart b/mobile-app/lib/services/extrinsic_indexer_polling_service.dart index b7ae52e5..8e1f472f 100644 --- a/mobile-app/lib/services/extrinsic_indexer_polling_service.dart +++ b/mobile-app/lib/services/extrinsic_indexer_polling_service.dart @@ -50,9 +50,7 @@ class ExtrinsicIndexerPollingService { return; } - quantusDebugPrint( - '${_config.logPrefix} startPolling $key hash=${_config.getExtrinsicHash(pending)}', - ); + quantusDebugPrint('${_config.logPrefix} startPolling $key hash=${_config.getExtrinsicHash(pending)}'); stopPolling(key); final startTime = DateTime.now(); diff --git a/mobile-app/lib/services/multisig_approval_polling_service.dart b/mobile-app/lib/services/multisig_approval_polling_service.dart index 58921283..c7608dee 100644 --- a/mobile-app/lib/services/multisig_approval_polling_service.dart +++ b/mobile-app/lib/services/multisig_approval_polling_service.dart @@ -9,14 +9,9 @@ import 'package:resonance_network_wallet/services/multisig_approval_reconciliati import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; import 'package:resonance_network_wallet/shared/utils/print.dart'; -typedef MultisigApprovalPollingService = - ExtrinsicIndexerPollingService; +typedef MultisigApprovalPollingService = ExtrinsicIndexerPollingService; -Future _confirmIndexedApproval( - Ref ref, - MultisigAccount msig, - PendingMultisigApprovalEvent pending, -) async { +Future _confirmIndexedApproval(Ref ref, MultisigAccount msig, PendingMultisigApprovalEvent pending) async { final hash = pending.extrinsicHash; if (hash == null) return false; @@ -35,11 +30,7 @@ Future _confirmIndexedApproval( /// When the indexer account event lags but the proposal already reflects the /// approval, clear pending state and refresh without a timeout toast. -Future _tryResolveApprovalTimeout( - Ref ref, - MultisigAccount msig, - PendingMultisigApprovalEvent pending, -) async { +Future _tryResolveApprovalTimeout(Ref ref, MultisigAccount msig, PendingMultisigApprovalEvent pending) async { final multisigService = ref.read(multisigServiceProvider); final proposal = await multisigService.getProposal(msig, pending.proposalId); if (proposal == null || !proposal.didApprove(pending.approverId)) { diff --git a/mobile-app/lib/services/multisig_approval_reconciliation.dart b/mobile-app/lib/services/multisig_approval_reconciliation.dart index a215641e..74689f15 100644 --- a/mobile-app/lib/services/multisig_approval_reconciliation.dart +++ b/mobile-app/lib/services/multisig_approval_reconciliation.dart @@ -5,11 +5,7 @@ import 'package:resonance_network_wallet/services/account_activity_reconciliatio import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; /// Refreshes proposal state and appends the approval to the approver's activity. -Future reconcileIndexedApproval( - Ref ref, - MultisigAccount msig, - MultisigProposalApprovedEvent indexed, -) async { +Future reconcileIndexedApproval(Ref ref, MultisigAccount msig, MultisigProposalApprovedEvent indexed) async { invalidateMultisigProposals(ref, msig); await appendConfirmedEventToHistory( diff --git a/mobile-app/lib/services/multisig_proposal_polling_service.dart b/mobile-app/lib/services/multisig_proposal_polling_service.dart index 77241b38..3aedb764 100644 --- a/mobile-app/lib/services/multisig_proposal_polling_service.dart +++ b/mobile-app/lib/services/multisig_proposal_polling_service.dart @@ -7,14 +7,9 @@ import 'package:resonance_network_wallet/services/extrinsic_indexer_polling_serv import 'package:resonance_network_wallet/services/multisig_proposal_reconciliation.dart'; import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; -typedef MultisigProposalPollingService = - ExtrinsicIndexerPollingService; +typedef MultisigProposalPollingService = ExtrinsicIndexerPollingService; -Future _confirmIndexedProposal( - Ref ref, - MultisigAccount msig, - PendingMultisigProposalEvent pending, -) async { +Future _confirmIndexedProposal(Ref ref, MultisigAccount msig, PendingMultisigProposalEvent pending) async { final hash = pending.extrinsicHash; if (hash == null) return false; diff --git a/mobile-app/lib/services/transaction_submission_service.dart b/mobile-app/lib/services/transaction_submission_service.dart index 75c35a38..53262e67 100644 --- a/mobile-app/lib/services/transaction_submission_service.dart +++ b/mobile-app/lib/services/transaction_submission_service.dart @@ -188,14 +188,7 @@ class TransactionSubmissionService { TelemetryService().sendEvent('multisig_approve'); - unawaited( - _submitApproveBackground( - msig: msig, - signer: signer, - proposalId: proposal.id, - pending: pending, - ), - ); + unawaited(_submitApproveBackground(msig: msig, signer: signer, proposalId: proposal.id, pending: pending)); } Future _submitApproveBackground({ @@ -206,11 +199,7 @@ class TransactionSubmissionService { }) async { try { final service = _ref.read(multisigServiceProvider); - final hashBytes = await service.submitApproveExtrinsic( - msig: msig, - signer: signer, - proposalId: proposalId, - ); + final hashBytes = await service.submitApproveExtrinsic(msig: msig, signer: signer, proposalId: proposalId); final extrinsicHash = '0x${hex.encode(hashBytes)}'; quantusDebugPrint('[Approve] submitted: $extrinsicHash'); diff --git a/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart b/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart index b470effd..58ba0d52 100644 --- a/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart +++ b/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart @@ -263,8 +263,7 @@ class _DetailsSection extends ConsumerWidget { final txHash = event.extrinsicHash != null ? AddressFormattingService.formatActivityDetailExtrinsicHash(event.extrinsicHash!) : null; - final approvalsLabel = - event.approvalsOfSignersLabel(l10n.multisigApprovalsOf) ?? event.approvalsCount.toString(); + final approvalsLabel = event.approvalsOfSignersLabel(l10n.multisigApprovalsOf) ?? event.approvalsCount.toString(); return Column( children: [ diff --git a/mobile-app/lib/v2/screens/home/home_screen.dart b/mobile-app/lib/v2/screens/home/home_screen.dart index 4a6d4c93..4c11bb9d 100644 --- a/mobile-app/lib/v2/screens/home/home_screen.dart +++ b/mobile-app/lib/v2/screens/home/home_screen.dart @@ -144,30 +144,30 @@ class _HomeScreenState extends ConsumerState { child: MultisigApprovalToastListener( child: MultisigProposalToastListener( child: accountAsync.when( - loading: () => const ScaffoldBase(mainContent: Center(child: Loader())), - error: (e, _) => ScaffoldBase( - mainContent: Center( - child: Text(l10n.homeError(e.toString()), style: text.detail?.copyWith(color: colors.textError)), + loading: () => const ScaffoldBase(mainContent: Center(child: Loader())), + error: (e, _) => ScaffoldBase( + mainContent: Center( + child: Text(l10n.homeError(e.toString()), style: text.detail?.copyWith(color: colors.textError)), + ), ), + data: (active) { + if (active == null) { + return ScaffoldBase(mainContent: Center(child: Text(l10n.homeNoActiveAccount))); + } + return ScaffoldBase.refreshable( + onRefresh: _refresh, + slivers: [ + _buildContent(active, colors, text, l10n), + if (active is MultisigDisplayAccount) + MultisigActivitySection(msig: active.account, txAsync: txAsync, onRetry: _refresh) + else + ActivitySection(txAsync: txAsync, activeAccount: active.account, onRetry: _refresh), + const SizedBox(height: 58), + ], + bottomContent: _buildBottomContent(l10n), + ); + }, ), - data: (active) { - if (active == null) { - return ScaffoldBase(mainContent: Center(child: Text(l10n.homeNoActiveAccount))); - } - return ScaffoldBase.refreshable( - onRefresh: _refresh, - slivers: [ - _buildContent(active, colors, text, l10n), - if (active is MultisigDisplayAccount) - MultisigActivitySection(msig: active.account, txAsync: txAsync, onRetry: _refresh) - else - ActivitySection(txAsync: txAsync, activeAccount: active.account, onRetry: _refresh), - const SizedBox(height: 58), - ], - bottomContent: _buildBottomContent(l10n), - ); - }, - ), ), ), ); diff --git a/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart index cb8ae8de..16fcd9ab 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart @@ -60,11 +60,9 @@ class _MultisigApproveConfirmSheetState extends ConsumerState<_MultisigApproveCo ); if (signer == null) throw Exception('No signer account available'); - final fee = await ref.read(multisigServiceProvider).estimateApproveFee( - msig: widget.msig, - signer: signer, - proposalId: widget.proposal.id, - ); + final fee = await ref + .read(multisigServiceProvider) + .estimateApproveFee(msig: widget.msig, signer: signer, proposalId: widget.proposal.id); if (!mounted) return; setState(() { @@ -104,11 +102,9 @@ class _MultisigApproveConfirmSheetState extends ConsumerState<_MultisigApproveCo ); if (signer == null) throw Exception('No signer account available'); - await ref.read(transactionSubmissionServiceProvider).approveProposal( - msig: widget.msig, - signer: signer, - proposal: widget.proposal, - ); + await ref + .read(transactionSubmissionServiceProvider) + .approveProposal(msig: widget.msig, signer: signer, proposal: widget.proposal); if (!mounted) return; ref.invalidate(multisigOpenProposalsProvider(widget.msig)); @@ -154,10 +150,7 @@ class _MultisigApproveConfirmSheetState extends ConsumerState<_MultisigApproveCo mainAxisSize: MainAxisSize.min, children: [ const SizedBox(height: 16), - Text( - l10n.multisigApproveConfirmBody, - style: text.paragraph?.copyWith(color: colors.textPrimary), - ), + Text(l10n.multisigApproveConfirmBody, style: text.paragraph?.copyWith(color: colors.textPrimary)), const SizedBox(height: 8), Text(amountText, style: text.smallTitle?.copyWith(color: colors.textPrimary)), const SizedBox(height: 8), @@ -167,18 +160,11 @@ class _MultisigApproveConfirmSheetState extends ConsumerState<_MultisigApproveCo ), if (networkFeeLabel != null) ...[ const SizedBox(height: 16), - DetailSummaryRow.review( - label: l10n.sendReviewNetworkFee, - value: networkFeeLabel, - valueStyle: valueStyle, - ), + DetailSummaryRow.review(label: l10n.sendReviewNetworkFee, value: networkFeeLabel, valueStyle: valueStyle), ], if (_errorMessage != null) ...[ const SizedBox(height: 16), - Text( - _errorMessage!, - style: text.detail?.copyWith(color: colors.textError), - ), + Text(_errorMessage!, style: text.detail?.copyWith(color: colors.textError)), ], const SizedBox(height: 24), QuantusButton.simple( diff --git a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart index 031073b0..d5d8923f 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart @@ -173,8 +173,14 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { label: l10n.multisigProposalApprovalsLabel, value: l10n.multisigApprovalsOf(liveProposal.approvalCount, liveProposal.threshold), ), - DetailSummaryRow(label: l10n.multisigProposalFeeRowLabel, value: _formatBalance(l10n, fmt, liveProposal.palletFee)), - DetailSummaryRow(label: l10n.multisigProposalDepositLabel, value: _formatBalance(l10n, fmt, liveProposal.deposit)), + DetailSummaryRow( + label: l10n.multisigProposalFeeRowLabel, + value: _formatBalance(l10n, fmt, liveProposal.palletFee), + ), + DetailSummaryRow( + label: l10n.multisigProposalDepositLabel, + value: _formatBalance(l10n, fmt, liveProposal.deposit), + ), if (liveProposal.networkFee != null && liveProposal.networkFee != BigInt.zero) DetailSummaryRow( label: l10n.activityDetailNetworkFee, @@ -279,11 +285,7 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { return Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - QuantusButton.simple( - label: label, - isDisabled: isDisabled, - onTap: onTap, - ), + QuantusButton.simple(label: label, isDisabled: isDisabled, onTap: onTap), if (note.isNotEmpty) ...[ const SizedBox(height: 12), Text( diff --git a/mobile-app/lib/v2/screens/multisig/proposal_row.dart b/mobile-app/lib/v2/screens/multisig/proposal_row.dart index 22baecd9..ceb678a4 100644 --- a/mobile-app/lib/v2/screens/multisig/proposal_row.dart +++ b/mobile-app/lib/v2/screens/multisig/proposal_row.dart @@ -47,10 +47,7 @@ class ProposalRow extends ConsumerWidget { _statusChip(l10n, colors, text), if (proposal.isOpen && !isApproving) ...[ const SizedBox(height: 6), - if (didApprove) - _approvedPill(l10n, colors, text) - else - _proposedPill(l10n, colors, text), + if (didApprove) _approvedPill(l10n, colors, text) else _proposedPill(l10n, colors, text), ], ], ), @@ -121,12 +118,7 @@ class ProposalRow extends ConsumerWidget { decoration: BoxDecoration(color: background, borderRadius: BorderRadius.circular(4)), child: Text( label, - style: text.detail?.copyWith( - color: foreground, - fontSize: 10, - fontWeight: FontWeight.w700, - letterSpacing: 0.8, - ), + style: text.detail?.copyWith(color: foreground, fontSize: 10, fontWeight: FontWeight.w700, letterSpacing: 0.8), ), ); } diff --git a/quantus_sdk/lib/src/models/multisig_proposal_approved_event.dart b/quantus_sdk/lib/src/models/multisig_proposal_approved_event.dart index 60a54d25..431c149b 100644 --- a/quantus_sdk/lib/src/models/multisig_proposal_approved_event.dart +++ b/quantus_sdk/lib/src/models/multisig_proposal_approved_event.dart @@ -110,10 +110,7 @@ class MultisigProposalApprovedEvent extends TransactionEvent { ); } - static MultisigAccount _minimalMultisigFromProposalJson( - Map proposalJson, - String myMemberAccountId, - ) { + static MultisigAccount _minimalMultisigFromProposalJson(Map proposalJson, String myMemberAccountId) { final multisigJson = jsonMapOrNull(proposalJson['multisig']); final address = nestedAccountId(multisigJson ?? proposalJson['multisig_id']); final signersRaw = multisigJson?['signers']; diff --git a/quantus_sdk/test/chain_history_service_test.dart b/quantus_sdk/test/chain_history_service_test.dart index cd451c9d..0645c983 100644 --- a/quantus_sdk/test/chain_history_service_test.dart +++ b/quantus_sdk/test/chain_history_service_test.dart @@ -161,9 +161,7 @@ void main() { test('parses signer approved with sparse multisig without wrong threshold', () { final sparse = Map.from(signerApprovedAccountEventFixture); - final approved = Map.from( - sparse['multisigSignerApproved'] as Map, - ); + final approved = Map.from(sparse['multisigSignerApproved'] as Map); final proposal = Map.from(approved['proposal'] as Map); proposal['multisig'] = {'id': 'qzo4qS1Lw6J66JuXcxLEWgzBLX2sBe3Ak3kmN1oA17pXLKCFH'}; approved['proposal'] = proposal; From ff78c2afa556c121fd4f5d3ffed7c5230117f4c5 Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 17:27:59 +0800 Subject: [PATCH 06/18] wip: add execute flow --- mobile-app/lib/l10n/app_en.arb | 44 +++++ mobile-app/lib/l10n/app_id.arb | 11 ++ mobile-app/lib/l10n/app_localizations.dart | 66 +++++++ mobile-app/lib/l10n/app_localizations_en.dart | 34 ++++ mobile-app/lib/l10n/app_localizations_id.dart | 34 ++++ .../multisig_execution_toast_provider.dart | 26 +++ .../pending_multisig_executions_provider.dart | 51 +++++ .../multisig_execution_polling_service.dart | 53 +++++ .../multisig_execution_reconciliation.dart | 14 ++ .../transaction_submission_service.dart | 45 +++++ .../multisig_approval_toast_listener.dart | 14 +- .../multisig_execute_confirm_sheet.dart | 187 ++++++++++++++++++ .../multisig_proposal_detail_sheet.dart | 99 +++++++++- .../lib/v2/screens/multisig/proposal_row.dart | 21 +- quantus_sdk/lib/quantus_sdk.dart | 1 + .../lib/src/models/multisig_proposal.dart | 3 + .../pending_multisig_execution_event.dart | 52 +++++ .../lib/src/services/multisig_service.dart | 26 +++ quantus_sdk/test/multisig_service_test.dart | 20 ++ 19 files changed, 794 insertions(+), 7 deletions(-) create mode 100644 mobile-app/lib/providers/multisig_execution_toast_provider.dart create mode 100644 mobile-app/lib/providers/pending_multisig_executions_provider.dart create mode 100644 mobile-app/lib/services/multisig_execution_polling_service.dart create mode 100644 mobile-app/lib/services/multisig_execution_reconciliation.dart create mode 100644 mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart create mode 100644 quantus_sdk/lib/src/models/pending_multisig_execution_event.dart diff --git a/mobile-app/lib/l10n/app_en.arb b/mobile-app/lib/l10n/app_en.arb index 8c822a2a..2ab09504 100644 --- a/mobile-app/lib/l10n/app_en.arb +++ b/mobile-app/lib/l10n/app_en.arb @@ -812,6 +812,50 @@ "@multisigApproveFailed": { "description": "Error when approve submission fails" }, + "multisigExecuteButton": "Execute", + "@multisigExecuteButton": { + "description": "Button to execute an approved multisig proposal" + }, + "multisigExecuteConfirmTitle": "Are you sure?", + "@multisigExecuteConfirmTitle": { + "description": "Title on execute confirmation sheet" + }, + "multisigExecuteConfirmBody": "You are about to execute a transfer of", + "@multisigExecuteConfirmBody": { + "description": "Body text on execute confirmation sheet" + }, + "multisigExecuteConfirmYes": "Yes, Execute", + "@multisigExecuteConfirmYes": { + "description": "Confirm button on execute sheet" + }, + "multisigExecuteAuthReason": "Authenticate to execute", + "@multisigExecuteAuthReason": { + "description": "Biometric auth prompt when executing" + }, + "multisigExecuteFailed": "Failed to execute", + "@multisigExecuteFailed": { + "description": "Error when execute submission fails" + }, + "multisigExecuteUnavailableNote": "This proposal can no longer be executed.", + "@multisigExecuteUnavailableNote": { + "description": "Note when execute action is unavailable" + }, + "multisigProposalExecutingLabel": "Executing…", + "@multisigProposalExecutingLabel": { + "description": "Disabled execute button while pending" + }, + "multisigProposalExecutingNote": "Your execution is being confirmed on-chain.", + "@multisigProposalExecutingNote": { + "description": "Note while execution is pending indexer confirmation" + }, + "activityTxExecuting": "Executing…", + "@activityTxExecuting": { + "description": "Status label on proposal row while execution is pending" + }, + "multisigExecutionTimeoutToast": "Execution confirmation is taking longer than expected. Check the chain or try again.", + "@multisigExecutionTimeoutToast": { + "description": "Toast when execution indexer polling times out" + }, "multisigCancelConfirmTitle": "Cancel Proposal?", "@multisigCancelConfirmTitle": { "description": "Title on cancel confirmation sheet" diff --git a/mobile-app/lib/l10n/app_id.arb b/mobile-app/lib/l10n/app_id.arb index 1919ae21..903a625e 100644 --- a/mobile-app/lib/l10n/app_id.arb +++ b/mobile-app/lib/l10n/app_id.arb @@ -183,6 +183,17 @@ "multisigApproveAuthReason": "Autentikasi untuk menyetujui", "multisigApproveAuthRequired": "Autentikasi diperlukan", "multisigApproveFailed": "Gagal menyetujui", + "multisigExecuteButton": "Eksekusi", + "multisigExecuteConfirmTitle": "Apakah Anda yakin?", + "multisigExecuteConfirmBody": "Anda akan mengeksekusi transfer sebesar", + "multisigExecuteConfirmYes": "Ya, Eksekusi", + "multisigExecuteAuthReason": "Autentikasi untuk mengeksekusi", + "multisigExecuteFailed": "Gagal mengeksekusi", + "multisigExecuteUnavailableNote": "Proposal ini tidak dapat dieksekusi lagi.", + "multisigProposalExecutingLabel": "Mengeksekusi…", + "multisigProposalExecutingNote": "Eksekusi Anda sedang dikonfirmasi di chain.", + "activityTxExecuting": "Mengeksekusi…", + "multisigExecutionTimeoutToast": "Konfirmasi eksekusi membutuhkan waktu lebih lama. Periksa chain atau coba lagi.", "multisigCancelConfirmTitle": "Batalkan Proposal?", "multisigCancelConfirmBody": "Pembatalan mengembalikan deposit proposal Anda. Penandatangan lain tidak dapat lagi menyetujui.", "multisigCancelConfirmYes": "Ya, Batalkan Proposal", diff --git a/mobile-app/lib/l10n/app_localizations.dart b/mobile-app/lib/l10n/app_localizations.dart index 1d1ac6bc..e0d8738a 100644 --- a/mobile-app/lib/l10n/app_localizations.dart +++ b/mobile-app/lib/l10n/app_localizations.dart @@ -1130,6 +1130,72 @@ abstract class AppLocalizations { /// **'Failed to approve'** String get multisigApproveFailed; + /// Button to execute an approved multisig proposal + /// + /// In en, this message translates to: + /// **'Execute'** + String get multisigExecuteButton; + + /// Title on execute confirmation sheet + /// + /// In en, this message translates to: + /// **'Are you sure?'** + String get multisigExecuteConfirmTitle; + + /// Body text on execute confirmation sheet + /// + /// In en, this message translates to: + /// **'You are about to execute a transfer of'** + String get multisigExecuteConfirmBody; + + /// Confirm button on execute sheet + /// + /// In en, this message translates to: + /// **'Yes, Execute'** + String get multisigExecuteConfirmYes; + + /// Biometric auth prompt when executing + /// + /// In en, this message translates to: + /// **'Authenticate to execute'** + String get multisigExecuteAuthReason; + + /// Error when execute submission fails + /// + /// In en, this message translates to: + /// **'Failed to execute'** + String get multisigExecuteFailed; + + /// Note when execute action is unavailable + /// + /// In en, this message translates to: + /// **'This proposal can no longer be executed.'** + String get multisigExecuteUnavailableNote; + + /// Disabled execute button while pending + /// + /// In en, this message translates to: + /// **'Executing…'** + String get multisigProposalExecutingLabel; + + /// Note while execution is pending indexer confirmation + /// + /// In en, this message translates to: + /// **'Your execution is being confirmed on-chain.'** + String get multisigProposalExecutingNote; + + /// Status label on proposal row while execution is pending + /// + /// In en, this message translates to: + /// **'Executing…'** + String get activityTxExecuting; + + /// Toast when execution indexer polling times out + /// + /// In en, this message translates to: + /// **'Execution confirmation is taking longer than expected. Check the chain or try again.'** + String get multisigExecutionTimeoutToast; + /// Title on cancel confirmation sheet /// /// In en, this message translates to: diff --git a/mobile-app/lib/l10n/app_localizations_en.dart b/mobile-app/lib/l10n/app_localizations_en.dart index 99a993af..069b4290 100644 --- a/mobile-app/lib/l10n/app_localizations_en.dart +++ b/mobile-app/lib/l10n/app_localizations_en.dart @@ -572,6 +572,40 @@ class AppLocalizationsEn extends AppLocalizations { @override String get multisigApproveFailed => 'Failed to approve'; + @override + String get multisigExecuteButton => 'Execute'; + + @override + String get multisigExecuteConfirmTitle => 'Are you sure?'; + + @override + String get multisigExecuteConfirmBody => 'You are about to execute a transfer of'; + + @override + String get multisigExecuteConfirmYes => 'Yes, Execute'; + + @override + String get multisigExecuteAuthReason => 'Authenticate to execute'; + + @override + String get multisigExecuteFailed => 'Failed to execute'; + + @override + String get multisigExecuteUnavailableNote => 'This proposal can no longer be executed.'; + + @override + String get multisigProposalExecutingLabel => 'Executing…'; + + @override + String get multisigProposalExecutingNote => 'Your execution is being confirmed on-chain.'; + + @override + String get activityTxExecuting => 'Executing…'; + + @override + String get multisigExecutionTimeoutToast => + 'Execution confirmation is taking longer than expected. Check the chain or try again.'; + @override String get multisigCancelConfirmTitle => 'Cancel Proposal?'; diff --git a/mobile-app/lib/l10n/app_localizations_id.dart b/mobile-app/lib/l10n/app_localizations_id.dart index a49f2e6b..6d44d04d 100644 --- a/mobile-app/lib/l10n/app_localizations_id.dart +++ b/mobile-app/lib/l10n/app_localizations_id.dart @@ -574,6 +574,40 @@ class AppLocalizationsId extends AppLocalizations { @override String get multisigApproveFailed => 'Gagal menyetujui'; + @override + String get multisigExecuteButton => 'Eksekusi'; + + @override + String get multisigExecuteConfirmTitle => 'Apakah Anda yakin?'; + + @override + String get multisigExecuteConfirmBody => 'Anda akan mengeksekusi transfer sebesar'; + + @override + String get multisigExecuteConfirmYes => 'Ya, Eksekusi'; + + @override + String get multisigExecuteAuthReason => 'Autentikasi untuk mengeksekusi'; + + @override + String get multisigExecuteFailed => 'Gagal mengeksekusi'; + + @override + String get multisigExecuteUnavailableNote => 'Proposal ini tidak dapat dieksekusi lagi.'; + + @override + String get multisigProposalExecutingLabel => 'Mengeksekusi…'; + + @override + String get multisigProposalExecutingNote => 'Eksekusi Anda sedang dikonfirmasi di chain.'; + + @override + String get activityTxExecuting => 'Mengeksekusi…'; + + @override + String get multisigExecutionTimeoutToast => + 'Konfirmasi eksekusi membutuhkan waktu lebih lama. Periksa chain atau coba lagi.'; + @override String get multisigCancelConfirmTitle => 'Batalkan Proposal?'; diff --git a/mobile-app/lib/providers/multisig_execution_toast_provider.dart b/mobile-app/lib/providers/multisig_execution_toast_provider.dart new file mode 100644 index 00000000..d07ae999 --- /dev/null +++ b/mobile-app/lib/providers/multisig_execution_toast_provider.dart @@ -0,0 +1,26 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +enum MultisigExecutionToastKind { timeout, submitFailed } + +class MultisigExecutionToastEvent { + const MultisigExecutionToastEvent(this.kind); + + final MultisigExecutionToastKind kind; +} + +class MultisigExecutionToastNotifier extends Notifier { + @override + MultisigExecutionToastEvent? build() => null; + + void show(MultisigExecutionToastKind kind) { + state = MultisigExecutionToastEvent(kind); + } + + void clear() { + state = null; + } +} + +final multisigExecutionToastProvider = NotifierProvider( + MultisigExecutionToastNotifier.new, +); diff --git a/mobile-app/lib/providers/pending_multisig_executions_provider.dart b/mobile-app/lib/providers/pending_multisig_executions_provider.dart new file mode 100644 index 00000000..eab55e3a --- /dev/null +++ b/mobile-app/lib/providers/pending_multisig_executions_provider.dart @@ -0,0 +1,51 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/providers/pending_extrinsic_events_notifier.dart'; + +/// Executions submitted on-chain but not yet visible in the indexer. +class PendingMultisigExecutionsNotifier extends PendingExtrinsicEventsNotifier { + @override + String idOf(PendingMultisigExecutionEvent event) => event.id; + + @override + PendingMultisigExecutionEvent withExtrinsicHash(PendingMultisigExecutionEvent event, String? extrinsicHash) { + return event.copyWith(extrinsicHash: extrinsicHash); + } +} + +final pendingMultisigExecutionsProvider = + NotifierProvider>( + PendingMultisigExecutionsNotifier.new, + ); + +PendingMultisigExecutionEvent? findPendingExecutionForProposal( + List all, + String multisigAddress, + int proposalId, + String executorId, +) { + for (final event in all) { + if (event.multisigAddress == multisigAddress && + event.proposalId == proposalId && + event.executorId == executorId) { + return event; + } + } + return null; +} + +void addPendingMultisigExecution(Ref ref, PendingMultisigExecutionEvent event) { + addPendingExtrinsicEvent(ref, pendingMultisigExecutionsProvider, event); +} + +void updatePendingMultisigExecution(Ref ref, String id, {String? extrinsicHash}) { + updatePendingExtrinsicEvent(ref, pendingMultisigExecutionsProvider, id, extrinsicHash: extrinsicHash); +} + +void removePendingMultisigExecution(Ref ref, String id) { + removePendingExtrinsicEvent(ref, pendingMultisigExecutionsProvider, id); +} + +PendingMultisigExecutionEvent? findPendingMultisigExecution(Ref ref, String id) { + return findPendingExtrinsicEventById(ref.read(pendingMultisigExecutionsProvider), id, (event) => event.id); +} diff --git a/mobile-app/lib/services/multisig_execution_polling_service.dart b/mobile-app/lib/services/multisig_execution_polling_service.dart new file mode 100644 index 00000000..cbf85345 --- /dev/null +++ b/mobile-app/lib/services/multisig_execution_polling_service.dart @@ -0,0 +1,53 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/providers/multisig_execution_toast_provider.dart'; +import 'package:resonance_network_wallet/providers/multisig_providers.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_executions_provider.dart'; +import 'package:resonance_network_wallet/services/extrinsic_indexer_polling_service.dart'; +import 'package:resonance_network_wallet/services/multisig_execution_reconciliation.dart'; + +typedef MultisigExecutionPollingService = ExtrinsicIndexerPollingService; + +Future _confirmIndexedExecution(Ref ref, MultisigAccount msig, PendingMultisigExecutionEvent pending) async { + final multisigService = ref.read(multisigServiceProvider); + final proposal = await multisigService.getProposal(msig, pending.proposalId); + if (proposal == null || proposal.status != MultisigProposalStatus.executed) return false; + + removePendingMultisigExecution(ref, pending.id); + await reconcileIndexedExecution(ref, msig, pending); + return true; +} + +/// When the indexer lags but the proposal already shows as executed, clear +/// pending state and refresh without a timeout toast. +Future _tryResolveExecutionTimeout(Ref ref, MultisigAccount msig, PendingMultisigExecutionEvent pending) async { + final multisigService = ref.read(multisigServiceProvider); + final proposal = await multisigService.getProposal(msig, pending.proposalId); + if (proposal == null || proposal.status != MultisigProposalStatus.executed) { + return false; + } + + removePendingMultisigExecution(ref, pending.id); + await reconcileIndexedExecution(ref, msig, pending); + return true; +} + +final multisigExecutionPollingServiceProvider = Provider((ref) { + final service = ExtrinsicIndexerPollingService( + ref, + ExtrinsicIndexerPollingConfig( + logPrefix: '[MultisigExecutionPoller]', + getId: (pending) => pending.id, + getExtrinsicHash: (pending) => pending.extrinsicHash, + isStillPending: (ref, id) => findPendingMultisigExecution(ref, id) != null, + removePending: removePendingMultisigExecution, + showTimeoutToast: (ref) { + ref.read(multisigExecutionToastProvider.notifier).show(MultisigExecutionToastKind.timeout); + }, + confirmIfIndexed: _confirmIndexedExecution, + tryResolveTimeout: _tryResolveExecutionTimeout, + ), + ); + ref.onDispose(service.dispose); + return service; +}); diff --git a/mobile-app/lib/services/multisig_execution_reconciliation.dart b/mobile-app/lib/services/multisig_execution_reconciliation.dart new file mode 100644 index 00000000..e8f597f7 --- /dev/null +++ b/mobile-app/lib/services/multisig_execution_reconciliation.dart @@ -0,0 +1,14 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/providers/multisig_providers.dart'; +import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; + +/// Refreshes proposal state and balances after an execution is indexed. +Future reconcileIndexedExecution( + Ref ref, + MultisigAccount msig, + PendingMultisigExecutionEvent pending, +) async { + invalidateMultisigProposals(ref, msig); + invalidateAccountBalances(ref, {pending.executorId, msig.accountId}); +} diff --git a/mobile-app/lib/services/transaction_submission_service.dart b/mobile-app/lib/services/transaction_submission_service.dart index 53262e67..fdb17959 100644 --- a/mobile-app/lib/services/transaction_submission_service.dart +++ b/mobile-app/lib/services/transaction_submission_service.dart @@ -9,12 +9,15 @@ import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/account_providers.dart'; import 'package:resonance_network_wallet/providers/notification_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_approval_toast_provider.dart'; +import 'package:resonance_network_wallet/providers/multisig_execution_toast_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_proposal_toast_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_approvals_provider.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_executions_provider.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_proposals_provider.dart'; import 'package:resonance_network_wallet/providers/pending_transactions_provider.dart'; import 'package:resonance_network_wallet/services/multisig_approval_polling_service.dart'; +import 'package:resonance_network_wallet/services/multisig_execution_polling_service.dart'; import 'package:resonance_network_wallet/services/multisig_proposal_polling_service.dart'; import 'package:resonance_network_wallet/services/pending_transaction_polling_service.dart'; import 'package:resonance_network_wallet/services/telemetry_service.dart'; @@ -213,6 +216,48 @@ class TransactionSubmissionService { } } + /// Submits a multisig proposal execution, tracks it optimistically, and polls + /// the indexer until the proposal status becomes executed. + Future executeProposal({ + required MultisigAccount msig, + required Account signer, + required MultisigProposal proposal, + }) async { + final pending = PendingMultisigExecutionEvent.create( + multisigAddress: msig.accountId, + proposalId: proposal.id, + executorId: signer.accountId, + ); + + addPendingMultisigExecution(_ref, pending); + + TelemetryService().sendEvent('multisig_execute'); + + unawaited(_submitExecuteBackground(msig: msig, signer: signer, proposalId: proposal.id, pending: pending)); + } + + Future _submitExecuteBackground({ + required MultisigAccount msig, + required Account signer, + required int proposalId, + required PendingMultisigExecutionEvent pending, + }) async { + try { + final service = _ref.read(multisigServiceProvider); + final hashBytes = await service.submitExecuteExtrinsic(msig: msig, signer: signer, proposalId: proposalId); + final extrinsicHash = '0x${hex.encode(hashBytes)}'; + quantusDebugPrint('[Execute] submitted: $extrinsicHash'); + + updatePendingMultisigExecution(_ref, pending.id, extrinsicHash: extrinsicHash); + final updated = findPendingMultisigExecution(_ref, pending.id) ?? pending.copyWith(extrinsicHash: extrinsicHash); + _ref.read(multisigExecutionPollingServiceProvider).startPolling(msig, updated); + } catch (e, stackTrace) { + quantusDebugPrint('[Execute] submit failed: $e\n$stackTrace'); + removePendingMultisigExecution(_ref, pending.id); + _ref.read(multisigExecutionToastProvider.notifier).show(MultisigExecutionToastKind.submitFailed); + } + } + Future _submitProposalBackground({ required MultisigAccount msig, required Account signer, diff --git a/mobile-app/lib/v2/components/multisig_approval_toast_listener.dart b/mobile-app/lib/v2/components/multisig_approval_toast_listener.dart index 74f33ff2..34dd2bb5 100644 --- a/mobile-app/lib/v2/components/multisig_approval_toast_listener.dart +++ b/mobile-app/lib/v2/components/multisig_approval_toast_listener.dart @@ -2,9 +2,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:resonance_network_wallet/providers/l10n_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_approval_toast_provider.dart'; +import 'package:resonance_network_wallet/providers/multisig_execution_toast_provider.dart'; import 'package:resonance_network_wallet/shared/extensions/toaster_extensions.dart'; -/// Shows toasts for background multisig approval confirmation events. +/// Shows toasts for background multisig approval and execution events. class MultisigApprovalToastListener extends ConsumerWidget { const MultisigApprovalToastListener({super.key, required this.child}); @@ -23,6 +24,17 @@ class MultisigApprovalToastListener extends ConsumerWidget { ref.read(multisigApprovalToastProvider.notifier).clear(); }); + ref.listen(multisigExecutionToastProvider, (previous, next) { + if (next == null) return; + final l10n = ref.read(l10nProvider); + final message = switch (next.kind) { + MultisigExecutionToastKind.timeout => l10n.multisigExecutionTimeoutToast, + MultisigExecutionToastKind.submitFailed => l10n.multisigExecuteFailed, + }; + context.showErrorToaster(message: message); + ref.read(multisigExecutionToastProvider.notifier).clear(); + }); + return child; } } diff --git a/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart new file mode 100644 index 00000000..79b4851c --- /dev/null +++ b/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart @@ -0,0 +1,187 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/l10n/app_localizations.dart'; +import 'package:resonance_network_wallet/providers/account_providers.dart'; +import 'package:resonance_network_wallet/providers/l10n_provider.dart'; +import 'package:resonance_network_wallet/providers/multisig_providers.dart'; +import 'package:resonance_network_wallet/providers/wallet_providers.dart'; +import 'package:resonance_network_wallet/services/local_auth_service.dart'; +import 'package:resonance_network_wallet/services/transaction_submission_service.dart'; +import 'package:resonance_network_wallet/v2/components/bottom_sheet_container.dart'; +import 'package:resonance_network_wallet/v2/components/detail_summary_row.dart'; +import 'package:resonance_network_wallet/v2/components/quantus_button.dart'; +import 'package:resonance_network_wallet/v2/theme/app_colors.dart'; +import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart'; + +void showMultisigExecuteConfirmSheet( + BuildContext context, { + required MultisigAccount msig, + required MultisigProposal proposal, +}) { + BottomSheetContainer.show( + context, + builder: (_) => _MultisigExecuteConfirmSheet(msig: msig, proposal: proposal), + ); +} + +class _MultisigExecuteConfirmSheet extends ConsumerStatefulWidget { + final MultisigAccount msig; + final MultisigProposal proposal; + + const _MultisigExecuteConfirmSheet({required this.msig, required this.proposal}); + + @override + ConsumerState<_MultisigExecuteConfirmSheet> createState() => _MultisigExecuteConfirmSheetState(); +} + +class _MultisigExecuteConfirmSheetState extends ConsumerState<_MultisigExecuteConfirmSheet> { + bool _submitting = false; + String? _errorMessage; + BigInt? _networkFee; + bool _loadingFee = true; + + @override + void initState() { + super.initState(); + unawaited(_loadNetworkFee()); + } + + Future _loadNetworkFee() async { + try { + final signer = ref + .read(accountsProvider) + .value + ?.firstWhere( + (a) => a.accountId == widget.msig.myMemberAccountId, + orElse: () => throw Exception('Member account not found in local wallet'), + ); + if (signer == null) throw Exception('No signer account available'); + + final fee = await ref + .read(multisigServiceProvider) + .estimateExecuteFee(msig: widget.msig, signer: signer, proposalId: widget.proposal.id); + + if (!mounted) return; + setState(() { + _networkFee = fee; + _loadingFee = false; + }); + } catch (e, st) { + debugPrint('Execute fee estimate error: $e $st'); + if (!mounted) return; + setState(() => _loadingFee = false); + } + } + + Future _confirm() async { + setState(() { + _submitting = true; + _errorMessage = null; + }); + + final l10n = ref.read(l10nProvider); + final authed = await LocalAuthService().authenticate(localizedReason: l10n.multisigExecuteAuthReason); + if (!authed || !mounted) { + setState(() { + _submitting = false; + _errorMessage = l10n.multisigApproveAuthRequired; + }); + return; + } + + try { + final signer = ref + .read(accountsProvider) + .value + ?.firstWhere( + (a) => a.accountId == widget.msig.myMemberAccountId, + orElse: () => throw Exception('Member account not found in local wallet'), + ); + if (signer == null) throw Exception('No signer account available'); + + await ref + .read(transactionSubmissionServiceProvider) + .executeProposal(msig: widget.msig, signer: signer, proposal: widget.proposal); + + if (!mounted) return; + ref.invalidate(multisigOpenProposalsProvider(widget.msig)); + ref.invalidate(multisigCurrentBlockProvider); + Navigator.pop(context); + } catch (e, st) { + debugPrint('Execute submit error: $e $st'); + if (!mounted) return; + setState(() { + _submitting = false; + _errorMessage = l10n.multisigExecuteFailed; + }); + } + } + + String? _networkFeeLabel(AppLocalizations l10n, NumberFormattingService fmt) { + if (_loadingFee) return '…'; + if (_networkFee == null) return null; + return l10n.commonAmountBalance( + fmt.formatBalance(_networkFee!, maxDecimals: AppConstants.decimals), + AppConstants.tokenSymbol, + ); + } + + @override + Widget build(BuildContext context) { + final l10n = ref.watch(l10nProvider); + final colors = context.colors; + final text = context.themeText; + final fmt = ref.watch(numberFormattingServiceProvider); + final valueStyle = text.transactionDetailRowLabel; + final amountText = l10n.commonAmountBalance( + fmt.formatBalance(widget.proposal.amount, maxDecimals: AppConstants.decimals), + AppConstants.tokenSymbol, + ); + final recipient = AddressFormattingService.formatActivityDetailAddress(widget.proposal.recipient); + final networkFeeLabel = _networkFeeLabel(l10n, fmt); + + return BottomSheetContainer( + title: l10n.multisigExecuteConfirmTitle, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisSize: MainAxisSize.min, + children: [ + const SizedBox(height: 16), + Text(l10n.multisigExecuteConfirmBody, style: text.paragraph?.copyWith(color: colors.textPrimary)), + const SizedBox(height: 8), + Text(amountText, style: text.smallTitle?.copyWith(color: colors.textPrimary)), + const SizedBox(height: 8), + Text( + l10n.multisigApproveConfirmTo(recipient), + style: text.smallParagraph?.copyWith(color: colors.textTertiary), + ), + if (networkFeeLabel != null) ...[ + const SizedBox(height: 16), + DetailSummaryRow.review(label: l10n.sendReviewNetworkFee, value: networkFeeLabel, valueStyle: valueStyle), + ], + if (_errorMessage != null) ...[ + const SizedBox(height: 16), + Text(_errorMessage!, style: text.detail?.copyWith(color: colors.textError)), + ], + const SizedBox(height: 24), + QuantusButton.simple( + label: l10n.multisigExecuteConfirmYes, + isDisabled: _submitting, + onTap: _submitting ? null : _confirm, + ), + const SizedBox(height: 12), + QuantusButton.simple( + label: l10n.multisigApproveConfirmNo, + variant: ButtonVariant.secondary, + isDisabled: _submitting, + onTap: _submitting ? null : () => Navigator.pop(context), + ), + const SizedBox(height: 8), + ], + ), + ); + } +} diff --git a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart index d5d8923f..5d2d71ef 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart @@ -8,6 +8,7 @@ import 'package:resonance_network_wallet/providers/currency_display_provider.dar import 'package:resonance_network_wallet/providers/l10n_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_approvals_provider.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_executions_provider.dart'; import 'package:resonance_network_wallet/providers/wallet_providers.dart'; import 'package:resonance_network_wallet/v2/components/multisig_expiry_value.dart'; import 'package:resonance_network_wallet/routes.dart'; @@ -18,10 +19,11 @@ import 'package:resonance_network_wallet/v2/components/bottom_sheet_container.da import 'package:resonance_network_wallet/v2/components/detail_summary_row.dart'; import 'package:resonance_network_wallet/v2/components/quantus_button.dart'; import 'package:resonance_network_wallet/v2/screens/multisig/multisig_approve_confirm_sheet.dart'; +import 'package:resonance_network_wallet/v2/screens/multisig/multisig_execute_confirm_sheet.dart'; import 'package:resonance_network_wallet/v2/theme/app_colors.dart'; import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart'; -/// Shows proposal detail with approve action for eligible co-signers. +/// Shows proposal detail with approve or execute actions for eligible signers. void showMultisigProposalDetailSheet( BuildContext context, { required MultisigAccount msig, @@ -76,6 +78,13 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { liveProposal.id, msig.myMemberAccountId, ); + final pendingExecutions = ref.watch(pendingMultisigExecutionsProvider); + final pendingExecution = findPendingExecutionForProposal( + pendingExecutions, + msig.accountId, + liveProposal.id, + msig.myMemberAccountId, + ); final didApprove = liveProposal.didApprove(msig.myMemberAccountId); final hasLocalSigner = _hasLocalSigner(ref); final isActionable = currentBlock != null && liveProposal.isActionable(currentBlock); @@ -105,7 +114,7 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { const SizedBox(height: 24), _signers(l10n, colors, text, liveProposal), const SizedBox(height: 24), - _signSection( + _actionSection( context, l10n, colors, @@ -113,6 +122,7 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { liveProposal: liveProposal, didApprove: didApprove, pendingApproval: pendingApproval, + pendingExecution: pendingExecution, hasLocalSigner: hasLocalSigner, isActionable: isActionable, ), @@ -249,7 +259,45 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { ); } - Widget _signSection( + Widget _actionSection( + BuildContext context, + AppLocalizations l10n, + AppColorsV2 colors, + AppTextTheme text, { + required MultisigProposal liveProposal, + required bool didApprove, + required PendingMultisigApprovalEvent? pendingApproval, + required PendingMultisigExecutionEvent? pendingExecution, + required bool hasLocalSigner, + required bool isActionable, + }) { + if (liveProposal.isReadyToExecute) { + return _executeSection( + context, + l10n, + colors, + text, + liveProposal: liveProposal, + pendingExecution: pendingExecution, + hasLocalSigner: hasLocalSigner, + isActionable: isActionable, + ); + } + + return _approveSection( + context, + l10n, + colors, + text, + liveProposal: liveProposal, + didApprove: didApprove, + pendingApproval: pendingApproval, + hasLocalSigner: hasLocalSigner, + isActionable: isActionable, + ); + } + + Widget _approveSection( BuildContext context, AppLocalizations l10n, AppColorsV2 colors, @@ -282,6 +330,51 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { _ => '', }; + return _actionButtonColumn(l10n, colors, text, label: label, isDisabled: isDisabled, onTap: onTap, note: note); + } + + Widget _executeSection( + BuildContext context, + AppLocalizations l10n, + AppColorsV2 colors, + AppTextTheme text, { + required MultisigProposal liveProposal, + required PendingMultisigExecutionEvent? pendingExecution, + required bool hasLocalSigner, + required bool isActionable, + }) { + final isPending = pendingExecution != null; + final canExecute = isActionable && !isPending && hasLocalSigner; + + final (label, isDisabled, onTap) = switch ((isPending, canExecute)) { + (true, _) => (l10n.multisigProposalExecutingLabel, true, null), + (_, true) => ( + l10n.multisigExecuteButton, + false, + () => showMultisigExecuteConfirmSheet(context, msig: msig, proposal: liveProposal), + ), + _ => (l10n.multisigExecuteButton, true, null), + }; + + final note = switch ((isPending, isActionable, hasLocalSigner)) { + (true, _, _) => l10n.multisigProposalExecutingNote, + (_, false, _) => l10n.multisigExecuteUnavailableNote, + (_, _, false) => l10n.multisigExecuteUnavailableNote, + _ => '', + }; + + return _actionButtonColumn(l10n, colors, text, label: label, isDisabled: isDisabled, onTap: onTap, note: note); + } + + Widget _actionButtonColumn( + AppLocalizations l10n, + AppColorsV2 colors, + AppTextTheme text, { + required String label, + required bool isDisabled, + required VoidCallback? onTap, + required String note, + }) { return Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ diff --git a/mobile-app/lib/v2/screens/multisig/proposal_row.dart b/mobile-app/lib/v2/screens/multisig/proposal_row.dart index ceb678a4..9657ad8d 100644 --- a/mobile-app/lib/v2/screens/multisig/proposal_row.dart +++ b/mobile-app/lib/v2/screens/multisig/proposal_row.dart @@ -4,6 +4,7 @@ import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/l10n/app_localizations.dart'; import 'package:resonance_network_wallet/providers/l10n_provider.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_approvals_provider.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_executions_provider.dart'; import 'package:resonance_network_wallet/v2/components/proposal_list_tile.dart'; import 'package:resonance_network_wallet/v2/theme/app_colors.dart'; import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart'; @@ -28,24 +29,38 @@ class ProposalRow extends ConsumerWidget { proposal.id, myAccountId, ); + final pendingExecutions = ref.watch(pendingMultisigExecutionsProvider); + final pendingExecution = findPendingExecutionForProposal( + pendingExecutions, + proposal.multisigAddress, + proposal.id, + myAccountId, + ); final isApproving = pendingApproval != null; + final isExecuting = pendingExecution != null; + final isPending = isApproving || isExecuting; return ProposalListTile( amount: proposal.amount, recipientAddress: proposal.recipient, - highlighted: isApproving, + highlighted: isPending, onTap: onTap, trailing: Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ - if (isApproving) + if (isExecuting) + Text( + l10n.activityTxExecuting, + style: text.detail?.copyWith(color: colors.checksum, fontWeight: FontWeight.w600, letterSpacing: 0.4), + ) + else if (isApproving) Text( l10n.activityTxApproving, style: text.detail?.copyWith(color: colors.checksum, fontWeight: FontWeight.w600, letterSpacing: 0.4), ) else _statusChip(l10n, colors, text), - if (proposal.isOpen && !isApproving) ...[ + if (proposal.isOpen && !isPending) ...[ const SizedBox(height: 6), if (didApprove) _approvedPill(l10n, colors, text) else _proposedPill(l10n, colors, text), ], diff --git a/quantus_sdk/lib/quantus_sdk.dart b/quantus_sdk/lib/quantus_sdk.dart index 59aa1a53..615e7311 100644 --- a/quantus_sdk/lib/quantus_sdk.dart +++ b/quantus_sdk/lib/quantus_sdk.dart @@ -82,6 +82,7 @@ export 'src/models/multisig_proposal_event.dart'; export 'src/models/multisig_proposal_created_event.dart'; export 'src/models/multisig_proposal_approved_event.dart'; export 'src/models/pending_multisig_approval_event.dart'; +export 'src/models/pending_multisig_execution_event.dart'; export 'src/models/propose_fee_breakdown.dart'; export 'src/models/multisig_signer.dart'; export 'src/services/multisig_service.dart'; diff --git a/quantus_sdk/lib/src/models/multisig_proposal.dart b/quantus_sdk/lib/src/models/multisig_proposal.dart index d8a4a8c1..01b042ac 100644 --- a/quantus_sdk/lib/src/models/multisig_proposal.dart +++ b/quantus_sdk/lib/src/models/multisig_proposal.dart @@ -166,6 +166,9 @@ class MultisigProposal { /// Whether this proposal should appear in the pinned "open" section. bool isActionable(int currentBlock) => isOpen && !expired(currentBlock); + /// Whether threshold is met and the proposal awaits execution. + bool get isReadyToExecute => status == MultisigProposalStatus.approved; + MultisigProposal copyWith({MultisigProposalStatus? status, List? approvals, BigInt? burnedPalletFee}) { return MultisigProposal( entityId: entityId, diff --git a/quantus_sdk/lib/src/models/pending_multisig_execution_event.dart b/quantus_sdk/lib/src/models/pending_multisig_execution_event.dart new file mode 100644 index 00000000..9a0d8207 --- /dev/null +++ b/quantus_sdk/lib/src/models/pending_multisig_execution_event.dart @@ -0,0 +1,52 @@ +import 'package:flutter/foundation.dart'; + +/// An execution submitted on-chain but not yet reflected in the indexer. +@immutable +class PendingMultisigExecutionEvent { + final String id; + final String multisigAddress; + final int proposalId; + final String executorId; + final String? extrinsicHash; + final DateTime submittedAt; + + const PendingMultisigExecutionEvent({ + required this.id, + required this.multisigAddress, + required this.proposalId, + required this.executorId, + this.extrinsicHash, + required this.submittedAt, + }); + + PendingMultisigExecutionEvent copyWith({String? extrinsicHash}) { + return PendingMultisigExecutionEvent( + id: id, + multisigAddress: multisigAddress, + proposalId: proposalId, + executorId: executorId, + extrinsicHash: extrinsicHash ?? this.extrinsicHash, + submittedAt: submittedAt, + ); + } + + factory PendingMultisigExecutionEvent.create({ + required String multisigAddress, + required int proposalId, + required String executorId, + }) { + return PendingMultisigExecutionEvent( + id: 'pending_execution_${DateTime.now().millisecondsSinceEpoch}', + multisigAddress: multisigAddress, + proposalId: proposalId, + executorId: executorId, + submittedAt: DateTime.now(), + ); + } + + @override + String toString() { + return 'PendingMultisigExecutionEvent{id: $id, multisig: $multisigAddress, ' + 'proposalId: $proposalId, executor: $executorId}'; + } +} diff --git a/quantus_sdk/lib/src/services/multisig_service.dart b/quantus_sdk/lib/src/services/multisig_service.dart index 158c7d4e..7edb4b3b 100644 --- a/quantus_sdk/lib/src/services/multisig_service.dart +++ b/quantus_sdk/lib/src/services/multisig_service.dart @@ -384,6 +384,32 @@ class MultisigService { return _substrateService.submitExtrinsic(signer, call); } + /// Builds the `multisig.execute` runtime call for [proposalId]. + Multisig buildExecuteCall({required MultisigAccount msig, required int proposalId}) { + return const Txs().execute(multisigAddress: getAccountId32(msig.accountId), proposalId: proposalId); + } + + /// Estimates the network fee for executing [proposalId]. + Future estimateExecuteFee({ + required MultisigAccount msig, + required Account signer, + required int proposalId, + }) async { + final call = buildExecuteCall(msig: msig, proposalId: proposalId); + final feeData = await _substrateService.getFeeForCall(signer, call); + return feeData.fee; + } + + /// Submits `multisig.execute` signed by [signer]. Returns extrinsic hash bytes. + Future submitExecuteExtrinsic({ + required MultisigAccount msig, + required Account signer, + required int proposalId, + }) async { + final call = buildExecuteCall(msig: msig, proposalId: proposalId); + return _substrateService.submitExtrinsic(signer, call); + } + /// Number of blocks that approximately span [duration] at average block time. int blocksForDuration(Duration duration) { return (duration.inSeconds / _avgBlockTimeSeconds).round(); diff --git a/quantus_sdk/test/multisig_service_test.dart b/quantus_sdk/test/multisig_service_test.dart index cb619258..14c2a675 100644 --- a/quantus_sdk/test/multisig_service_test.dart +++ b/quantus_sdk/test/multisig_service_test.dart @@ -438,6 +438,26 @@ void main() { }); }); + group('MultisigService.buildExecuteCall', () { + const signerA = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'; + const signerB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty'; + const multisigAddress = '5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy'; + + final msig = MultisigAccount( + name: 'Team', + accountId: multisigAddress, + signers: [signerA, signerB], + threshold: 2, + nonce: BigInt.zero, + myMemberAccountId: signerB, + ); + + test('returns a Multisig runtime call for valid params', () { + final call = MultisigService().buildExecuteCall(msig: msig, proposalId: 3); + expect(call.encode().isNotEmpty, isTrue); + }); + }); + group('MultisigService.proposalCreationFee', () { final service = MultisigService(); final base = service.proposalFee; From ec78bcdcdd175dfbb39014dca57eb619a44bef7d Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 18:22:45 +0800 Subject: [PATCH 07/18] feat: regenerate polkadart metadata, clean up deposit field and rename interceptor to guardian --- mobile-app/lib/l10n/app_en.arb | 2 +- mobile-app/lib/l10n/app_id.arb | 2 +- mobile-app/lib/l10n/app_localizations.dart | 2 +- mobile-app/lib/l10n/app_localizations_en.dart | 2 +- mobile-app/lib/l10n/app_localizations_id.dart | 2 +- .../pending_multisig_creation_record.dart | 1 - .../services/multisig_submission_service.dart | 2 +- .../activity/transaction_detail_sheet.dart | 5 - .../multisig_execute_confirm_sheet.dart | 6 + .../lib/generated/planck/pallets/assets.dart | 471 +- .../planck/pallets/assets_holder.dart | 76 +- .../generated/planck/pallets/balances.dart | 289 +- .../planck/pallets/conviction_voting.dart | 147 +- .../planck/pallets/mining_rewards.dart | 13 +- .../generated/planck/pallets/multisig.dart | 241 +- .../generated/planck/pallets/preimage.dart | 111 +- .../lib/generated/planck/pallets/q_po_w.dart | 60 +- .../generated/planck/pallets/recovery.dart | 143 +- .../generated/planck/pallets/referenda.dart | 173 +- .../planck/pallets/reversible_transfers.dart | 311 +- .../generated/planck/pallets/scheduler.dart | 220 +- .../lib/generated/planck/pallets/system.dart | 604 ++- .../planck/pallets/tech_collective.dart | 247 +- .../planck/pallets/tech_referenda.dart | 173 +- .../generated/planck/pallets/timestamp.dart | 10 +- .../planck/pallets/transaction_payment.dart | 29 +- .../planck/pallets/treasury_pallet.dart | 21 +- .../lib/generated/planck/pallets/utility.dart | 50 +- .../generated/planck/pallets/wormhole.dart | 90 +- .../lib/generated/planck/pallets/zk_tree.dart | 81 +- quantus_sdk/lib/generated/planck/planck.dart | 82 +- .../generated/planck/types/b_tree_map.dart | 26 +- .../bounded_btree_map/bounded_b_tree_map.dart | 20 +- .../lib/generated/planck/types/cow_1.dart | 10 +- .../lib/generated/planck/types/cow_2.dart | 26 +- .../check_metadata_hash.dart | 17 +- .../frame_metadata_hash_extension/mode.dart | 15 +- .../dispatch/dispatch_class.dart | 15 +- .../types/frame_support/dispatch/pays.dart | 15 +- .../dispatch/per_dispatch_class_1.dart | 45 +- .../dispatch/per_dispatch_class_2.dart | 45 +- .../dispatch/per_dispatch_class_3.dart | 43 +- .../dispatch/post_dispatch_info.dart | 46 +- .../frame_support/dispatch/raw_origin.dart | 47 +- .../planck/types/frame_support/pallet_id.dart | 10 +- .../traits/preimages/bounded.dart | 115 +- .../traits/schedule/dispatch_time.dart | 45 +- .../frame_support/traits/storage/no_drop.dart | 10 +- .../tokens/fungible/imbalance/imbalance.dart | 17 +- .../traits/tokens/misc/balance_status.dart | 15 +- .../traits/tokens/misc/id_amount_1.dart | 41 +- .../traits/tokens/misc/id_amount_2.dart | 41 +- .../types/frame_system/account_info.dart | 55 +- .../code_upgrade_authorization.dart | 43 +- .../frame_system/dispatch_event_info.dart | 48 +- .../types/frame_system/event_record.dart | 56 +- .../check_genesis/check_genesis.dart | 10 +- .../check_mortality/check_mortality.dart | 10 +- .../check_non_zero_sender.dart | 10 +- .../extensions/check_nonce/check_nonce.dart | 10 +- .../check_spec_version.dart | 10 +- .../check_tx_version/check_tx_version.dart | 10 +- .../extensions/check_weight/check_weight.dart | 10 +- .../last_runtime_upgrade_info.dart | 42 +- .../frame_system/limits/block_length.dart | 17 +- .../frame_system/limits/block_weights.dart | 50 +- .../limits/weights_per_class.dart | 75 +- .../types/frame_system/pallet/call.dart | 365 +- .../types/frame_system/pallet/error.dart | 15 +- .../types/frame_system/pallet/event.dart | 301 +- .../planck/types/frame_system/phase.dart | 38 +- .../types/pallet_assets/pallet/call.dart | 1691 +++++-- .../types/pallet_assets/pallet/error.dart | 15 +- .../types/pallet_assets/pallet/event.dart | 1503 ++++-- .../pallet_assets/types/account_status.dart | 15 +- .../types/pallet_assets/types/approval.dart | 41 +- .../pallet_assets/types/asset_account.dart | 54 +- .../pallet_assets/types/asset_details.dart | 142 +- .../pallet_assets/types/asset_metadata.dart | 65 +- .../pallet_assets/types/asset_status.dart | 15 +- .../pallet_assets/types/existence_reason.dart | 101 +- .../pallet_assets_holder/pallet/error.dart | 15 +- .../pallet_assets_holder/pallet/event.dart | 206 +- .../types/pallet_balances/pallet/call.dart | 450 +- .../types/pallet_balances/pallet/error.dart | 15 +- .../types/pallet_balances/pallet/event.dart | 1603 ++++-- .../pallet/unexpected_kind.dart | 15 +- .../pallet_balances/types/account_data.dart | 51 +- .../types/adjustment_direction.dart | 15 +- .../pallet_balances/types/balance_lock.dart | 51 +- .../pallet_balances/types/extra_flags.dart | 10 +- .../types/pallet_balances/types/reasons.dart | 15 +- .../pallet_balances/types/reserve_data.dart | 46 +- .../conviction/conviction.dart | 15 +- .../pallet_conviction_voting/pallet/call.dart | 311 +- .../pallet/error.dart | 15 +- .../pallet/event.dart | 324 +- .../types/delegations.dart | 41 +- .../pallet_conviction_voting/types/tally.dart | 47 +- .../vote/account_vote.dart | 180 +- .../vote/casting.dart | 74 +- .../vote/delegating.dart | 60 +- .../vote/prior_lock.dart | 41 +- .../pallet_conviction_voting/vote/vote.dart | 10 +- .../pallet_conviction_voting/vote/voting.dart | 45 +- .../pallet_mining_rewards/pallet/event.dart | 197 +- .../types/pallet_multisig/multisig_data.dart | 115 +- .../types/pallet_multisig/pallet/call.dart | 453 +- .../types/pallet_multisig/pallet/error.dart | 119 +- .../types/pallet_multisig/pallet/event.dart | 745 +-- .../types/pallet_multisig/proposal_data.dart | 114 +- .../pallet_multisig/proposal_status.dart | 23 +- .../pallet_preimage/old_request_status.dart | 161 +- .../types/pallet_preimage/pallet/call.dart | 140 +- .../types/pallet_preimage/pallet/error.dart | 15 +- .../types/pallet_preimage/pallet/event.dart | 86 +- .../pallet_preimage/pallet/hold_reason.dart | 15 +- .../types/pallet_preimage/request_status.dart | 156 +- .../types/pallet_qpow/pallet/event.dart | 140 +- .../member_record.dart | 17 +- .../pallet_ranked_collective/pallet/call.dart | 299 +- .../pallet/error.dart | 15 +- .../pallet/event.dart | 274 +- .../types/pallet_ranked_collective/tally.dart | 48 +- .../pallet_ranked_collective/vote_record.dart | 45 +- .../pallet_recovery/active_recovery.dart | 57 +- .../types/pallet_recovery/deposit_kind.dart | 36 +- .../types/pallet_recovery/pallet/call.dart | 355 +- .../types/pallet_recovery/pallet/error.dart | 15 +- .../types/pallet_recovery/pallet/event.dart | 368 +- .../pallet_recovery/recovery_config.dart | 59 +- .../types/pallet_referenda/pallet/call_1.dart | 266 +- .../types/pallet_referenda/pallet/call_2.dart | 266 +- .../pallet_referenda/pallet/error_1.dart | 15 +- .../pallet_referenda/pallet/error_2.dart | 15 +- .../pallet_referenda/pallet/event_1.dart | 803 ++- .../pallet_referenda/pallet/event_2.dart | 803 ++- .../types/pallet_referenda/types/curve.dart | 189 +- .../types/deciding_status.dart | 41 +- .../types/pallet_referenda/types/deposit.dart | 46 +- .../types/referendum_info_1.dart | 317 +- .../types/referendum_info_2.dart | 317 +- .../types/referendum_status_1.dart | 172 +- .../types/referendum_status_2.dart | 172 +- .../pallet_referenda/types/track_details.dart | 95 +- .../high_security_account_data.dart | 51 +- .../pallet/call.dart | 427 +- .../pallet/error.dart | 30 +- .../pallet/event.dart | 437 +- .../pallet/hold_reason.dart | 15 +- .../pending_transfer.dart | 98 +- .../types/pallet_scheduler/pallet/call.dart | 546 ++- .../types/pallet_scheduler/pallet/error.dart | 25 +- .../types/pallet_scheduler/pallet/event.dart | 503 +- .../types/pallet_scheduler/retry_config.dart | 43 +- .../types/pallet_scheduler/scheduled.dart | 61 +- .../types/pallet_timestamp/pallet/call.dart | 32 +- .../charge_transaction_payment.dart | 10 +- .../pallet/event.dart | 70 +- .../pallet_transaction_payment/releases.dart | 15 +- .../types/pallet_treasury/pallet/call.dart | 64 +- .../types/pallet_treasury/pallet/error.dart | 15 +- .../types/pallet_treasury/pallet/event.dart | 108 +- .../types/pallet_utility/pallet/call.dart | 375 +- .../types/pallet_utility/pallet/error.dart | 15 +- .../types/pallet_utility/pallet/event.dart | 167 +- .../types/pallet_wormhole/pallet/call.dart | 38 +- .../types/pallet_wormhole/pallet/error.dart | 18 +- .../types/pallet_wormhole/pallet/event.dart | 226 +- .../types/pallet_zk_tree/pallet/error.dart | 15 +- .../types/pallet_zk_tree/pallet/event.dart | 99 +- .../planck/types/pallet_zk_tree/zk_leaf.dart | 59 +- .../planck/types/primitive_types/h256.dart | 10 +- .../planck/types/primitive_types/u512.dart | 10 +- .../types/dilithium_signature_scheme.dart | 37 +- .../dilithium_signature_with_public.dart | 29 +- .../block_number_or_timestamp.dart | 51 +- .../types/qp_scheduler/dispatch_time.dart | 45 +- .../definitions/preimage_deposit.dart | 17 +- .../types/quantus_runtime/origin_caller.dart | 28 +- .../planck/types/quantus_runtime/runtime.dart | 10 +- .../types/quantus_runtime/runtime_call.dart | 334 +- .../types/quantus_runtime/runtime_event.dart | 402 +- .../runtime_freeze_reason.dart | 10 +- .../quantus_runtime/runtime_hold_reason.dart | 45 +- .../reversible_transaction_extension.dart | 13 +- .../wormhole_proof_recorder_extension.dart | 13 +- .../types/sp_arithmetic/arithmetic_error.dart | 15 +- .../sp_arithmetic/fixed_point/fixed_i64.dart | 10 +- .../sp_arithmetic/fixed_point/fixed_u128.dart | 10 +- .../sp_arithmetic/per_things/perbill.dart | 10 +- .../sp_arithmetic/per_things/permill.dart | 10 +- .../types/sp_core/crypto/account_id32.dart | 10 +- .../types/sp_runtime/dispatch_error.dart | 152 +- .../dispatch_error_with_post_info.dart | 45 +- .../sp_runtime/generic/digest/digest.dart | 32 +- .../generic/digest/digest_item.dart | 223 +- .../types/sp_runtime/generic/era/era.dart | 4351 ++++++++++++++--- .../unchecked_extrinsic.dart | 10 +- .../planck/types/sp_runtime/module_error.dart | 46 +- .../multiaddress/multi_address.dart | 110 +- .../sp_runtime/proving_trie/trie_error.dart | 15 +- .../planck/types/sp_runtime/token_error.dart | 15 +- .../types/sp_runtime/traits/blake_two256.dart | 10 +- .../types/sp_runtime/transactional_error.dart | 15 +- .../types/sp_version/runtime_version.dart | 106 +- .../types/sp_weights/runtime_db_weight.dart | 41 +- .../types/sp_weights/weight_v2/weight.dart | 38 +- .../lib/generated/planck/types/tuples.dart | 20 +- .../lib/generated/planck/types/tuples_1.dart | 20 +- .../lib/generated/planck/types/tuples_2.dart | 23 +- .../lib/generated/planck/types/tuples_3.dart | 5 +- .../models/multisig_create_submission.dart | 2 +- .../src/models/multisig_created_event.dart | 5 +- .../src/models/multisig_creation_event.dart | 11 +- .../pending_multisig_creation_event.dart | 2 - .../src/services/high_security_service.dart | 2 +- .../reversible_transfers_service.dart | 6 +- quantus_sdk/pubspec.yaml | 2 +- .../test/chain_history_service_test.dart | 3 +- 220 files changed, 23503 insertions(+), 6874 deletions(-) diff --git a/mobile-app/lib/l10n/app_en.arb b/mobile-app/lib/l10n/app_en.arb index 2ab09504..fe3519b9 100644 --- a/mobile-app/lib/l10n/app_en.arb +++ b/mobile-app/lib/l10n/app_en.arb @@ -326,7 +326,7 @@ "@multisigCreateAlreadyExists": { "description": "Toast when predicted multisig address is already registered" }, - "multisigCreateInsufficientBalance": "Insufficient balance to cover multisig creation fees and deposit.", + "multisigCreateInsufficientBalance": "Insufficient balance to cover multisig creation fees.", "@multisigCreateInsufficientBalance": { "description": "Toast when creator balance is below pallet fee + network fee + deposit" }, diff --git a/mobile-app/lib/l10n/app_id.arb b/mobile-app/lib/l10n/app_id.arb index 903a625e..3e234e42 100644 --- a/mobile-app/lib/l10n/app_id.arb +++ b/mobile-app/lib/l10n/app_id.arb @@ -82,7 +82,7 @@ "multisigCreateErrorCouldNotCreate": "Gagal membuat multisig.", "multisigCreateReadyToast": "Multisig ditambahkan ke akun Anda.", "multisigCreateAlreadyExists": "Multisig dengan alamat ini sudah ada on-chain.", - "multisigCreateInsufficientBalance": "Saldo tidak cukup untuk biaya dan deposit pembuatan multisig.", + "multisigCreateInsufficientBalance": "Saldo tidak cukup untuk biaya pembuatan multisig.", "multisigCreateTimeoutToast": "Pembuatan multisig membutuhkan waktu lebih lama. Periksa chain atau coba lagi.", "multisigCreateAuthReason": "Autentikasi untuk membuat multisig ini", "multisigCreateSignersLabel": "PENANDATANGAN", diff --git a/mobile-app/lib/l10n/app_localizations.dart b/mobile-app/lib/l10n/app_localizations.dart index e0d8738a..1159484f 100644 --- a/mobile-app/lib/l10n/app_localizations.dart +++ b/mobile-app/lib/l10n/app_localizations.dart @@ -527,7 +527,7 @@ abstract class AppLocalizations { /// Toast when creator balance is below pallet fee + network fee + deposit /// /// In en, this message translates to: - /// **'Insufficient balance to cover multisig creation fees and deposit.'** + /// **'Insufficient balance to cover multisig creation fees.'** String get multisigCreateInsufficientBalance; /// Toast when on-chain confirmation polling times out diff --git a/mobile-app/lib/l10n/app_localizations_en.dart b/mobile-app/lib/l10n/app_localizations_en.dart index 069b4290..5caf2d18 100644 --- a/mobile-app/lib/l10n/app_localizations_en.dart +++ b/mobile-app/lib/l10n/app_localizations_en.dart @@ -238,7 +238,7 @@ class AppLocalizationsEn extends AppLocalizations { String get multisigCreateAlreadyExists => 'A multisig with this address already exists on-chain.'; @override - String get multisigCreateInsufficientBalance => 'Insufficient balance to cover multisig creation fees and deposit.'; + String get multisigCreateInsufficientBalance => 'Insufficient balance to cover multisig creation fees.'; @override String get multisigCreateTimeoutToast => diff --git a/mobile-app/lib/l10n/app_localizations_id.dart b/mobile-app/lib/l10n/app_localizations_id.dart index 6d44d04d..39b45e65 100644 --- a/mobile-app/lib/l10n/app_localizations_id.dart +++ b/mobile-app/lib/l10n/app_localizations_id.dart @@ -240,7 +240,7 @@ class AppLocalizationsId extends AppLocalizations { String get multisigCreateAlreadyExists => 'Multisig dengan alamat ini sudah ada on-chain.'; @override - String get multisigCreateInsufficientBalance => 'Saldo tidak cukup untuk biaya dan deposit pembuatan multisig.'; + String get multisigCreateInsufficientBalance => 'Saldo tidak cukup untuk biaya pembuatan multisig.'; @override String get multisigCreateTimeoutToast => diff --git a/mobile-app/lib/models/pending_multisig_creation_record.dart b/mobile-app/lib/models/pending_multisig_creation_record.dart index 5b80fd99..8a349fea 100644 --- a/mobile-app/lib/models/pending_multisig_creation_record.dart +++ b/mobile-app/lib/models/pending_multisig_creation_record.dart @@ -26,7 +26,6 @@ class PendingMultisigCreationRecord { signers: fields.signers, palletFee: fields.palletFee, networkFee: fields.networkFee, - deposit: fields.deposit, timestamp: submittedAt, extrinsicHash: extrinsicHash, ); diff --git a/mobile-app/lib/services/multisig_submission_service.dart b/mobile-app/lib/services/multisig_submission_service.dart index 3084c9dd..94cce616 100644 --- a/mobile-app/lib/services/multisig_submission_service.dart +++ b/mobile-app/lib/services/multisig_submission_service.dart @@ -20,7 +20,7 @@ class MultisigSubmissionService { /// /// Throws [MultisigAlreadyExistsException] if the predicted address already /// exists, or [MultisigInsufficientBalanceException] if the creator cannot - /// afford pallet fee + network fee + deposit. + /// afford pallet fee + network fee. Future preflightMultisigCreation({ required List signers, required int threshold, diff --git a/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart b/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart index 58ba0d52..034f225a 100644 --- a/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart +++ b/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart @@ -346,7 +346,6 @@ class _DetailsSection extends ConsumerWidget { signers: event.signers, palletFee: event.palletFee, networkFee: event.networkFee, - deposit: event.deposit, timestamp: event.timestamp, ); } @@ -369,7 +368,6 @@ class _DetailsSection extends ConsumerWidget { signers: event.signers, palletFee: event.palletFee, networkFee: event.networkFee, - deposit: event.deposit, timestamp: event.timestamp, txHash: txHash, ); @@ -384,7 +382,6 @@ class _DetailsSection extends ConsumerWidget { required List signers, required BigInt palletFee, required BigInt networkFee, - required BigInt deposit, required DateTime timestamp, String? txHash, }) { @@ -393,7 +390,6 @@ class _DetailsSection extends ConsumerWidget { final dateTime = DatetimeFormattingService.formatTxDateTime(timestamp); final palletFeeValue = _formatBalance(l10n, formattingService, palletFee); final networkFeeValue = _formatBalance(l10n, formattingService, networkFee); - final depositValue = _formatBalance(l10n, formattingService, deposit); return Column( children: [ @@ -407,7 +403,6 @@ class _DetailsSection extends ConsumerWidget { _DetailRow(label: l10n.activityDetailMultisigCreator, value: creatorAddress, colors: colors), _DetailRow(label: l10n.activityDetailMultisigCreationFee, value: palletFeeValue, colors: colors), _DetailRow(label: l10n.activityDetailNetworkFee, value: networkFeeValue, colors: colors), - _DetailRow(label: l10n.activityDetailMultisigDeposit, value: depositValue, colors: colors), _DetailRow(label: l10n.activityDetailDate, value: dateTime, colors: colors), if (txHash != null) _DetailRow(label: l10n.activityDetailTxHash, value: txHash, colors: colors), ], diff --git a/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart index 79b4851c..bf246270 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart @@ -50,6 +50,8 @@ class _MultisigExecuteConfirmSheetState extends ConsumerState<_MultisigExecuteCo } Future _loadNetworkFee() async { + print('loading network fee proposal id: ${widget.proposal.id}'); + try { final signer = ref .read(accountsProvider) @@ -102,6 +104,10 @@ class _MultisigExecuteConfirmSheetState extends ConsumerState<_MultisigExecuteCo ); if (signer == null) throw Exception('No signer account available'); + print('executing proposal id: ${widget.proposal.id}'); + print('msig: ${widget.msig.accountId}'); + print('signer: ${signer.accountId}'); + await ref .read(transactionSubmissionServiceProvider) .executeProposal(msig: widget.msig, signer: signer, proposal: widget.proposal); diff --git a/quantus_sdk/lib/generated/planck/pallets/assets.dart b/quantus_sdk/lib/generated/planck/pallets/assets.dart index 544fbc2f..8e535630 100644 --- a/quantus_sdk/lib/generated/planck/pallets/assets.dart +++ b/quantus_sdk/lib/generated/planck/pallets/assets.dart @@ -19,7 +19,8 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageMap _asset = const _i1.StorageMap( + final _i1.StorageMap _asset = + const _i1.StorageMap( prefix: 'Assets', storage: 'Asset', valueCodec: _i2.AssetDetails.codec, @@ -28,31 +29,35 @@ class Queries { final _i1.StorageDoubleMap _account = const _i1.StorageDoubleMap( - prefix: 'Assets', - storage: 'Account', - valueCodec: _i5.AssetAccount.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), - hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), - ); - - final _i1.StorageTripleMap _approvals = - const _i1.StorageTripleMap( - prefix: 'Assets', - storage: 'Approvals', - valueCodec: _i6.Approval.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), - hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), - hasher3: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), - ); - - final _i1.StorageMap _metadata = const _i1.StorageMap( + prefix: 'Assets', + storage: 'Account', + valueCodec: _i5.AssetAccount.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), + hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), + ); + + final _i1 + .StorageTripleMap + _approvals = const _i1.StorageTripleMap( + prefix: 'Assets', + storage: 'Approvals', + valueCodec: _i6.Approval.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), + hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), + hasher3: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), + ); + + final _i1.StorageMap _metadata = + const _i1.StorageMap( prefix: 'Assets', storage: 'Metadata', valueCodec: _i7.AssetMetadata.codec, hasher: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), ); - final _i1.StorageMap> _reserves = const _i1.StorageMap>( + final _i1.StorageMap> _reserves = + const _i1.StorageMap>( prefix: 'Assets', storage: 'Reserves', valueCodec: _i3.SequenceCodec(_i3.NullCodec.codec), @@ -66,9 +71,15 @@ class Queries { ); /// Details of an asset. - _i8.Future<_i2.AssetDetails?> asset(int key1, {_i1.BlockHash? at}) async { + _i8.Future<_i2.AssetDetails?> asset( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _asset.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _asset.decodeValue(bytes); } @@ -76,9 +87,19 @@ class Queries { } /// The holdings of a specific account for a specific asset. - _i8.Future<_i5.AssetAccount?> account(int key1, _i4.AccountId32 key2, {_i1.BlockHash? at}) async { - final hashedKey = _account.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); + _i8.Future<_i5.AssetAccount?> account( + int key1, + _i4.AccountId32 key2, { + _i1.BlockHash? at, + }) async { + final hashedKey = _account.hashedKeyFor( + key1, + key2, + ); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _account.decodeValue(bytes); } @@ -88,9 +109,21 @@ class Queries { /// Approved balance transfers. First balance is the amount approved for transfer. Second /// is the amount of `T::Currency` reserved for storing this. /// First key is the asset ID, second key is the owner and third key is the delegate. - _i8.Future<_i6.Approval?> approvals(int key1, _i4.AccountId32 key2, _i4.AccountId32 key3, {_i1.BlockHash? at}) async { - final hashedKey = _approvals.hashedKeyFor(key1, key2, key3); - final bytes = await __api.getStorage(hashedKey, at: at); + _i8.Future<_i6.Approval?> approvals( + int key1, + _i4.AccountId32 key2, + _i4.AccountId32 key3, { + _i1.BlockHash? at, + }) async { + final hashedKey = _approvals.hashedKeyFor( + key1, + key2, + key3, + ); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _approvals.decodeValue(bytes); } @@ -98,25 +131,45 @@ class Queries { } /// Metadata of an asset. - _i8.Future<_i7.AssetMetadata> metadata(int key1, {_i1.BlockHash? at}) async { + _i8.Future<_i7.AssetMetadata> metadata( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _metadata.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _metadata.decodeValue(bytes); } return _i7.AssetMetadata( deposit: BigInt.zero, - name: List.filled(0, 0, growable: true), - symbol: List.filled(0, 0, growable: true), + name: List.filled( + 0, + 0, + growable: true, + ), + symbol: List.filled( + 0, + 0, + growable: true, + ), decimals: 0, isFrozen: false, ); /* Default */ } /// Maps an asset to a list of its configured reserve information. - _i8.Future> reserves(int key1, {_i1.BlockHash? at}) async { + _i8.Future> reserves( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _reserves.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _reserves.decodeValue(bytes); } @@ -134,7 +187,10 @@ class Queries { /// [SetNextAssetId](`migration::next_asset_id::SetNextAssetId`) migration. _i8.Future nextAssetId({_i1.BlockHash? at}) async { final hashedKey = _nextAssetId.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _nextAssetId.decodeValue(bytes); } @@ -142,9 +198,15 @@ class Queries { } /// Details of an asset. - _i8.Future> multiAsset(List keys, {_i1.BlockHash? at}) async { + _i8.Future> multiAsset( + List keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _asset.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { return bytes.first.changes.map((v) => _asset.decodeValue(v.key)).toList(); } @@ -152,34 +214,56 @@ class Queries { } /// Metadata of an asset. - _i8.Future> multiMetadata(List keys, {_i1.BlockHash? at}) async { + _i8.Future> multiMetadata( + List keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _metadata.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _metadata.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _metadata.decodeValue(v.key)) + .toList(); } return (keys - .map( - (key) => _i7.AssetMetadata( - deposit: BigInt.zero, - name: List.filled(0, 0, growable: true), - symbol: List.filled(0, 0, growable: true), - decimals: 0, - isFrozen: false, + .map((key) => _i7.AssetMetadata( + deposit: BigInt.zero, + name: List.filled( + 0, + 0, + growable: true, ), - ) - .toList() - as List<_i7.AssetMetadata>); /* Default */ + symbol: List.filled( + 0, + 0, + growable: true, + ), + decimals: 0, + isFrozen: false, + )) + .toList() as List<_i7.AssetMetadata>); /* Default */ } /// Maps an asset to a list of its configured reserve information. - _i8.Future>> multiReserves(List keys, {_i1.BlockHash? at}) async { + _i8.Future>> multiReserves( + List keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _reserves.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _reserves.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _reserves.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => []).toList() as List>); /* Default */ + return (keys.map((key) => []).toList() + as List>); /* Default */ } /// Returns the storage key for `asset`. @@ -189,14 +273,28 @@ class Queries { } /// Returns the storage key for `account`. - _i9.Uint8List accountKey(int key1, _i4.AccountId32 key2) { - final hashedKey = _account.hashedKeyFor(key1, key2); + _i9.Uint8List accountKey( + int key1, + _i4.AccountId32 key2, + ) { + final hashedKey = _account.hashedKeyFor( + key1, + key2, + ); return hashedKey; } /// Returns the storage key for `approvals`. - _i9.Uint8List approvalsKey(int key1, _i4.AccountId32 key2, _i4.AccountId32 key3) { - final hashedKey = _approvals.hashedKeyFor(key1, key2, key3); + _i9.Uint8List approvalsKey( + int key1, + _i4.AccountId32 key2, + _i4.AccountId32 key3, + ) { + final hashedKey = _approvals.hashedKeyFor( + key1, + key2, + key3, + ); return hashedKey; } @@ -265,8 +363,16 @@ class Txs { /// Emits `Created` event when successful. /// /// Weight: `O(1)` - _i10.Assets create({required BigInt id, required _i11.MultiAddress admin, required BigInt minBalance}) { - return _i10.Assets(_i12.Create(id: id, admin: admin, minBalance: minBalance)); + _i10.Assets create({ + required BigInt id, + required _i11.MultiAddress admin, + required BigInt minBalance, + }) { + return _i10.Assets(_i12.Create( + id: id, + admin: admin, + minBalance: minBalance, + )); } /// Issue a new class of fungible assets from a privileged origin. @@ -294,7 +400,12 @@ class Txs { required bool isSufficient, required BigInt minBalance, }) { - return _i10.Assets(_i12.ForceCreate(id: id, owner: owner, isSufficient: isSufficient, minBalance: minBalance)); + return _i10.Assets(_i12.ForceCreate( + id: id, + owner: owner, + isSufficient: isSufficient, + minBalance: minBalance, + )); } /// Start the process of destroying a fungible asset class. @@ -371,8 +482,16 @@ class Txs { /// /// Weight: `O(1)` /// Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. - _i10.Assets mint({required BigInt id, required _i11.MultiAddress beneficiary, required BigInt amount}) { - return _i10.Assets(_i12.Mint(id: id, beneficiary: beneficiary, amount: amount)); + _i10.Assets mint({ + required BigInt id, + required _i11.MultiAddress beneficiary, + required BigInt amount, + }) { + return _i10.Assets(_i12.Mint( + id: id, + beneficiary: beneficiary, + amount: amount, + )); } /// Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. @@ -390,8 +509,16 @@ class Txs { /// /// Weight: `O(1)` /// Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. - _i10.Assets burn({required BigInt id, required _i11.MultiAddress who, required BigInt amount}) { - return _i10.Assets(_i12.Burn(id: id, who: who, amount: amount)); + _i10.Assets burn({ + required BigInt id, + required _i11.MultiAddress who, + required BigInt amount, + }) { + return _i10.Assets(_i12.Burn( + id: id, + who: who, + amount: amount, + )); } /// Move some assets from the sender account to another. @@ -412,8 +539,16 @@ class Txs { /// Weight: `O(1)` /// Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of /// `target`. - _i10.Assets transfer({required BigInt id, required _i11.MultiAddress target, required BigInt amount}) { - return _i10.Assets(_i12.Transfer(id: id, target: target, amount: amount)); + _i10.Assets transfer({ + required BigInt id, + required _i11.MultiAddress target, + required BigInt amount, + }) { + return _i10.Assets(_i12.Transfer( + id: id, + target: target, + amount: amount, + )); } /// Move some assets from the sender account to another, keeping the sender account alive. @@ -434,8 +569,16 @@ class Txs { /// Weight: `O(1)` /// Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of /// `target`. - _i10.Assets transferKeepAlive({required BigInt id, required _i11.MultiAddress target, required BigInt amount}) { - return _i10.Assets(_i12.TransferKeepAlive(id: id, target: target, amount: amount)); + _i10.Assets transferKeepAlive({ + required BigInt id, + required _i11.MultiAddress target, + required BigInt amount, + }) { + return _i10.Assets(_i12.TransferKeepAlive( + id: id, + target: target, + amount: amount, + )); } /// Move some assets from one account to another. @@ -463,7 +606,12 @@ class Txs { required _i11.MultiAddress dest, required BigInt amount, }) { - return _i10.Assets(_i12.ForceTransfer(id: id, source: source, dest: dest, amount: amount)); + return _i10.Assets(_i12.ForceTransfer( + id: id, + source: source, + dest: dest, + amount: amount, + )); } /// Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` @@ -478,8 +626,14 @@ class Txs { /// Emits `Frozen`. /// /// Weight: `O(1)` - _i10.Assets freeze({required BigInt id, required _i11.MultiAddress who}) { - return _i10.Assets(_i12.Freeze(id: id, who: who)); + _i10.Assets freeze({ + required BigInt id, + required _i11.MultiAddress who, + }) { + return _i10.Assets(_i12.Freeze( + id: id, + who: who, + )); } /// Allow unprivileged transfers to and from an account again. @@ -492,8 +646,14 @@ class Txs { /// Emits `Thawed`. /// /// Weight: `O(1)` - _i10.Assets thaw({required BigInt id, required _i11.MultiAddress who}) { - return _i10.Assets(_i12.Thaw(id: id, who: who)); + _i10.Assets thaw({ + required BigInt id, + required _i11.MultiAddress who, + }) { + return _i10.Assets(_i12.Thaw( + id: id, + who: who, + )); } /// Disallow further unprivileged transfers for the asset class. @@ -532,8 +692,14 @@ class Txs { /// Emits `OwnerChanged`. /// /// Weight: `O(1)` - _i10.Assets transferOwnership({required BigInt id, required _i11.MultiAddress owner}) { - return _i10.Assets(_i12.TransferOwnership(id: id, owner: owner)); + _i10.Assets transferOwnership({ + required BigInt id, + required _i11.MultiAddress owner, + }) { + return _i10.Assets(_i12.TransferOwnership( + id: id, + owner: owner, + )); } /// Change the Issuer, Admin and Freezer of an asset. @@ -554,7 +720,12 @@ class Txs { required _i11.MultiAddress admin, required _i11.MultiAddress freezer, }) { - return _i10.Assets(_i12.SetTeam(id: id, issuer: issuer, admin: admin, freezer: freezer)); + return _i10.Assets(_i12.SetTeam( + id: id, + issuer: issuer, + admin: admin, + freezer: freezer, + )); } /// Set the metadata for an asset. @@ -579,7 +750,12 @@ class Txs { required List symbol, required int decimals, }) { - return _i10.Assets(_i12.SetMetadata(id: id, name: name, symbol: symbol, decimals: decimals)); + return _i10.Assets(_i12.SetMetadata( + id: id, + name: name, + symbol: symbol, + decimals: decimals, + )); } /// Clear the metadata for an asset. @@ -618,9 +794,13 @@ class Txs { required int decimals, required bool isFrozen, }) { - return _i10.Assets( - _i12.ForceSetMetadata(id: id, name: name, symbol: symbol, decimals: decimals, isFrozen: isFrozen), - ); + return _i10.Assets(_i12.ForceSetMetadata( + id: id, + name: name, + symbol: symbol, + decimals: decimals, + isFrozen: isFrozen, + )); } /// Clear the metadata for an asset. @@ -670,18 +850,16 @@ class Txs { required bool isSufficient, required bool isFrozen, }) { - return _i10.Assets( - _i12.ForceAssetStatus( - id: id, - owner: owner, - issuer: issuer, - admin: admin, - freezer: freezer, - minBalance: minBalance, - isSufficient: isSufficient, - isFrozen: isFrozen, - ), - ); + return _i10.Assets(_i12.ForceAssetStatus( + id: id, + owner: owner, + issuer: issuer, + admin: admin, + freezer: freezer, + minBalance: minBalance, + isSufficient: isSufficient, + isFrozen: isFrozen, + )); } /// Approve an amount of asset for transfer by a delegated third-party account. @@ -704,8 +882,16 @@ class Txs { /// Emits `ApprovedTransfer` on success. /// /// Weight: `O(1)` - _i10.Assets approveTransfer({required BigInt id, required _i11.MultiAddress delegate, required BigInt amount}) { - return _i10.Assets(_i12.ApproveTransfer(id: id, delegate: delegate, amount: amount)); + _i10.Assets approveTransfer({ + required BigInt id, + required _i11.MultiAddress delegate, + required BigInt amount, + }) { + return _i10.Assets(_i12.ApproveTransfer( + id: id, + delegate: delegate, + amount: amount, + )); } /// Cancel all of some asset approved for delegated transfer by a third-party account. @@ -721,8 +907,14 @@ class Txs { /// Emits `ApprovalCancelled` on success. /// /// Weight: `O(1)` - _i10.Assets cancelApproval({required BigInt id, required _i11.MultiAddress delegate}) { - return _i10.Assets(_i12.CancelApproval(id: id, delegate: delegate)); + _i10.Assets cancelApproval({ + required BigInt id, + required _i11.MultiAddress delegate, + }) { + return _i10.Assets(_i12.CancelApproval( + id: id, + delegate: delegate, + )); } /// Cancel all of some asset approved for delegated transfer by a third-party account. @@ -743,7 +935,11 @@ class Txs { required _i11.MultiAddress owner, required _i11.MultiAddress delegate, }) { - return _i10.Assets(_i12.ForceCancelApproval(id: id, owner: owner, delegate: delegate)); + return _i10.Assets(_i12.ForceCancelApproval( + id: id, + owner: owner, + delegate: delegate, + )); } /// Transfer some asset balance from a previously delegated account to some third-party @@ -770,7 +966,12 @@ class Txs { required _i11.MultiAddress destination, required BigInt amount, }) { - return _i10.Assets(_i12.TransferApproved(id: id, owner: owner, destination: destination, amount: amount)); + return _i10.Assets(_i12.TransferApproved( + id: id, + owner: owner, + destination: destination, + amount: amount, + )); } /// Create an asset account for non-provider assets. @@ -799,8 +1000,14 @@ class Txs { /// the asset account contains holds or freezes in place. /// /// Emits `Refunded` event when successful. - _i10.Assets refund({required BigInt id, required bool allowBurn}) { - return _i10.Assets(_i12.Refund(id: id, allowBurn: allowBurn)); + _i10.Assets refund({ + required BigInt id, + required bool allowBurn, + }) { + return _i10.Assets(_i12.Refund( + id: id, + allowBurn: allowBurn, + )); } /// Sets the minimum balance of an asset. @@ -815,8 +1022,14 @@ class Txs { /// - `min_balance`: The new value of `min_balance`. /// /// Emits `AssetMinBalanceChanged` event when successful. - _i10.Assets setMinBalance({required BigInt id, required BigInt minBalance}) { - return _i10.Assets(_i12.SetMinBalance(id: id, minBalance: minBalance)); + _i10.Assets setMinBalance({ + required BigInt id, + required BigInt minBalance, + }) { + return _i10.Assets(_i12.SetMinBalance( + id: id, + minBalance: minBalance, + )); } /// Create an asset account for `who`. @@ -830,8 +1043,14 @@ class Txs { /// - `who`: The account to be created. /// /// Emits `Touched` event when successful. - _i10.Assets touchOther({required BigInt id, required _i11.MultiAddress who}) { - return _i10.Assets(_i12.TouchOther(id: id, who: who)); + _i10.Assets touchOther({ + required BigInt id, + required _i11.MultiAddress who, + }) { + return _i10.Assets(_i12.TouchOther( + id: id, + who: who, + )); } /// Return the deposit (if any) of a target asset account. Useful if you are the depositor. @@ -847,8 +1066,14 @@ class Txs { /// the asset account contains holds or freezes in place. /// /// Emits `Refunded` event when successful. - _i10.Assets refundOther({required BigInt id, required _i11.MultiAddress who}) { - return _i10.Assets(_i12.RefundOther(id: id, who: who)); + _i10.Assets refundOther({ + required BigInt id, + required _i11.MultiAddress who, + }) { + return _i10.Assets(_i12.RefundOther( + id: id, + who: who, + )); } /// Disallow further unprivileged transfers of an asset `id` to and from an account `who`. @@ -861,8 +1086,14 @@ class Txs { /// Emits `Blocked`. /// /// Weight: `O(1)` - _i10.Assets block({required BigInt id, required _i11.MultiAddress who}) { - return _i10.Assets(_i12.Block(id: id, who: who)); + _i10.Assets block({ + required BigInt id, + required _i11.MultiAddress who, + }) { + return _i10.Assets(_i12.Block( + id: id, + who: who, + )); } /// Transfer the entire transferable balance from the caller asset account. @@ -881,8 +1112,16 @@ class Txs { /// of the funds the asset account has, causing the sender asset account to be killed /// (false), or transfer everything except at least the minimum balance, which will /// guarantee to keep the sender asset account alive (true). - _i10.Assets transferAll({required BigInt id, required _i11.MultiAddress dest, required bool keepAlive}) { - return _i10.Assets(_i12.TransferAll(id: id, dest: dest, keepAlive: keepAlive)); + _i10.Assets transferAll({ + required BigInt id, + required _i11.MultiAddress dest, + required bool keepAlive, + }) { + return _i10.Assets(_i12.TransferAll( + id: id, + dest: dest, + keepAlive: keepAlive, + )); } /// Sets the trusted reserve information of an asset. @@ -894,8 +1133,14 @@ class Txs { /// - `reserves`: The full list of trusted reserves information. /// /// Emits `AssetMinBalanceChanged` event when successful. - _i10.Assets setReserves({required BigInt id, required List reserves}) { - return _i10.Assets(_i12.SetReserves(id: id, reserves: reserves)); + _i10.Assets setReserves({ + required BigInt id, + required List reserves, + }) { + return _i10.Assets(_i12.SetReserves( + id: id, + reserves: reserves, + )); } } diff --git a/quantus_sdk/lib/generated/planck/pallets/assets_holder.dart b/quantus_sdk/lib/generated/planck/pallets/assets_holder.dart index 608ecb2d..918dddaa 100644 --- a/quantus_sdk/lib/generated/planck/pallets/assets_holder.dart +++ b/quantus_sdk/lib/generated/planck/pallets/assets_holder.dart @@ -15,26 +15,36 @@ class Queries { final _i1.StorageDoubleMap> _holds = const _i1.StorageDoubleMap>( - prefix: 'AssetsHolder', - storage: 'Holds', - valueCodec: _i4.SequenceCodec<_i3.IdAmount>(_i3.IdAmount.codec), - hasher1: _i1.StorageHasher.blake2b128Concat(_i4.U32Codec.codec), - hasher2: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'AssetsHolder', + storage: 'Holds', + valueCodec: _i4.SequenceCodec<_i3.IdAmount>(_i3.IdAmount.codec), + hasher1: _i1.StorageHasher.blake2b128Concat(_i4.U32Codec.codec), + hasher2: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); final _i1.StorageDoubleMap _balancesOnHold = const _i1.StorageDoubleMap( - prefix: 'AssetsHolder', - storage: 'BalancesOnHold', - valueCodec: _i4.U128Codec.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i4.U32Codec.codec), - hasher2: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'AssetsHolder', + storage: 'BalancesOnHold', + valueCodec: _i4.U128Codec.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i4.U32Codec.codec), + hasher2: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); /// A map that stores holds applied on an account for a given AssetId. - _i5.Future> holds(int key1, _i2.AccountId32 key2, {_i1.BlockHash? at}) async { - final hashedKey = _holds.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); + _i5.Future> holds( + int key1, + _i2.AccountId32 key2, { + _i1.BlockHash? at, + }) async { + final hashedKey = _holds.hashedKeyFor( + key1, + key2, + ); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _holds.decodeValue(bytes); } @@ -42,9 +52,19 @@ class Queries { } /// A map that stores the current total balance on hold for every account on a given AssetId. - _i5.Future balancesOnHold(int key1, _i2.AccountId32 key2, {_i1.BlockHash? at}) async { - final hashedKey = _balancesOnHold.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); + _i5.Future balancesOnHold( + int key1, + _i2.AccountId32 key2, { + _i1.BlockHash? at, + }) async { + final hashedKey = _balancesOnHold.hashedKeyFor( + key1, + key2, + ); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _balancesOnHold.decodeValue(bytes); } @@ -52,14 +72,26 @@ class Queries { } /// Returns the storage key for `holds`. - _i6.Uint8List holdsKey(int key1, _i2.AccountId32 key2) { - final hashedKey = _holds.hashedKeyFor(key1, key2); + _i6.Uint8List holdsKey( + int key1, + _i2.AccountId32 key2, + ) { + final hashedKey = _holds.hashedKeyFor( + key1, + key2, + ); return hashedKey; } /// Returns the storage key for `balancesOnHold`. - _i6.Uint8List balancesOnHoldKey(int key1, _i2.AccountId32 key2) { - final hashedKey = _balancesOnHold.hashedKeyFor(key1, key2); + _i6.Uint8List balancesOnHoldKey( + int key1, + _i2.AccountId32 key2, + ) { + final hashedKey = _balancesOnHold.hashedKeyFor( + key1, + key2, + ); return hashedKey; } diff --git a/quantus_sdk/lib/generated/planck/pallets/balances.dart b/quantus_sdk/lib/generated/planck/pallets/balances.dart index be3312a9..04e93051 100644 --- a/quantus_sdk/lib/generated/planck/pallets/balances.dart +++ b/quantus_sdk/lib/generated/planck/pallets/balances.dart @@ -21,13 +21,15 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue _totalIssuance = const _i1.StorageValue( + final _i1.StorageValue _totalIssuance = + const _i1.StorageValue( prefix: 'Balances', storage: 'TotalIssuance', valueCodec: _i2.U128Codec.codec, ); - final _i1.StorageValue _inactiveIssuance = const _i1.StorageValue( + final _i1.StorageValue _inactiveIssuance = + const _i1.StorageValue( prefix: 'Balances', storage: 'InactiveIssuance', valueCodec: _i2.U128Codec.codec, @@ -35,48 +37,51 @@ class Queries { final _i1.StorageMap<_i3.AccountId32, _i4.AccountData> _account = const _i1.StorageMap<_i3.AccountId32, _i4.AccountData>( - prefix: 'Balances', - storage: 'Account', - valueCodec: _i4.AccountData.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), - ); + prefix: 'Balances', + storage: 'Account', + valueCodec: _i4.AccountData.codec, + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); final _i1.StorageMap<_i3.AccountId32, List<_i5.BalanceLock>> _locks = const _i1.StorageMap<_i3.AccountId32, List<_i5.BalanceLock>>( - prefix: 'Balances', - storage: 'Locks', - valueCodec: _i2.SequenceCodec<_i5.BalanceLock>(_i5.BalanceLock.codec), - hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), - ); + prefix: 'Balances', + storage: 'Locks', + valueCodec: _i2.SequenceCodec<_i5.BalanceLock>(_i5.BalanceLock.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); final _i1.StorageMap<_i3.AccountId32, List<_i6.ReserveData>> _reserves = const _i1.StorageMap<_i3.AccountId32, List<_i6.ReserveData>>( - prefix: 'Balances', - storage: 'Reserves', - valueCodec: _i2.SequenceCodec<_i6.ReserveData>(_i6.ReserveData.codec), - hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), - ); + prefix: 'Balances', + storage: 'Reserves', + valueCodec: _i2.SequenceCodec<_i6.ReserveData>(_i6.ReserveData.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); final _i1.StorageMap<_i3.AccountId32, List<_i7.IdAmount>> _holds = const _i1.StorageMap<_i3.AccountId32, List<_i7.IdAmount>>( - prefix: 'Balances', - storage: 'Holds', - valueCodec: _i2.SequenceCodec<_i7.IdAmount>(_i7.IdAmount.codec), - hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), - ); + prefix: 'Balances', + storage: 'Holds', + valueCodec: _i2.SequenceCodec<_i7.IdAmount>(_i7.IdAmount.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); final _i1.StorageMap<_i3.AccountId32, List<_i8.IdAmount>> _freezes = const _i1.StorageMap<_i3.AccountId32, List<_i8.IdAmount>>( - prefix: 'Balances', - storage: 'Freezes', - valueCodec: _i2.SequenceCodec<_i8.IdAmount>(_i8.IdAmount.codec), - hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), - ); + prefix: 'Balances', + storage: 'Freezes', + valueCodec: _i2.SequenceCodec<_i8.IdAmount>(_i8.IdAmount.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); /// The total units issued in the system. _i9.Future totalIssuance({_i1.BlockHash? at}) async { final hashedKey = _totalIssuance.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _totalIssuance.decodeValue(bytes); } @@ -86,7 +91,10 @@ class Queries { /// The total units of outstanding deactivated balance in the system. _i9.Future inactiveIssuance({_i1.BlockHash? at}) async { final hashedKey = _inactiveIssuance.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _inactiveIssuance.decodeValue(bytes); } @@ -117,9 +125,15 @@ class Queries { /// `frame_system` data alongside the account data contrary to storing account balances in the /// `Balances` pallet, which uses a `StorageMap` to store balances data only. /// NOTE: This is only used in the case that this pallet is used to store balances. - _i9.Future<_i4.AccountData> account(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i9.Future<_i4.AccountData> account( + _i3.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _account.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _account.decodeValue(bytes); } @@ -127,7 +141,10 @@ class Queries { free: BigInt.zero, reserved: BigInt.zero, frozen: BigInt.zero, - flags: BigInt.parse('170141183460469231731687303715884105728', radix: 10), + flags: BigInt.parse( + '170141183460469231731687303715884105728', + radix: 10, + ), ); /* Default */ } @@ -135,9 +152,15 @@ class Queries { /// NOTE: Should only be accessed when setting, changing and freeing a lock. /// /// Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` - _i9.Future> locks(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i9.Future> locks( + _i3.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _locks.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _locks.decodeValue(bytes); } @@ -147,9 +170,15 @@ class Queries { /// Named reserves on some account balances. /// /// Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` - _i9.Future> reserves(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i9.Future> reserves( + _i3.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _reserves.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _reserves.decodeValue(bytes); } @@ -157,9 +186,15 @@ class Queries { } /// Holds on account balances. - _i9.Future> holds(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i9.Future> holds( + _i3.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _holds.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _holds.decodeValue(bytes); } @@ -167,9 +202,15 @@ class Queries { } /// Freeze locks on account balances. - _i9.Future> freezes(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i9.Future> freezes( + _i3.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _freezes.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _freezes.decodeValue(bytes); } @@ -200,68 +241,108 @@ class Queries { /// `frame_system` data alongside the account data contrary to storing account balances in the /// `Balances` pallet, which uses a `StorageMap` to store balances data only. /// NOTE: This is only used in the case that this pallet is used to store balances. - _i9.Future> multiAccount(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + _i9.Future> multiAccount( + List<_i3.AccountId32> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _account.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _account.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _account.decodeValue(v.key)) + .toList(); } return (keys - .map( - (key) => _i4.AccountData( - free: BigInt.zero, - reserved: BigInt.zero, - frozen: BigInt.zero, - flags: BigInt.parse('170141183460469231731687303715884105728', radix: 10), + .map((key) => _i4.AccountData( + free: BigInt.zero, + reserved: BigInt.zero, + frozen: BigInt.zero, + flags: BigInt.parse( + '170141183460469231731687303715884105728', + radix: 10, ), - ) - .toList() - as List<_i4.AccountData>); /* Default */ + )) + .toList() as List<_i4.AccountData>); /* Default */ } /// Any liquidity locks on some account balances. /// NOTE: Should only be accessed when setting, changing and freeing a lock. /// /// Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` - _i9.Future>> multiLocks(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + _i9.Future>> multiLocks( + List<_i3.AccountId32> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _locks.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { return bytes.first.changes.map((v) => _locks.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() as List>); /* Default */ + return (keys.map((key) => []).toList() + as List>); /* Default */ } /// Named reserves on some account balances. /// /// Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` - _i9.Future>> multiReserves(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + _i9.Future>> multiReserves( + List<_i3.AccountId32> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _reserves.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _reserves.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _reserves.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => []).toList() as List>); /* Default */ + return (keys.map((key) => []).toList() + as List>); /* Default */ } /// Holds on account balances. - _i9.Future>> multiHolds(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + _i9.Future>> multiHolds( + List<_i3.AccountId32> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _holds.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { return bytes.first.changes.map((v) => _holds.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() as List>); /* Default */ + return (keys.map((key) => []).toList() + as List>); /* Default */ } /// Freeze locks on account balances. - _i9.Future>> multiFreezes(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + _i9.Future>> multiFreezes( + List<_i3.AccountId32> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _freezes.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _freezes.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _freezes.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => []).toList() as List>); /* Default */ + return (keys.map((key) => []).toList() + as List>); /* Default */ } /// Returns the storage key for `totalIssuance`. @@ -347,8 +428,14 @@ class Txs { /// of the transfer, the account will be reaped. /// /// The dispatch origin for this call must be `Signed` by the transactor. - _i11.Balances transferAllowDeath({required _i12.MultiAddress dest, required BigInt value}) { - return _i11.Balances(_i13.TransferAllowDeath(dest: dest, value: value)); + _i11.Balances transferAllowDeath({ + required _i12.MultiAddress dest, + required BigInt value, + }) { + return _i11.Balances(_i13.TransferAllowDeath( + dest: dest, + value: value, + )); } /// Exactly as `transfer_allow_death`, except the origin must be root and the source account @@ -358,7 +445,11 @@ class Txs { required _i12.MultiAddress dest, required BigInt value, }) { - return _i11.Balances(_i13.ForceTransfer(source: source, dest: dest, value: value)); + return _i11.Balances(_i13.ForceTransfer( + source: source, + dest: dest, + value: value, + )); } /// Same as the [`transfer_allow_death`] call, but with a check that the transfer will not @@ -367,8 +458,14 @@ class Txs { /// 99% of the time you want [`transfer_allow_death`] instead. /// /// [`transfer_allow_death`]: struct.Pallet.html#method.transfer - _i11.Balances transferKeepAlive({required _i12.MultiAddress dest, required BigInt value}) { - return _i11.Balances(_i13.TransferKeepAlive(dest: dest, value: value)); + _i11.Balances transferKeepAlive({ + required _i12.MultiAddress dest, + required BigInt value, + }) { + return _i11.Balances(_i13.TransferKeepAlive( + dest: dest, + value: value, + )); } /// Transfer the entire transferable balance from the caller account. @@ -386,15 +483,27 @@ class Txs { /// of the funds the account has, causing the sender account to be killed (false), or /// transfer everything except at least the existential deposit, which will guarantee to /// keep the sender account alive (true). - _i11.Balances transferAll({required _i12.MultiAddress dest, required bool keepAlive}) { - return _i11.Balances(_i13.TransferAll(dest: dest, keepAlive: keepAlive)); + _i11.Balances transferAll({ + required _i12.MultiAddress dest, + required bool keepAlive, + }) { + return _i11.Balances(_i13.TransferAll( + dest: dest, + keepAlive: keepAlive, + )); } /// Unreserve some balance from a user by force. /// /// Can only be called by ROOT. - _i11.Balances forceUnreserve({required _i12.MultiAddress who, required BigInt amount}) { - return _i11.Balances(_i13.ForceUnreserve(who: who, amount: amount)); + _i11.Balances forceUnreserve({ + required _i12.MultiAddress who, + required BigInt amount, + }) { + return _i11.Balances(_i13.ForceUnreserve( + who: who, + amount: amount, + )); } /// Upgrade a specified account. @@ -412,8 +521,14 @@ class Txs { /// Set the regular balance of a given account. /// /// The dispatch origin for this call is `root`. - _i11.Balances forceSetBalance({required _i12.MultiAddress who, required BigInt newFree}) { - return _i11.Balances(_i13.ForceSetBalance(who: who, newFree: newFree)); + _i11.Balances forceSetBalance({ + required _i12.MultiAddress who, + required BigInt newFree, + }) { + return _i11.Balances(_i13.ForceSetBalance( + who: who, + newFree: newFree, + )); } /// Adjust the total issuance in a saturating way. @@ -421,8 +536,14 @@ class Txs { /// Can only be called by root and always needs a positive `delta`. /// /// # Example - _i11.Balances forceAdjustTotalIssuance({required _i14.AdjustmentDirection direction, required BigInt delta}) { - return _i11.Balances(_i13.ForceAdjustTotalIssuance(direction: direction, delta: delta)); + _i11.Balances forceAdjustTotalIssuance({ + required _i14.AdjustmentDirection direction, + required BigInt delta, + }) { + return _i11.Balances(_i13.ForceAdjustTotalIssuance( + direction: direction, + delta: delta, + )); } /// Burn the specified liquid free balance from the origin account. @@ -432,8 +553,14 @@ class Txs { /// /// Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, /// this `burn` operation will reduce total issuance by the amount _burned_. - _i11.Balances burn({required BigInt value, required bool keepAlive}) { - return _i11.Balances(_i13.Burn(value: value, keepAlive: keepAlive)); + _i11.Balances burn({ + required BigInt value, + required bool keepAlive, + }) { + return _i11.Balances(_i13.Burn( + value: value, + keepAlive: keepAlive, + )); } } diff --git a/quantus_sdk/lib/generated/planck/pallets/conviction_voting.dart b/quantus_sdk/lib/generated/planck/pallets/conviction_voting.dart index 5b01a8c0..866e87c4 100644 --- a/quantus_sdk/lib/generated/planck/pallets/conviction_voting.dart +++ b/quantus_sdk/lib/generated/planck/pallets/conviction_voting.dart @@ -24,46 +24,69 @@ class Queries { final _i1.StorageDoubleMap<_i2.AccountId32, int, _i3.Voting> _votingFor = const _i1.StorageDoubleMap<_i2.AccountId32, int, _i3.Voting>( - prefix: 'ConvictionVoting', - storage: 'VotingFor', - valueCodec: _i3.Voting.codec, - hasher1: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), - hasher2: _i1.StorageHasher.twoxx64Concat(_i4.U16Codec.codec), - ); + prefix: 'ConvictionVoting', + storage: 'VotingFor', + valueCodec: _i3.Voting.codec, + hasher1: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), + hasher2: _i1.StorageHasher.twoxx64Concat(_i4.U16Codec.codec), + ); - final _i1.StorageMap<_i2.AccountId32, List<_i5.Tuple2>> _classLocksFor = + final _i1.StorageMap<_i2.AccountId32, List<_i5.Tuple2>> + _classLocksFor = const _i1.StorageMap<_i2.AccountId32, List<_i5.Tuple2>>( - prefix: 'ConvictionVoting', - storage: 'ClassLocksFor', - valueCodec: _i4.SequenceCodec<_i5.Tuple2>( - _i5.Tuple2Codec(_i4.U16Codec.codec, _i4.U128Codec.codec), - ), - hasher: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), - ); + prefix: 'ConvictionVoting', + storage: 'ClassLocksFor', + valueCodec: + _i4.SequenceCodec<_i5.Tuple2>(_i5.Tuple2Codec( + _i4.U16Codec.codec, + _i4.U128Codec.codec, + )), + hasher: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), + ); /// All voting for a particular voter in a particular voting class. We store the balance for the /// number of votes that we have recorded. - _i6.Future<_i3.Voting> votingFor(_i2.AccountId32 key1, int key2, {_i1.BlockHash? at}) async { - final hashedKey = _votingFor.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); + _i6.Future<_i3.Voting> votingFor( + _i2.AccountId32 key1, + int key2, { + _i1.BlockHash? at, + }) async { + final hashedKey = _votingFor.hashedKeyFor( + key1, + key2, + ); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _votingFor.decodeValue(bytes); } - return _i3.Casting( - _i7.Casting( - votes: [], - delegations: _i8.Delegations(votes: BigInt.zero, capital: BigInt.zero), - prior: _i9.PriorLock(0, BigInt.zero), + return _i3.Casting(_i7.Casting( + votes: [], + delegations: _i8.Delegations( + votes: BigInt.zero, + capital: BigInt.zero, + ), + prior: _i9.PriorLock( + 0, + BigInt.zero, ), - ); /* Default */ + )); /* Default */ } /// The voting classes which have a non-zero lock requirement and the lock amounts which they /// require. The actual amount locked on behalf of this pallet should always be the maximum of /// this list. - _i6.Future>> classLocksFor(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { + _i6.Future>> classLocksFor( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _classLocksFor.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _classLocksFor.decodeValue(bytes); } @@ -77,17 +100,30 @@ class Queries { List<_i2.AccountId32> keys, { _i1.BlockHash? at, }) async { - final hashedKeys = keys.map((key) => _classLocksFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final hashedKeys = + keys.map((key) => _classLocksFor.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _classLocksFor.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _classLocksFor.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => []).toList() as List>>); /* Default */ + return (keys.map((key) => []).toList() + as List>>); /* Default */ } /// Returns the storage key for `votingFor`. - _i10.Uint8List votingForKey(_i2.AccountId32 key1, int key2) { - final hashedKey = _votingFor.hashedKeyFor(key1, key2); + _i10.Uint8List votingForKey( + _i2.AccountId32 key1, + int key2, + ) { + final hashedKey = _votingFor.hashedKeyFor( + key1, + key2, + ); return hashedKey; } @@ -122,8 +158,14 @@ class Txs { /// - `vote`: The vote configuration. /// /// Weight: `O(R)` where R is the number of polls the voter has voted on. - _i11.ConvictionVoting vote({required BigInt pollIndex, required _i12.AccountVote vote}) { - return _i11.ConvictionVoting(_i13.Vote(pollIndex: pollIndex, vote: vote)); + _i11.ConvictionVoting vote({ + required BigInt pollIndex, + required _i12.AccountVote vote, + }) { + return _i11.ConvictionVoting(_i13.Vote( + pollIndex: pollIndex, + vote: vote, + )); } /// Delegate the voting power (with some given conviction) of the sending account for a @@ -155,7 +197,12 @@ class Txs { required _i15.Conviction conviction, required BigInt balance, }) { - return _i11.ConvictionVoting(_i13.Delegate(class_: class_, to: to, conviction: conviction, balance: balance)); + return _i11.ConvictionVoting(_i13.Delegate( + class_: class_, + to: to, + conviction: conviction, + balance: balance, + )); } /// Undelegate the voting power of the sending account for a particular class of polls. @@ -185,8 +232,14 @@ class Txs { /// - `target`: The account to remove the lock on. /// /// Weight: `O(R)` with R number of vote of target. - _i11.ConvictionVoting unlock({required int class_, required _i14.MultiAddress target}) { - return _i11.ConvictionVoting(_i13.Unlock(class_: class_, target: target)); + _i11.ConvictionVoting unlock({ + required int class_, + required _i14.MultiAddress target, + }) { + return _i11.ConvictionVoting(_i13.Unlock( + class_: class_, + target: target, + )); } /// Remove a vote for a poll. @@ -218,8 +271,14 @@ class Txs { /// /// Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. /// Weight is calculated for the maximum number of vote. - _i11.ConvictionVoting removeVote({int? class_, required int index}) { - return _i11.ConvictionVoting(_i13.RemoveVote(class_: class_, index: index)); + _i11.ConvictionVoting removeVote({ + int? class_, + required int index, + }) { + return _i11.ConvictionVoting(_i13.RemoveVote( + class_: class_, + index: index, + )); } /// Remove a vote for a poll. @@ -238,8 +297,16 @@ class Txs { /// /// Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. /// Weight is calculated for the maximum number of vote. - _i11.ConvictionVoting removeOtherVote({required _i14.MultiAddress target, required int class_, required int index}) { - return _i11.ConvictionVoting(_i13.RemoveOtherVote(target: target, class_: class_, index: index)); + _i11.ConvictionVoting removeOtherVote({ + required _i14.MultiAddress target, + required int class_, + required int index, + }) { + return _i11.ConvictionVoting(_i13.RemoveOtherVote( + target: target, + class_: class_, + index: index, + )); } } diff --git a/quantus_sdk/lib/generated/planck/pallets/mining_rewards.dart b/quantus_sdk/lib/generated/planck/pallets/mining_rewards.dart index ce7825c3..a036087a 100644 --- a/quantus_sdk/lib/generated/planck/pallets/mining_rewards.dart +++ b/quantus_sdk/lib/generated/planck/pallets/mining_rewards.dart @@ -12,7 +12,8 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue _collectedFees = const _i1.StorageValue( + final _i1.StorageValue _collectedFees = + const _i1.StorageValue( prefix: 'MiningRewards', storage: 'CollectedFees', valueCodec: _i2.U128Codec.codec, @@ -20,7 +21,10 @@ class Queries { _i3.Future collectedFees({_i1.BlockHash? at}) async { final hashedKey = _collectedFees.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _collectedFees.decodeValue(bytes); } @@ -38,7 +42,10 @@ class Constants { Constants(); /// The maximum total supply of tokens - final BigInt maxSupply = BigInt.parse('21000000000000000000', radix: 10); + final BigInt maxSupply = BigInt.parse( + '21000000000000000000', + radix: 10, + ); /// The divisor used to calculate block rewards from remaining supply final BigInt emissionDivisor = BigInt.from(26280000); diff --git a/quantus_sdk/lib/generated/planck/pallets/multisig.dart b/quantus_sdk/lib/generated/planck/pallets/multisig.dart index da2e8685..d0d2d54a 100644 --- a/quantus_sdk/lib/generated/planck/pallets/multisig.dart +++ b/quantus_sdk/lib/generated/planck/pallets/multisig.dart @@ -12,6 +12,7 @@ import '../types/pallet_multisig/proposal_data.dart' as _i4; import '../types/quantus_runtime/runtime_call.dart' as _i8; import '../types/sp_arithmetic/per_things/permill.dart' as _i10; import '../types/sp_core/crypto/account_id32.dart' as _i2; +import '../types/sp_weights/weight_v2/weight.dart' as _i12; class Queries { const Queries(this.__api); @@ -20,33 +21,32 @@ class Queries { final _i1.StorageMap<_i2.AccountId32, _i3.MultisigData> _multisigs = const _i1.StorageMap<_i2.AccountId32, _i3.MultisigData>( - prefix: 'Multisig', - storage: 'Multisigs', - valueCodec: _i3.MultisigData.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); - - final _i1.StorageDoubleMap<_i2.AccountId32, int, _i4.ProposalData> _proposals = + prefix: 'Multisig', + storage: 'Multisigs', + valueCodec: _i3.MultisigData.codec, + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); + + final _i1.StorageDoubleMap<_i2.AccountId32, int, _i4.ProposalData> + _proposals = const _i1.StorageDoubleMap<_i2.AccountId32, int, _i4.ProposalData>( - prefix: 'Multisig', - storage: 'Proposals', - valueCodec: _i4.ProposalData.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - hasher2: _i1.StorageHasher.twoxx64Concat(_i5.U32Codec.codec), - ); - - final _i1.StorageMap<_i2.AccountId32, List<_i2.AccountId32>> _dissolveApprovals = - const _i1.StorageMap<_i2.AccountId32, List<_i2.AccountId32>>( - prefix: 'Multisig', - storage: 'DissolveApprovals', - valueCodec: _i5.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'Multisig', + storage: 'Proposals', + valueCodec: _i4.ProposalData.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + hasher2: _i1.StorageHasher.twoxx64Concat(_i5.U32Codec.codec), + ); /// Multisigs stored by their deterministic address - _i6.Future<_i3.MultisigData?> multisigs(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { + _i6.Future<_i3.MultisigData?> multisigs( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _multisigs.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _multisigs.decodeValue(bytes); } @@ -54,46 +54,39 @@ class Queries { } /// Proposals indexed by (multisig_address, proposal_nonce) - _i6.Future<_i4.ProposalData?> proposals(_i2.AccountId32 key1, int key2, {_i1.BlockHash? at}) async { - final hashedKey = _proposals.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); + _i6.Future<_i4.ProposalData?> proposals( + _i2.AccountId32 key1, + int key2, { + _i1.BlockHash? at, + }) async { + final hashedKey = _proposals.hashedKeyFor( + key1, + key2, + ); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _proposals.decodeValue(bytes); } return null; /* Nullable */ } - /// Dissolve approvals: tracks which signers approved dissolving the multisig - /// Maps multisig_address -> Vec - _i6.Future?> dissolveApprovals(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _dissolveApprovals.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _dissolveApprovals.decodeValue(bytes); - } - return null; /* Nullable */ - } - /// Multisigs stored by their deterministic address - _i6.Future> multiMultisigs(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _multisigs.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _multisigs.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Dissolve approvals: tracks which signers approved dissolving the multisig - /// Maps multisig_address -> Vec - _i6.Future?>> multiDissolveApprovals( + _i6.Future> multiMultisigs( List<_i2.AccountId32> keys, { _i1.BlockHash? at, }) async { - final hashedKeys = keys.map((key) => _dissolveApprovals.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final hashedKeys = keys.map((key) => _multisigs.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _dissolveApprovals.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _multisigs.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -105,14 +98,14 @@ class Queries { } /// Returns the storage key for `proposals`. - _i7.Uint8List proposalsKey(_i2.AccountId32 key1, int key2) { - final hashedKey = _proposals.hashedKeyFor(key1, key2); - return hashedKey; - } - - /// Returns the storage key for `dissolveApprovals`. - _i7.Uint8List dissolveApprovalsKey(_i2.AccountId32 key1) { - final hashedKey = _dissolveApprovals.hashedKeyFor(key1); + _i7.Uint8List proposalsKey( + _i2.AccountId32 key1, + int key2, + ) { + final hashedKey = _proposals.hashedKeyFor( + key1, + key2, + ); return hashedKey; } @@ -127,12 +120,6 @@ class Queries { final hashedKey = _proposals.mapPrefix(key1); return hashedKey; } - - /// Returns the storage map key prefix for `dissolveApprovals`. - _i7.Uint8List dissolveApprovalsMapPrefix() { - final hashedKey = _dissolveApprovals.mapPrefix(); - return hashedKey; - } } class Txs { @@ -152,9 +139,16 @@ class Txs { /// /// Economic costs: /// - MultisigFee: burned immediately (spam prevention) - /// - MultisigDeposit: reserved until dissolution, then returned to creator (storage bond) - _i8.Multisig createMultisig({required List<_i2.AccountId32> signers, required int threshold, required BigInt nonce}) { - return _i8.Multisig(_i9.CreateMultisig(signers: signers, threshold: threshold, nonce: nonce)); + _i8.Multisig createMultisig({ + required List<_i2.AccountId32> signers, + required int threshold, + required BigInt nonce, + }) { + return _i8.Multisig(_i9.CreateMultisig( + signers: signers, + threshold: threshold, + nonce: nonce, + )); } /// Propose a transaction to be executed by the multisig @@ -173,8 +167,16 @@ class Txs { /// /// **Weight:** Charged upfront for worst-case (high-security path with decode). /// Refunded to actual cost on success based on whether HS path was taken. - _i8.Multisig propose({required _i2.AccountId32 multisigAddress, required List call, required int expiry}) { - return _i8.Multisig(_i9.Propose(multisigAddress: multisigAddress, call: call, expiry: expiry)); + _i8.Multisig propose({ + required _i2.AccountId32 multisigAddress, + required List call, + required int expiry, + }) { + return _i8.Multisig(_i9.Propose( + multisigAddress: multisigAddress, + call: call, + expiry: expiry, + )); } /// Approve a proposed transaction @@ -187,8 +189,14 @@ class Txs { /// - `proposal_id`: ID (nonce) of the proposal to approve /// /// Weight: Charges for MAX call size, refunds based on actual - _i8.Multisig approve({required _i2.AccountId32 multisigAddress, required int proposalId}) { - return _i8.Multisig(_i9.Approve(multisigAddress: multisigAddress, proposalId: proposalId)); + _i8.Multisig approve({ + required _i2.AccountId32 multisigAddress, + required int proposalId, + }) { + return _i8.Multisig(_i9.Approve( + multisigAddress: multisigAddress, + proposalId: proposalId, + )); } /// Cancel a proposed transaction (only by proposer) @@ -196,8 +204,14 @@ class Txs { /// Parameters: /// - `multisig_address`: The multisig account /// - `proposal_id`: ID (nonce) of the proposal to cancel - _i8.Multisig cancel({required _i2.AccountId32 multisigAddress, required int proposalId}) { - return _i8.Multisig(_i9.Cancel(multisigAddress: multisigAddress, proposalId: proposalId)); + _i8.Multisig cancel({ + required _i2.AccountId32 multisigAddress, + required int proposalId, + }) { + return _i8.Multisig(_i9.Cancel( + multisigAddress: multisigAddress, + proposalId: proposalId, + )); } /// Remove expired proposals and return deposits to proposers @@ -211,8 +225,14 @@ class Txs { /// lockup and enables multisig dissolution. /// /// The deposit is always returned to the original proposer, not the caller. - _i8.Multisig removeExpired({required _i2.AccountId32 multisigAddress, required int proposalId}) { - return _i8.Multisig(_i9.RemoveExpired(multisigAddress: multisigAddress, proposalId: proposalId)); + _i8.Multisig removeExpired({ + required _i2.AccountId32 multisigAddress, + required int proposalId, + }) { + return _i8.Multisig(_i9.RemoveExpired( + multisigAddress: multisigAddress, + proposalId: proposalId, + )); } /// Claim all deposits from expired proposals @@ -242,25 +262,18 @@ class Txs { /// Parameters: /// - `multisig_address`: The multisig account /// - `proposal_id`: ID (nonce) of the proposal to execute - _i8.Multisig execute({required _i2.AccountId32 multisigAddress, required int proposalId}) { - return _i8.Multisig(_i9.Execute(multisigAddress: multisigAddress, proposalId: proposalId)); - } - - /// Approve dissolving a multisig account - /// - /// Signers call this to approve dissolving the multisig. - /// When threshold is reached, the multisig is automatically dissolved. /// - /// Requirements: - /// - Caller must be a signer - /// - No proposals exist (active, executed, or cancelled) - must be fully cleaned up - /// - Multisig account balance must be zero - /// - /// When threshold is reached: - /// - Deposit is returned to creator - /// - Multisig storage is removed - _i8.Multisig approveDissolve({required _i2.AccountId32 multisigAddress}) { - return _i8.Multisig(_i9.ApproveDissolve(multisigAddress: multisigAddress)); + /// Note: The weight charged includes both multisig bookkeeping and MaxInnerCallWeight. + /// Actual weight is refunded based on the inner call's post-dispatch info. + /// The inner call's weight is validated against MaxInnerCallWeight at propose time. + _i8.Multisig execute({ + required _i2.AccountId32 multisigAddress, + required int proposalId, + }) { + return _i8.Multisig(_i9.Execute( + multisigAddress: multisigAddress, + proposalId: proposalId, + )); } } @@ -270,19 +283,17 @@ class Constants { /// Maximum number of signers allowed in a multisig final int maxSigners = 100; - /// Maximum total number of proposals in storage per multisig (Active + Executed + - /// Cancelled) This prevents unbounded storage growth and incentivizes cleanup + /// Maximum number of proposals in storage per multisig. + /// Only Active and Approved proposals are stored; executed and cancelled + /// proposals are removed immediately. This limit prevents unbounded storage growth. final int maxTotalProposalsInStorage = 200; /// Maximum size of an encoded call final int maxCallSize = 10240; - /// Fee charged for creating a multisig (non-refundable, burned) - final BigInt multisigFee = BigInt.from(100000000000); - - /// Deposit reserved for creating a multisig (returned when dissolved). - /// Keeps the state clean by incentivizing removal of unused multisigs. - final BigInt multisigDeposit = BigInt.from(500000000000); + /// Fee charged for creating a multisig (non-refundable, burned). + /// This prevents spam creation of multisig accounts. + final BigInt multisigFee = BigInt.from(600000000000); /// Deposit required per proposal (returned on execute or cancel) final BigInt proposalDeposit = BigInt.from(1000000000000); @@ -297,7 +308,16 @@ class Constants { final _i10.Permill signerStepFactor = 10000; /// Pallet ID for generating multisig addresses - final _i11.PalletId palletId = const [112, 121, 47, 109, 108, 116, 115, 103]; + final _i11.PalletId palletId = const [ + 112, + 121, + 47, + 109, + 108, + 116, + 115, + 103, + ]; /// Maximum duration (in blocks) that a proposal can be set to expire in the future. /// This prevents proposals from being created with extremely far expiry dates @@ -306,4 +326,17 @@ class Constants { /// Example: If set to 100_000 blocks (~2 weeks at 12s blocks), /// a proposal created at block 1000 cannot have expiry > 101_000. final int maxExpiryDuration = 100800; + + /// Maximum weight allowed for inner calls executed through the multisig. + /// + /// This bound ensures that the `execute` extrinsic can safely reserve weight + /// for the inner call at pre-dispatch time. Proposals with calls exceeding + /// this weight limit are rejected at propose time. + /// + /// The execute extrinsic's weight annotation is: bookkeeping + MaxInnerCallWeight. + /// This guarantees the block weight is never exceeded by arbitrary inner calls. + final _i12.Weight maxInnerCallWeight = _i12.Weight( + refTime: BigInt.from(1000000000000), + proofSize: BigInt.from(2621440), + ); } diff --git a/quantus_sdk/lib/generated/planck/pallets/preimage.dart b/quantus_sdk/lib/generated/planck/pallets/preimage.dart index d0a8f646..0cffd534 100644 --- a/quantus_sdk/lib/generated/planck/pallets/preimage.dart +++ b/quantus_sdk/lib/generated/planck/pallets/preimage.dart @@ -19,32 +19,41 @@ class Queries { final _i1.StorageMap<_i2.H256, _i3.OldRequestStatus> _statusFor = const _i1.StorageMap<_i2.H256, _i3.OldRequestStatus>( - prefix: 'Preimage', - storage: 'StatusFor', - valueCodec: _i3.OldRequestStatus.codec, - hasher: _i1.StorageHasher.identity(_i2.H256Codec()), - ); + prefix: 'Preimage', + storage: 'StatusFor', + valueCodec: _i3.OldRequestStatus.codec, + hasher: _i1.StorageHasher.identity(_i2.H256Codec()), + ); final _i1.StorageMap<_i2.H256, _i4.RequestStatus> _requestStatusFor = const _i1.StorageMap<_i2.H256, _i4.RequestStatus>( - prefix: 'Preimage', - storage: 'RequestStatusFor', - valueCodec: _i4.RequestStatus.codec, - hasher: _i1.StorageHasher.identity(_i2.H256Codec()), - ); + prefix: 'Preimage', + storage: 'RequestStatusFor', + valueCodec: _i4.RequestStatus.codec, + hasher: _i1.StorageHasher.identity(_i2.H256Codec()), + ); final _i1.StorageMap<_i5.Tuple2<_i2.H256, int>, List> _preimageFor = const _i1.StorageMap<_i5.Tuple2<_i2.H256, int>, List>( - prefix: 'Preimage', - storage: 'PreimageFor', - valueCodec: _i6.U8SequenceCodec.codec, - hasher: _i1.StorageHasher.identity(_i5.Tuple2Codec<_i2.H256, int>(_i2.H256Codec(), _i6.U32Codec.codec)), - ); + prefix: 'Preimage', + storage: 'PreimageFor', + valueCodec: _i6.U8SequenceCodec.codec, + hasher: _i1.StorageHasher.identity(_i5.Tuple2Codec<_i2.H256, int>( + _i2.H256Codec(), + _i6.U32Codec.codec, + )), + ); /// The request status of a given hash. - _i7.Future<_i3.OldRequestStatus?> statusFor(_i2.H256 key1, {_i1.BlockHash? at}) async { + _i7.Future<_i3.OldRequestStatus?> statusFor( + _i2.H256 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _statusFor.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _statusFor.decodeValue(bytes); } @@ -52,18 +61,30 @@ class Queries { } /// The request status of a given hash. - _i7.Future<_i4.RequestStatus?> requestStatusFor(_i2.H256 key1, {_i1.BlockHash? at}) async { + _i7.Future<_i4.RequestStatus?> requestStatusFor( + _i2.H256 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _requestStatusFor.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _requestStatusFor.decodeValue(bytes); } return null; /* Nullable */ } - _i7.Future?> preimageFor(_i5.Tuple2<_i2.H256, int> key1, {_i1.BlockHash? at}) async { + _i7.Future?> preimageFor( + _i5.Tuple2<_i2.H256, int> key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _preimageFor.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _preimageFor.decodeValue(bytes); } @@ -71,30 +92,56 @@ class Queries { } /// The request status of a given hash. - _i7.Future> multiStatusFor(List<_i2.H256> keys, {_i1.BlockHash? at}) async { + _i7.Future> multiStatusFor( + List<_i2.H256> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _statusFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _statusFor.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _statusFor.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } /// The request status of a given hash. - _i7.Future> multiRequestStatusFor(List<_i2.H256> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _requestStatusFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i7.Future> multiRequestStatusFor( + List<_i2.H256> keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _requestStatusFor.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _requestStatusFor.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _requestStatusFor.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } - _i7.Future?>> multiPreimageFor(List<_i5.Tuple2<_i2.H256, int>> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _preimageFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i7.Future?>> multiPreimageFor( + List<_i5.Tuple2<_i2.H256, int>> keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _preimageFor.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _preimageFor.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _preimageFor.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } diff --git a/quantus_sdk/lib/generated/planck/pallets/q_po_w.dart b/quantus_sdk/lib/generated/planck/pallets/q_po_w.dart index ebea4f61..5a8be777 100644 --- a/quantus_sdk/lib/generated/planck/pallets/q_po_w.dart +++ b/quantus_sdk/lib/generated/planck/pallets/q_po_w.dart @@ -6,40 +6,39 @@ import 'package:polkadart/polkadart.dart' as _i1; import 'package:polkadart/scale_codec.dart' as _i2; import '../types/primitive_types/u512.dart' as _i3; -import '../types/sp_arithmetic/fixed_point/fixed_u128.dart' as _i6; class Queries { const Queries(this.__api); final _i1.StateApi __api; - final _i1.StorageValue _lastBlockTime = const _i1.StorageValue( + final _i1.StorageValue _lastBlockTime = + const _i1.StorageValue( prefix: 'QPoW', storage: 'LastBlockTime', valueCodec: _i2.U64Codec.codec, ); - final _i1.StorageValue _lastBlockDuration = const _i1.StorageValue( + final _i1.StorageValue _lastBlockDuration = + const _i1.StorageValue( prefix: 'QPoW', storage: 'LastBlockDuration', valueCodec: _i2.U64Codec.codec, ); - final _i1.StorageValue<_i3.U512> _currentDifficulty = const _i1.StorageValue<_i3.U512>( + final _i1.StorageValue<_i3.U512> _currentDifficulty = + const _i1.StorageValue<_i3.U512>( prefix: 'QPoW', storage: 'CurrentDifficulty', valueCodec: _i3.U512Codec(), ); - final _i1.StorageValue _blockTimeEma = const _i1.StorageValue( - prefix: 'QPoW', - storage: 'BlockTimeEma', - valueCodec: _i2.U64Codec.codec, - ); - _i4.Future lastBlockTime({_i1.BlockHash? at}) async { final hashedKey = _lastBlockTime.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _lastBlockTime.decodeValue(bytes); } @@ -48,7 +47,10 @@ class Queries { _i4.Future lastBlockDuration({_i1.BlockHash? at}) async { final hashedKey = _lastBlockDuration.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _lastBlockDuration.decodeValue(bytes); } @@ -57,20 +59,18 @@ class Queries { _i4.Future<_i3.U512> currentDifficulty({_i1.BlockHash? at}) async { final hashedKey = _currentDifficulty.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _currentDifficulty.decodeValue(bytes); } - return List.filled(8, BigInt.zero, growable: false); /* Default */ - } - - _i4.Future blockTimeEma({_i1.BlockHash? at}) async { - final hashedKey = _blockTimeEma.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _blockTimeEma.decodeValue(bytes); - } - return BigInt.zero; /* Default */ + return List.filled( + 8, + BigInt.zero, + growable: false, + ); /* Default */ } /// Returns the storage key for `lastBlockTime`. @@ -90,20 +90,13 @@ class Queries { final hashedKey = _currentDifficulty.hashedKey(); return hashedKey; } - - /// Returns the storage key for `blockTimeEma`. - _i5.Uint8List blockTimeEmaKey() { - final hashedKey = _blockTimeEma.hashedKey(); - return hashedKey; - } } class Constants { Constants(); - /// Pallet's weight info final _i3.U512 initialDifficulty = [ - BigInt.from(1189189), + BigInt.from(4000000), BigInt.from(0), BigInt.from(0), BigInt.from(0), @@ -113,12 +106,7 @@ class Constants { BigInt.from(0), ]; - final _i6.FixedU128 difficultyAdjustPercentClamp = BigInt.parse('100000000000000000', radix: 10); - final BigInt targetBlockTime = BigInt.from(12000); - /// EMA smoothing factor (0-1000, where 1000 = 1.0) - final int emaAlpha = 100; - final int maxReorgDepth = 180; } diff --git a/quantus_sdk/lib/generated/planck/pallets/recovery.dart b/quantus_sdk/lib/generated/planck/pallets/recovery.dart index 4e0e8134..6400f72c 100644 --- a/quantus_sdk/lib/generated/planck/pallets/recovery.dart +++ b/quantus_sdk/lib/generated/planck/pallets/recovery.dart @@ -18,33 +18,41 @@ class Queries { final _i1.StorageMap<_i2.AccountId32, _i3.RecoveryConfig> _recoverable = const _i1.StorageMap<_i2.AccountId32, _i3.RecoveryConfig>( - prefix: 'Recovery', - storage: 'Recoverable', - valueCodec: _i3.RecoveryConfig.codec, - hasher: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), - ); - - final _i1.StorageDoubleMap<_i2.AccountId32, _i2.AccountId32, _i4.ActiveRecovery> _activeRecoveries = - const _i1.StorageDoubleMap<_i2.AccountId32, _i2.AccountId32, _i4.ActiveRecovery>( - prefix: 'Recovery', - storage: 'ActiveRecoveries', - valueCodec: _i4.ActiveRecovery.codec, - hasher1: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), - hasher2: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), - ); + prefix: 'Recovery', + storage: 'Recoverable', + valueCodec: _i3.RecoveryConfig.codec, + hasher: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), + ); + + final _i1 + .StorageDoubleMap<_i2.AccountId32, _i2.AccountId32, _i4.ActiveRecovery> + _activeRecoveries = const _i1.StorageDoubleMap<_i2.AccountId32, + _i2.AccountId32, _i4.ActiveRecovery>( + prefix: 'Recovery', + storage: 'ActiveRecoveries', + valueCodec: _i4.ActiveRecovery.codec, + hasher1: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), + hasher2: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), + ); final _i1.StorageMap<_i2.AccountId32, _i2.AccountId32> _proxy = const _i1.StorageMap<_i2.AccountId32, _i2.AccountId32>( - prefix: 'Recovery', - storage: 'Proxy', - valueCodec: _i2.AccountId32Codec(), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'Recovery', + storage: 'Proxy', + valueCodec: _i2.AccountId32Codec(), + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); /// The set of recoverable accounts and their recovery configuration. - _i5.Future<_i3.RecoveryConfig?> recoverable(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { + _i5.Future<_i3.RecoveryConfig?> recoverable( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _recoverable.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _recoverable.decodeValue(bytes); } @@ -60,8 +68,14 @@ class Queries { _i2.AccountId32 key2, { _i1.BlockHash? at, }) async { - final hashedKey = _activeRecoveries.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); + final hashedKey = _activeRecoveries.hashedKeyFor( + key1, + key2, + ); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _activeRecoveries.decodeValue(bytes); } @@ -71,9 +85,15 @@ class Queries { /// The list of allowed proxy accounts. /// /// Map from the user who can access it to the recovered account. - _i5.Future<_i2.AccountId32?> proxy(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { + _i5.Future<_i2.AccountId32?> proxy( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _proxy.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _proxy.decodeValue(bytes); } @@ -81,11 +101,20 @@ class Queries { } /// The set of recoverable accounts and their recovery configuration. - _i5.Future> multiRecoverable(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _recoverable.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i5.Future> multiRecoverable( + List<_i2.AccountId32> keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _recoverable.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _recoverable.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _recoverable.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -93,9 +122,15 @@ class Queries { /// The list of allowed proxy accounts. /// /// Map from the user who can access it to the recovered account. - _i5.Future> multiProxy(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { + _i5.Future> multiProxy( + List<_i2.AccountId32> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _proxy.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { return bytes.first.changes.map((v) => _proxy.decodeValue(v.key)).toList(); } @@ -109,8 +144,14 @@ class Queries { } /// Returns the storage key for `activeRecoveries`. - _i6.Uint8List activeRecoveriesKey(_i2.AccountId32 key1, _i2.AccountId32 key2) { - final hashedKey = _activeRecoveries.hashedKeyFor(key1, key2); + _i6.Uint8List activeRecoveriesKey( + _i2.AccountId32 key1, + _i2.AccountId32 key2, + ) { + final hashedKey = _activeRecoveries.hashedKeyFor( + key1, + key2, + ); return hashedKey; } @@ -150,8 +191,14 @@ class Txs { /// Parameters: /// - `account`: The recovered account you want to make a call on-behalf-of. /// - `call`: The call you want to make with the recovered account. - _i7.Recovery asRecovered({required _i8.MultiAddress account, required _i7.RuntimeCall call}) { - return _i7.Recovery(_i9.AsRecovered(account: account, call: call)); + _i7.Recovery asRecovered({ + required _i8.MultiAddress account, + required _i7.RuntimeCall call, + }) { + return _i7.Recovery(_i9.AsRecovered( + account: account, + call: call, + )); } /// Allow ROOT to bypass the recovery process and set a rescuer account @@ -162,8 +209,14 @@ class Txs { /// Parameters: /// - `lost`: The "lost account" to be recovered. /// - `rescuer`: The "rescuer account" which can call as the lost account. - _i7.Recovery setRecovered({required _i8.MultiAddress lost, required _i8.MultiAddress rescuer}) { - return _i7.Recovery(_i9.SetRecovered(lost: lost, rescuer: rescuer)); + _i7.Recovery setRecovered({ + required _i8.MultiAddress lost, + required _i8.MultiAddress rescuer, + }) { + return _i7.Recovery(_i9.SetRecovered( + lost: lost, + rescuer: rescuer, + )); } /// Create a recovery configuration for your account. This makes your account recoverable. @@ -187,7 +240,11 @@ class Txs { required int threshold, required int delayPeriod, }) { - return _i7.Recovery(_i9.CreateRecovery(friends: friends, threshold: threshold, delayPeriod: delayPeriod)); + return _i7.Recovery(_i9.CreateRecovery( + friends: friends, + threshold: threshold, + delayPeriod: delayPeriod, + )); } /// Initiate the process for recovering a recoverable account. @@ -217,8 +274,14 @@ class Txs { /// /// The combination of these two parameters must point to an active recovery /// process. - _i7.Recovery vouchRecovery({required _i8.MultiAddress lost, required _i8.MultiAddress rescuer}) { - return _i7.Recovery(_i9.VouchRecovery(lost: lost, rescuer: rescuer)); + _i7.Recovery vouchRecovery({ + required _i8.MultiAddress lost, + required _i8.MultiAddress rescuer, + }) { + return _i7.Recovery(_i9.VouchRecovery( + lost: lost, + rescuer: rescuer, + )); } /// Allow a successful rescuer to claim their recovered account. diff --git a/quantus_sdk/lib/generated/planck/pallets/referenda.dart b/quantus_sdk/lib/generated/planck/pallets/referenda.dart index 869b1bb2..b16924a5 100644 --- a/quantus_sdk/lib/generated/planck/pallets/referenda.dart +++ b/quantus_sdk/lib/generated/planck/pallets/referenda.dart @@ -27,7 +27,8 @@ class Queries { valueCodec: _i2.U32Codec.codec, ); - final _i1.StorageMap _referendumInfoFor = const _i1.StorageMap( + final _i1.StorageMap _referendumInfoFor = + const _i1.StorageMap( prefix: 'Referenda', storage: 'ReferendumInfoFor', valueCodec: _i3.ReferendumInfo.codec, @@ -36,22 +37,26 @@ class Queries { final _i1.StorageMap>> _trackQueue = const _i1.StorageMap>>( - prefix: 'Referenda', - storage: 'TrackQueue', - valueCodec: _i2.SequenceCodec<_i4.Tuple2>( - _i4.Tuple2Codec(_i2.U32Codec.codec, _i2.U128Codec.codec), - ), - hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), - ); + prefix: 'Referenda', + storage: 'TrackQueue', + valueCodec: + _i2.SequenceCodec<_i4.Tuple2>(_i4.Tuple2Codec( + _i2.U32Codec.codec, + _i2.U128Codec.codec, + )), + hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), + ); - final _i1.StorageMap _decidingCount = const _i1.StorageMap( + final _i1.StorageMap _decidingCount = + const _i1.StorageMap( prefix: 'Referenda', storage: 'DecidingCount', valueCodec: _i2.U32Codec.codec, hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), ); - final _i1.StorageMap _metadataOf = const _i1.StorageMap( + final _i1.StorageMap _metadataOf = + const _i1.StorageMap( prefix: 'Referenda', storage: 'MetadataOf', valueCodec: _i5.H256Codec(), @@ -61,7 +66,10 @@ class Queries { /// The next free referendum index, aka the number of referenda started so far. _i6.Future referendumCount({_i1.BlockHash? at}) async { final hashedKey = _referendumCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _referendumCount.decodeValue(bytes); } @@ -69,9 +77,15 @@ class Queries { } /// Information concerning any given referendum. - _i6.Future<_i3.ReferendumInfo?> referendumInfoFor(int key1, {_i1.BlockHash? at}) async { + _i6.Future<_i3.ReferendumInfo?> referendumInfoFor( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _referendumInfoFor.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _referendumInfoFor.decodeValue(bytes); } @@ -82,9 +96,15 @@ class Queries { /// conviction-weighted approvals. /// /// This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. - _i6.Future>> trackQueue(int key1, {_i1.BlockHash? at}) async { + _i6.Future>> trackQueue( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _trackQueue.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _trackQueue.decodeValue(bytes); } @@ -92,9 +112,15 @@ class Queries { } /// The number of referenda being decided currently. - _i6.Future decidingCount(int key1, {_i1.BlockHash? at}) async { + _i6.Future decidingCount( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _decidingCount.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _decidingCount.decodeValue(bytes); } @@ -107,9 +133,15 @@ class Queries { /// /// Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove) /// large preimages. - _i6.Future<_i5.H256?> metadataOf(int key1, {_i1.BlockHash? at}) async { + _i6.Future<_i5.H256?> metadataOf( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _metadataOf.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _metadataOf.decodeValue(bytes); } @@ -117,11 +149,20 @@ class Queries { } /// Information concerning any given referendum. - _i6.Future> multiReferendumInfoFor(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _referendumInfoFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i6.Future> multiReferendumInfoFor( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _referendumInfoFor.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _referendumInfoFor.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _referendumInfoFor.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -130,21 +171,40 @@ class Queries { /// conviction-weighted approvals. /// /// This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. - _i6.Future>>> multiTrackQueue(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _trackQueue.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i6.Future>>> multiTrackQueue( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _trackQueue.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _trackQueue.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _trackQueue.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => []).toList() as List>>); /* Default */ + return (keys.map((key) => []).toList() + as List>>); /* Default */ } /// The number of referenda being decided currently. - _i6.Future> multiDecidingCount(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _decidingCount.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i6.Future> multiDecidingCount( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _decidingCount.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _decidingCount.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _decidingCount.decodeValue(v.key)) + .toList(); } return (keys.map((key) => 0).toList() as List); /* Default */ } @@ -155,11 +215,20 @@ class Queries { /// /// Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove) /// large preimages. - _i6.Future> multiMetadataOf(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _metadataOf.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i6.Future> multiMetadataOf( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _metadataOf.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _metadataOf.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _metadataOf.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -236,9 +305,11 @@ class Txs { required _i10.Bounded proposal, required _i11.DispatchTime enactmentMoment, }) { - return _i8.Referenda( - _i12.Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment), - ); + return _i8.Referenda(_i12.Submit( + proposalOrigin: proposalOrigin, + proposal: proposal, + enactmentMoment: enactmentMoment, + )); } /// Post the Decision Deposit for a referendum. @@ -323,8 +394,14 @@ class Txs { /// metadata of a finished referendum. /// - `index`: The index of a referendum to set or clear metadata for. /// - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. - _i8.Referenda setMetadata({required int index, _i5.H256? maybeHash}) { - return _i8.Referenda(_i12.SetMetadata(index: index, maybeHash: maybeHash)); + _i8.Referenda setMetadata({ + required int index, + _i5.H256? maybeHash, + }) { + return _i8.Referenda(_i12.SetMetadata( + index: index, + maybeHash: maybeHash, + )); } } @@ -360,9 +437,17 @@ class Constants { decisionPeriod: 50400, confirmPeriod: 3600, minEnactmentPeriod: 7200, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 550000000, ceil: 700000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 50000000, ceil: 250000000), + minApproval: const _i14.LinearDecreasing( + length: 1000000000, + floor: 550000000, + ceil: 700000000, + ), + minSupport: const _i14.LinearDecreasing( + length: 1000000000, + floor: 50000000, + ceil: 250000000, + ), ), - ), + ) ]; } diff --git a/quantus_sdk/lib/generated/planck/pallets/reversible_transfers.dart b/quantus_sdk/lib/generated/planck/pallets/reversible_transfers.dart index 832fe618..f0e5ed9b 100644 --- a/quantus_sdk/lib/generated/planck/pallets/reversible_transfers.dart +++ b/quantus_sdk/lib/generated/planck/pallets/reversible_transfers.dart @@ -5,7 +5,8 @@ import 'dart:typed_data' as _i8; import 'package:polkadart/polkadart.dart' as _i1; import 'package:polkadart/scale_codec.dart' as _i6; -import '../types/pallet_reversible_transfers/high_security_account_data.dart' as _i3; +import '../types/pallet_reversible_transfers/high_security_account_data.dart' + as _i3; import '../types/pallet_reversible_transfers/pallet/call.dart' as _i11; import '../types/pallet_reversible_transfers/pending_transfer.dart' as _i5; import '../types/primitive_types/h256.dart' as _i4; @@ -20,49 +21,58 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageMap<_i2.AccountId32, _i3.HighSecurityAccountData> _highSecurityAccounts = + final _i1.StorageMap<_i2.AccountId32, _i3.HighSecurityAccountData> + _highSecurityAccounts = const _i1.StorageMap<_i2.AccountId32, _i3.HighSecurityAccountData>( - prefix: 'ReversibleTransfers', - storage: 'HighSecurityAccounts', - valueCodec: _i3.HighSecurityAccountData.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'ReversibleTransfers', + storage: 'HighSecurityAccounts', + valueCodec: _i3.HighSecurityAccountData.codec, + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); final _i1.StorageMap<_i4.H256, _i5.PendingTransfer> _pendingTransfers = const _i1.StorageMap<_i4.H256, _i5.PendingTransfer>( - prefix: 'ReversibleTransfers', - storage: 'PendingTransfers', - valueCodec: _i5.PendingTransfer.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i4.H256Codec()), - ); + prefix: 'ReversibleTransfers', + storage: 'PendingTransfers', + valueCodec: _i5.PendingTransfer.codec, + hasher: _i1.StorageHasher.blake2b128Concat(_i4.H256Codec()), + ); - final _i1.StorageMap<_i2.AccountId32, List<_i4.H256>> _pendingTransfersBySender = + final _i1.StorageMap<_i2.AccountId32, List<_i4.H256>> + _pendingTransfersBySender = const _i1.StorageMap<_i2.AccountId32, List<_i4.H256>>( - prefix: 'ReversibleTransfers', - storage: 'PendingTransfersBySender', - valueCodec: _i6.SequenceCodec<_i4.H256>(_i4.H256Codec()), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'ReversibleTransfers', + storage: 'PendingTransfersBySender', + valueCodec: _i6.SequenceCodec<_i4.H256>(_i4.H256Codec()), + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); - final _i1.StorageMap<_i2.AccountId32, List<_i2.AccountId32>> _interceptorIndex = + final _i1.StorageMap<_i2.AccountId32, List<_i2.AccountId32>> _guardianIndex = const _i1.StorageMap<_i2.AccountId32, List<_i2.AccountId32>>( - prefix: 'ReversibleTransfers', - storage: 'InterceptorIndex', - valueCodec: _i6.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'ReversibleTransfers', + storage: 'GuardianIndex', + valueCodec: _i6.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()), + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); - final _i1.StorageValue _globalNonce = const _i1.StorageValue( + final _i1.StorageValue _nextTransactionId = + const _i1.StorageValue( prefix: 'ReversibleTransfers', - storage: 'GlobalNonce', + storage: 'NextTransactionId', valueCodec: _i6.U64Codec.codec, ); /// Maps accounts to their chosen reversibility delay period (in milliseconds). /// Accounts present in this map have reversibility enabled. - _i7.Future<_i3.HighSecurityAccountData?> highSecurityAccounts(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { + _i7.Future<_i3.HighSecurityAccountData?> highSecurityAccounts( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _highSecurityAccounts.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _highSecurityAccounts.decodeValue(bytes); } @@ -71,9 +81,15 @@ class Queries { /// Stores the details of pending transactions scheduled for delayed execution. /// Keyed by the unique transaction ID. - _i7.Future<_i5.PendingTransfer?> pendingTransfers(_i4.H256 key1, {_i1.BlockHash? at}) async { + _i7.Future<_i5.PendingTransfer?> pendingTransfers( + _i4.H256 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _pendingTransfers.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _pendingTransfers.decodeValue(bytes); } @@ -81,33 +97,50 @@ class Queries { } /// Maps sender accounts to their list of pending transaction IDs. - _i7.Future> pendingTransfersBySender(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { + _i7.Future> pendingTransfersBySender( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _pendingTransfersBySender.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _pendingTransfersBySender.decodeValue(bytes); } return []; /* Default */ } - /// Maps interceptor accounts to the list of accounts they can intercept for. - /// This allows the UI to efficiently query all accounts for which a given account is an - /// interceptor. - _i7.Future> interceptorIndex(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _interceptorIndex.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + /// Maps guardian accounts to the list of accounts they protect. + /// This allows the UI to efficiently query all accounts for which a given account is a + /// guardian. + _i7.Future> guardianIndex( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { + final hashedKey = _guardianIndex.hashedKeyFor(key1); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { - return _interceptorIndex.decodeValue(bytes); + return _guardianIndex.decodeValue(bytes); } return []; /* Default */ } - /// Global nonce for generating unique transaction IDs. - _i7.Future globalNonce({_i1.BlockHash? at}) async { - final hashedKey = _globalNonce.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + /// Monotonically increasing counter used to generate unique transaction IDs. + /// Each scheduled transfer increments this value to ensure no two transfers + /// produce the same `tx_id`, even if they have identical parameters. + _i7.Future nextTransactionId({_i1.BlockHash? at}) async { + final hashedKey = _nextTransactionId.hashedKey(); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { - return _globalNonce.decodeValue(bytes); + return _nextTransactionId.decodeValue(bytes); } return BigInt.zero; /* Default */ } @@ -118,21 +151,36 @@ class Queries { List<_i2.AccountId32> keys, { _i1.BlockHash? at, }) async { - final hashedKeys = keys.map((key) => _highSecurityAccounts.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final hashedKeys = + keys.map((key) => _highSecurityAccounts.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _highSecurityAccounts.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _highSecurityAccounts.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } /// Stores the details of pending transactions scheduled for delayed execution. /// Keyed by the unique transaction ID. - _i7.Future> multiPendingTransfers(List<_i4.H256> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _pendingTransfers.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i7.Future> multiPendingTransfers( + List<_i4.H256> keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _pendingTransfers.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _pendingTransfers.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _pendingTransfers.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -142,24 +190,41 @@ class Queries { List<_i2.AccountId32> keys, { _i1.BlockHash? at, }) async { - final hashedKeys = keys.map((key) => _pendingTransfersBySender.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final hashedKeys = + keys.map((key) => _pendingTransfersBySender.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _pendingTransfersBySender.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _pendingTransfersBySender.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => []).toList() as List>); /* Default */ + return (keys.map((key) => []).toList() + as List>); /* Default */ } - /// Maps interceptor accounts to the list of accounts they can intercept for. - /// This allows the UI to efficiently query all accounts for which a given account is an - /// interceptor. - _i7.Future>> multiInterceptorIndex(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _interceptorIndex.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + /// Maps guardian accounts to the list of accounts they protect. + /// This allows the UI to efficiently query all accounts for which a given account is a + /// guardian. + _i7.Future>> multiGuardianIndex( + List<_i2.AccountId32> keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _guardianIndex.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _interceptorIndex.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _guardianIndex.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => []).toList() as List>); /* Default */ + return (keys.map((key) => []).toList() + as List>); /* Default */ } /// Returns the storage key for `highSecurityAccounts`. @@ -180,15 +245,15 @@ class Queries { return hashedKey; } - /// Returns the storage key for `interceptorIndex`. - _i8.Uint8List interceptorIndexKey(_i2.AccountId32 key1) { - final hashedKey = _interceptorIndex.hashedKeyFor(key1); + /// Returns the storage key for `guardianIndex`. + _i8.Uint8List guardianIndexKey(_i2.AccountId32 key1) { + final hashedKey = _guardianIndex.hashedKeyFor(key1); return hashedKey; } - /// Returns the storage key for `globalNonce`. - _i8.Uint8List globalNonceKey() { - final hashedKey = _globalNonce.hashedKey(); + /// Returns the storage key for `nextTransactionId`. + _i8.Uint8List nextTransactionIdKey() { + final hashedKey = _nextTransactionId.hashedKey(); return hashedKey; } @@ -210,9 +275,9 @@ class Queries { return hashedKey; } - /// Returns the storage map key prefix for `interceptorIndex`. - _i8.Uint8List interceptorIndexMapPrefix() { - final hashedKey = _interceptorIndex.mapPrefix(); + /// Returns the storage map key prefix for `guardianIndex`. + _i8.Uint8List guardianIndexMapPrefix() { + final hashedKey = _guardianIndex.mapPrefix(); return hashedKey; } } @@ -223,21 +288,43 @@ class Txs { /// Enable high-security for the calling account with a specified /// reversibility delay. /// - /// Recoverer and interceptor (aka guardian) could be the same account or - /// different accounts. - /// /// Once an account is set as high security it can only make reversible /// transfers. It is not allowed any other calls. /// - /// - `delay`: The reversibility time for any transfer made by the high - /// security account. - /// - interceptor: The account that can intercept transctions from the - /// high security account. + /// # Warning: Permanent and Irreversible + /// + /// **Enabling high security mode is a one-way operation that cannot be undone.** + /// + /// Once this function is called successfully, the account is permanently restricted + /// to only the following operations: + /// - [`schedule_transfer`](Self::schedule_transfer) - Schedule delayed native token + /// transfers + /// - [`schedule_asset_transfer`](Self::schedule_asset_transfer) - Schedule delayed asset + /// transfers + /// - [`cancel`](Self::cancel) - Cancel pending transfers + /// - [`recover_funds`](Self::recover_funds) - Guardian-initiated emergency fund recovery + /// + /// There is no mechanism to disable high security mode or restore normal account + /// functionality. This design is intentional to provide maximum security guarantees: + /// an attacker who gains access to the account cannot simply disable the protections. + /// + /// Users who no longer wish to use high-security features can simply transfer their + /// funds to a different account using [`schedule_transfer`](Self::schedule_transfer) + /// or [`schedule_asset_transfer`](Self::schedule_asset_transfer). + /// + /// # Parameters + /// + /// - `delay`: The reversibility time for any transfer made by the high-security account. + /// - `guardian`: The guardian account that can cancel pending transfers and recover funds + /// from this high-security account. _i9.ReversibleTransfers setHighSecurity({ required _i10.BlockNumberOrTimestamp delay, - required _i2.AccountId32 interceptor, + required _i2.AccountId32 guardian, }) { - return _i9.ReversibleTransfers(_i11.SetHighSecurity(delay: delay, interceptor: interceptor)); + return _i9.ReversibleTransfers(_i11.SetHighSecurity( + delay: delay, + guardian: guardian, + )); } /// Cancel a pending reversible transaction scheduled by the caller. @@ -247,16 +334,35 @@ class Txs { return _i9.ReversibleTransfers(_i11.Cancel(txId: txId)); } - /// Called by the Scheduler to finalize the scheduled task/call + /// Executes a previously scheduled transfer after the delay period has elapsed. + /// + /// This extrinsic is called automatically by the Scheduler pallet when the + /// delay period expires. It must be signed by this pallet's account (not a user). + /// The pallet account is set as the origin when scheduling via + /// [`do_schedule_transfer_inner`](Self::do_schedule_transfer_inner). + /// + /// # Parameters + /// + /// - `tx_id`: The unique identifier of the pending transfer to execute. + /// + /// # Errors /// - /// - `tx_id`: The unique id of the transaction to finalize and dispatch. + /// - [`InvalidSchedulerOrigin`](Error::InvalidSchedulerOrigin): Called by an account other + /// than this pallet's account. + /// - [`PendingTxNotFound`](Error::PendingTxNotFound): No pending transfer with this ID. _i9.ReversibleTransfers executeTransfer({required _i4.H256 txId}) { return _i9.ReversibleTransfers(_i11.ExecuteTransfer(txId: txId)); } /// Schedule a transaction for delayed execution. - _i9.ReversibleTransfers scheduleTransfer({required _i12.MultiAddress dest, required BigInt amount}) { - return _i9.ReversibleTransfers(_i11.ScheduleTransfer(dest: dest, amount: amount)); + _i9.ReversibleTransfers scheduleTransfer({ + required _i12.MultiAddress dest, + required BigInt amount, + }) { + return _i9.ReversibleTransfers(_i11.ScheduleTransfer( + dest: dest, + amount: amount, + )); } /// Schedule a transaction for delayed execution with a custom, one-time delay. @@ -270,7 +376,11 @@ class Txs { required BigInt amount, required _i10.BlockNumberOrTimestamp delay, }) { - return _i9.ReversibleTransfers(_i11.ScheduleTransferWithDelay(dest: dest, amount: amount, delay: delay)); + return _i9.ReversibleTransfers(_i11.ScheduleTransferWithDelay( + dest: dest, + amount: amount, + delay: delay, + )); } /// Schedule an asset transfer (pallet-assets) for delayed execution using the configured @@ -280,7 +390,11 @@ class Txs { required _i12.MultiAddress dest, required BigInt amount, }) { - return _i9.ReversibleTransfers(_i11.ScheduleAssetTransfer(assetId: assetId, dest: dest, amount: amount)); + return _i9.ReversibleTransfers(_i11.ScheduleAssetTransfer( + assetId: assetId, + dest: dest, + amount: amount, + )); } /// Schedule an asset transfer (pallet-assets) with a custom one-time delay. @@ -290,17 +404,24 @@ class Txs { required BigInt amount, required _i10.BlockNumberOrTimestamp delay, }) { - return _i9.ReversibleTransfers( - _i11.ScheduleAssetTransferWithDelay(assetId: assetId, dest: dest, amount: amount, delay: delay), - ); + return _i9.ReversibleTransfers(_i11.ScheduleAssetTransferWithDelay( + assetId: assetId, + dest: dest, + amount: amount, + delay: delay, + )); } - /// Allows the guardian (interceptor) to recover all funds from a high security - /// account by transferring the entire balance to themselves. + /// Allows the guardian to recover all funds from a high-security account + /// by transferring the entire balance to themselves. /// - /// This is an emergency function for when the high security account may be compromised. + /// This is an emergency function for when the high-security account may be compromised. /// It cancels all pending transfers first (applying volume fees), then transfers /// the remaining free balance to the guardian. + /// + /// If releasing held funds fails for any transfer, that transfer is skipped (metadata + /// preserved for manual retry via `cancel`) and a `TransferRecoveryFailed` event is + /// emitted. Other transfers continue to be processed. _i9.ReversibleTransfers recoverFunds({required _i2.AccountId32 account}) { return _i9.ReversibleTransfers(_i11.RecoverFunds(account: account)); } @@ -309,8 +430,8 @@ class Txs { class Constants { Constants(); - /// Maximum number of accounts an interceptor can intercept for. Used for BoundedVec. - final int maxInterceptorAccounts = 32; + /// Maximum number of accounts a single guardian can protect. Used for BoundedVec. + final int maxGuardianAccounts = 32; /// Maximum pending reversible transactions allowed per account. final int maxPendingPerAccount = 16; diff --git a/quantus_sdk/lib/generated/planck/pallets/scheduler.dart b/quantus_sdk/lib/generated/planck/pallets/scheduler.dart index 181c1543..21d34fc4 100644 --- a/quantus_sdk/lib/generated/planck/pallets/scheduler.dart +++ b/quantus_sdk/lib/generated/planck/pallets/scheduler.dart @@ -18,57 +18,70 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue _incompleteBlockSince = const _i1.StorageValue( + final _i1.StorageValue _incompleteBlockSince = + const _i1.StorageValue( prefix: 'Scheduler', storage: 'IncompleteBlockSince', valueCodec: _i2.U32Codec.codec, ); - final _i1.StorageValue _incompleteTimestampSince = const _i1.StorageValue( + final _i1.StorageValue _incompleteTimestampSince = + const _i1.StorageValue( prefix: 'Scheduler', storage: 'IncompleteTimestampSince', valueCodec: _i2.U64Codec.codec, ); - final _i1.StorageValue _lastProcessedTimestamp = const _i1.StorageValue( + final _i1.StorageValue _lastProcessedTimestamp = + const _i1.StorageValue( prefix: 'Scheduler', storage: 'LastProcessedTimestamp', valueCodec: _i2.U64Codec.codec, ); - final _i1.StorageMap<_i3.BlockNumberOrTimestamp, List<_i4.Scheduled?>> _agenda = + final _i1.StorageMap<_i3.BlockNumberOrTimestamp, List<_i4.Scheduled?>> + _agenda = const _i1.StorageMap<_i3.BlockNumberOrTimestamp, List<_i4.Scheduled?>>( - prefix: 'Scheduler', - storage: 'Agenda', - valueCodec: _i2.SequenceCodec<_i4.Scheduled?>(_i2.OptionCodec<_i4.Scheduled>(_i4.Scheduled.codec)), - hasher: _i1.StorageHasher.twoxx64Concat(_i3.BlockNumberOrTimestamp.codec), - ); - - final _i1.StorageMap<_i5.Tuple2<_i3.BlockNumberOrTimestamp, int>, _i6.RetryConfig> _retries = - const _i1.StorageMap<_i5.Tuple2<_i3.BlockNumberOrTimestamp, int>, _i6.RetryConfig>( - prefix: 'Scheduler', - storage: 'Retries', - valueCodec: _i6.RetryConfig.codec, - hasher: _i1.StorageHasher.blake2b128Concat( - _i5.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>(_i3.BlockNumberOrTimestamp.codec, _i2.U32Codec.codec), - ), - ); - - final _i1.StorageMap, _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>> _lookup = - const _i1.StorageMap, _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>>( - prefix: 'Scheduler', - storage: 'Lookup', - valueCodec: _i5.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( - _i3.BlockNumberOrTimestamp.codec, - _i2.U32Codec.codec, - ), - hasher: _i1.StorageHasher.twoxx64Concat(_i2.U8ArrayCodec(32)), - ); + prefix: 'Scheduler', + storage: 'Agenda', + valueCodec: _i2.SequenceCodec<_i4.Scheduled?>( + _i2.OptionCodec<_i4.Scheduled>(_i4.Scheduled.codec)), + hasher: _i1.StorageHasher.twoxx64Concat(_i3.BlockNumberOrTimestamp.codec), + ); + + final _i1 + .StorageMap<_i5.Tuple2<_i3.BlockNumberOrTimestamp, int>, _i6.RetryConfig> + _retries = const _i1.StorageMap< + _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>, _i6.RetryConfig>( + prefix: 'Scheduler', + storage: 'Retries', + valueCodec: _i6.RetryConfig.codec, + hasher: _i1.StorageHasher.blake2b128Concat( + _i5.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( + _i3.BlockNumberOrTimestamp.codec, + _i2.U32Codec.codec, + )), + ); + + final _i1.StorageMap, _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>> + _lookup = const _i1 + .StorageMap, _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>>( + prefix: 'Scheduler', + storage: 'Lookup', + valueCodec: _i5.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( + _i3.BlockNumberOrTimestamp.codec, + _i2.U32Codec.codec, + ), + hasher: _i1.StorageHasher.twoxx64Concat(_i2.U8ArrayCodec(32)), + ); /// Tracks incomplete block-based agendas that need to be processed in a later block. _i7.Future incompleteBlockSince({_i1.BlockHash? at}) async { final hashedKey = _incompleteBlockSince.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _incompleteBlockSince.decodeValue(bytes); } @@ -78,7 +91,10 @@ class Queries { /// Tracks incomplete timestamp-based agendas that need to be processed in a later block. _i7.Future incompleteTimestampSince({_i1.BlockHash? at}) async { final hashedKey = _incompleteTimestampSince.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _incompleteTimestampSince.decodeValue(bytes); } @@ -89,7 +105,10 @@ class Queries { /// Used to avoid reprocessing all buckets from 0 on every run. _i7.Future lastProcessedTimestamp({_i1.BlockHash? at}) async { final hashedKey = _lastProcessedTimestamp.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _lastProcessedTimestamp.decodeValue(bytes); } @@ -97,9 +116,15 @@ class Queries { } /// Items to be executed, indexed by the block number that they should be executed on. - _i7.Future> agenda(_i3.BlockNumberOrTimestamp key1, {_i1.BlockHash? at}) async { + _i7.Future> agenda( + _i3.BlockNumberOrTimestamp key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _agenda.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _agenda.decodeValue(bytes); } @@ -107,9 +132,15 @@ class Queries { } /// Retry configurations for items to be executed, indexed by task address. - _i7.Future<_i6.RetryConfig?> retries(_i5.Tuple2<_i3.BlockNumberOrTimestamp, int> key1, {_i1.BlockHash? at}) async { + _i7.Future<_i6.RetryConfig?> retries( + _i5.Tuple2<_i3.BlockNumberOrTimestamp, int> key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _retries.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _retries.decodeValue(bytes); } @@ -117,9 +148,15 @@ class Queries { } /// Lookup from a name to the block number and index of the task. - _i7.Future<_i5.Tuple2<_i3.BlockNumberOrTimestamp, int>?> lookup(List key1, {_i1.BlockHash? at}) async { + _i7.Future<_i5.Tuple2<_i3.BlockNumberOrTimestamp, int>?> lookup( + List key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _lookup.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _lookup.decodeValue(bytes); } @@ -127,13 +164,22 @@ class Queries { } /// Items to be executed, indexed by the block number that they should be executed on. - _i7.Future>> multiAgenda(List<_i3.BlockNumberOrTimestamp> keys, {_i1.BlockHash? at}) async { + _i7.Future>> multiAgenda( + List<_i3.BlockNumberOrTimestamp> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _agenda.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _agenda.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _agenda.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => []).toList() as List>); /* Default */ + return (keys.map((key) => []).toList() + as List>); /* Default */ } /// Retry configurations for items to be executed, indexed by task address. @@ -142,9 +188,14 @@ class Queries { _i1.BlockHash? at, }) async { final hashedKeys = keys.map((key) => _retries.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _retries.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _retries.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -155,9 +206,14 @@ class Queries { _i1.BlockHash? at, }) async { final hashedKeys = keys.map((key) => _lookup.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _lookup.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _lookup.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -220,13 +276,27 @@ class Queries { class Txs { const Txs(); - _i9.Scheduler schedule({required int when, required int priority, required _i9.RuntimeCall call}) { - return _i9.Scheduler(_i10.Schedule(when: when, priority: priority, call: call)); + _i9.Scheduler schedule({ + required int when, + required int priority, + required _i9.RuntimeCall call, + }) { + return _i9.Scheduler(_i10.Schedule( + when: when, + priority: priority, + call: call, + )); } /// Cancel an anonymously scheduled task. - _i9.Scheduler cancel({required _i3.BlockNumberOrTimestamp when, required int index}) { - return _i9.Scheduler(_i10.Cancel(when: when, index: index)); + _i9.Scheduler cancel({ + required _i3.BlockNumberOrTimestamp when, + required int index, + }) { + return _i9.Scheduler(_i10.Cancel( + when: when, + index: index, + )); } _i9.Scheduler scheduleNamed({ @@ -235,7 +305,12 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler(_i10.ScheduleNamed(id: id, when: when, priority: priority, call: call)); + return _i9.Scheduler(_i10.ScheduleNamed( + id: id, + when: when, + priority: priority, + call: call, + )); } /// Cancel a named scheduled task. @@ -248,7 +323,11 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler(_i10.ScheduleAfter(after: after, priority: priority, call: call)); + return _i9.Scheduler(_i10.ScheduleAfter( + after: after, + priority: priority, + call: call, + )); } _i9.Scheduler scheduleNamedAfter({ @@ -257,7 +336,12 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler(_i10.ScheduleNamedAfter(id: id, after: after, priority: priority, call: call)); + return _i9.Scheduler(_i10.ScheduleNamedAfter( + id: id, + after: after, + priority: priority, + call: call, + )); } /// Set a retry configuration for a task so that, in case its scheduled run fails, it will @@ -271,12 +355,20 @@ class Txs { /// clones of the original task. Their retry configuration will be derived from the /// original task's configuration, but will have a lower value for `remaining` than the /// original `total_retries`. + /// + /// The `period` type must match the task's scheduling type: block-scheduled tasks + /// require a block-number period, and timestamp-scheduled tasks require a timestamp + /// period. Mismatched types will return [`Error::RetryPeriodMismatch`]. _i9.Scheduler setRetry({ required _i5.Tuple2<_i3.BlockNumberOrTimestamp, int> task, required int retries, required _i3.BlockNumberOrTimestamp period, }) { - return _i9.Scheduler(_i10.SetRetry(task: task, retries: retries, period: period)); + return _i9.Scheduler(_i10.SetRetry( + task: task, + retries: retries, + period: period, + )); } /// Set a retry configuration for a named task so that, in case its scheduled run fails, it @@ -290,16 +382,25 @@ class Txs { /// clones of the original task. Their retry configuration will be derived from the /// original task's configuration, but will have a lower value for `remaining` than the /// original `total_retries`. + /// + /// The `period` type must match the task's scheduling type: block-scheduled tasks + /// require a block-number period, and timestamp-scheduled tasks require a timestamp + /// period. Mismatched types will return [`Error::RetryPeriodMismatch`]. _i9.Scheduler setRetryNamed({ required List id, required int retries, required _i3.BlockNumberOrTimestamp period, }) { - return _i9.Scheduler(_i10.SetRetryNamed(id: id, retries: retries, period: period)); + return _i9.Scheduler(_i10.SetRetryNamed( + id: id, + retries: retries, + period: period, + )); } /// Removes the retry configuration of a task. - _i9.Scheduler cancelRetry({required _i5.Tuple2<_i3.BlockNumberOrTimestamp, int> task}) { + _i9.Scheduler cancelRetry( + {required _i5.Tuple2<_i3.BlockNumberOrTimestamp, int> task}) { return _i9.Scheduler(_i10.CancelRetry(task: task)); } @@ -315,7 +416,10 @@ class Constants { /// The maximum weight that may be scheduled per block for any dispatchables. final _i11.Weight maximumWeight = _i11.Weight( refTime: BigInt.from(4800000000000), - proofSize: BigInt.parse('14757395258967641292', radix: 10), + proofSize: BigInt.parse( + '14757395258967641292', + radix: 10, + ), ); /// The maximum number of scheduled calls in the queue for a single block. diff --git a/quantus_sdk/lib/generated/planck/pallets/system.dart b/quantus_sdk/lib/generated/planck/pallets/system.dart index 03a09f0d..a0a73a6a 100644 --- a/quantus_sdk/lib/generated/planck/pallets/system.dart +++ b/quantus_sdk/lib/generated/planck/pallets/system.dart @@ -34,11 +34,11 @@ class Queries { final _i1.StorageMap<_i2.AccountId32, _i3.AccountInfo> _account = const _i1.StorageMap<_i2.AccountId32, _i3.AccountInfo>( - prefix: 'System', - storage: 'Account', - valueCodec: _i3.AccountInfo.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'System', + storage: 'Account', + valueCodec: _i3.AccountInfo.codec, + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); final _i1.StorageValue _extrinsicCount = const _i1.StorageValue( prefix: 'System', @@ -52,7 +52,8 @@ class Queries { valueCodec: _i4.BoolCodec.codec, ); - final _i1.StorageValue<_i5.PerDispatchClass> _blockWeight = const _i1.StorageValue<_i5.PerDispatchClass>( + final _i1.StorageValue<_i5.PerDispatchClass> _blockWeight = + const _i1.StorageValue<_i5.PerDispatchClass>( prefix: 'System', storage: 'BlockWeight', valueCodec: _i5.PerDispatchClass.codec, @@ -64,14 +65,16 @@ class Queries { valueCodec: _i4.U32Codec.codec, ); - final _i1.StorageMap _blockHash = const _i1.StorageMap( + final _i1.StorageMap _blockHash = + const _i1.StorageMap( prefix: 'System', storage: 'BlockHash', valueCodec: _i6.H256Codec(), hasher: _i1.StorageHasher.twoxx64Concat(_i4.U32Codec.codec), ); - final _i1.StorageMap> _extrinsicData = const _i1.StorageMap>( + final _i1.StorageMap> _extrinsicData = + const _i1.StorageMap>( prefix: 'System', storage: 'ExtrinsicData', valueCodec: _i4.U8SequenceCodec.codec, @@ -84,25 +87,29 @@ class Queries { valueCodec: _i4.U32Codec.codec, ); - final _i1.StorageValue<_i6.H256> _parentHash = const _i1.StorageValue<_i6.H256>( + final _i1.StorageValue<_i6.H256> _parentHash = + const _i1.StorageValue<_i6.H256>( prefix: 'System', storage: 'ParentHash', valueCodec: _i6.H256Codec(), ); - final _i1.StorageValue<_i7.Digest> _digest = const _i1.StorageValue<_i7.Digest>( + final _i1.StorageValue<_i7.Digest> _digest = + const _i1.StorageValue<_i7.Digest>( prefix: 'System', storage: 'Digest', valueCodec: _i7.Digest.codec, ); - final _i1.StorageValue<_i6.H256> _zkTreeRoot = const _i1.StorageValue<_i6.H256>( + final _i1.StorageValue<_i6.H256> _zkTreeRoot = + const _i1.StorageValue<_i6.H256>( prefix: 'System', storage: 'ZkTreeRoot', valueCodec: _i6.H256Codec(), ); - final _i1.StorageValue> _events = const _i1.StorageValue>( + final _i1.StorageValue> _events = + const _i1.StorageValue>( prefix: 'System', storage: 'Events', valueCodec: _i4.SequenceCodec<_i8.EventRecord>(_i8.EventRecord.codec), @@ -116,34 +123,39 @@ class Queries { final _i1.StorageMap<_i6.H256, List<_i9.Tuple2>> _eventTopics = const _i1.StorageMap<_i6.H256, List<_i9.Tuple2>>( - prefix: 'System', - storage: 'EventTopics', - valueCodec: _i4.SequenceCodec<_i9.Tuple2>( - _i9.Tuple2Codec(_i4.U32Codec.codec, _i4.U32Codec.codec), - ), - hasher: _i1.StorageHasher.blake2b128Concat(_i6.H256Codec()), - ); + prefix: 'System', + storage: 'EventTopics', + valueCodec: + _i4.SequenceCodec<_i9.Tuple2>(_i9.Tuple2Codec( + _i4.U32Codec.codec, + _i4.U32Codec.codec, + )), + hasher: _i1.StorageHasher.blake2b128Concat(_i6.H256Codec()), + ); final _i1.StorageValue<_i10.LastRuntimeUpgradeInfo> _lastRuntimeUpgrade = const _i1.StorageValue<_i10.LastRuntimeUpgradeInfo>( - prefix: 'System', - storage: 'LastRuntimeUpgrade', - valueCodec: _i10.LastRuntimeUpgradeInfo.codec, - ); + prefix: 'System', + storage: 'LastRuntimeUpgrade', + valueCodec: _i10.LastRuntimeUpgradeInfo.codec, + ); - final _i1.StorageValue _upgradedToU32RefCount = const _i1.StorageValue( + final _i1.StorageValue _upgradedToU32RefCount = + const _i1.StorageValue( prefix: 'System', storage: 'UpgradedToU32RefCount', valueCodec: _i4.BoolCodec.codec, ); - final _i1.StorageValue _upgradedToTripleRefCount = const _i1.StorageValue( + final _i1.StorageValue _upgradedToTripleRefCount = + const _i1.StorageValue( prefix: 'System', storage: 'UpgradedToTripleRefCount', valueCodec: _i4.BoolCodec.codec, ); - final _i1.StorageValue<_i11.Phase> _executionPhase = const _i1.StorageValue<_i11.Phase>( + final _i1.StorageValue<_i11.Phase> _executionPhase = + const _i1.StorageValue<_i11.Phase>( prefix: 'System', storage: 'ExecutionPhase', valueCodec: _i11.Phase.codec, @@ -151,21 +163,28 @@ class Queries { final _i1.StorageValue<_i12.CodeUpgradeAuthorization> _authorizedUpgrade = const _i1.StorageValue<_i12.CodeUpgradeAuthorization>( - prefix: 'System', - storage: 'AuthorizedUpgrade', - valueCodec: _i12.CodeUpgradeAuthorization.codec, - ); + prefix: 'System', + storage: 'AuthorizedUpgrade', + valueCodec: _i12.CodeUpgradeAuthorization.codec, + ); - final _i1.StorageValue<_i13.Weight> _extrinsicWeightReclaimed = const _i1.StorageValue<_i13.Weight>( + final _i1.StorageValue<_i13.Weight> _extrinsicWeightReclaimed = + const _i1.StorageValue<_i13.Weight>( prefix: 'System', storage: 'ExtrinsicWeightReclaimed', valueCodec: _i13.Weight.codec, ); /// The full account information for a particular account ID. - _i14.Future<_i3.AccountInfo> account(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { + _i14.Future<_i3.AccountInfo> account( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _account.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _account.decodeValue(bytes); } @@ -178,7 +197,10 @@ class Queries { free: BigInt.zero, reserved: BigInt.zero, frozen: BigInt.zero, - flags: BigInt.parse('170141183460469231731687303715884105728', radix: 10), + flags: BigInt.parse( + '170141183460469231731687303715884105728', + radix: 10, + ), ), ); /* Default */ } @@ -186,7 +208,10 @@ class Queries { /// Total extrinsics count for the current block. _i14.Future extrinsicCount({_i1.BlockHash? at}) async { final hashedKey = _extrinsicCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _extrinsicCount.decodeValue(bytes); } @@ -196,7 +221,10 @@ class Queries { /// Whether all inherents have been applied. _i14.Future inherentsApplied({_i1.BlockHash? at}) async { final hashedKey = _inherentsApplied.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _inherentsApplied.decodeValue(bytes); } @@ -206,21 +234,36 @@ class Queries { /// The current weight for the block. _i14.Future<_i5.PerDispatchClass> blockWeight({_i1.BlockHash? at}) async { final hashedKey = _blockWeight.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _blockWeight.decodeValue(bytes); } return _i5.PerDispatchClass( - normal: _i13.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), - operational: _i13.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), - mandatory: _i13.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), + normal: _i13.Weight( + refTime: BigInt.zero, + proofSize: BigInt.zero, + ), + operational: _i13.Weight( + refTime: BigInt.zero, + proofSize: BigInt.zero, + ), + mandatory: _i13.Weight( + refTime: BigInt.zero, + proofSize: BigInt.zero, + ), ); /* Default */ } /// Total length (in bytes) for all extrinsics put together, for the current block. _i14.Future allExtrinsicsLen({_i1.BlockHash? at}) async { final hashedKey = _allExtrinsicsLen.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _allExtrinsicsLen.decodeValue(bytes); } @@ -228,29 +271,52 @@ class Queries { } /// Map of block numbers to block hashes. - _i14.Future<_i6.H256> blockHash(int key1, {_i1.BlockHash? at}) async { + _i14.Future<_i6.H256> blockHash( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _blockHash.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _blockHash.decodeValue(bytes); } - return List.filled(32, 0, growable: false); /* Default */ + return List.filled( + 32, + 0, + growable: false, + ); /* Default */ } /// Extrinsics data for the current block (maps an extrinsic's index to its data). - _i14.Future> extrinsicData(int key1, {_i1.BlockHash? at}) async { + _i14.Future> extrinsicData( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _extrinsicData.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _extrinsicData.decodeValue(bytes); } - return List.filled(0, 0, growable: true); /* Default */ + return List.filled( + 0, + 0, + growable: true, + ); /* Default */ } /// The current block number being processed. Set by `execute_block`. _i14.Future number({_i1.BlockHash? at}) async { final hashedKey = _number.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _number.decodeValue(bytes); } @@ -260,17 +326,27 @@ class Queries { /// Hash of the previous block. _i14.Future<_i6.H256> parentHash({_i1.BlockHash? at}) async { final hashedKey = _parentHash.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _parentHash.decodeValue(bytes); } - return List.filled(32, 0, growable: false); /* Default */ + return List.filled( + 32, + 0, + growable: false, + ); /* Default */ } /// Digest of the current block, also part of the block header. _i14.Future<_i7.Digest> digest({_i1.BlockHash? at}) async { final hashedKey = _digest.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _digest.decodeValue(bytes); } @@ -284,11 +360,18 @@ class Queries { /// for ZK circuit verification. _i14.Future<_i6.H256> zkTreeRoot({_i1.BlockHash? at}) async { final hashedKey = _zkTreeRoot.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _zkTreeRoot.decodeValue(bytes); } - return List.filled(32, 0, growable: false); /* Default */ + return List.filled( + 32, + 0, + growable: false, + ); /* Default */ } /// Events deposited for the current block. @@ -300,7 +383,10 @@ class Queries { /// just in case someone still reads them from within the runtime. _i14.Future> events({_i1.BlockHash? at}) async { final hashedKey = _events.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _events.decodeValue(bytes); } @@ -310,7 +396,10 @@ class Queries { /// The number of events in the `Events` list. _i14.Future eventCount({_i1.BlockHash? at}) async { final hashedKey = _eventCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _eventCount.decodeValue(bytes); } @@ -327,9 +416,15 @@ class Queries { /// The value has the type `(BlockNumberFor, EventIndex)` because if we used only just /// the `EventIndex` then in case if the topic has the same contents on the next block /// no notification will be triggered thus the event might be lost. - _i14.Future>> eventTopics(_i6.H256 key1, {_i1.BlockHash? at}) async { + _i14.Future>> eventTopics( + _i6.H256 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _eventTopics.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _eventTopics.decodeValue(bytes); } @@ -337,9 +432,13 @@ class Queries { } /// Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened. - _i14.Future<_i10.LastRuntimeUpgradeInfo?> lastRuntimeUpgrade({_i1.BlockHash? at}) async { + _i14.Future<_i10.LastRuntimeUpgradeInfo?> lastRuntimeUpgrade( + {_i1.BlockHash? at}) async { final hashedKey = _lastRuntimeUpgrade.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _lastRuntimeUpgrade.decodeValue(bytes); } @@ -349,7 +448,10 @@ class Queries { /// True if we have upgraded so that `type RefCount` is `u32`. False (default) if not. _i14.Future upgradedToU32RefCount({_i1.BlockHash? at}) async { final hashedKey = _upgradedToU32RefCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _upgradedToU32RefCount.decodeValue(bytes); } @@ -360,7 +462,10 @@ class Queries { /// (default) if not. _i14.Future upgradedToTripleRefCount({_i1.BlockHash? at}) async { final hashedKey = _upgradedToTripleRefCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _upgradedToTripleRefCount.decodeValue(bytes); } @@ -370,7 +475,10 @@ class Queries { /// The execution phase of the block. _i14.Future<_i11.Phase?> executionPhase({_i1.BlockHash? at}) async { final hashedKey = _executionPhase.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _executionPhase.decodeValue(bytes); } @@ -378,9 +486,13 @@ class Queries { } /// `Some` if a code upgrade has been authorized. - _i14.Future<_i12.CodeUpgradeAuthorization?> authorizedUpgrade({_i1.BlockHash? at}) async { + _i14.Future<_i12.CodeUpgradeAuthorization?> authorizedUpgrade( + {_i1.BlockHash? at}) async { final hashedKey = _authorizedUpgrade.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _authorizedUpgrade.decodeValue(bytes); } @@ -396,57 +508,100 @@ class Queries { /// reduction. _i14.Future<_i13.Weight> extrinsicWeightReclaimed({_i1.BlockHash? at}) async { final hashedKey = _extrinsicWeightReclaimed.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _extrinsicWeightReclaimed.decodeValue(bytes); } - return _i13.Weight(refTime: BigInt.zero, proofSize: BigInt.zero); /* Default */ + return _i13.Weight( + refTime: BigInt.zero, + proofSize: BigInt.zero, + ); /* Default */ } /// The full account information for a particular account ID. - _i14.Future> multiAccount(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { + _i14.Future> multiAccount( + List<_i2.AccountId32> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _account.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _account.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _account.decodeValue(v.key)) + .toList(); } return (keys - .map( - (key) => _i3.AccountInfo( - nonce: 0, - consumers: 0, - providers: 0, - sufficients: 0, - data: _i15.AccountData( - free: BigInt.zero, - reserved: BigInt.zero, - frozen: BigInt.zero, - flags: BigInt.parse('170141183460469231731687303715884105728', radix: 10), + .map((key) => _i3.AccountInfo( + nonce: 0, + consumers: 0, + providers: 0, + sufficients: 0, + data: _i15.AccountData( + free: BigInt.zero, + reserved: BigInt.zero, + frozen: BigInt.zero, + flags: BigInt.parse( + '170141183460469231731687303715884105728', + radix: 10, ), ), - ) - .toList() - as List<_i3.AccountInfo>); /* Default */ + )) + .toList() as List<_i3.AccountInfo>); /* Default */ } /// Map of block numbers to block hashes. - _i14.Future> multiBlockHash(List keys, {_i1.BlockHash? at}) async { + _i14.Future> multiBlockHash( + List keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _blockHash.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _blockHash.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _blockHash.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => List.filled(32, 0, growable: false)).toList() as List<_i6.H256>); /* Default */ + return (keys + .map((key) => List.filled( + 32, + 0, + growable: false, + )) + .toList() as List<_i6.H256>); /* Default */ } /// Extrinsics data for the current block (maps an extrinsic's index to its data). - _i14.Future>> multiExtrinsicData(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _extrinsicData.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i14.Future>> multiExtrinsicData( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _extrinsicData.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _extrinsicData.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _extrinsicData.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => List.filled(0, 0, growable: true)).toList() as List>); /* Default */ + return (keys + .map((key) => List.filled( + 0, + 0, + growable: true, + )) + .toList() as List>); /* Default */ } /// Mapping between a topic (represented by T::Hash) and a vector of indexes @@ -459,13 +614,23 @@ class Queries { /// The value has the type `(BlockNumberFor, EventIndex)` because if we used only just /// the `EventIndex` then in case if the topic has the same contents on the next block /// no notification will be triggered thus the event might be lost. - _i14.Future>>> multiEventTopics(List<_i6.H256> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _eventTopics.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i14.Future>>> multiEventTopics( + List<_i6.H256> keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _eventTopics.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _eventTopics.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _eventTopics.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => []).toList() as List>>); /* Default */ + return (keys.map((key) => []).toList() + as List>>); /* Default */ } /// Returns the storage key for `account`. @@ -642,7 +807,8 @@ class Txs { } /// Set some items of storage. - _i17.System setStorage({required List<_i9.Tuple2, List>> items}) { + _i17.System setStorage( + {required List<_i9.Tuple2, List>> items}) { return _i17.System(_i18.SetStorage(items: items)); } @@ -655,8 +821,14 @@ class Txs { /// /// **NOTE:** We rely on the Root origin to provide us the number of subkeys under /// the prefix we are removing to accurately calculate the weight of this function. - _i17.System killPrefix({required List prefix, required int subkeys}) { - return _i17.System(_i18.KillPrefix(prefix: prefix, subkeys: subkeys)); + _i17.System killPrefix({ + required List prefix, + required int subkeys, + }) { + return _i17.System(_i18.KillPrefix( + prefix: prefix, + subkeys: subkeys, + )); } /// Make some on-chain remark and emit event. @@ -703,41 +875,74 @@ class Constants { /// Block & extrinsics weights: base values and limits. final _i19.BlockWeights blockWeights = _i19.BlockWeights( - baseBlock: _i13.Weight(refTime: BigInt.from(431614000), proofSize: BigInt.zero), + baseBlock: _i13.Weight( + refTime: BigInt.from(431614000), + proofSize: BigInt.zero, + ), maxBlock: _i13.Weight( refTime: BigInt.from(6000000000000), - proofSize: BigInt.parse('18446744073709551615', radix: 10), + proofSize: BigInt.parse( + '18446744073709551615', + radix: 10, + ), ), perClass: _i20.PerDispatchClass( normal: _i21.WeightsPerClass( - baseExtrinsic: _i13.Weight(refTime: BigInt.from(108157000), proofSize: BigInt.zero), + baseExtrinsic: _i13.Weight( + refTime: BigInt.from(108157000), + proofSize: BigInt.zero, + ), maxExtrinsic: _i13.Weight( refTime: BigInt.from(3899891843000), - proofSize: BigInt.parse('11990383647911208550', radix: 10), + proofSize: BigInt.parse( + '11990383647911208550', + radix: 10, + ), ), maxTotal: _i13.Weight( refTime: BigInt.from(4500000000000), - proofSize: BigInt.parse('13835058055282163711', radix: 10), + proofSize: BigInt.parse( + '13835058055282163711', + radix: 10, + ), + ), + reserved: _i13.Weight( + refTime: BigInt.zero, + proofSize: BigInt.zero, ), - reserved: _i13.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), ), operational: _i21.WeightsPerClass( - baseExtrinsic: _i13.Weight(refTime: BigInt.from(108157000), proofSize: BigInt.zero), + baseExtrinsic: _i13.Weight( + refTime: BigInt.from(108157000), + proofSize: BigInt.zero, + ), maxExtrinsic: _i13.Weight( refTime: BigInt.from(5399891843000), - proofSize: BigInt.parse('16602069666338596454', radix: 10), + proofSize: BigInt.parse( + '16602069666338596454', + radix: 10, + ), ), maxTotal: _i13.Weight( refTime: BigInt.from(6000000000000), - proofSize: BigInt.parse('18446744073709551615', radix: 10), + proofSize: BigInt.parse( + '18446744073709551615', + radix: 10, + ), ), reserved: _i13.Weight( refTime: BigInt.from(1500000000000), - proofSize: BigInt.parse('4611686018427387904', radix: 10), + proofSize: BigInt.parse( + '4611686018427387904', + radix: 10, + ), ), ), mandatory: _i21.WeightsPerClass( - baseExtrinsic: _i13.Weight(refTime: BigInt.from(108157000), proofSize: BigInt.zero), + baseExtrinsic: _i13.Weight( + refTime: BigInt.from(108157000), + proofSize: BigInt.zero, + ), maxExtrinsic: null, maxTotal: null, reserved: null, @@ -747,8 +952,11 @@ class Constants { /// The maximum length of a block (in bytes). final _i22.BlockLength blockLength = const _i22.BlockLength( - max: _i23.PerDispatchClass(normal: 3932160, operational: 5242880, mandatory: 5242880), - ); + max: _i23.PerDispatchClass( + normal: 3932160, + operational: 5242880, + mandatory: 5242880, + )); /// Maximum number of block number to block hash mappings to keep (oldest pruned first). final int blockHashCount = 4096; @@ -764,21 +972,165 @@ class Constants { specName: 'quantus-runtime', implName: 'quantus-runtime', authoringVersion: 1, - specVersion: 128, + specVersion: 129, implVersion: 1, apis: [ - _i9.Tuple2, int>([223, 106, 203, 104, 153, 7, 96, 155], 5), - _i9.Tuple2, int>([55, 227, 151, 252, 124, 145, 245, 228], 2), - _i9.Tuple2, int>([64, 254, 58, 212, 1, 248, 149, 154], 6), - _i9.Tuple2, int>([210, 188, 152, 151, 238, 208, 143, 21], 3), - _i9.Tuple2, int>([247, 139, 39, 139, 229, 63, 69, 76], 2), - _i9.Tuple2, int>([171, 60, 5, 114, 41, 31, 235, 139], 1), - _i9.Tuple2, int>([19, 40, 169, 252, 46, 48, 6, 19], 1), - _i9.Tuple2, int>([36, 88, 89, 217, 231, 139, 198, 105], 1), - _i9.Tuple2, int>([188, 157, 137, 144, 79, 91, 146, 63], 1), - _i9.Tuple2, int>([55, 200, 187, 19, 80, 169, 162, 168], 4), - _i9.Tuple2, int>([243, 255, 20, 213, 171, 82, 112, 89], 3), - _i9.Tuple2, int>([251, 197, 119, 185, 215, 71, 239, 214], 1), + _i9.Tuple2, int>( + [ + 223, + 106, + 203, + 104, + 153, + 7, + 96, + 155, + ], + 5, + ), + _i9.Tuple2, int>( + [ + 55, + 227, + 151, + 252, + 124, + 145, + 245, + 228, + ], + 2, + ), + _i9.Tuple2, int>( + [ + 64, + 254, + 58, + 212, + 1, + 248, + 149, + 154, + ], + 6, + ), + _i9.Tuple2, int>( + [ + 210, + 188, + 152, + 151, + 238, + 208, + 143, + 21, + ], + 3, + ), + _i9.Tuple2, int>( + [ + 247, + 139, + 39, + 139, + 229, + 63, + 69, + 76, + ], + 2, + ), + _i9.Tuple2, int>( + [ + 171, + 60, + 5, + 114, + 41, + 31, + 235, + 139, + ], + 1, + ), + _i9.Tuple2, int>( + [ + 19, + 40, + 169, + 252, + 46, + 48, + 6, + 19, + ], + 1, + ), + _i9.Tuple2, int>( + [ + 36, + 88, + 89, + 217, + 231, + 139, + 198, + 105, + ], + 1, + ), + _i9.Tuple2, int>( + [ + 188, + 157, + 137, + 144, + 79, + 91, + 146, + 63, + ], + 1, + ), + _i9.Tuple2, int>( + [ + 55, + 200, + 187, + 19, + 80, + 169, + 162, + 168, + ], + 4, + ), + _i9.Tuple2, int>( + [ + 243, + 255, + 20, + 213, + 171, + 82, + 112, + 89, + ], + 3, + ), + _i9.Tuple2, int>( + [ + 251, + 197, + 119, + 185, + 215, + 71, + 239, + 214, + ], + 1, + ), ], transactionVersion: 2, systemVersion: 1, diff --git a/quantus_sdk/lib/generated/planck/pallets/tech_collective.dart b/quantus_sdk/lib/generated/planck/pallets/tech_collective.dart index 61efa344..62d1fcf7 100644 --- a/quantus_sdk/lib/generated/planck/pallets/tech_collective.dart +++ b/quantus_sdk/lib/generated/planck/pallets/tech_collective.dart @@ -26,40 +26,41 @@ class Queries { final _i1.StorageMap<_i3.AccountId32, _i4.MemberRecord> _members = const _i1.StorageMap<_i3.AccountId32, _i4.MemberRecord>( - prefix: 'TechCollective', - storage: 'Members', - valueCodec: _i4.MemberRecord.codec, - hasher: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), - ); + prefix: 'TechCollective', + storage: 'Members', + valueCodec: _i4.MemberRecord.codec, + hasher: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), + ); final _i1.StorageDoubleMap _idToIndex = const _i1.StorageDoubleMap( - prefix: 'TechCollective', - storage: 'IdToIndex', - valueCodec: _i2.U32Codec.codec, - hasher1: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), - hasher2: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), - ); + prefix: 'TechCollective', + storage: 'IdToIndex', + valueCodec: _i2.U32Codec.codec, + hasher1: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), + hasher2: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), + ); final _i1.StorageDoubleMap _indexToId = const _i1.StorageDoubleMap( - prefix: 'TechCollective', - storage: 'IndexToId', - valueCodec: _i3.AccountId32Codec(), - hasher1: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), - hasher2: _i1.StorageHasher.twoxx64Concat(_i2.U32Codec.codec), - ); + prefix: 'TechCollective', + storage: 'IndexToId', + valueCodec: _i3.AccountId32Codec(), + hasher1: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), + hasher2: _i1.StorageHasher.twoxx64Concat(_i2.U32Codec.codec), + ); final _i1.StorageDoubleMap _voting = const _i1.StorageDoubleMap( - prefix: 'TechCollective', - storage: 'Voting', - valueCodec: _i5.VoteRecord.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i2.U32Codec.codec), - hasher2: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), - ); - - final _i1.StorageMap> _votingCleanup = const _i1.StorageMap>( + prefix: 'TechCollective', + storage: 'Voting', + valueCodec: _i5.VoteRecord.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i2.U32Codec.codec), + hasher2: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), + ); + + final _i1.StorageMap> _votingCleanup = + const _i1.StorageMap>( prefix: 'TechCollective', storage: 'VotingCleanup', valueCodec: _i2.U8SequenceCodec.codec, @@ -68,9 +69,15 @@ class Queries { /// The number of members in the collective who have at least the rank according to the index /// of the vec. - _i6.Future memberCount(int key1, {_i1.BlockHash? at}) async { + _i6.Future memberCount( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _memberCount.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _memberCount.decodeValue(bytes); } @@ -78,9 +85,15 @@ class Queries { } /// The current members of the collective. - _i6.Future<_i4.MemberRecord?> members(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i6.Future<_i4.MemberRecord?> members( + _i3.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _members.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _members.decodeValue(bytes); } @@ -88,9 +101,19 @@ class Queries { } /// The index of each ranks's member into the group of members who have at least that rank. - _i6.Future idToIndex(int key1, _i3.AccountId32 key2, {_i1.BlockHash? at}) async { - final hashedKey = _idToIndex.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); + _i6.Future idToIndex( + int key1, + _i3.AccountId32 key2, { + _i1.BlockHash? at, + }) async { + final hashedKey = _idToIndex.hashedKeyFor( + key1, + key2, + ); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _idToIndex.decodeValue(bytes); } @@ -99,9 +122,19 @@ class Queries { /// The members in the collective by index. All indices in the range `0..MemberCount` will /// return `Some`, however a member's index is not guaranteed to remain unchanged over time. - _i6.Future<_i3.AccountId32?> indexToId(int key1, int key2, {_i1.BlockHash? at}) async { - final hashedKey = _indexToId.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); + _i6.Future<_i3.AccountId32?> indexToId( + int key1, + int key2, { + _i1.BlockHash? at, + }) async { + final hashedKey = _indexToId.hashedKeyFor( + key1, + key2, + ); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _indexToId.decodeValue(bytes); } @@ -109,18 +142,34 @@ class Queries { } /// Votes on a given proposal, if it is ongoing. - _i6.Future<_i5.VoteRecord?> voting(int key1, _i3.AccountId32 key2, {_i1.BlockHash? at}) async { - final hashedKey = _voting.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); + _i6.Future<_i5.VoteRecord?> voting( + int key1, + _i3.AccountId32 key2, { + _i1.BlockHash? at, + }) async { + final hashedKey = _voting.hashedKeyFor( + key1, + key2, + ); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _voting.decodeValue(bytes); } return null; /* Nullable */ } - _i6.Future?> votingCleanup(int key1, {_i1.BlockHash? at}) async { + _i6.Future?> votingCleanup( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _votingCleanup.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _votingCleanup.decodeValue(bytes); } @@ -129,30 +178,56 @@ class Queries { /// The number of members in the collective who have at least the rank according to the index /// of the vec. - _i6.Future> multiMemberCount(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _memberCount.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i6.Future> multiMemberCount( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _memberCount.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _memberCount.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _memberCount.decodeValue(v.key)) + .toList(); } return (keys.map((key) => 0).toList() as List); /* Default */ } /// The current members of the collective. - _i6.Future> multiMembers(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + _i6.Future> multiMembers( + List<_i3.AccountId32> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _members.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _members.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _members.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } - _i6.Future?>> multiVotingCleanup(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _votingCleanup.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i6.Future?>> multiVotingCleanup( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _votingCleanup.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _votingCleanup.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _votingCleanup.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -170,20 +245,38 @@ class Queries { } /// Returns the storage key for `idToIndex`. - _i7.Uint8List idToIndexKey(int key1, _i3.AccountId32 key2) { - final hashedKey = _idToIndex.hashedKeyFor(key1, key2); + _i7.Uint8List idToIndexKey( + int key1, + _i3.AccountId32 key2, + ) { + final hashedKey = _idToIndex.hashedKeyFor( + key1, + key2, + ); return hashedKey; } /// Returns the storage key for `indexToId`. - _i7.Uint8List indexToIdKey(int key1, int key2) { - final hashedKey = _indexToId.hashedKeyFor(key1, key2); + _i7.Uint8List indexToIdKey( + int key1, + int key2, + ) { + final hashedKey = _indexToId.hashedKeyFor( + key1, + key2, + ); return hashedKey; } /// Returns the storage key for `voting`. - _i7.Uint8List votingKey(int key1, _i3.AccountId32 key2) { - final hashedKey = _voting.hashedKeyFor(key1, key2); + _i7.Uint8List votingKey( + int key1, + _i3.AccountId32 key2, + ) { + final hashedKey = _voting.hashedKeyFor( + key1, + key2, + ); return hashedKey; } @@ -271,8 +364,14 @@ class Txs { /// - `min_rank`: The rank of the member or greater. /// /// Weight: `O(min_rank)`. - _i8.TechCollective removeMember({required _i9.MultiAddress who, required int minRank}) { - return _i8.TechCollective(_i10.RemoveMember(who: who, minRank: minRank)); + _i8.TechCollective removeMember({ + required _i9.MultiAddress who, + required int minRank, + }) { + return _i8.TechCollective(_i10.RemoveMember( + who: who, + minRank: minRank, + )); } /// Add an aye or nay vote for the sender to the given proposal. @@ -286,8 +385,14 @@ class Txs { /// fee. /// /// Weight: `O(1)`, less if there was no previous vote on the poll by the member. - _i8.TechCollective vote({required int poll, required bool aye}) { - return _i8.TechCollective(_i10.Vote(poll: poll, aye: aye)); + _i8.TechCollective vote({ + required int poll, + required bool aye, + }) { + return _i8.TechCollective(_i10.Vote( + poll: poll, + aye: aye, + )); } /// Remove votes from the given poll. It must have ended. @@ -300,8 +405,14 @@ class Txs { /// Transaction fees are waived if the operation is successful. /// /// Weight `O(max)` (less if there are fewer items to remove than `max`). - _i8.TechCollective cleanupPoll({required int pollIndex, required int max}) { - return _i8.TechCollective(_i10.CleanupPoll(pollIndex: pollIndex, max: max)); + _i8.TechCollective cleanupPoll({ + required int pollIndex, + required int max, + }) { + return _i8.TechCollective(_i10.CleanupPoll( + pollIndex: pollIndex, + max: max, + )); } /// Exchanges a member with a new account and the same existing rank. @@ -309,7 +420,13 @@ class Txs { /// - `origin`: Must be the `ExchangeOrigin`. /// - `who`: Account of existing member of rank greater than zero to be exchanged. /// - `new_who`: New Account of existing member of rank greater than zero to exchanged to. - _i8.TechCollective exchangeMember({required _i9.MultiAddress who, required _i9.MultiAddress newWho}) { - return _i8.TechCollective(_i10.ExchangeMember(who: who, newWho: newWho)); + _i8.TechCollective exchangeMember({ + required _i9.MultiAddress who, + required _i9.MultiAddress newWho, + }) { + return _i8.TechCollective(_i10.ExchangeMember( + who: who, + newWho: newWho, + )); } } diff --git a/quantus_sdk/lib/generated/planck/pallets/tech_referenda.dart b/quantus_sdk/lib/generated/planck/pallets/tech_referenda.dart index f3c0a162..1b3db42e 100644 --- a/quantus_sdk/lib/generated/planck/pallets/tech_referenda.dart +++ b/quantus_sdk/lib/generated/planck/pallets/tech_referenda.dart @@ -27,7 +27,8 @@ class Queries { valueCodec: _i2.U32Codec.codec, ); - final _i1.StorageMap _referendumInfoFor = const _i1.StorageMap( + final _i1.StorageMap _referendumInfoFor = + const _i1.StorageMap( prefix: 'TechReferenda', storage: 'ReferendumInfoFor', valueCodec: _i3.ReferendumInfo.codec, @@ -36,22 +37,26 @@ class Queries { final _i1.StorageMap>> _trackQueue = const _i1.StorageMap>>( - prefix: 'TechReferenda', - storage: 'TrackQueue', - valueCodec: _i2.SequenceCodec<_i4.Tuple2>( - _i4.Tuple2Codec(_i2.U32Codec.codec, _i2.U32Codec.codec), - ), - hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), - ); + prefix: 'TechReferenda', + storage: 'TrackQueue', + valueCodec: + _i2.SequenceCodec<_i4.Tuple2>(_i4.Tuple2Codec( + _i2.U32Codec.codec, + _i2.U32Codec.codec, + )), + hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), + ); - final _i1.StorageMap _decidingCount = const _i1.StorageMap( + final _i1.StorageMap _decidingCount = + const _i1.StorageMap( prefix: 'TechReferenda', storage: 'DecidingCount', valueCodec: _i2.U32Codec.codec, hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), ); - final _i1.StorageMap _metadataOf = const _i1.StorageMap( + final _i1.StorageMap _metadataOf = + const _i1.StorageMap( prefix: 'TechReferenda', storage: 'MetadataOf', valueCodec: _i5.H256Codec(), @@ -61,7 +66,10 @@ class Queries { /// The next free referendum index, aka the number of referenda started so far. _i6.Future referendumCount({_i1.BlockHash? at}) async { final hashedKey = _referendumCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _referendumCount.decodeValue(bytes); } @@ -69,9 +77,15 @@ class Queries { } /// Information concerning any given referendum. - _i6.Future<_i3.ReferendumInfo?> referendumInfoFor(int key1, {_i1.BlockHash? at}) async { + _i6.Future<_i3.ReferendumInfo?> referendumInfoFor( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _referendumInfoFor.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _referendumInfoFor.decodeValue(bytes); } @@ -82,9 +96,15 @@ class Queries { /// conviction-weighted approvals. /// /// This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. - _i6.Future>> trackQueue(int key1, {_i1.BlockHash? at}) async { + _i6.Future>> trackQueue( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _trackQueue.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _trackQueue.decodeValue(bytes); } @@ -92,9 +112,15 @@ class Queries { } /// The number of referenda being decided currently. - _i6.Future decidingCount(int key1, {_i1.BlockHash? at}) async { + _i6.Future decidingCount( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _decidingCount.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _decidingCount.decodeValue(bytes); } @@ -107,9 +133,15 @@ class Queries { /// /// Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove) /// large preimages. - _i6.Future<_i5.H256?> metadataOf(int key1, {_i1.BlockHash? at}) async { + _i6.Future<_i5.H256?> metadataOf( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _metadataOf.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _metadataOf.decodeValue(bytes); } @@ -117,11 +149,20 @@ class Queries { } /// Information concerning any given referendum. - _i6.Future> multiReferendumInfoFor(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _referendumInfoFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i6.Future> multiReferendumInfoFor( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _referendumInfoFor.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _referendumInfoFor.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _referendumInfoFor.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -130,21 +171,40 @@ class Queries { /// conviction-weighted approvals. /// /// This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. - _i6.Future>>> multiTrackQueue(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _trackQueue.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i6.Future>>> multiTrackQueue( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _trackQueue.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _trackQueue.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _trackQueue.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => []).toList() as List>>); /* Default */ + return (keys.map((key) => []).toList() + as List>>); /* Default */ } /// The number of referenda being decided currently. - _i6.Future> multiDecidingCount(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _decidingCount.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i6.Future> multiDecidingCount( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _decidingCount.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _decidingCount.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _decidingCount.decodeValue(v.key)) + .toList(); } return (keys.map((key) => 0).toList() as List); /* Default */ } @@ -155,11 +215,20 @@ class Queries { /// /// Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove) /// large preimages. - _i6.Future> multiMetadataOf(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _metadataOf.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i6.Future> multiMetadataOf( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _metadataOf.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _metadataOf.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _metadataOf.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -236,9 +305,11 @@ class Txs { required _i10.Bounded proposal, required _i11.DispatchTime enactmentMoment, }) { - return _i8.TechReferenda( - _i12.Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment), - ); + return _i8.TechReferenda(_i12.Submit( + proposalOrigin: proposalOrigin, + proposal: proposal, + enactmentMoment: enactmentMoment, + )); } /// Post the Decision Deposit for a referendum. @@ -323,8 +394,14 @@ class Txs { /// metadata of a finished referendum. /// - `index`: The index of a referendum to set or clear metadata for. /// - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. - _i8.TechReferenda setMetadata({required int index, _i5.H256? maybeHash}) { - return _i8.TechReferenda(_i12.SetMetadata(index: index, maybeHash: maybeHash)); + _i8.TechReferenda setMetadata({ + required int index, + _i5.H256? maybeHash, + }) { + return _i8.TechReferenda(_i12.SetMetadata( + index: index, + maybeHash: maybeHash, + )); } } @@ -360,9 +437,17 @@ class Constants { decisionPeriod: 7200, confirmPeriod: 20, minEnactmentPeriod: 20, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 500000000, ceil: 1000000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 0, ceil: 0), + minApproval: const _i14.LinearDecreasing( + length: 1000000000, + floor: 500000000, + ceil: 1000000000, + ), + minSupport: const _i14.LinearDecreasing( + length: 1000000000, + floor: 0, + ceil: 0, + ), ), - ), + ) ]; } diff --git a/quantus_sdk/lib/generated/planck/pallets/timestamp.dart b/quantus_sdk/lib/generated/planck/pallets/timestamp.dart index 5f716696..d68a6568 100644 --- a/quantus_sdk/lib/generated/planck/pallets/timestamp.dart +++ b/quantus_sdk/lib/generated/planck/pallets/timestamp.dart @@ -28,7 +28,10 @@ class Queries { /// The current time for the current block. _i3.Future now({_i1.BlockHash? at}) async { final hashedKey = _now.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _now.decodeValue(bytes); } @@ -41,7 +44,10 @@ class Queries { /// It is then checked at the end of each block execution in the `on_finalize` hook. _i3.Future didUpdate({_i1.BlockHash? at}) async { final hashedKey = _didUpdate.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _didUpdate.decodeValue(bytes); } diff --git a/quantus_sdk/lib/generated/planck/pallets/transaction_payment.dart b/quantus_sdk/lib/generated/planck/pallets/transaction_payment.dart index 2d15bce2..b74b49b4 100644 --- a/quantus_sdk/lib/generated/planck/pallets/transaction_payment.dart +++ b/quantus_sdk/lib/generated/planck/pallets/transaction_payment.dart @@ -13,19 +13,22 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue<_i2.FixedU128> _nextFeeMultiplier = const _i1.StorageValue<_i2.FixedU128>( + final _i1.StorageValue<_i2.FixedU128> _nextFeeMultiplier = + const _i1.StorageValue<_i2.FixedU128>( prefix: 'TransactionPayment', storage: 'NextFeeMultiplier', valueCodec: _i2.FixedU128Codec(), ); - final _i1.StorageValue<_i3.Releases> _storageVersion = const _i1.StorageValue<_i3.Releases>( + final _i1.StorageValue<_i3.Releases> _storageVersion = + const _i1.StorageValue<_i3.Releases>( prefix: 'TransactionPayment', storage: 'StorageVersion', valueCodec: _i3.Releases.codec, ); - final _i1.StorageValue<_i4.NoDrop> _txPaymentCredit = const _i1.StorageValue<_i4.NoDrop>( + final _i1.StorageValue<_i4.NoDrop> _txPaymentCredit = + const _i1.StorageValue<_i4.NoDrop>( prefix: 'TransactionPayment', storage: 'TxPaymentCredit', valueCodec: _i4.NoDropCodec(), @@ -33,16 +36,25 @@ class Queries { _i5.Future<_i2.FixedU128> nextFeeMultiplier({_i1.BlockHash? at}) async { final hashedKey = _nextFeeMultiplier.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _nextFeeMultiplier.decodeValue(bytes); } - return BigInt.parse('1000000000000000000', radix: 10); /* Default */ + return BigInt.parse( + '1000000000000000000', + radix: 10, + ); /* Default */ } _i5.Future<_i3.Releases> storageVersion({_i1.BlockHash? at}) async { final hashedKey = _storageVersion.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _storageVersion.decodeValue(bytes); } @@ -54,7 +66,10 @@ class Queries { /// Use `withdraw_txfee` and `remaining_txfee` to access from outside the crate. _i5.Future<_i4.NoDrop?> txPaymentCredit({_i1.BlockHash? at}) async { final hashedKey = _txPaymentCredit.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _txPaymentCredit.decodeValue(bytes); } diff --git a/quantus_sdk/lib/generated/planck/pallets/treasury_pallet.dart b/quantus_sdk/lib/generated/planck/pallets/treasury_pallet.dart index a0db558f..69ecc343 100644 --- a/quantus_sdk/lib/generated/planck/pallets/treasury_pallet.dart +++ b/quantus_sdk/lib/generated/planck/pallets/treasury_pallet.dart @@ -14,13 +14,15 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue<_i2.AccountId32> _treasuryAccount = const _i1.StorageValue<_i2.AccountId32>( + final _i1.StorageValue<_i2.AccountId32> _treasuryAccount = + const _i1.StorageValue<_i2.AccountId32>( prefix: 'TreasuryPallet', storage: 'TreasuryAccount', valueCodec: _i2.AccountId32Codec(), ); - final _i1.StorageValue<_i3.Permill> _treasuryPortion = const _i1.StorageValue<_i3.Permill>( + final _i1.StorageValue<_i3.Permill> _treasuryPortion = + const _i1.StorageValue<_i3.Permill>( prefix: 'TreasuryPallet', storage: 'TreasuryPortion', valueCodec: _i3.PermillCodec(), @@ -29,7 +31,10 @@ class Queries { /// The treasury account that receives mining rewards. _i4.Future<_i2.AccountId32?> treasuryAccount({_i1.BlockHash? at}) async { final hashedKey = _treasuryAccount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _treasuryAccount.decodeValue(bytes); } @@ -40,7 +45,10 @@ class Queries { /// Uses OptionQuery so genesis is required. Permill allows fine granularity (e.g. 33.3%). _i4.Future<_i3.Permill?> treasuryPortion({_i1.BlockHash? at}) async { final hashedKey = _treasuryPortion.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _treasuryPortion.decodeValue(bytes); } @@ -64,6 +72,11 @@ class Txs { const Txs(); /// Set the treasury account. Root only. Zero address is rejected (funds would be locked). + /// + /// **Important**: This only changes where *future* mining rewards are sent. Any balance + /// that has already accumulated in the current treasury account is NOT automatically + /// migrated to the new account. If you need to move existing funds, perform a separate + /// balance transfer (e.g., via governance proposal) after updating the account. _i6.TreasuryPallet setTreasuryAccount({required _i2.AccountId32 account}) { return _i6.TreasuryPallet(_i7.SetTreasuryAccount(account: account)); } diff --git a/quantus_sdk/lib/generated/planck/pallets/utility.dart b/quantus_sdk/lib/generated/planck/pallets/utility.dart index 52251630..5f1507a7 100644 --- a/quantus_sdk/lib/generated/planck/pallets/utility.dart +++ b/quantus_sdk/lib/generated/planck/pallets/utility.dart @@ -42,8 +42,14 @@ class Txs { /// NOTE: Prior to version *12, this was called `as_limited_sub`. /// /// The dispatch origin for this call must be _Signed_. - _i1.Utility asDerivative({required int index, required _i1.RuntimeCall call}) { - return _i1.Utility(_i2.AsDerivative(index: index, call: call)); + _i1.Utility asDerivative({ + required int index, + required _i1.RuntimeCall call, + }) { + return _i1.Utility(_i2.AsDerivative( + index: index, + call: call, + )); } /// Send a batch of dispatch calls and atomically execute them. @@ -69,8 +75,14 @@ class Txs { /// /// ## Complexity /// - O(1). - _i1.Utility dispatchAs({required _i3.OriginCaller asOrigin, required _i1.RuntimeCall call}) { - return _i1.Utility(_i2.DispatchAs(asOrigin: asOrigin, call: call)); + _i1.Utility dispatchAs({ + required _i3.OriginCaller asOrigin, + required _i1.RuntimeCall call, + }) { + return _i1.Utility(_i2.DispatchAs( + asOrigin: asOrigin, + call: call, + )); } /// Send a batch of dispatch calls. @@ -96,8 +108,14 @@ class Txs { /// Root origin to specify the weight of the call. /// /// The dispatch origin for this call must be _Root_. - _i1.Utility withWeight({required _i1.RuntimeCall call, required _i4.Weight weight}) { - return _i1.Utility(_i2.WithWeight(call: call, weight: weight)); + _i1.Utility withWeight({ + required _i1.RuntimeCall call, + required _i4.Weight weight, + }) { + return _i1.Utility(_i2.WithWeight( + call: call, + weight: weight, + )); } /// Dispatch a fallback call in the event the main call fails to execute. @@ -123,8 +141,14 @@ class Txs { /// ## Use Case /// - Some use cases might involve submitting a `batch` type call in either main, fallback /// or both. - _i1.Utility ifElse({required _i1.RuntimeCall main, required _i1.RuntimeCall fallback}) { - return _i1.Utility(_i2.IfElse(main: main, fallback: fallback)); + _i1.Utility ifElse({ + required _i1.RuntimeCall main, + required _i1.RuntimeCall fallback, + }) { + return _i1.Utility(_i2.IfElse( + main: main, + fallback: fallback, + )); } /// Dispatches a function call with a provided origin. @@ -132,8 +156,14 @@ class Txs { /// Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call. /// /// The dispatch origin for this call must be _Root_. - _i1.Utility dispatchAsFallible({required _i3.OriginCaller asOrigin, required _i1.RuntimeCall call}) { - return _i1.Utility(_i2.DispatchAsFallible(asOrigin: asOrigin, call: call)); + _i1.Utility dispatchAsFallible({ + required _i3.OriginCaller asOrigin, + required _i1.RuntimeCall call, + }) { + return _i1.Utility(_i2.DispatchAsFallible( + asOrigin: asOrigin, + call: call, + )); } } diff --git a/quantus_sdk/lib/generated/planck/pallets/wormhole.dart b/quantus_sdk/lib/generated/planck/pallets/wormhole.dart index c2e6c75d..131fd829 100644 --- a/quantus_sdk/lib/generated/planck/pallets/wormhole.dart +++ b/quantus_sdk/lib/generated/planck/pallets/wormhole.dart @@ -16,32 +16,43 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageMap, bool> _usedNullifiers = const _i1.StorageMap, bool>( + final _i1.StorageMap, bool> _usedNullifiers = + const _i1.StorageMap, bool>( prefix: 'Wormhole', storage: 'UsedNullifiers', valueCodec: _i2.BoolCodec.codec, hasher: _i1.StorageHasher.blake2b128Concat(_i2.U8ArrayCodec(32)), ); - final _i1.StorageMap<_i3.AccountId32, BigInt> _transferCount = const _i1.StorageMap<_i3.AccountId32, BigInt>( + final _i1.StorageMap<_i3.AccountId32, BigInt> _transferCount = + const _i1.StorageMap<_i3.AccountId32, BigInt>( prefix: 'Wormhole', storage: 'TransferCount', valueCodec: _i2.U64Codec.codec, hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), ); - final _i1.StorageValue>> _genesisEndowmentsPending = + final _i1.StorageValue>> + _genesisEndowmentsPending = const _i1.StorageValue>>( - prefix: 'Wormhole', - storage: 'GenesisEndowmentsPending', - valueCodec: _i2.SequenceCodec<_i4.Tuple2<_i3.AccountId32, BigInt>>( - _i4.Tuple2Codec<_i3.AccountId32, BigInt>(_i3.AccountId32Codec(), _i2.U128Codec.codec), - ), - ); - - _i5.Future usedNullifiers(List key1, {_i1.BlockHash? at}) async { + prefix: 'Wormhole', + storage: 'GenesisEndowmentsPending', + valueCodec: _i2.SequenceCodec<_i4.Tuple2<_i3.AccountId32, BigInt>>( + _i4.Tuple2Codec<_i3.AccountId32, BigInt>( + _i3.AccountId32Codec(), + _i2.U128Codec.codec, + )), + ); + + _i5.Future usedNullifiers( + List key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _usedNullifiers.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _usedNullifiers.decodeValue(bytes); } @@ -49,9 +60,15 @@ class Queries { } /// Transfer count per recipient - used to generate unique leaf indices in the ZK trie. - _i5.Future transferCount(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i5.Future transferCount( + _i3.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _transferCount.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _transferCount.decodeValue(bytes); } @@ -64,32 +81,55 @@ class Queries { /// then cleared. This ensures indexers like Subsquid can track genesis transfers. /// /// Unbounded because it's only populated at genesis and cleared on block 1. - _i5.Future>> genesisEndowmentsPending({_i1.BlockHash? at}) async { + _i5.Future>> + genesisEndowmentsPending({_i1.BlockHash? at}) async { final hashedKey = _genesisEndowmentsPending.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _genesisEndowmentsPending.decodeValue(bytes); } return []; /* Default */ } - _i5.Future> multiUsedNullifiers(List> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _usedNullifiers.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i5.Future> multiUsedNullifiers( + List> keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _usedNullifiers.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _usedNullifiers.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _usedNullifiers.decodeValue(v.key)) + .toList(); } return (keys.map((key) => false).toList() as List); /* Default */ } /// Transfer count per recipient - used to generate unique leaf indices in the ZK trie. - _i5.Future> multiTransferCount(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _transferCount.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i5.Future> multiTransferCount( + List<_i3.AccountId32> keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _transferCount.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _transferCount.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _transferCount.decodeValue(v.key)) + .toList(); } - return (keys.map((key) => BigInt.zero).toList() as List); /* Default */ + return (keys.map((key) => BigInt.zero).toList() + as List); /* Default */ } /// Returns the storage key for `usedNullifiers`. diff --git a/quantus_sdk/lib/generated/planck/pallets/zk_tree.dart b/quantus_sdk/lib/generated/planck/pallets/zk_tree.dart index 518803dd..343185d0 100644 --- a/quantus_sdk/lib/generated/planck/pallets/zk_tree.dart +++ b/quantus_sdk/lib/generated/planck/pallets/zk_tree.dart @@ -13,7 +13,8 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageMap _leaves = const _i1.StorageMap( + final _i1.StorageMap _leaves = + const _i1.StorageMap( prefix: 'ZkTree', storage: 'Leaves', valueCodec: _i2.ZkLeaf.codec, @@ -22,11 +23,14 @@ class Queries { final _i1.StorageMap<_i4.Tuple2, List> _nodes = const _i1.StorageMap<_i4.Tuple2, List>( - prefix: 'ZkTree', - storage: 'Nodes', - valueCodec: _i3.U8ArrayCodec(32), - hasher: _i1.StorageHasher.identity(_i4.Tuple2Codec(_i3.U8Codec.codec, _i3.U64Codec.codec)), - ); + prefix: 'ZkTree', + storage: 'Nodes', + valueCodec: _i3.U8ArrayCodec(32), + hasher: _i1.StorageHasher.identity(_i4.Tuple2Codec( + _i3.U8Codec.codec, + _i3.U64Codec.codec, + )), + ); final _i1.StorageValue _leafCount = const _i1.StorageValue( prefix: 'ZkTree', @@ -47,9 +51,15 @@ class Queries { ); /// Leaf data stored by index. - _i5.Future<_i2.ZkLeaf?> leaves(BigInt key1, {_i1.BlockHash? at}) async { + _i5.Future<_i2.ZkLeaf?> leaves( + BigInt key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _leaves.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _leaves.decodeValue(bytes); } @@ -59,9 +69,15 @@ class Queries { /// Internal tree nodes: (level, index) -> hash. /// Level 0 is unused (leaves are hashed on-demand). /// Level 1+ contains internal node hashes. - _i5.Future?> nodes(_i4.Tuple2 key1, {_i1.BlockHash? at}) async { + _i5.Future?> nodes( + _i4.Tuple2 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _nodes.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _nodes.decodeValue(bytes); } @@ -71,7 +87,10 @@ class Queries { /// Number of leaves in the tree. _i5.Future leafCount({_i1.BlockHash? at}) async { final hashedKey = _leafCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _leafCount.decodeValue(bytes); } @@ -81,7 +100,10 @@ class Queries { /// Current depth of the tree (0 = empty, 1 = up to 4 leaves, etc.). _i5.Future depth({_i1.BlockHash? at}) async { final hashedKey = _depth.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _depth.decodeValue(bytes); } @@ -91,19 +113,34 @@ class Queries { /// Current root hash of the tree. _i5.Future> root({_i1.BlockHash? at}) async { final hashedKey = _root.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _root.decodeValue(bytes); } - return List.filled(32, 0, growable: false); /* Default */ + return List.filled( + 32, + 0, + growable: false, + ); /* Default */ } /// Leaf data stored by index. - _i5.Future> multiLeaves(List keys, {_i1.BlockHash? at}) async { + _i5.Future> multiLeaves( + List keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _leaves.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _leaves.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _leaves.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -111,9 +148,15 @@ class Queries { /// Internal tree nodes: (level, index) -> hash. /// Level 0 is unused (leaves are hashed on-demand). /// Level 1+ contains internal node hashes. - _i5.Future?>> multiNodes(List<_i4.Tuple2> keys, {_i1.BlockHash? at}) async { + _i5.Future?>> multiNodes( + List<_i4.Tuple2> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _nodes.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { return bytes.first.changes.map((v) => _nodes.decodeValue(v.key)).toList(); } diff --git a/quantus_sdk/lib/generated/planck/planck.dart b/quantus_sdk/lib/generated/planck/planck.dart index 58ad3bda..1ce5fc17 100644 --- a/quantus_sdk/lib/generated/planck/planck.dart +++ b/quantus_sdk/lib/generated/planck/planck.dart @@ -27,26 +27,26 @@ import 'pallets/zk_tree.dart' as _i21; class Queries { Queries(_i1.StateApi api) - : system = _i2.Queries(api), - timestamp = _i3.Queries(api), - balances = _i4.Queries(api), - transactionPayment = _i5.Queries(api), - qPoW = _i6.Queries(api), - miningRewards = _i7.Queries(api), - preimage = _i8.Queries(api), - scheduler = _i9.Queries(api), - referenda = _i10.Queries(api), - reversibleTransfers = _i11.Queries(api), - convictionVoting = _i12.Queries(api), - techCollective = _i13.Queries(api), - techReferenda = _i14.Queries(api), - treasuryPallet = _i15.Queries(api), - recovery = _i16.Queries(api), - assets = _i17.Queries(api), - assetsHolder = _i18.Queries(api), - multisig = _i19.Queries(api), - wormhole = _i20.Queries(api), - zkTree = _i21.Queries(api); + : system = _i2.Queries(api), + timestamp = _i3.Queries(api), + balances = _i4.Queries(api), + transactionPayment = _i5.Queries(api), + qPoW = _i6.Queries(api), + miningRewards = _i7.Queries(api), + preimage = _i8.Queries(api), + scheduler = _i9.Queries(api), + referenda = _i10.Queries(api), + reversibleTransfers = _i11.Queries(api), + convictionVoting = _i12.Queries(api), + techCollective = _i13.Queries(api), + techReferenda = _i14.Queries(api), + treasuryPallet = _i15.Queries(api), + recovery = _i16.Queries(api), + assets = _i17.Queries(api), + assetsHolder = _i18.Queries(api), + multisig = _i19.Queries(api), + wormhole = _i20.Queries(api), + zkTree = _i21.Queries(api); final _i2.Queries system; @@ -162,7 +162,10 @@ class Constants { } class Rpc { - const Rpc({required this.state, required this.system}); + const Rpc({ + required this.state, + required this.system, + }); final _i1.StateApi state; @@ -175,24 +178,43 @@ class Registry { final int extrinsicVersion = 4; List getSignedExtensionTypes() { - return ['CheckMortality', 'CheckNonce', 'ChargeTransactionPayment', 'CheckMetadataHash']; + return [ + 'CheckMortality', + 'CheckNonce', + 'ChargeTransactionPayment', + 'CheckMetadataHash' + ]; } List getSignedExtensionExtra() { - return ['CheckSpecVersion', 'CheckTxVersion', 'CheckGenesis', 'CheckMortality', 'CheckMetadataHash']; + return [ + 'CheckSpecVersion', + 'CheckTxVersion', + 'CheckGenesis', + 'CheckMortality', + 'CheckMetadataHash' + ]; } } class Planck { - Planck._(this._provider, this.rpc) - : query = Queries(rpc.state), - constant = Constants(), - tx = Extrinsics(), - registry = Registry(); + Planck._( + this._provider, + this.rpc, + ) : query = Queries(rpc.state), + constant = Constants(), + tx = Extrinsics(), + registry = Registry(); factory Planck(_i1.Provider provider) { - final rpc = Rpc(state: _i1.StateApi(provider), system: _i1.SystemApi(provider)); - return Planck._(provider, rpc); + final rpc = Rpc( + state: _i1.StateApi(provider), + system: _i1.SystemApi(provider), + ); + return Planck._( + provider, + rpc, + ); } factory Planck.url(Uri url) { diff --git a/quantus_sdk/lib/generated/planck/types/b_tree_map.dart b/quantus_sdk/lib/generated/planck/types/b_tree_map.dart index 25b6b30c..499cc158 100644 --- a/quantus_sdk/lib/generated/planck/types/b_tree_map.dart +++ b/quantus_sdk/lib/generated/planck/types/b_tree_map.dart @@ -12,21 +12,33 @@ class BTreeMapCodec with _i3.Codec { @override BTreeMap decode(_i3.Input input) { return const _i3.SequenceCodec<_i1.Tuple2<_i2.AccountId32, int>>( - _i1.Tuple2Codec<_i2.AccountId32, int>(_i2.AccountId32Codec(), _i3.U32Codec.codec), - ).decode(input); + _i1.Tuple2Codec<_i2.AccountId32, int>( + _i2.AccountId32Codec(), + _i3.U32Codec.codec, + )).decode(input); } @override - void encodeTo(BTreeMap value, _i3.Output output) { + void encodeTo( + BTreeMap value, + _i3.Output output, + ) { const _i3.SequenceCodec<_i1.Tuple2<_i2.AccountId32, int>>( - _i1.Tuple2Codec<_i2.AccountId32, int>(_i2.AccountId32Codec(), _i3.U32Codec.codec), - ).encodeTo(value, output); + _i1.Tuple2Codec<_i2.AccountId32, int>( + _i2.AccountId32Codec(), + _i3.U32Codec.codec, + )).encodeTo( + value, + output, + ); } @override int sizeHint(BTreeMap value) { return const _i3.SequenceCodec<_i1.Tuple2<_i2.AccountId32, int>>( - _i1.Tuple2Codec<_i2.AccountId32, int>(_i2.AccountId32Codec(), _i3.U32Codec.codec), - ).sizeHint(value); + _i1.Tuple2Codec<_i2.AccountId32, int>( + _i2.AccountId32Codec(), + _i3.U32Codec.codec, + )).sizeHint(value); } } diff --git a/quantus_sdk/lib/generated/planck/types/bounded_collections/bounded_btree_map/bounded_b_tree_map.dart b/quantus_sdk/lib/generated/planck/types/bounded_collections/bounded_btree_map/bounded_b_tree_map.dart index 7b21a5cb..d364098a 100644 --- a/quantus_sdk/lib/generated/planck/types/bounded_collections/bounded_btree_map/bounded_b_tree_map.dart +++ b/quantus_sdk/lib/generated/planck/types/bounded_collections/bounded_btree_map/bounded_b_tree_map.dart @@ -13,15 +13,25 @@ class BoundedBTreeMapCodec with _i2.Codec { @override BoundedBTreeMap decode(_i2.Input input) { return const _i2.SequenceCodec<_i3.Tuple2<_i4.AccountId32, int>>( - _i3.Tuple2Codec<_i4.AccountId32, int>(_i4.AccountId32Codec(), _i2.U32Codec.codec), - ).decode(input); + _i3.Tuple2Codec<_i4.AccountId32, int>( + _i4.AccountId32Codec(), + _i2.U32Codec.codec, + )).decode(input); } @override - void encodeTo(BoundedBTreeMap value, _i2.Output output) { + void encodeTo( + BoundedBTreeMap value, + _i2.Output output, + ) { const _i2.SequenceCodec<_i3.Tuple2<_i4.AccountId32, int>>( - _i3.Tuple2Codec<_i4.AccountId32, int>(_i4.AccountId32Codec(), _i2.U32Codec.codec), - ).encodeTo(value, output); + _i3.Tuple2Codec<_i4.AccountId32, int>( + _i4.AccountId32Codec(), + _i2.U32Codec.codec, + )).encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/cow_1.dart b/quantus_sdk/lib/generated/planck/types/cow_1.dart index deb05241..9f85ccde 100644 --- a/quantus_sdk/lib/generated/planck/types/cow_1.dart +++ b/quantus_sdk/lib/generated/planck/types/cow_1.dart @@ -12,8 +12,14 @@ class CowCodec with _i1.Codec { } @override - void encodeTo(Cow value, _i1.Output output) { - _i1.StrCodec.codec.encodeTo(value, output); + void encodeTo( + Cow value, + _i1.Output output, + ) { + _i1.StrCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/cow_2.dart b/quantus_sdk/lib/generated/planck/types/cow_2.dart index 5077d888..c1e00c6b 100644 --- a/quantus_sdk/lib/generated/planck/types/cow_2.dart +++ b/quantus_sdk/lib/generated/planck/types/cow_2.dart @@ -11,21 +11,33 @@ class CowCodec with _i2.Codec { @override Cow decode(_i2.Input input) { return const _i2.SequenceCodec<_i1.Tuple2, int>>( - _i1.Tuple2Codec, int>(_i2.U8ArrayCodec(8), _i2.U32Codec.codec), - ).decode(input); + _i1.Tuple2Codec, int>( + _i2.U8ArrayCodec(8), + _i2.U32Codec.codec, + )).decode(input); } @override - void encodeTo(Cow value, _i2.Output output) { + void encodeTo( + Cow value, + _i2.Output output, + ) { const _i2.SequenceCodec<_i1.Tuple2, int>>( - _i1.Tuple2Codec, int>(_i2.U8ArrayCodec(8), _i2.U32Codec.codec), - ).encodeTo(value, output); + _i1.Tuple2Codec, int>( + _i2.U8ArrayCodec(8), + _i2.U32Codec.codec, + )).encodeTo( + value, + output, + ); } @override int sizeHint(Cow value) { return const _i2.SequenceCodec<_i1.Tuple2, int>>( - _i1.Tuple2Codec, int>(_i2.U8ArrayCodec(8), _i2.U32Codec.codec), - ).sizeHint(value); + _i1.Tuple2Codec, int>( + _i2.U8ArrayCodec(8), + _i2.U32Codec.codec, + )).sizeHint(value); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/check_metadata_hash.dart b/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/check_metadata_hash.dart index 58d56ebe..59209324 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/check_metadata_hash.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/check_metadata_hash.dart @@ -24,7 +24,12 @@ class CheckMetadataHash { Map toJson() => {'mode': mode.toJson()}; @override - bool operator ==(Object other) => identical(this, other) || other is CheckMetadataHash && other.mode == mode; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is CheckMetadataHash && other.mode == mode; @override int get hashCode => mode.hashCode; @@ -34,8 +39,14 @@ class $CheckMetadataHashCodec with _i1.Codec { const $CheckMetadataHashCodec(); @override - void encodeTo(CheckMetadataHash obj, _i1.Output output) { - _i2.Mode.codec.encodeTo(obj.mode, output); + void encodeTo( + CheckMetadataHash obj, + _i1.Output output, + ) { + _i2.Mode.codec.encodeTo( + obj.mode, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/mode.dart b/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/mode.dart index 5ec6e0eb..a7816bd2 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/mode.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/mode.dart @@ -7,7 +7,10 @@ enum Mode { disabled('Disabled', 0), enabled('Enabled', 1); - const Mode(this.variantName, this.codecIndex); + const Mode( + this.variantName, + this.codecIndex, + ); factory Mode.decode(_i1.Input input) { return codec.decode(input); @@ -43,7 +46,13 @@ class $ModeCodec with _i1.Codec { } @override - void encodeTo(Mode value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Mode value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/dispatch_class.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/dispatch_class.dart index e4f8be5b..5b770447 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/dispatch_class.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/dispatch_class.dart @@ -8,7 +8,10 @@ enum DispatchClass { operational('Operational', 1), mandatory('Mandatory', 2); - const DispatchClass(this.variantName, this.codecIndex); + const DispatchClass( + this.variantName, + this.codecIndex, + ); factory DispatchClass.decode(_i1.Input input) { return codec.decode(input); @@ -46,7 +49,13 @@ class $DispatchClassCodec with _i1.Codec { } @override - void encodeTo(DispatchClass value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + DispatchClass value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/pays.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/pays.dart index 05394649..4667ef73 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/pays.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/pays.dart @@ -7,7 +7,10 @@ enum Pays { yes('Yes', 0), no('No', 1); - const Pays(this.variantName, this.codecIndex); + const Pays( + this.variantName, + this.codecIndex, + ); factory Pays.decode(_i1.Input input) { return codec.decode(input); @@ -43,7 +46,13 @@ class $PaysCodec with _i1.Codec { } @override - void encodeTo(Pays value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Pays value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_1.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_1.dart index 7f410127..5a6fe514 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_1.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_1.dart @@ -6,7 +6,11 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../../sp_weights/weight_v2/weight.dart' as _i2; class PerDispatchClass { - const PerDispatchClass({required this.normal, required this.operational, required this.mandatory}); + const PerDispatchClass({ + required this.normal, + required this.operational, + required this.mandatory, + }); factory PerDispatchClass.decode(_i1.Input input) { return codec.decode(input); @@ -28,31 +32,50 @@ class PerDispatchClass { } Map> toJson() => { - 'normal': normal.toJson(), - 'operational': operational.toJson(), - 'mandatory': mandatory.toJson(), - }; + 'normal': normal.toJson(), + 'operational': operational.toJson(), + 'mandatory': mandatory.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is PerDispatchClass && other.normal == normal && other.operational == operational && other.mandatory == mandatory; @override - int get hashCode => Object.hash(normal, operational, mandatory); + int get hashCode => Object.hash( + normal, + operational, + mandatory, + ); } class $PerDispatchClassCodec with _i1.Codec { const $PerDispatchClassCodec(); @override - void encodeTo(PerDispatchClass obj, _i1.Output output) { - _i2.Weight.codec.encodeTo(obj.normal, output); - _i2.Weight.codec.encodeTo(obj.operational, output); - _i2.Weight.codec.encodeTo(obj.mandatory, output); + void encodeTo( + PerDispatchClass obj, + _i1.Output output, + ) { + _i2.Weight.codec.encodeTo( + obj.normal, + output, + ); + _i2.Weight.codec.encodeTo( + obj.operational, + output, + ); + _i2.Weight.codec.encodeTo( + obj.mandatory, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_2.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_2.dart index 4055b7ae..7b98dfe9 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_2.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_2.dart @@ -6,7 +6,11 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../../frame_system/limits/weights_per_class.dart' as _i2; class PerDispatchClass { - const PerDispatchClass({required this.normal, required this.operational, required this.mandatory}); + const PerDispatchClass({ + required this.normal, + required this.operational, + required this.mandatory, + }); factory PerDispatchClass.decode(_i1.Input input) { return codec.decode(input); @@ -28,31 +32,50 @@ class PerDispatchClass { } Map?>> toJson() => { - 'normal': normal.toJson(), - 'operational': operational.toJson(), - 'mandatory': mandatory.toJson(), - }; + 'normal': normal.toJson(), + 'operational': operational.toJson(), + 'mandatory': mandatory.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is PerDispatchClass && other.normal == normal && other.operational == operational && other.mandatory == mandatory; @override - int get hashCode => Object.hash(normal, operational, mandatory); + int get hashCode => Object.hash( + normal, + operational, + mandatory, + ); } class $PerDispatchClassCodec with _i1.Codec { const $PerDispatchClassCodec(); @override - void encodeTo(PerDispatchClass obj, _i1.Output output) { - _i2.WeightsPerClass.codec.encodeTo(obj.normal, output); - _i2.WeightsPerClass.codec.encodeTo(obj.operational, output); - _i2.WeightsPerClass.codec.encodeTo(obj.mandatory, output); + void encodeTo( + PerDispatchClass obj, + _i1.Output output, + ) { + _i2.WeightsPerClass.codec.encodeTo( + obj.normal, + output, + ); + _i2.WeightsPerClass.codec.encodeTo( + obj.operational, + output, + ); + _i2.WeightsPerClass.codec.encodeTo( + obj.mandatory, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_3.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_3.dart index a45897bd..f442b028 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_3.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_3.dart @@ -4,7 +4,11 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class PerDispatchClass { - const PerDispatchClass({required this.normal, required this.operational, required this.mandatory}); + const PerDispatchClass({ + required this.normal, + required this.operational, + required this.mandatory, + }); factory PerDispatchClass.decode(_i1.Input input) { return codec.decode(input); @@ -25,28 +29,51 @@ class PerDispatchClass { return codec.encode(this); } - Map toJson() => {'normal': normal, 'operational': operational, 'mandatory': mandatory}; + Map toJson() => { + 'normal': normal, + 'operational': operational, + 'mandatory': mandatory, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is PerDispatchClass && other.normal == normal && other.operational == operational && other.mandatory == mandatory; @override - int get hashCode => Object.hash(normal, operational, mandatory); + int get hashCode => Object.hash( + normal, + operational, + mandatory, + ); } class $PerDispatchClassCodec with _i1.Codec { const $PerDispatchClassCodec(); @override - void encodeTo(PerDispatchClass obj, _i1.Output output) { - _i1.U32Codec.codec.encodeTo(obj.normal, output); - _i1.U32Codec.codec.encodeTo(obj.operational, output); - _i1.U32Codec.codec.encodeTo(obj.mandatory, output); + void encodeTo( + PerDispatchClass obj, + _i1.Output output, + ) { + _i1.U32Codec.codec.encodeTo( + obj.normal, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.operational, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.mandatory, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/post_dispatch_info.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/post_dispatch_info.dart index 05dbdaed..ca10c804 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/post_dispatch_info.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/post_dispatch_info.dart @@ -7,7 +7,10 @@ import '../../sp_weights/weight_v2/weight.dart' as _i2; import 'pays.dart' as _i3; class PostDispatchInfo { - const PostDispatchInfo({this.actualWeight, required this.paysFee}); + const PostDispatchInfo({ + this.actualWeight, + required this.paysFee, + }); factory PostDispatchInfo.decode(_i1.Input input) { return codec.decode(input); @@ -25,30 +28,51 @@ class PostDispatchInfo { return codec.encode(this); } - Map toJson() => {'actualWeight': actualWeight?.toJson(), 'paysFee': paysFee.toJson()}; + Map toJson() => { + 'actualWeight': actualWeight?.toJson(), + 'paysFee': paysFee.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || - other is PostDispatchInfo && other.actualWeight == actualWeight && other.paysFee == paysFee; + identical( + this, + other, + ) || + other is PostDispatchInfo && + other.actualWeight == actualWeight && + other.paysFee == paysFee; @override - int get hashCode => Object.hash(actualWeight, paysFee); + int get hashCode => Object.hash( + actualWeight, + paysFee, + ); } class $PostDispatchInfoCodec with _i1.Codec { const $PostDispatchInfoCodec(); @override - void encodeTo(PostDispatchInfo obj, _i1.Output output) { - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo(obj.actualWeight, output); - _i3.Pays.codec.encodeTo(obj.paysFee, output); + void encodeTo( + PostDispatchInfo obj, + _i1.Output output, + ) { + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo( + obj.actualWeight, + output, + ); + _i3.Pays.codec.encodeTo( + obj.paysFee, + output, + ); } @override PostDispatchInfo decode(_i1.Input input) { return PostDispatchInfo( - actualWeight: const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), + actualWeight: + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), paysFee: _i3.Pays.codec.decode(input), ); } @@ -56,7 +80,9 @@ class $PostDispatchInfoCodec with _i1.Codec { @override int sizeHint(PostDispatchInfo obj) { int size = 0; - size = size + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).sizeHint(obj.actualWeight); + size = size + + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec) + .sizeHint(obj.actualWeight); size = size + _i3.Pays.codec.sizeHint(obj.paysFee); return size; } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/raw_origin.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/raw_origin.dart index c329c2b4..c2e51449 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/raw_origin.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/raw_origin.dart @@ -71,7 +71,10 @@ class $RawOriginCodec with _i1.Codec { } @override - void encodeTo(RawOrigin value, _i1.Output output) { + void encodeTo( + RawOrigin value, + _i1.Output output, + ) { switch (value.runtimeType) { case Root: (value as Root).encodeTo(output); @@ -86,7 +89,8 @@ class $RawOriginCodec with _i1.Codec { (value as Authorized).encodeTo(output); break; default: - throw Exception('RawOrigin: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RawOrigin: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -102,7 +106,8 @@ class $RawOriginCodec with _i1.Codec { case Authorized: return 1; default: - throw Exception('RawOrigin: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RawOrigin: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -114,7 +119,10 @@ class Root extends RawOrigin { Map toJson() => {'Root': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); } @override @@ -144,12 +152,27 @@ class Signed extends RawOrigin { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Signed && _i4.listsEqual(other.value0, value0); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Signed && + _i4.listsEqual( + other.value0, + value0, + ); @override int get hashCode => value0.hashCode; @@ -162,7 +185,10 @@ class None extends RawOrigin { Map toJson() => {'None': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); } @override @@ -179,7 +205,10 @@ class Authorized extends RawOrigin { Map toJson() => {'Authorized': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/pallet_id.dart b/quantus_sdk/lib/generated/planck/types/frame_support/pallet_id.dart index ae6812ea..9c862f63 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/pallet_id.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/pallet_id.dart @@ -12,8 +12,14 @@ class PalletIdCodec with _i1.Codec { } @override - void encodeTo(PalletId value, _i1.Output output) { - const _i1.U8ArrayCodec(8).encodeTo(value, output); + void encodeTo( + PalletId value, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(8).encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/preimages/bounded.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/preimages/bounded.dart index 289a499b..3588d651 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/preimages/bounded.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/preimages/bounded.dart @@ -41,8 +41,14 @@ class $Bounded { return Inline(value0); } - Lookup lookup({required _i3.H256 hash, required int len}) { - return Lookup(hash: hash, len: len); + Lookup lookup({ + required _i3.H256 hash, + required int len, + }) { + return Lookup( + hash: hash, + len: len, + ); } } @@ -65,7 +71,10 @@ class $BoundedCodec with _i1.Codec { } @override - void encodeTo(Bounded value, _i1.Output output) { + void encodeTo( + Bounded value, + _i1.Output output, + ) { switch (value.runtimeType) { case Legacy: (value as Legacy).encodeTo(output); @@ -77,7 +86,8 @@ class $BoundedCodec with _i1.Codec { (value as Lookup).encodeTo(output); break; default: - throw Exception('Bounded: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Bounded: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -91,7 +101,8 @@ class $BoundedCodec with _i1.Codec { case Lookup: return (value as Lookup)._sizeHint(); default: - throw Exception('Bounded: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Bounded: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -108,8 +119,8 @@ class Legacy extends Bounded { @override Map>> toJson() => { - 'Legacy': {'hash': hash.toList()}, - }; + 'Legacy': {'hash': hash.toList()} + }; int _sizeHint() { int size = 1; @@ -118,12 +129,27 @@ class Legacy extends Bounded { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Legacy && _i4.listsEqual(other.hash, hash); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Legacy && + _i4.listsEqual( + other.hash, + hash, + ); @override int get hashCode => hash.hashCode; @@ -149,22 +175,43 @@ class Inline extends Bounded { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U8SequenceCodec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Inline && _i4.listsEqual(other.value0, value0); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Inline && + _i4.listsEqual( + other.value0, + value0, + ); @override int get hashCode => value0.hashCode; } class Lookup extends Bounded { - const Lookup({required this.hash, required this.len}); + const Lookup({ + required this.hash, + required this.len, + }); factory Lookup._decode(_i1.Input input) { - return Lookup(hash: const _i1.U8ArrayCodec(32).decode(input), len: _i1.U32Codec.codec.decode(input)); + return Lookup( + hash: const _i1.U8ArrayCodec(32).decode(input), + len: _i1.U32Codec.codec.decode(input), + ); } /// H::Output @@ -175,8 +222,11 @@ class Lookup extends Bounded { @override Map> toJson() => { - 'Lookup': {'hash': hash.toList(), 'len': len}, - }; + 'Lookup': { + 'hash': hash.toList(), + 'len': len, + } + }; int _sizeHint() { int size = 1; @@ -186,15 +236,36 @@ class Lookup extends Bounded { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); - _i1.U32Codec.codec.encodeTo(len, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); + _i1.U32Codec.codec.encodeTo( + len, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Lookup && _i4.listsEqual(other.hash, hash) && other.len == len; + identical( + this, + other, + ) || + other is Lookup && + _i4.listsEqual( + other.hash, + hash, + ) && + other.len == len; @override - int get hashCode => Object.hash(hash, len); + int get hashCode => Object.hash( + hash, + len, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/schedule/dispatch_time.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/schedule/dispatch_time.dart index 5a14fb3f..9b5953f2 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/schedule/dispatch_time.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/schedule/dispatch_time.dart @@ -56,7 +56,10 @@ class $DispatchTimeCodec with _i1.Codec { } @override - void encodeTo(DispatchTime value, _i1.Output output) { + void encodeTo( + DispatchTime value, + _i1.Output output, + ) { switch (value.runtimeType) { case At: (value as At).encodeTo(output); @@ -65,7 +68,8 @@ class $DispatchTimeCodec with _i1.Codec { (value as After).encodeTo(output); break; default: - throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -77,7 +81,8 @@ class $DispatchTimeCodec with _i1.Codec { case After: return (value as After)._sizeHint(); default: - throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -102,12 +107,23 @@ class At extends DispatchTime { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is At && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is At && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -133,12 +149,23 @@ class After extends DispatchTime { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is After && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is After && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/storage/no_drop.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/storage/no_drop.dart index c0f043e5..0e4b40c7 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/storage/no_drop.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/storage/no_drop.dart @@ -14,8 +14,14 @@ class NoDropCodec with _i2.Codec { } @override - void encodeTo(NoDrop value, _i2.Output output) { - _i1.Imbalance.codec.encodeTo(value, output); + void encodeTo( + NoDrop value, + _i2.Output output, + ) { + _i1.Imbalance.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/fungible/imbalance/imbalance.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/fungible/imbalance/imbalance.dart index 7f69836d..1c0f4b91 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/fungible/imbalance/imbalance.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/fungible/imbalance/imbalance.dart @@ -22,7 +22,12 @@ class Imbalance { Map toJson() => {'amount': amount}; @override - bool operator ==(Object other) => identical(this, other) || other is Imbalance && other.amount == amount; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Imbalance && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -32,8 +37,14 @@ class $ImbalanceCodec with _i1.Codec { const $ImbalanceCodec(); @override - void encodeTo(Imbalance obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.amount, output); + void encodeTo( + Imbalance obj, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/balance_status.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/balance_status.dart index 5f830490..c0012bda 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/balance_status.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/balance_status.dart @@ -7,7 +7,10 @@ enum BalanceStatus { free('Free', 0), reserved('Reserved', 1); - const BalanceStatus(this.variantName, this.codecIndex); + const BalanceStatus( + this.variantName, + this.codecIndex, + ); factory BalanceStatus.decode(_i1.Input input) { return codec.decode(input); @@ -43,7 +46,13 @@ class $BalanceStatusCodec with _i1.Codec { } @override - void encodeTo(BalanceStatus value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + BalanceStatus value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_1.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_1.dart index 852db11b..a390eaa2 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_1.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_1.dart @@ -6,7 +6,10 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../../../../quantus_runtime/runtime_hold_reason.dart' as _i2; class IdAmount { - const IdAmount({required this.id, required this.amount}); + const IdAmount({ + required this.id, + required this.amount, + }); factory IdAmount.decode(_i1.Input input) { return codec.decode(input); @@ -24,28 +27,50 @@ class IdAmount { return codec.encode(this); } - Map toJson() => {'id': id.toJson(), 'amount': amount}; + Map toJson() => { + 'id': id.toJson(), + 'amount': amount, + }; @override bool operator ==(Object other) => - identical(this, other) || other is IdAmount && other.id == id && other.amount == amount; + identical( + this, + other, + ) || + other is IdAmount && other.id == id && other.amount == amount; @override - int get hashCode => Object.hash(id, amount); + int get hashCode => Object.hash( + id, + amount, + ); } class $IdAmountCodec with _i1.Codec { const $IdAmountCodec(); @override - void encodeTo(IdAmount obj, _i1.Output output) { - _i2.RuntimeHoldReason.codec.encodeTo(obj.id, output); - _i1.U128Codec.codec.encodeTo(obj.amount, output); + void encodeTo( + IdAmount obj, + _i1.Output output, + ) { + _i2.RuntimeHoldReason.codec.encodeTo( + obj.id, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); } @override IdAmount decode(_i1.Input input) { - return IdAmount(id: _i2.RuntimeHoldReason.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); + return IdAmount( + id: _i2.RuntimeHoldReason.codec.decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_2.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_2.dart index 6ec0b06d..4707596a 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_2.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_2.dart @@ -6,7 +6,10 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../../../../quantus_runtime/runtime_freeze_reason.dart' as _i2; class IdAmount { - const IdAmount({required this.id, required this.amount}); + const IdAmount({ + required this.id, + required this.amount, + }); factory IdAmount.decode(_i1.Input input) { return codec.decode(input); @@ -24,28 +27,50 @@ class IdAmount { return codec.encode(this); } - Map toJson() => {'id': null, 'amount': amount}; + Map toJson() => { + 'id': null, + 'amount': amount, + }; @override bool operator ==(Object other) => - identical(this, other) || other is IdAmount && other.id == id && other.amount == amount; + identical( + this, + other, + ) || + other is IdAmount && other.id == id && other.amount == amount; @override - int get hashCode => Object.hash(id, amount); + int get hashCode => Object.hash( + id, + amount, + ); } class $IdAmountCodec with _i1.Codec { const $IdAmountCodec(); @override - void encodeTo(IdAmount obj, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(obj.id, output); - _i1.U128Codec.codec.encodeTo(obj.amount, output); + void encodeTo( + IdAmount obj, + _i1.Output output, + ) { + _i1.NullCodec.codec.encodeTo( + obj.id, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); } @override IdAmount decode(_i1.Input input) { - return IdAmount(id: _i1.NullCodec.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); + return IdAmount( + id: _i1.NullCodec.codec.decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/account_info.dart b/quantus_sdk/lib/generated/planck/types/frame_system/account_info.dart index d35ddcf1..3faadbb0 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/account_info.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/account_info.dart @@ -40,16 +40,19 @@ class AccountInfo { } Map toJson() => { - 'nonce': nonce, - 'consumers': consumers, - 'providers': providers, - 'sufficients': sufficients, - 'data': data.toJson(), - }; + 'nonce': nonce, + 'consumers': consumers, + 'providers': providers, + 'sufficients': sufficients, + 'data': data.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is AccountInfo && other.nonce == nonce && other.consumers == consumers && @@ -58,19 +61,43 @@ class AccountInfo { other.data == data; @override - int get hashCode => Object.hash(nonce, consumers, providers, sufficients, data); + int get hashCode => Object.hash( + nonce, + consumers, + providers, + sufficients, + data, + ); } class $AccountInfoCodec with _i1.Codec { const $AccountInfoCodec(); @override - void encodeTo(AccountInfo obj, _i1.Output output) { - _i1.U32Codec.codec.encodeTo(obj.nonce, output); - _i1.U32Codec.codec.encodeTo(obj.consumers, output); - _i1.U32Codec.codec.encodeTo(obj.providers, output); - _i1.U32Codec.codec.encodeTo(obj.sufficients, output); - _i2.AccountData.codec.encodeTo(obj.data, output); + void encodeTo( + AccountInfo obj, + _i1.Output output, + ) { + _i1.U32Codec.codec.encodeTo( + obj.nonce, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.consumers, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.providers, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.sufficients, + output, + ); + _i2.AccountData.codec.encodeTo( + obj.data, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/code_upgrade_authorization.dart b/quantus_sdk/lib/generated/planck/types/frame_system/code_upgrade_authorization.dart index d89fc207..cc29ab5d 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/code_upgrade_authorization.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/code_upgrade_authorization.dart @@ -7,7 +7,10 @@ import 'package:quiver/collection.dart' as _i4; import '../primitive_types/h256.dart' as _i2; class CodeUpgradeAuthorization { - const CodeUpgradeAuthorization({required this.codeHash, required this.checkVersion}); + const CodeUpgradeAuthorization({ + required this.codeHash, + required this.checkVersion, + }); factory CodeUpgradeAuthorization.decode(_i1.Input input) { return codec.decode(input); @@ -19,32 +22,54 @@ class CodeUpgradeAuthorization { /// bool final bool checkVersion; - static const $CodeUpgradeAuthorizationCodec codec = $CodeUpgradeAuthorizationCodec(); + static const $CodeUpgradeAuthorizationCodec codec = + $CodeUpgradeAuthorizationCodec(); _i3.Uint8List encode() { return codec.encode(this); } - Map toJson() => {'codeHash': codeHash.toList(), 'checkVersion': checkVersion}; + Map toJson() => { + 'codeHash': codeHash.toList(), + 'checkVersion': checkVersion, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is CodeUpgradeAuthorization && - _i4.listsEqual(other.codeHash, codeHash) && + _i4.listsEqual( + other.codeHash, + codeHash, + ) && other.checkVersion == checkVersion; @override - int get hashCode => Object.hash(codeHash, checkVersion); + int get hashCode => Object.hash( + codeHash, + checkVersion, + ); } class $CodeUpgradeAuthorizationCodec with _i1.Codec { const $CodeUpgradeAuthorizationCodec(); @override - void encodeTo(CodeUpgradeAuthorization obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.codeHash, output); - _i1.BoolCodec.codec.encodeTo(obj.checkVersion, output); + void encodeTo( + CodeUpgradeAuthorization obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + obj.codeHash, + output, + ); + _i1.BoolCodec.codec.encodeTo( + obj.checkVersion, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/dispatch_event_info.dart b/quantus_sdk/lib/generated/planck/types/frame_system/dispatch_event_info.dart index 764759fb..728e8f63 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/dispatch_event_info.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/dispatch_event_info.dart @@ -8,7 +8,11 @@ import '../frame_support/dispatch/pays.dart' as _i4; import '../sp_weights/weight_v2/weight.dart' as _i2; class DispatchEventInfo { - const DispatchEventInfo({required this.weight, required this.class_, required this.paysFee}); + const DispatchEventInfo({ + required this.weight, + required this.class_, + required this.paysFee, + }); factory DispatchEventInfo.decode(_i1.Input input) { return codec.decode(input); @@ -29,25 +33,51 @@ class DispatchEventInfo { return codec.encode(this); } - Map toJson() => {'weight': weight.toJson(), 'class': class_.toJson(), 'paysFee': paysFee.toJson()}; + Map toJson() => { + 'weight': weight.toJson(), + 'class': class_.toJson(), + 'paysFee': paysFee.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || - other is DispatchEventInfo && other.weight == weight && other.class_ == class_ && other.paysFee == paysFee; + identical( + this, + other, + ) || + other is DispatchEventInfo && + other.weight == weight && + other.class_ == class_ && + other.paysFee == paysFee; @override - int get hashCode => Object.hash(weight, class_, paysFee); + int get hashCode => Object.hash( + weight, + class_, + paysFee, + ); } class $DispatchEventInfoCodec with _i1.Codec { const $DispatchEventInfoCodec(); @override - void encodeTo(DispatchEventInfo obj, _i1.Output output) { - _i2.Weight.codec.encodeTo(obj.weight, output); - _i3.DispatchClass.codec.encodeTo(obj.class_, output); - _i4.Pays.codec.encodeTo(obj.paysFee, output); + void encodeTo( + DispatchEventInfo obj, + _i1.Output output, + ) { + _i2.Weight.codec.encodeTo( + obj.weight, + output, + ); + _i3.DispatchClass.codec.encodeTo( + obj.class_, + output, + ); + _i4.Pays.codec.encodeTo( + obj.paysFee, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/event_record.dart b/quantus_sdk/lib/generated/planck/types/frame_system/event_record.dart index 5987bf9b..640ec813 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/event_record.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/event_record.dart @@ -9,7 +9,11 @@ import '../quantus_runtime/runtime_event.dart' as _i3; import 'phase.dart' as _i2; class EventRecord { - const EventRecord({required this.phase, required this.event, required this.topics}); + const EventRecord({ + required this.phase, + required this.event, + required this.topics, + }); factory EventRecord.decode(_i1.Input input) { return codec.decode(input); @@ -31,28 +35,53 @@ class EventRecord { } Map toJson() => { - 'phase': phase.toJson(), - 'event': event.toJson(), - 'topics': topics.map((value) => value.toList()).toList(), - }; + 'phase': phase.toJson(), + 'event': event.toJson(), + 'topics': topics.map((value) => value.toList()).toList(), + }; @override bool operator ==(Object other) => - identical(this, other) || - other is EventRecord && other.phase == phase && other.event == event && _i6.listsEqual(other.topics, topics); + identical( + this, + other, + ) || + other is EventRecord && + other.phase == phase && + other.event == event && + _i6.listsEqual( + other.topics, + topics, + ); @override - int get hashCode => Object.hash(phase, event, topics); + int get hashCode => Object.hash( + phase, + event, + topics, + ); } class $EventRecordCodec with _i1.Codec { const $EventRecordCodec(); @override - void encodeTo(EventRecord obj, _i1.Output output) { - _i2.Phase.codec.encodeTo(obj.phase, output); - _i3.RuntimeEvent.codec.encodeTo(obj.event, output); - const _i1.SequenceCodec<_i4.H256>(_i4.H256Codec()).encodeTo(obj.topics, output); + void encodeTo( + EventRecord obj, + _i1.Output output, + ) { + _i2.Phase.codec.encodeTo( + obj.phase, + output, + ); + _i3.RuntimeEvent.codec.encodeTo( + obj.event, + output, + ); + const _i1.SequenceCodec<_i4.H256>(_i4.H256Codec()).encodeTo( + obj.topics, + output, + ); } @override @@ -69,7 +98,8 @@ class $EventRecordCodec with _i1.Codec { int size = 0; size = size + _i2.Phase.codec.sizeHint(obj.phase); size = size + _i3.RuntimeEvent.codec.sizeHint(obj.event); - size = size + const _i1.SequenceCodec<_i4.H256>(_i4.H256Codec()).sizeHint(obj.topics); + size = size + + const _i1.SequenceCodec<_i4.H256>(_i4.H256Codec()).sizeHint(obj.topics); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_genesis/check_genesis.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_genesis/check_genesis.dart index 8868c238..dfb8d9aa 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_genesis/check_genesis.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_genesis/check_genesis.dart @@ -12,8 +12,14 @@ class CheckGenesisCodec with _i1.Codec { } @override - void encodeTo(CheckGenesis value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); + void encodeTo( + CheckGenesis value, + _i1.Output output, + ) { + _i1.NullCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_mortality/check_mortality.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_mortality/check_mortality.dart index 06298fe3..74bb6a2b 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_mortality/check_mortality.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_mortality/check_mortality.dart @@ -14,8 +14,14 @@ class CheckMortalityCodec with _i2.Codec { } @override - void encodeTo(CheckMortality value, _i2.Output output) { - _i1.Era.codec.encodeTo(value, output); + void encodeTo( + CheckMortality value, + _i2.Output output, + ) { + _i1.Era.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart index f2cf2cad..e6bd60e1 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart @@ -12,8 +12,14 @@ class CheckNonZeroSenderCodec with _i1.Codec { } @override - void encodeTo(CheckNonZeroSender value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); + void encodeTo( + CheckNonZeroSender value, + _i1.Output output, + ) { + _i1.NullCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_nonce/check_nonce.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_nonce/check_nonce.dart index 5e91c23f..2b7e417d 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_nonce/check_nonce.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_nonce/check_nonce.dart @@ -12,8 +12,14 @@ class CheckNonceCodec with _i1.Codec { } @override - void encodeTo(CheckNonce value, _i1.Output output) { - _i1.CompactBigIntCodec.codec.encodeTo(value, output); + void encodeTo( + CheckNonce value, + _i1.Output output, + ) { + _i1.CompactBigIntCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_spec_version/check_spec_version.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_spec_version/check_spec_version.dart index 8366f520..54164051 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_spec_version/check_spec_version.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_spec_version/check_spec_version.dart @@ -12,8 +12,14 @@ class CheckSpecVersionCodec with _i1.Codec { } @override - void encodeTo(CheckSpecVersion value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); + void encodeTo( + CheckSpecVersion value, + _i1.Output output, + ) { + _i1.NullCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_tx_version/check_tx_version.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_tx_version/check_tx_version.dart index 68153e17..8c1617d2 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_tx_version/check_tx_version.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_tx_version/check_tx_version.dart @@ -12,8 +12,14 @@ class CheckTxVersionCodec with _i1.Codec { } @override - void encodeTo(CheckTxVersion value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); + void encodeTo( + CheckTxVersion value, + _i1.Output output, + ) { + _i1.NullCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_weight/check_weight.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_weight/check_weight.dart index 8fec0eef..5fc6a462 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_weight/check_weight.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_weight/check_weight.dart @@ -12,8 +12,14 @@ class CheckWeightCodec with _i1.Codec { } @override - void encodeTo(CheckWeight value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); + void encodeTo( + CheckWeight value, + _i1.Output output, + ) { + _i1.NullCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/last_runtime_upgrade_info.dart b/quantus_sdk/lib/generated/planck/types/frame_system/last_runtime_upgrade_info.dart index f36c690b..77fd6ae7 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/last_runtime_upgrade_info.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/last_runtime_upgrade_info.dart @@ -6,7 +6,10 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../cow_1.dart' as _i2; class LastRuntimeUpgradeInfo { - const LastRuntimeUpgradeInfo({required this.specVersion, required this.specName}); + const LastRuntimeUpgradeInfo({ + required this.specVersion, + required this.specName, + }); factory LastRuntimeUpgradeInfo.decode(_i1.Input input) { return codec.decode(input); @@ -18,30 +21,51 @@ class LastRuntimeUpgradeInfo { /// Cow<'static, str> final _i2.Cow specName; - static const $LastRuntimeUpgradeInfoCodec codec = $LastRuntimeUpgradeInfoCodec(); + static const $LastRuntimeUpgradeInfoCodec codec = + $LastRuntimeUpgradeInfoCodec(); _i3.Uint8List encode() { return codec.encode(this); } - Map toJson() => {'specVersion': specVersion, 'specName': specName}; + Map toJson() => { + 'specVersion': specVersion, + 'specName': specName, + }; @override bool operator ==(Object other) => - identical(this, other) || - other is LastRuntimeUpgradeInfo && other.specVersion == specVersion && other.specName == specName; + identical( + this, + other, + ) || + other is LastRuntimeUpgradeInfo && + other.specVersion == specVersion && + other.specName == specName; @override - int get hashCode => Object.hash(specVersion, specName); + int get hashCode => Object.hash( + specVersion, + specName, + ); } class $LastRuntimeUpgradeInfoCodec with _i1.Codec { const $LastRuntimeUpgradeInfoCodec(); @override - void encodeTo(LastRuntimeUpgradeInfo obj, _i1.Output output) { - _i1.CompactBigIntCodec.codec.encodeTo(obj.specVersion, output); - _i1.StrCodec.codec.encodeTo(obj.specName, output); + void encodeTo( + LastRuntimeUpgradeInfo obj, + _i1.Output output, + ) { + _i1.CompactBigIntCodec.codec.encodeTo( + obj.specVersion, + output, + ); + _i1.StrCodec.codec.encodeTo( + obj.specName, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_length.dart b/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_length.dart index 8d610bb0..b5a0a476 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_length.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_length.dart @@ -24,7 +24,12 @@ class BlockLength { Map> toJson() => {'max': max.toJson()}; @override - bool operator ==(Object other) => identical(this, other) || other is BlockLength && other.max == max; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is BlockLength && other.max == max; @override int get hashCode => max.hashCode; @@ -34,8 +39,14 @@ class $BlockLengthCodec with _i1.Codec { const $BlockLengthCodec(); @override - void encodeTo(BlockLength obj, _i1.Output output) { - _i2.PerDispatchClass.codec.encodeTo(obj.max, output); + void encodeTo( + BlockLength obj, + _i1.Output output, + ) { + _i2.PerDispatchClass.codec.encodeTo( + obj.max, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_weights.dart b/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_weights.dart index 45160d0b..e0ff79bb 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_weights.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_weights.dart @@ -7,7 +7,11 @@ import '../../frame_support/dispatch/per_dispatch_class_2.dart' as _i3; import '../../sp_weights/weight_v2/weight.dart' as _i2; class BlockWeights { - const BlockWeights({required this.baseBlock, required this.maxBlock, required this.perClass}); + const BlockWeights({ + required this.baseBlock, + required this.maxBlock, + required this.perClass, + }); factory BlockWeights.decode(_i1.Input input) { return codec.decode(input); @@ -29,28 +33,50 @@ class BlockWeights { } Map> toJson() => { - 'baseBlock': baseBlock.toJson(), - 'maxBlock': maxBlock.toJson(), - 'perClass': perClass.toJson(), - }; + 'baseBlock': baseBlock.toJson(), + 'maxBlock': maxBlock.toJson(), + 'perClass': perClass.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || - other is BlockWeights && other.baseBlock == baseBlock && other.maxBlock == maxBlock && other.perClass == perClass; + identical( + this, + other, + ) || + other is BlockWeights && + other.baseBlock == baseBlock && + other.maxBlock == maxBlock && + other.perClass == perClass; @override - int get hashCode => Object.hash(baseBlock, maxBlock, perClass); + int get hashCode => Object.hash( + baseBlock, + maxBlock, + perClass, + ); } class $BlockWeightsCodec with _i1.Codec { const $BlockWeightsCodec(); @override - void encodeTo(BlockWeights obj, _i1.Output output) { - _i2.Weight.codec.encodeTo(obj.baseBlock, output); - _i2.Weight.codec.encodeTo(obj.maxBlock, output); - _i3.PerDispatchClass.codec.encodeTo(obj.perClass, output); + void encodeTo( + BlockWeights obj, + _i1.Output output, + ) { + _i2.Weight.codec.encodeTo( + obj.baseBlock, + output, + ); + _i2.Weight.codec.encodeTo( + obj.maxBlock, + output, + ); + _i3.PerDispatchClass.codec.encodeTo( + obj.perClass, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/limits/weights_per_class.dart b/quantus_sdk/lib/generated/planck/types/frame_system/limits/weights_per_class.dart index d3728830..0a830e75 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/limits/weights_per_class.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/limits/weights_per_class.dart @@ -6,7 +6,12 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../../sp_weights/weight_v2/weight.dart' as _i2; class WeightsPerClass { - const WeightsPerClass({required this.baseExtrinsic, this.maxExtrinsic, this.maxTotal, this.reserved}); + const WeightsPerClass({ + required this.baseExtrinsic, + this.maxExtrinsic, + this.maxTotal, + this.reserved, + }); factory WeightsPerClass.decode(_i1.Input input) { return codec.decode(input); @@ -31,15 +36,18 @@ class WeightsPerClass { } Map?> toJson() => { - 'baseExtrinsic': baseExtrinsic.toJson(), - 'maxExtrinsic': maxExtrinsic?.toJson(), - 'maxTotal': maxTotal?.toJson(), - 'reserved': reserved?.toJson(), - }; + 'baseExtrinsic': baseExtrinsic.toJson(), + 'maxExtrinsic': maxExtrinsic?.toJson(), + 'maxTotal': maxTotal?.toJson(), + 'reserved': reserved?.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is WeightsPerClass && other.baseExtrinsic == baseExtrinsic && other.maxExtrinsic == maxExtrinsic && @@ -47,27 +55,50 @@ class WeightsPerClass { other.reserved == reserved; @override - int get hashCode => Object.hash(baseExtrinsic, maxExtrinsic, maxTotal, reserved); + int get hashCode => Object.hash( + baseExtrinsic, + maxExtrinsic, + maxTotal, + reserved, + ); } class $WeightsPerClassCodec with _i1.Codec { const $WeightsPerClassCodec(); @override - void encodeTo(WeightsPerClass obj, _i1.Output output) { - _i2.Weight.codec.encodeTo(obj.baseExtrinsic, output); - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo(obj.maxExtrinsic, output); - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo(obj.maxTotal, output); - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo(obj.reserved, output); + void encodeTo( + WeightsPerClass obj, + _i1.Output output, + ) { + _i2.Weight.codec.encodeTo( + obj.baseExtrinsic, + output, + ); + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo( + obj.maxExtrinsic, + output, + ); + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo( + obj.maxTotal, + output, + ); + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo( + obj.reserved, + output, + ); } @override WeightsPerClass decode(_i1.Input input) { return WeightsPerClass( baseExtrinsic: _i2.Weight.codec.decode(input), - maxExtrinsic: const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), - maxTotal: const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), - reserved: const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), + maxExtrinsic: + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), + maxTotal: + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), + reserved: + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), ); } @@ -75,9 +106,15 @@ class $WeightsPerClassCodec with _i1.Codec { int sizeHint(WeightsPerClass obj) { int size = 0; size = size + _i2.Weight.codec.sizeHint(obj.baseExtrinsic); - size = size + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).sizeHint(obj.maxExtrinsic); - size = size + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).sizeHint(obj.maxTotal); - size = size + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).sizeHint(obj.reserved); + size = size + + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec) + .sizeHint(obj.maxExtrinsic); + size = size + + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec) + .sizeHint(obj.maxTotal); + size = size + + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec) + .sizeHint(obj.reserved); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/call.dart index d63a4a81..13af67c8 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/call.dart @@ -51,7 +51,8 @@ class $Call { return SetCodeWithoutChecks(code: code); } - SetStorage setStorage({required List<_i3.Tuple2, List>> items}) { + SetStorage setStorage( + {required List<_i3.Tuple2, List>> items}) { return SetStorage(items: items); } @@ -59,8 +60,14 @@ class $Call { return KillStorage(keys: keys); } - KillPrefix killPrefix({required List prefix, required int subkeys}) { - return KillPrefix(prefix: prefix, subkeys: subkeys); + KillPrefix killPrefix({ + required List prefix, + required int subkeys, + }) { + return KillPrefix( + prefix: prefix, + subkeys: subkeys, + ); } RemarkWithEvent remarkWithEvent({required List remark}) { @@ -71,7 +78,8 @@ class $Call { return AuthorizeUpgrade(codeHash: codeHash); } - AuthorizeUpgradeWithoutChecks authorizeUpgradeWithoutChecks({required _i4.H256 codeHash}) { + AuthorizeUpgradeWithoutChecks authorizeUpgradeWithoutChecks( + {required _i4.H256 codeHash}) { return AuthorizeUpgradeWithoutChecks(codeHash: codeHash); } @@ -115,7 +123,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case Remark: (value as Remark).encodeTo(output); @@ -151,7 +162,8 @@ class $CallCodec with _i1.Codec { (value as ApplyAuthorizedUpgrade).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -181,7 +193,8 @@ class $CallCodec with _i1.Codec { case ApplyAuthorizedUpgrade: return (value as ApplyAuthorizedUpgrade)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -201,8 +214,8 @@ class Remark extends Call { @override Map>> toJson() => { - 'remark': {'remark': remark}, - }; + 'remark': {'remark': remark} + }; int _sizeHint() { int size = 1; @@ -211,12 +224,27 @@ class Remark extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U8SequenceCodec.codec.encodeTo(remark, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + remark, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Remark && _i5.listsEqual(other.remark, remark); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Remark && + _i5.listsEqual( + other.remark, + remark, + ); @override int get hashCode => remark.hashCode; @@ -235,8 +263,8 @@ class SetHeapPages extends Call { @override Map> toJson() => { - 'set_heap_pages': {'pages': pages}, - }; + 'set_heap_pages': {'pages': pages} + }; int _sizeHint() { int size = 1; @@ -245,12 +273,23 @@ class SetHeapPages extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U64Codec.codec.encodeTo(pages, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U64Codec.codec.encodeTo( + pages, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is SetHeapPages && other.pages == pages; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is SetHeapPages && other.pages == pages; @override int get hashCode => pages.hashCode; @@ -269,8 +308,8 @@ class SetCode extends Call { @override Map>> toJson() => { - 'set_code': {'code': code}, - }; + 'set_code': {'code': code} + }; int _sizeHint() { int size = 1; @@ -279,12 +318,27 @@ class SetCode extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U8SequenceCodec.codec.encodeTo(code, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + code, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is SetCode && _i5.listsEqual(other.code, code); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is SetCode && + _i5.listsEqual( + other.code, + code, + ); @override int get hashCode => code.hashCode; @@ -306,8 +360,8 @@ class SetCodeWithoutChecks extends Call { @override Map>> toJson() => { - 'set_code_without_checks': {'code': code}, - }; + 'set_code_without_checks': {'code': code} + }; int _sizeHint() { int size = 1; @@ -316,13 +370,27 @@ class SetCodeWithoutChecks extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U8SequenceCodec.codec.encodeTo(code, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + code, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is SetCodeWithoutChecks && _i5.listsEqual(other.code, code); + identical( + this, + other, + ) || + other is SetCodeWithoutChecks && + _i5.listsEqual( + other.code, + code, + ); @override int get hashCode => code.hashCode; @@ -334,10 +402,11 @@ class SetStorage extends Call { factory SetStorage._decode(_i1.Input input) { return SetStorage( - items: const _i1.SequenceCodec<_i3.Tuple2, List>>( - _i3.Tuple2Codec, List>(_i1.U8SequenceCodec.codec, _i1.U8SequenceCodec.codec), - ).decode(input), - ); + items: const _i1.SequenceCodec<_i3.Tuple2, List>>( + _i3.Tuple2Codec, List>( + _i1.U8SequenceCodec.codec, + _i1.U8SequenceCodec.codec, + )).decode(input)); } /// Vec @@ -345,30 +414,53 @@ class SetStorage extends Call { @override Map>>>> toJson() => { - 'set_storage': { - 'items': items.map((value) => [value.value0, value.value1]).toList(), - }, - }; + 'set_storage': { + 'items': items + .map((value) => [ + value.value0, + value.value1, + ]) + .toList() + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i1.SequenceCodec<_i3.Tuple2, List>>( - _i3.Tuple2Codec, List>(_i1.U8SequenceCodec.codec, _i1.U8SequenceCodec.codec), - ).sizeHint(items); + _i3.Tuple2Codec, List>( + _i1.U8SequenceCodec.codec, + _i1.U8SequenceCodec.codec, + )).sizeHint(items); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); const _i1.SequenceCodec<_i3.Tuple2, List>>( - _i3.Tuple2Codec, List>(_i1.U8SequenceCodec.codec, _i1.U8SequenceCodec.codec), - ).encodeTo(items, output); + _i3.Tuple2Codec, List>( + _i1.U8SequenceCodec.codec, + _i1.U8SequenceCodec.codec, + )).encodeTo( + items, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is SetStorage && _i5.listsEqual(other.items, items); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is SetStorage && + _i5.listsEqual( + other.items, + items, + ); @override int get hashCode => items.hashCode; @@ -379,7 +471,9 @@ class KillStorage extends Call { const KillStorage({required this.keys}); factory KillStorage._decode(_i1.Input input) { - return KillStorage(keys: const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec).decode(input)); + return KillStorage( + keys: const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec) + .decode(input)); } /// Vec @@ -387,22 +481,39 @@ class KillStorage extends Call { @override Map>>> toJson() => { - 'kill_storage': {'keys': keys.map((value) => value).toList()}, - }; + 'kill_storage': {'keys': keys.map((value) => value).toList()} + }; int _sizeHint() { int size = 1; - size = size + const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec).sizeHint(keys); + size = size + + const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec) + .sizeHint(keys); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec).encodeTo(keys, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec).encodeTo( + keys, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is KillStorage && _i5.listsEqual(other.keys, keys); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is KillStorage && + _i5.listsEqual( + other.keys, + keys, + ); @override int get hashCode => keys.hashCode; @@ -413,10 +524,16 @@ class KillStorage extends Call { /// **NOTE:** We rely on the Root origin to provide us the number of subkeys under /// the prefix we are removing to accurately calculate the weight of this function. class KillPrefix extends Call { - const KillPrefix({required this.prefix, required this.subkeys}); + const KillPrefix({ + required this.prefix, + required this.subkeys, + }); factory KillPrefix._decode(_i1.Input input) { - return KillPrefix(prefix: _i1.U8SequenceCodec.codec.decode(input), subkeys: _i1.U32Codec.codec.decode(input)); + return KillPrefix( + prefix: _i1.U8SequenceCodec.codec.decode(input), + subkeys: _i1.U32Codec.codec.decode(input), + ); } /// Key @@ -427,8 +544,11 @@ class KillPrefix extends Call { @override Map> toJson() => { - 'kill_prefix': {'prefix': prefix, 'subkeys': subkeys}, - }; + 'kill_prefix': { + 'prefix': prefix, + 'subkeys': subkeys, + } + }; int _sizeHint() { int size = 1; @@ -438,17 +558,38 @@ class KillPrefix extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.U8SequenceCodec.codec.encodeTo(prefix, output); - _i1.U32Codec.codec.encodeTo(subkeys, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + prefix, + output, + ); + _i1.U32Codec.codec.encodeTo( + subkeys, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is KillPrefix && _i5.listsEqual(other.prefix, prefix) && other.subkeys == subkeys; - - @override - int get hashCode => Object.hash(prefix, subkeys); + identical( + this, + other, + ) || + other is KillPrefix && + _i5.listsEqual( + other.prefix, + prefix, + ) && + other.subkeys == subkeys; + + @override + int get hashCode => Object.hash( + prefix, + subkeys, + ); } /// Make some on-chain remark and emit event. @@ -464,8 +605,8 @@ class RemarkWithEvent extends Call { @override Map>> toJson() => { - 'remark_with_event': {'remark': remark}, - }; + 'remark_with_event': {'remark': remark} + }; int _sizeHint() { int size = 1; @@ -474,13 +615,27 @@ class RemarkWithEvent extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i1.U8SequenceCodec.codec.encodeTo(remark, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + remark, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is RemarkWithEvent && _i5.listsEqual(other.remark, remark); + identical( + this, + other, + ) || + other is RemarkWithEvent && + _i5.listsEqual( + other.remark, + remark, + ); @override int get hashCode => remark.hashCode; @@ -502,8 +657,8 @@ class AuthorizeUpgrade extends Call { @override Map>> toJson() => { - 'authorize_upgrade': {'codeHash': codeHash.toList()}, - }; + 'authorize_upgrade': {'codeHash': codeHash.toList()} + }; int _sizeHint() { int size = 1; @@ -512,13 +667,27 @@ class AuthorizeUpgrade extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - const _i1.U8ArrayCodec(32).encodeTo(codeHash, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + codeHash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is AuthorizeUpgrade && _i5.listsEqual(other.codeHash, codeHash); + identical( + this, + other, + ) || + other is AuthorizeUpgrade && + _i5.listsEqual( + other.codeHash, + codeHash, + ); @override int get hashCode => codeHash.hashCode; @@ -536,7 +705,8 @@ class AuthorizeUpgradeWithoutChecks extends Call { const AuthorizeUpgradeWithoutChecks({required this.codeHash}); factory AuthorizeUpgradeWithoutChecks._decode(_i1.Input input) { - return AuthorizeUpgradeWithoutChecks(codeHash: const _i1.U8ArrayCodec(32).decode(input)); + return AuthorizeUpgradeWithoutChecks( + codeHash: const _i1.U8ArrayCodec(32).decode(input)); } /// T::Hash @@ -544,8 +714,8 @@ class AuthorizeUpgradeWithoutChecks extends Call { @override Map>> toJson() => { - 'authorize_upgrade_without_checks': {'codeHash': codeHash.toList()}, - }; + 'authorize_upgrade_without_checks': {'codeHash': codeHash.toList()} + }; int _sizeHint() { int size = 1; @@ -554,13 +724,27 @@ class AuthorizeUpgradeWithoutChecks extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - const _i1.U8ArrayCodec(32).encodeTo(codeHash, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + codeHash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is AuthorizeUpgradeWithoutChecks && _i5.listsEqual(other.codeHash, codeHash); + identical( + this, + other, + ) || + other is AuthorizeUpgradeWithoutChecks && + _i5.listsEqual( + other.codeHash, + codeHash, + ); @override int get hashCode => codeHash.hashCode; @@ -579,7 +763,8 @@ class ApplyAuthorizedUpgrade extends Call { const ApplyAuthorizedUpgrade({required this.code}); factory ApplyAuthorizedUpgrade._decode(_i1.Input input) { - return ApplyAuthorizedUpgrade(code: _i1.U8SequenceCodec.codec.decode(input)); + return ApplyAuthorizedUpgrade( + code: _i1.U8SequenceCodec.codec.decode(input)); } /// Vec @@ -587,8 +772,8 @@ class ApplyAuthorizedUpgrade extends Call { @override Map>> toJson() => { - 'apply_authorized_upgrade': {'code': code}, - }; + 'apply_authorized_upgrade': {'code': code} + }; int _sizeHint() { int size = 1; @@ -597,13 +782,27 @@ class ApplyAuthorizedUpgrade extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i1.U8SequenceCodec.codec.encodeTo(code, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + code, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is ApplyAuthorizedUpgrade && _i5.listsEqual(other.code, code); + identical( + this, + other, + ) || + other is ApplyAuthorizedUpgrade && + _i5.listsEqual( + other.code, + code, + ); @override int get hashCode => code.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/error.dart index 09fee32c..b93eeb41 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/error.dart @@ -36,7 +36,10 @@ enum Error { /// The submitted code is not authorized. unauthorized('Unauthorized', 8); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -86,7 +89,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/event.dart index fd6f224c..f54d2af9 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/event.dart @@ -37,7 +37,8 @@ abstract class Event { class $Event { const $Event(); - ExtrinsicSuccess extrinsicSuccess({required _i3.DispatchEventInfo dispatchInfo}) { + ExtrinsicSuccess extrinsicSuccess( + {required _i3.DispatchEventInfo dispatchInfo}) { return ExtrinsicSuccess(dispatchInfo: dispatchInfo); } @@ -45,7 +46,10 @@ class $Event { required _i4.DispatchError dispatchError, required _i3.DispatchEventInfo dispatchInfo, }) { - return ExtrinsicFailed(dispatchError: dispatchError, dispatchInfo: dispatchInfo); + return ExtrinsicFailed( + dispatchError: dispatchError, + dispatchInfo: dispatchInfo, + ); } CodeUpdated codeUpdated() { @@ -60,19 +64,34 @@ class $Event { return KilledAccount(account: account); } - Remarked remarked({required _i5.AccountId32 sender, required _i6.H256 hash}) { - return Remarked(sender: sender, hash: hash); + Remarked remarked({ + required _i5.AccountId32 sender, + required _i6.H256 hash, + }) { + return Remarked( + sender: sender, + hash: hash, + ); } - UpgradeAuthorized upgradeAuthorized({required _i6.H256 codeHash, required bool checkVersion}) { - return UpgradeAuthorized(codeHash: codeHash, checkVersion: checkVersion); + UpgradeAuthorized upgradeAuthorized({ + required _i6.H256 codeHash, + required bool checkVersion, + }) { + return UpgradeAuthorized( + codeHash: codeHash, + checkVersion: checkVersion, + ); } RejectedInvalidAuthorizedUpgrade rejectedInvalidAuthorizedUpgrade({ required _i6.H256 codeHash, required _i4.DispatchError error, }) { - return RejectedInvalidAuthorizedUpgrade(codeHash: codeHash, error: error); + return RejectedInvalidAuthorizedUpgrade( + codeHash: codeHash, + error: error, + ); } } @@ -105,7 +124,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case ExtrinsicSuccess: (value as ExtrinsicSuccess).encodeTo(output); @@ -132,7 +154,8 @@ class $EventCodec with _i1.Codec { (value as RejectedInvalidAuthorizedUpgrade).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -156,7 +179,8 @@ class $EventCodec with _i1.Codec { case RejectedInvalidAuthorizedUpgrade: return (value as RejectedInvalidAuthorizedUpgrade)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -166,7 +190,8 @@ class ExtrinsicSuccess extends Event { const ExtrinsicSuccess({required this.dispatchInfo}); factory ExtrinsicSuccess._decode(_i1.Input input) { - return ExtrinsicSuccess(dispatchInfo: _i3.DispatchEventInfo.codec.decode(input)); + return ExtrinsicSuccess( + dispatchInfo: _i3.DispatchEventInfo.codec.decode(input)); } /// DispatchEventInfo @@ -174,8 +199,8 @@ class ExtrinsicSuccess extends Event { @override Map>> toJson() => { - 'ExtrinsicSuccess': {'dispatchInfo': dispatchInfo.toJson()}, - }; + 'ExtrinsicSuccess': {'dispatchInfo': dispatchInfo.toJson()} + }; int _sizeHint() { int size = 1; @@ -184,13 +209,23 @@ class ExtrinsicSuccess extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.DispatchEventInfo.codec.encodeTo(dispatchInfo, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.DispatchEventInfo.codec.encodeTo( + dispatchInfo, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is ExtrinsicSuccess && other.dispatchInfo == dispatchInfo; + identical( + this, + other, + ) || + other is ExtrinsicSuccess && other.dispatchInfo == dispatchInfo; @override int get hashCode => dispatchInfo.hashCode; @@ -198,7 +233,10 @@ class ExtrinsicSuccess extends Event { /// An extrinsic failed. class ExtrinsicFailed extends Event { - const ExtrinsicFailed({required this.dispatchError, required this.dispatchInfo}); + const ExtrinsicFailed({ + required this.dispatchError, + required this.dispatchInfo, + }); factory ExtrinsicFailed._decode(_i1.Input input) { return ExtrinsicFailed( @@ -215,8 +253,11 @@ class ExtrinsicFailed extends Event { @override Map>> toJson() => { - 'ExtrinsicFailed': {'dispatchError': dispatchError.toJson(), 'dispatchInfo': dispatchInfo.toJson()}, - }; + 'ExtrinsicFailed': { + 'dispatchError': dispatchError.toJson(), + 'dispatchInfo': dispatchInfo.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -226,18 +267,35 @@ class ExtrinsicFailed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i4.DispatchError.codec.encodeTo(dispatchError, output); - _i3.DispatchEventInfo.codec.encodeTo(dispatchInfo, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i4.DispatchError.codec.encodeTo( + dispatchError, + output, + ); + _i3.DispatchEventInfo.codec.encodeTo( + dispatchInfo, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ExtrinsicFailed && other.dispatchError == dispatchError && other.dispatchInfo == dispatchInfo; + identical( + this, + other, + ) || + other is ExtrinsicFailed && + other.dispatchError == dispatchError && + other.dispatchInfo == dispatchInfo; @override - int get hashCode => Object.hash(dispatchError, dispatchInfo); + int get hashCode => Object.hash( + dispatchError, + dispatchInfo, + ); } /// `:code` was updated. @@ -248,7 +306,10 @@ class CodeUpdated extends Event { Map toJson() => {'CodeUpdated': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); } @override @@ -271,8 +332,8 @@ class NewAccount extends Event { @override Map>> toJson() => { - 'NewAccount': {'account': account.toList()}, - }; + 'NewAccount': {'account': account.toList()} + }; int _sizeHint() { int size = 1; @@ -281,13 +342,27 @@ class NewAccount extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is NewAccount && _i7.listsEqual(other.account, account); + identical( + this, + other, + ) || + other is NewAccount && + _i7.listsEqual( + other.account, + account, + ); @override int get hashCode => account.hashCode; @@ -306,8 +381,8 @@ class KilledAccount extends Event { @override Map>> toJson() => { - 'KilledAccount': {'account': account.toList()}, - }; + 'KilledAccount': {'account': account.toList()} + }; int _sizeHint() { int size = 1; @@ -316,13 +391,27 @@ class KilledAccount extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is KilledAccount && _i7.listsEqual(other.account, account); + identical( + this, + other, + ) || + other is KilledAccount && + _i7.listsEqual( + other.account, + account, + ); @override int get hashCode => account.hashCode; @@ -330,10 +419,16 @@ class KilledAccount extends Event { /// On on-chain remark happened. class Remarked extends Event { - const Remarked({required this.sender, required this.hash}); + const Remarked({ + required this.sender, + required this.hash, + }); factory Remarked._decode(_i1.Input input) { - return Remarked(sender: const _i1.U8ArrayCodec(32).decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); + return Remarked( + sender: const _i1.U8ArrayCodec(32).decode(input), + hash: const _i1.U8ArrayCodec(32).decode(input), + ); } /// T::AccountId @@ -344,8 +439,11 @@ class Remarked extends Event { @override Map>> toJson() => { - 'Remarked': {'sender': sender.toList(), 'hash': hash.toList()}, - }; + 'Remarked': { + 'sender': sender.toList(), + 'hash': hash.toList(), + } + }; int _sizeHint() { int size = 1; @@ -355,23 +453,49 @@ class Remarked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - const _i1.U8ArrayCodec(32).encodeTo(sender, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + sender, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Remarked && _i7.listsEqual(other.sender, sender) && _i7.listsEqual(other.hash, hash); + identical( + this, + other, + ) || + other is Remarked && + _i7.listsEqual( + other.sender, + sender, + ) && + _i7.listsEqual( + other.hash, + hash, + ); @override - int get hashCode => Object.hash(sender, hash); + int get hashCode => Object.hash( + sender, + hash, + ); } /// An upgrade was authorized. class UpgradeAuthorized extends Event { - const UpgradeAuthorized({required this.codeHash, required this.checkVersion}); + const UpgradeAuthorized({ + required this.codeHash, + required this.checkVersion, + }); factory UpgradeAuthorized._decode(_i1.Input input) { return UpgradeAuthorized( @@ -388,8 +512,11 @@ class UpgradeAuthorized extends Event { @override Map> toJson() => { - 'UpgradeAuthorized': {'codeHash': codeHash.toList(), 'checkVersion': checkVersion}, - }; + 'UpgradeAuthorized': { + 'codeHash': codeHash.toList(), + 'checkVersion': checkVersion, + } + }; int _sizeHint() { int size = 1; @@ -399,23 +526,46 @@ class UpgradeAuthorized extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - const _i1.U8ArrayCodec(32).encodeTo(codeHash, output); - _i1.BoolCodec.codec.encodeTo(checkVersion, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + codeHash, + output, + ); + _i1.BoolCodec.codec.encodeTo( + checkVersion, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is UpgradeAuthorized && _i7.listsEqual(other.codeHash, codeHash) && other.checkVersion == checkVersion; + identical( + this, + other, + ) || + other is UpgradeAuthorized && + _i7.listsEqual( + other.codeHash, + codeHash, + ) && + other.checkVersion == checkVersion; @override - int get hashCode => Object.hash(codeHash, checkVersion); + int get hashCode => Object.hash( + codeHash, + checkVersion, + ); } /// An invalid authorized upgrade was rejected while trying to apply it. class RejectedInvalidAuthorizedUpgrade extends Event { - const RejectedInvalidAuthorizedUpgrade({required this.codeHash, required this.error}); + const RejectedInvalidAuthorizedUpgrade({ + required this.codeHash, + required this.error, + }); factory RejectedInvalidAuthorizedUpgrade._decode(_i1.Input input) { return RejectedInvalidAuthorizedUpgrade( @@ -432,8 +582,11 @@ class RejectedInvalidAuthorizedUpgrade extends Event { @override Map> toJson() => { - 'RejectedInvalidAuthorizedUpgrade': {'codeHash': codeHash.toList(), 'error': error.toJson()}, - }; + 'RejectedInvalidAuthorizedUpgrade': { + 'codeHash': codeHash.toList(), + 'error': error.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -443,16 +596,36 @@ class RejectedInvalidAuthorizedUpgrade extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - const _i1.U8ArrayCodec(32).encodeTo(codeHash, output); - _i4.DispatchError.codec.encodeTo(error, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + codeHash, + output, + ); + _i4.DispatchError.codec.encodeTo( + error, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is RejectedInvalidAuthorizedUpgrade && _i7.listsEqual(other.codeHash, codeHash) && other.error == error; + identical( + this, + other, + ) || + other is RejectedInvalidAuthorizedUpgrade && + _i7.listsEqual( + other.codeHash, + codeHash, + ) && + other.error == error; @override - int get hashCode => Object.hash(codeHash, error); + int get hashCode => Object.hash( + codeHash, + error, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/phase.dart b/quantus_sdk/lib/generated/planck/types/frame_system/phase.dart index a888c990..e5dbc292 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/phase.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/phase.dart @@ -62,7 +62,10 @@ class $PhaseCodec with _i1.Codec { } @override - void encodeTo(Phase value, _i1.Output output) { + void encodeTo( + Phase value, + _i1.Output output, + ) { switch (value.runtimeType) { case ApplyExtrinsic: (value as ApplyExtrinsic).encodeTo(output); @@ -74,7 +77,8 @@ class $PhaseCodec with _i1.Codec { (value as Initialization).encodeTo(output); break; default: - throw Exception('Phase: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Phase: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -88,7 +92,8 @@ class $PhaseCodec with _i1.Codec { case Initialization: return 1; default: - throw Exception('Phase: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Phase: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -113,12 +118,23 @@ class ApplyExtrinsic extends Phase { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ApplyExtrinsic && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ApplyExtrinsic && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -131,7 +147,10 @@ class Finalization extends Phase { Map toJson() => {'Finalization': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); } @override @@ -148,7 +167,10 @@ class Initialization extends Phase { Map toJson() => {'Initialization': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/call.dart index 85a0d97e..ca1d7494 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/call.dart @@ -34,8 +34,16 @@ abstract class Call { class $Call { const $Call(); - Create create({required BigInt id, required _i3.MultiAddress admin, required BigInt minBalance}) { - return Create(id: id, admin: admin, minBalance: minBalance); + Create create({ + required BigInt id, + required _i3.MultiAddress admin, + required BigInt minBalance, + }) { + return Create( + id: id, + admin: admin, + minBalance: minBalance, + ); } ForceCreate forceCreate({ @@ -44,7 +52,12 @@ class $Call { required bool isSufficient, required BigInt minBalance, }) { - return ForceCreate(id: id, owner: owner, isSufficient: isSufficient, minBalance: minBalance); + return ForceCreate( + id: id, + owner: owner, + isSufficient: isSufficient, + minBalance: minBalance, + ); } StartDestroy startDestroy({required BigInt id}) { @@ -63,20 +76,52 @@ class $Call { return FinishDestroy(id: id); } - Mint mint({required BigInt id, required _i3.MultiAddress beneficiary, required BigInt amount}) { - return Mint(id: id, beneficiary: beneficiary, amount: amount); + Mint mint({ + required BigInt id, + required _i3.MultiAddress beneficiary, + required BigInt amount, + }) { + return Mint( + id: id, + beneficiary: beneficiary, + amount: amount, + ); } - Burn burn({required BigInt id, required _i3.MultiAddress who, required BigInt amount}) { - return Burn(id: id, who: who, amount: amount); + Burn burn({ + required BigInt id, + required _i3.MultiAddress who, + required BigInt amount, + }) { + return Burn( + id: id, + who: who, + amount: amount, + ); } - Transfer transfer({required BigInt id, required _i3.MultiAddress target, required BigInt amount}) { - return Transfer(id: id, target: target, amount: amount); + Transfer transfer({ + required BigInt id, + required _i3.MultiAddress target, + required BigInt amount, + }) { + return Transfer( + id: id, + target: target, + amount: amount, + ); } - TransferKeepAlive transferKeepAlive({required BigInt id, required _i3.MultiAddress target, required BigInt amount}) { - return TransferKeepAlive(id: id, target: target, amount: amount); + TransferKeepAlive transferKeepAlive({ + required BigInt id, + required _i3.MultiAddress target, + required BigInt amount, + }) { + return TransferKeepAlive( + id: id, + target: target, + amount: amount, + ); } ForceTransfer forceTransfer({ @@ -85,15 +130,32 @@ class $Call { required _i3.MultiAddress dest, required BigInt amount, }) { - return ForceTransfer(id: id, source: source, dest: dest, amount: amount); + return ForceTransfer( + id: id, + source: source, + dest: dest, + amount: amount, + ); } - Freeze freeze({required BigInt id, required _i3.MultiAddress who}) { - return Freeze(id: id, who: who); + Freeze freeze({ + required BigInt id, + required _i3.MultiAddress who, + }) { + return Freeze( + id: id, + who: who, + ); } - Thaw thaw({required BigInt id, required _i3.MultiAddress who}) { - return Thaw(id: id, who: who); + Thaw thaw({ + required BigInt id, + required _i3.MultiAddress who, + }) { + return Thaw( + id: id, + who: who, + ); } FreezeAsset freezeAsset({required BigInt id}) { @@ -104,8 +166,14 @@ class $Call { return ThawAsset(id: id); } - TransferOwnership transferOwnership({required BigInt id, required _i3.MultiAddress owner}) { - return TransferOwnership(id: id, owner: owner); + TransferOwnership transferOwnership({ + required BigInt id, + required _i3.MultiAddress owner, + }) { + return TransferOwnership( + id: id, + owner: owner, + ); } SetTeam setTeam({ @@ -114,7 +182,12 @@ class $Call { required _i3.MultiAddress admin, required _i3.MultiAddress freezer, }) { - return SetTeam(id: id, issuer: issuer, admin: admin, freezer: freezer); + return SetTeam( + id: id, + issuer: issuer, + admin: admin, + freezer: freezer, + ); } SetMetadata setMetadata({ @@ -123,7 +196,12 @@ class $Call { required List symbol, required int decimals, }) { - return SetMetadata(id: id, name: name, symbol: symbol, decimals: decimals); + return SetMetadata( + id: id, + name: name, + symbol: symbol, + decimals: decimals, + ); } ClearMetadata clearMetadata({required BigInt id}) { @@ -137,7 +215,13 @@ class $Call { required int decimals, required bool isFrozen, }) { - return ForceSetMetadata(id: id, name: name, symbol: symbol, decimals: decimals, isFrozen: isFrozen); + return ForceSetMetadata( + id: id, + name: name, + symbol: symbol, + decimals: decimals, + isFrozen: isFrozen, + ); } ForceClearMetadata forceClearMetadata({required BigInt id}) { @@ -166,12 +250,26 @@ class $Call { ); } - ApproveTransfer approveTransfer({required BigInt id, required _i3.MultiAddress delegate, required BigInt amount}) { - return ApproveTransfer(id: id, delegate: delegate, amount: amount); + ApproveTransfer approveTransfer({ + required BigInt id, + required _i3.MultiAddress delegate, + required BigInt amount, + }) { + return ApproveTransfer( + id: id, + delegate: delegate, + amount: amount, + ); } - CancelApproval cancelApproval({required BigInt id, required _i3.MultiAddress delegate}) { - return CancelApproval(id: id, delegate: delegate); + CancelApproval cancelApproval({ + required BigInt id, + required _i3.MultiAddress delegate, + }) { + return CancelApproval( + id: id, + delegate: delegate, + ); } ForceCancelApproval forceCancelApproval({ @@ -179,7 +277,11 @@ class $Call { required _i3.MultiAddress owner, required _i3.MultiAddress delegate, }) { - return ForceCancelApproval(id: id, owner: owner, delegate: delegate); + return ForceCancelApproval( + id: id, + owner: owner, + delegate: delegate, + ); } TransferApproved transferApproved({ @@ -188,39 +290,88 @@ class $Call { required _i3.MultiAddress destination, required BigInt amount, }) { - return TransferApproved(id: id, owner: owner, destination: destination, amount: amount); + return TransferApproved( + id: id, + owner: owner, + destination: destination, + amount: amount, + ); } Touch touch({required BigInt id}) { return Touch(id: id); } - Refund refund({required BigInt id, required bool allowBurn}) { - return Refund(id: id, allowBurn: allowBurn); + Refund refund({ + required BigInt id, + required bool allowBurn, + }) { + return Refund( + id: id, + allowBurn: allowBurn, + ); } - SetMinBalance setMinBalance({required BigInt id, required BigInt minBalance}) { - return SetMinBalance(id: id, minBalance: minBalance); + SetMinBalance setMinBalance({ + required BigInt id, + required BigInt minBalance, + }) { + return SetMinBalance( + id: id, + minBalance: minBalance, + ); } - TouchOther touchOther({required BigInt id, required _i3.MultiAddress who}) { - return TouchOther(id: id, who: who); + TouchOther touchOther({ + required BigInt id, + required _i3.MultiAddress who, + }) { + return TouchOther( + id: id, + who: who, + ); } - RefundOther refundOther({required BigInt id, required _i3.MultiAddress who}) { - return RefundOther(id: id, who: who); + RefundOther refundOther({ + required BigInt id, + required _i3.MultiAddress who, + }) { + return RefundOther( + id: id, + who: who, + ); } - Block block({required BigInt id, required _i3.MultiAddress who}) { - return Block(id: id, who: who); + Block block({ + required BigInt id, + required _i3.MultiAddress who, + }) { + return Block( + id: id, + who: who, + ); } - TransferAll transferAll({required BigInt id, required _i3.MultiAddress dest, required bool keepAlive}) { - return TransferAll(id: id, dest: dest, keepAlive: keepAlive); + TransferAll transferAll({ + required BigInt id, + required _i3.MultiAddress dest, + required bool keepAlive, + }) { + return TransferAll( + id: id, + dest: dest, + keepAlive: keepAlive, + ); } - SetReserves setReserves({required BigInt id, required List reserves}) { - return SetReserves(id: id, reserves: reserves); + SetReserves setReserves({ + required BigInt id, + required List reserves, + }) { + return SetReserves( + id: id, + reserves: reserves, + ); } } @@ -305,7 +456,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case Create: (value as Create).encodeTo(output); @@ -410,7 +564,8 @@ class $CallCodec with _i1.Codec { (value as SetReserves).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -486,7 +641,8 @@ class $CallCodec with _i1.Codec { case SetReserves: return (value as SetReserves)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -511,7 +667,11 @@ class $CallCodec with _i1.Codec { /// /// Weight: `O(1)` class Create extends Call { - const Create({required this.id, required this.admin, required this.minBalance}); + const Create({ + required this.id, + required this.admin, + required this.minBalance, + }); factory Create._decode(_i1.Input input) { return Create( @@ -532,8 +692,12 @@ class Create extends Call { @override Map> toJson() => { - 'create': {'id': id, 'admin': admin.toJson(), 'minBalance': minBalance}, - }; + 'create': { + 'id': id, + 'admin': admin.toJson(), + 'minBalance': minBalance, + } + }; int _sizeHint() { int size = 1; @@ -544,19 +708,41 @@ class Create extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(admin, output); - _i1.U128Codec.codec.encodeTo(minBalance, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + admin, + output, + ); + _i1.U128Codec.codec.encodeTo( + minBalance, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Create && other.id == id && other.admin == admin && other.minBalance == minBalance; + identical( + this, + other, + ) || + other is Create && + other.id == id && + other.admin == admin && + other.minBalance == minBalance; @override - int get hashCode => Object.hash(id, admin, minBalance); + int get hashCode => Object.hash( + id, + admin, + minBalance, + ); } /// Issue a new class of fungible assets from a privileged origin. @@ -579,7 +765,12 @@ class Create extends Call { /// /// Weight: `O(1)` class ForceCreate extends Call { - const ForceCreate({required this.id, required this.owner, required this.isSufficient, required this.minBalance}); + const ForceCreate({ + required this.id, + required this.owner, + required this.isSufficient, + required this.minBalance, + }); factory ForceCreate._decode(_i1.Input input) { return ForceCreate( @@ -604,8 +795,13 @@ class ForceCreate extends Call { @override Map> toJson() => { - 'force_create': {'id': id, 'owner': owner.toJson(), 'isSufficient': isSufficient, 'minBalance': minBalance}, - }; + 'force_create': { + 'id': id, + 'owner': owner.toJson(), + 'isSufficient': isSufficient, + 'minBalance': minBalance, + } + }; int _sizeHint() { int size = 1; @@ -617,16 +813,34 @@ class ForceCreate extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(owner, output); - _i1.BoolCodec.codec.encodeTo(isSufficient, output); - _i1.CompactBigIntCodec.codec.encodeTo(minBalance, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + owner, + output, + ); + _i1.BoolCodec.codec.encodeTo( + isSufficient, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + minBalance, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ForceCreate && other.id == id && other.owner == owner && @@ -634,7 +848,12 @@ class ForceCreate extends Call { other.minBalance == minBalance; @override - int get hashCode => Object.hash(id, owner, isSufficient, minBalance); + int get hashCode => Object.hash( + id, + owner, + isSufficient, + minBalance, + ); } /// Start the process of destroying a fungible asset class. @@ -661,8 +880,8 @@ class StartDestroy extends Call { @override Map> toJson() => { - 'start_destroy': {'id': id}, - }; + 'start_destroy': {'id': id} + }; int _sizeHint() { int size = 1; @@ -671,12 +890,23 @@ class StartDestroy extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is StartDestroy && other.id == id; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is StartDestroy && other.id == id; @override int get hashCode => id.hashCode; @@ -706,8 +936,8 @@ class DestroyAccounts extends Call { @override Map> toJson() => { - 'destroy_accounts': {'id': id}, - }; + 'destroy_accounts': {'id': id} + }; int _sizeHint() { int size = 1; @@ -716,12 +946,23 @@ class DestroyAccounts extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is DestroyAccounts && other.id == id; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is DestroyAccounts && other.id == id; @override int get hashCode => id.hashCode; @@ -751,8 +992,8 @@ class DestroyApprovals extends Call { @override Map> toJson() => { - 'destroy_approvals': {'id': id}, - }; + 'destroy_approvals': {'id': id} + }; int _sizeHint() { int size = 1; @@ -761,12 +1002,23 @@ class DestroyApprovals extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is DestroyApprovals && other.id == id; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is DestroyApprovals && other.id == id; @override int get hashCode => id.hashCode; @@ -794,8 +1046,8 @@ class FinishDestroy extends Call { @override Map> toJson() => { - 'finish_destroy': {'id': id}, - }; + 'finish_destroy': {'id': id} + }; int _sizeHint() { int size = 1; @@ -804,12 +1056,23 @@ class FinishDestroy extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is FinishDestroy && other.id == id; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is FinishDestroy && other.id == id; @override int get hashCode => id.hashCode; @@ -828,7 +1091,11 @@ class FinishDestroy extends Call { /// Weight: `O(1)` /// Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. class Mint extends Call { - const Mint({required this.id, required this.beneficiary, required this.amount}); + const Mint({ + required this.id, + required this.beneficiary, + required this.amount, + }); factory Mint._decode(_i1.Input input) { return Mint( @@ -849,8 +1116,12 @@ class Mint extends Call { @override Map> toJson() => { - 'mint': {'id': id, 'beneficiary': beneficiary.toJson(), 'amount': amount}, - }; + 'mint': { + 'id': id, + 'beneficiary': beneficiary.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -861,19 +1132,41 @@ class Mint extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(beneficiary, output); - _i1.CompactBigIntCodec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + beneficiary, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Mint && other.id == id && other.beneficiary == beneficiary && other.amount == amount; + identical( + this, + other, + ) || + other is Mint && + other.id == id && + other.beneficiary == beneficiary && + other.amount == amount; @override - int get hashCode => Object.hash(id, beneficiary, amount); + int get hashCode => Object.hash( + id, + beneficiary, + amount, + ); } /// Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. @@ -892,7 +1185,11 @@ class Mint extends Call { /// Weight: `O(1)` /// Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. class Burn extends Call { - const Burn({required this.id, required this.who, required this.amount}); + const Burn({ + required this.id, + required this.who, + required this.amount, + }); factory Burn._decode(_i1.Input input) { return Burn( @@ -913,8 +1210,12 @@ class Burn extends Call { @override Map> toJson() => { - 'burn': {'id': id, 'who': who.toJson(), 'amount': amount}, - }; + 'burn': { + 'id': id, + 'who': who.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -925,18 +1226,41 @@ class Burn extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(who, output); - _i1.CompactBigIntCodec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Burn && other.id == id && other.who == who && other.amount == amount; + identical( + this, + other, + ) || + other is Burn && + other.id == id && + other.who == who && + other.amount == amount; @override - int get hashCode => Object.hash(id, who, amount); + int get hashCode => Object.hash( + id, + who, + amount, + ); } /// Move some assets from the sender account to another. @@ -958,7 +1282,11 @@ class Burn extends Call { /// Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of /// `target`. class Transfer extends Call { - const Transfer({required this.id, required this.target, required this.amount}); + const Transfer({ + required this.id, + required this.target, + required this.amount, + }); factory Transfer._decode(_i1.Input input) { return Transfer( @@ -979,8 +1307,12 @@ class Transfer extends Call { @override Map> toJson() => { - 'transfer': {'id': id, 'target': target.toJson(), 'amount': amount}, - }; + 'transfer': { + 'id': id, + 'target': target.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -991,18 +1323,41 @@ class Transfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(target, output); - _i1.CompactBigIntCodec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + target, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Transfer && other.id == id && other.target == target && other.amount == amount; + identical( + this, + other, + ) || + other is Transfer && + other.id == id && + other.target == target && + other.amount == amount; @override - int get hashCode => Object.hash(id, target, amount); + int get hashCode => Object.hash( + id, + target, + amount, + ); } /// Move some assets from the sender account to another, keeping the sender account alive. @@ -1024,7 +1379,11 @@ class Transfer extends Call { /// Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of /// `target`. class TransferKeepAlive extends Call { - const TransferKeepAlive({required this.id, required this.target, required this.amount}); + const TransferKeepAlive({ + required this.id, + required this.target, + required this.amount, + }); factory TransferKeepAlive._decode(_i1.Input input) { return TransferKeepAlive( @@ -1045,8 +1404,12 @@ class TransferKeepAlive extends Call { @override Map> toJson() => { - 'transfer_keep_alive': {'id': id, 'target': target.toJson(), 'amount': amount}, - }; + 'transfer_keep_alive': { + 'id': id, + 'target': target.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1057,19 +1420,41 @@ class TransferKeepAlive extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(target, output); - _i1.CompactBigIntCodec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + target, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is TransferKeepAlive && other.id == id && other.target == target && other.amount == amount; + identical( + this, + other, + ) || + other is TransferKeepAlive && + other.id == id && + other.target == target && + other.amount == amount; @override - int get hashCode => Object.hash(id, target, amount); + int get hashCode => Object.hash( + id, + target, + amount, + ); } /// Move some assets from one account to another. @@ -1092,7 +1477,12 @@ class TransferKeepAlive extends Call { /// Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of /// `dest`. class ForceTransfer extends Call { - const ForceTransfer({required this.id, required this.source, required this.dest, required this.amount}); + const ForceTransfer({ + required this.id, + required this.source, + required this.dest, + required this.amount, + }); factory ForceTransfer._decode(_i1.Input input) { return ForceTransfer( @@ -1117,8 +1507,13 @@ class ForceTransfer extends Call { @override Map> toJson() => { - 'force_transfer': {'id': id, 'source': source.toJson(), 'dest': dest.toJson(), 'amount': amount}, - }; + 'force_transfer': { + 'id': id, + 'source': source.toJson(), + 'dest': dest.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1130,16 +1525,34 @@ class ForceTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(source, output); - _i3.MultiAddress.codec.encodeTo(dest, output); - _i1.CompactBigIntCodec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + source, + output, + ); + _i3.MultiAddress.codec.encodeTo( + dest, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ForceTransfer && other.id == id && other.source == source && @@ -1147,7 +1560,12 @@ class ForceTransfer extends Call { other.amount == amount; @override - int get hashCode => Object.hash(id, source, dest, amount); + int get hashCode => Object.hash( + id, + source, + dest, + amount, + ); } /// Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` @@ -1163,10 +1581,16 @@ class ForceTransfer extends Call { /// /// Weight: `O(1)` class Freeze extends Call { - const Freeze({required this.id, required this.who}); + const Freeze({ + required this.id, + required this.who, + }); factory Freeze._decode(_i1.Input input) { - return Freeze(id: _i1.CompactBigIntCodec.codec.decode(input), who: _i3.MultiAddress.codec.decode(input)); + return Freeze( + id: _i1.CompactBigIntCodec.codec.decode(input), + who: _i3.MultiAddress.codec.decode(input), + ); } /// T::AssetIdParameter @@ -1177,8 +1601,11 @@ class Freeze extends Call { @override Map> toJson() => { - 'freeze': {'id': id, 'who': who.toJson()}, - }; + 'freeze': { + 'id': id, + 'who': who.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -1188,16 +1615,33 @@ class Freeze extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Freeze && other.id == id && other.who == who; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Freeze && other.id == id && other.who == who; @override - int get hashCode => Object.hash(id, who); + int get hashCode => Object.hash( + id, + who, + ); } /// Allow unprivileged transfers to and from an account again. @@ -1211,10 +1655,16 @@ class Freeze extends Call { /// /// Weight: `O(1)` class Thaw extends Call { - const Thaw({required this.id, required this.who}); + const Thaw({ + required this.id, + required this.who, + }); factory Thaw._decode(_i1.Input input) { - return Thaw(id: _i1.CompactBigIntCodec.codec.decode(input), who: _i3.MultiAddress.codec.decode(input)); + return Thaw( + id: _i1.CompactBigIntCodec.codec.decode(input), + who: _i3.MultiAddress.codec.decode(input), + ); } /// T::AssetIdParameter @@ -1225,8 +1675,11 @@ class Thaw extends Call { @override Map> toJson() => { - 'thaw': {'id': id, 'who': who.toJson()}, - }; + 'thaw': { + 'id': id, + 'who': who.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -1236,16 +1689,33 @@ class Thaw extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 12, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Thaw && other.id == id && other.who == who; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Thaw && other.id == id && other.who == who; @override - int get hashCode => Object.hash(id, who); + int get hashCode => Object.hash( + id, + who, + ); } /// Disallow further unprivileged transfers for the asset class. @@ -1269,8 +1739,8 @@ class FreezeAsset extends Call { @override Map> toJson() => { - 'freeze_asset': {'id': id}, - }; + 'freeze_asset': {'id': id} + }; int _sizeHint() { int size = 1; @@ -1279,12 +1749,23 @@ class FreezeAsset extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 13, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is FreezeAsset && other.id == id; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is FreezeAsset && other.id == id; @override int get hashCode => id.hashCode; @@ -1311,8 +1792,8 @@ class ThawAsset extends Call { @override Map> toJson() => { - 'thaw_asset': {'id': id}, - }; + 'thaw_asset': {'id': id} + }; int _sizeHint() { int size = 1; @@ -1321,12 +1802,23 @@ class ThawAsset extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 14, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ThawAsset && other.id == id; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ThawAsset && other.id == id; @override int get hashCode => id.hashCode; @@ -1343,7 +1835,10 @@ class ThawAsset extends Call { /// /// Weight: `O(1)` class TransferOwnership extends Call { - const TransferOwnership({required this.id, required this.owner}); + const TransferOwnership({ + required this.id, + required this.owner, + }); factory TransferOwnership._decode(_i1.Input input) { return TransferOwnership( @@ -1360,8 +1855,11 @@ class TransferOwnership extends Call { @override Map> toJson() => { - 'transfer_ownership': {'id': id, 'owner': owner.toJson()}, - }; + 'transfer_ownership': { + 'id': id, + 'owner': owner.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -1371,17 +1869,33 @@ class TransferOwnership extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(owner, output); + _i1.U8Codec.codec.encodeTo( + 15, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + owner, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is TransferOwnership && other.id == id && other.owner == owner; + identical( + this, + other, + ) || + other is TransferOwnership && other.id == id && other.owner == owner; @override - int get hashCode => Object.hash(id, owner); + int get hashCode => Object.hash( + id, + owner, + ); } /// Change the Issuer, Admin and Freezer of an asset. @@ -1397,7 +1911,12 @@ class TransferOwnership extends Call { /// /// Weight: `O(1)` class SetTeam extends Call { - const SetTeam({required this.id, required this.issuer, required this.admin, required this.freezer}); + const SetTeam({ + required this.id, + required this.issuer, + required this.admin, + required this.freezer, + }); factory SetTeam._decode(_i1.Input input) { return SetTeam( @@ -1422,8 +1941,13 @@ class SetTeam extends Call { @override Map> toJson() => { - 'set_team': {'id': id, 'issuer': issuer.toJson(), 'admin': admin.toJson(), 'freezer': freezer.toJson()}, - }; + 'set_team': { + 'id': id, + 'issuer': issuer.toJson(), + 'admin': admin.toJson(), + 'freezer': freezer.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -1435,20 +1959,47 @@ class SetTeam extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(16, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(issuer, output); - _i3.MultiAddress.codec.encodeTo(admin, output); - _i3.MultiAddress.codec.encodeTo(freezer, output); + _i1.U8Codec.codec.encodeTo( + 16, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + issuer, + output, + ); + _i3.MultiAddress.codec.encodeTo( + admin, + output, + ); + _i3.MultiAddress.codec.encodeTo( + freezer, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is SetTeam && other.id == id && other.issuer == issuer && other.admin == admin && other.freezer == freezer; + identical( + this, + other, + ) || + other is SetTeam && + other.id == id && + other.issuer == issuer && + other.admin == admin && + other.freezer == freezer; @override - int get hashCode => Object.hash(id, issuer, admin, freezer); + int get hashCode => Object.hash( + id, + issuer, + admin, + freezer, + ); } /// Set the metadata for an asset. @@ -1468,7 +2019,12 @@ class SetTeam extends Call { /// /// Weight: `O(1)` class SetMetadata extends Call { - const SetMetadata({required this.id, required this.name, required this.symbol, required this.decimals}); + const SetMetadata({ + required this.id, + required this.name, + required this.symbol, + required this.decimals, + }); factory SetMetadata._decode(_i1.Input input) { return SetMetadata( @@ -1493,8 +2049,13 @@ class SetMetadata extends Call { @override Map> toJson() => { - 'set_metadata': {'id': id, 'name': name, 'symbol': symbol, 'decimals': decimals}, - }; + 'set_metadata': { + 'id': id, + 'name': name, + 'symbol': symbol, + 'decimals': decimals, + } + }; int _sizeHint() { int size = 1; @@ -1506,24 +2067,53 @@ class SetMetadata extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(17, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i1.U8SequenceCodec.codec.encodeTo(name, output); - _i1.U8SequenceCodec.codec.encodeTo(symbol, output); - _i1.U8Codec.codec.encodeTo(decimals, output); + _i1.U8Codec.codec.encodeTo( + 17, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + name, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + symbol, + output, + ); + _i1.U8Codec.codec.encodeTo( + decimals, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is SetMetadata && other.id == id && - _i4.listsEqual(other.name, name) && - _i4.listsEqual(other.symbol, symbol) && + _i4.listsEqual( + other.name, + name, + ) && + _i4.listsEqual( + other.symbol, + symbol, + ) && other.decimals == decimals; @override - int get hashCode => Object.hash(id, name, symbol, decimals); + int get hashCode => Object.hash( + id, + name, + symbol, + decimals, + ); } /// Clear the metadata for an asset. @@ -1549,8 +2139,8 @@ class ClearMetadata extends Call { @override Map> toJson() => { - 'clear_metadata': {'id': id}, - }; + 'clear_metadata': {'id': id} + }; int _sizeHint() { int size = 1; @@ -1559,12 +2149,23 @@ class ClearMetadata extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(18, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 18, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ClearMetadata && other.id == id; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ClearMetadata && other.id == id; @override int get hashCode => id.hashCode; @@ -1620,8 +2221,14 @@ class ForceSetMetadata extends Call { @override Map> toJson() => { - 'force_set_metadata': {'id': id, 'name': name, 'symbol': symbol, 'decimals': decimals, 'isFrozen': isFrozen}, - }; + 'force_set_metadata': { + 'id': id, + 'name': name, + 'symbol': symbol, + 'decimals': decimals, + 'isFrozen': isFrozen, + } + }; int _sizeHint() { int size = 1; @@ -1634,26 +2241,59 @@ class ForceSetMetadata extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(19, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i1.U8SequenceCodec.codec.encodeTo(name, output); - _i1.U8SequenceCodec.codec.encodeTo(symbol, output); - _i1.U8Codec.codec.encodeTo(decimals, output); - _i1.BoolCodec.codec.encodeTo(isFrozen, output); + _i1.U8Codec.codec.encodeTo( + 19, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + name, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + symbol, + output, + ); + _i1.U8Codec.codec.encodeTo( + decimals, + output, + ); + _i1.BoolCodec.codec.encodeTo( + isFrozen, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ForceSetMetadata && other.id == id && - _i4.listsEqual(other.name, name) && - _i4.listsEqual(other.symbol, symbol) && + _i4.listsEqual( + other.name, + name, + ) && + _i4.listsEqual( + other.symbol, + symbol, + ) && other.decimals == decimals && other.isFrozen == isFrozen; @override - int get hashCode => Object.hash(id, name, symbol, decimals, isFrozen); + int get hashCode => Object.hash( + id, + name, + symbol, + decimals, + isFrozen, + ); } /// Clear the metadata for an asset. @@ -1679,8 +2319,8 @@ class ForceClearMetadata extends Call { @override Map> toJson() => { - 'force_clear_metadata': {'id': id}, - }; + 'force_clear_metadata': {'id': id} + }; int _sizeHint() { int size = 1; @@ -1689,12 +2329,23 @@ class ForceClearMetadata extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(20, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 20, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ForceClearMetadata && other.id == id; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ForceClearMetadata && other.id == id; @override int get hashCode => id.hashCode; @@ -1773,17 +2424,17 @@ class ForceAssetStatus extends Call { @override Map> toJson() => { - 'force_asset_status': { - 'id': id, - 'owner': owner.toJson(), - 'issuer': issuer.toJson(), - 'admin': admin.toJson(), - 'freezer': freezer.toJson(), - 'minBalance': minBalance, - 'isSufficient': isSufficient, - 'isFrozen': isFrozen, - }, - }; + 'force_asset_status': { + 'id': id, + 'owner': owner.toJson(), + 'issuer': issuer.toJson(), + 'admin': admin.toJson(), + 'freezer': freezer.toJson(), + 'minBalance': minBalance, + 'isSufficient': isSufficient, + 'isFrozen': isFrozen, + } + }; int _sizeHint() { int size = 1; @@ -1799,20 +2450,50 @@ class ForceAssetStatus extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(21, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(owner, output); - _i3.MultiAddress.codec.encodeTo(issuer, output); - _i3.MultiAddress.codec.encodeTo(admin, output); - _i3.MultiAddress.codec.encodeTo(freezer, output); - _i1.CompactBigIntCodec.codec.encodeTo(minBalance, output); - _i1.BoolCodec.codec.encodeTo(isSufficient, output); - _i1.BoolCodec.codec.encodeTo(isFrozen, output); + _i1.U8Codec.codec.encodeTo( + 21, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + owner, + output, + ); + _i3.MultiAddress.codec.encodeTo( + issuer, + output, + ); + _i3.MultiAddress.codec.encodeTo( + admin, + output, + ); + _i3.MultiAddress.codec.encodeTo( + freezer, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + minBalance, + output, + ); + _i1.BoolCodec.codec.encodeTo( + isSufficient, + output, + ); + _i1.BoolCodec.codec.encodeTo( + isFrozen, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ForceAssetStatus && other.id == id && other.owner == owner && @@ -1824,7 +2505,16 @@ class ForceAssetStatus extends Call { other.isFrozen == isFrozen; @override - int get hashCode => Object.hash(id, owner, issuer, admin, freezer, minBalance, isSufficient, isFrozen); + int get hashCode => Object.hash( + id, + owner, + issuer, + admin, + freezer, + minBalance, + isSufficient, + isFrozen, + ); } /// Approve an amount of asset for transfer by a delegated third-party account. @@ -1848,7 +2538,11 @@ class ForceAssetStatus extends Call { /// /// Weight: `O(1)` class ApproveTransfer extends Call { - const ApproveTransfer({required this.id, required this.delegate, required this.amount}); + const ApproveTransfer({ + required this.id, + required this.delegate, + required this.amount, + }); factory ApproveTransfer._decode(_i1.Input input) { return ApproveTransfer( @@ -1869,8 +2563,12 @@ class ApproveTransfer extends Call { @override Map> toJson() => { - 'approve_transfer': {'id': id, 'delegate': delegate.toJson(), 'amount': amount}, - }; + 'approve_transfer': { + 'id': id, + 'delegate': delegate.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1881,19 +2579,41 @@ class ApproveTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(22, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(delegate, output); - _i1.CompactBigIntCodec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 22, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + delegate, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ApproveTransfer && other.id == id && other.delegate == delegate && other.amount == amount; + identical( + this, + other, + ) || + other is ApproveTransfer && + other.id == id && + other.delegate == delegate && + other.amount == amount; @override - int get hashCode => Object.hash(id, delegate, amount); + int get hashCode => Object.hash( + id, + delegate, + amount, + ); } /// Cancel all of some asset approved for delegated transfer by a third-party account. @@ -1910,7 +2630,10 @@ class ApproveTransfer extends Call { /// /// Weight: `O(1)` class CancelApproval extends Call { - const CancelApproval({required this.id, required this.delegate}); + const CancelApproval({ + required this.id, + required this.delegate, + }); factory CancelApproval._decode(_i1.Input input) { return CancelApproval( @@ -1927,8 +2650,11 @@ class CancelApproval extends Call { @override Map> toJson() => { - 'cancel_approval': {'id': id, 'delegate': delegate.toJson()}, - }; + 'cancel_approval': { + 'id': id, + 'delegate': delegate.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -1938,17 +2664,33 @@ class CancelApproval extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(23, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(delegate, output); + _i1.U8Codec.codec.encodeTo( + 23, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + delegate, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is CancelApproval && other.id == id && other.delegate == delegate; + identical( + this, + other, + ) || + other is CancelApproval && other.id == id && other.delegate == delegate; @override - int get hashCode => Object.hash(id, delegate); + int get hashCode => Object.hash( + id, + delegate, + ); } /// Cancel all of some asset approved for delegated transfer by a third-party account. @@ -1965,7 +2707,11 @@ class CancelApproval extends Call { /// /// Weight: `O(1)` class ForceCancelApproval extends Call { - const ForceCancelApproval({required this.id, required this.owner, required this.delegate}); + const ForceCancelApproval({ + required this.id, + required this.owner, + required this.delegate, + }); factory ForceCancelApproval._decode(_i1.Input input) { return ForceCancelApproval( @@ -1986,8 +2732,12 @@ class ForceCancelApproval extends Call { @override Map> toJson() => { - 'force_cancel_approval': {'id': id, 'owner': owner.toJson(), 'delegate': delegate.toJson()}, - }; + 'force_cancel_approval': { + 'id': id, + 'owner': owner.toJson(), + 'delegate': delegate.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -1998,19 +2748,41 @@ class ForceCancelApproval extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(24, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(owner, output); - _i3.MultiAddress.codec.encodeTo(delegate, output); + _i1.U8Codec.codec.encodeTo( + 24, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + owner, + output, + ); + _i3.MultiAddress.codec.encodeTo( + delegate, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ForceCancelApproval && other.id == id && other.owner == owner && other.delegate == delegate; + identical( + this, + other, + ) || + other is ForceCancelApproval && + other.id == id && + other.owner == owner && + other.delegate == delegate; @override - int get hashCode => Object.hash(id, owner, delegate); + int get hashCode => Object.hash( + id, + owner, + delegate, + ); } /// Transfer some asset balance from a previously delegated account to some third-party @@ -2032,7 +2804,12 @@ class ForceCancelApproval extends Call { /// /// Weight: `O(1)` class TransferApproved extends Call { - const TransferApproved({required this.id, required this.owner, required this.destination, required this.amount}); + const TransferApproved({ + required this.id, + required this.owner, + required this.destination, + required this.amount, + }); factory TransferApproved._decode(_i1.Input input) { return TransferApproved( @@ -2057,8 +2834,13 @@ class TransferApproved extends Call { @override Map> toJson() => { - 'transfer_approved': {'id': id, 'owner': owner.toJson(), 'destination': destination.toJson(), 'amount': amount}, - }; + 'transfer_approved': { + 'id': id, + 'owner': owner.toJson(), + 'destination': destination.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -2070,16 +2852,34 @@ class TransferApproved extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(25, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(owner, output); - _i3.MultiAddress.codec.encodeTo(destination, output); - _i1.CompactBigIntCodec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 25, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + owner, + output, + ); + _i3.MultiAddress.codec.encodeTo( + destination, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is TransferApproved && other.id == id && other.owner == owner && @@ -2087,7 +2887,12 @@ class TransferApproved extends Call { other.amount == amount; @override - int get hashCode => Object.hash(id, owner, destination, amount); + int get hashCode => Object.hash( + id, + owner, + destination, + amount, + ); } /// Create an asset account for non-provider assets. @@ -2111,8 +2916,8 @@ class Touch extends Call { @override Map> toJson() => { - 'touch': {'id': id}, - }; + 'touch': {'id': id} + }; int _sizeHint() { int size = 1; @@ -2121,12 +2926,23 @@ class Touch extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(26, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 26, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Touch && other.id == id; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Touch && other.id == id; @override int get hashCode => id.hashCode; @@ -2146,10 +2962,16 @@ class Touch extends Call { /// /// Emits `Refunded` event when successful. class Refund extends Call { - const Refund({required this.id, required this.allowBurn}); + const Refund({ + required this.id, + required this.allowBurn, + }); factory Refund._decode(_i1.Input input) { - return Refund(id: _i1.CompactBigIntCodec.codec.decode(input), allowBurn: _i1.BoolCodec.codec.decode(input)); + return Refund( + id: _i1.CompactBigIntCodec.codec.decode(input), + allowBurn: _i1.BoolCodec.codec.decode(input), + ); } /// T::AssetIdParameter @@ -2160,8 +2982,11 @@ class Refund extends Call { @override Map> toJson() => { - 'refund': {'id': id, 'allowBurn': allowBurn}, - }; + 'refund': { + 'id': id, + 'allowBurn': allowBurn, + } + }; int _sizeHint() { int size = 1; @@ -2171,17 +2996,33 @@ class Refund extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(27, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i1.BoolCodec.codec.encodeTo(allowBurn, output); + _i1.U8Codec.codec.encodeTo( + 27, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i1.BoolCodec.codec.encodeTo( + allowBurn, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Refund && other.id == id && other.allowBurn == allowBurn; + identical( + this, + other, + ) || + other is Refund && other.id == id && other.allowBurn == allowBurn; @override - int get hashCode => Object.hash(id, allowBurn); + int get hashCode => Object.hash( + id, + allowBurn, + ); } /// Sets the minimum balance of an asset. @@ -2197,10 +3038,16 @@ class Refund extends Call { /// /// Emits `AssetMinBalanceChanged` event when successful. class SetMinBalance extends Call { - const SetMinBalance({required this.id, required this.minBalance}); + const SetMinBalance({ + required this.id, + required this.minBalance, + }); factory SetMinBalance._decode(_i1.Input input) { - return SetMinBalance(id: _i1.CompactBigIntCodec.codec.decode(input), minBalance: _i1.U128Codec.codec.decode(input)); + return SetMinBalance( + id: _i1.CompactBigIntCodec.codec.decode(input), + minBalance: _i1.U128Codec.codec.decode(input), + ); } /// T::AssetIdParameter @@ -2211,8 +3058,11 @@ class SetMinBalance extends Call { @override Map> toJson() => { - 'set_min_balance': {'id': id, 'minBalance': minBalance}, - }; + 'set_min_balance': { + 'id': id, + 'minBalance': minBalance, + } + }; int _sizeHint() { int size = 1; @@ -2222,17 +3072,35 @@ class SetMinBalance extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(28, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i1.U128Codec.codec.encodeTo(minBalance, output); + _i1.U8Codec.codec.encodeTo( + 28, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i1.U128Codec.codec.encodeTo( + minBalance, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is SetMinBalance && other.id == id && other.minBalance == minBalance; + identical( + this, + other, + ) || + other is SetMinBalance && + other.id == id && + other.minBalance == minBalance; @override - int get hashCode => Object.hash(id, minBalance); + int get hashCode => Object.hash( + id, + minBalance, + ); } /// Create an asset account for `who`. @@ -2247,10 +3115,16 @@ class SetMinBalance extends Call { /// /// Emits `Touched` event when successful. class TouchOther extends Call { - const TouchOther({required this.id, required this.who}); + const TouchOther({ + required this.id, + required this.who, + }); factory TouchOther._decode(_i1.Input input) { - return TouchOther(id: _i1.CompactBigIntCodec.codec.decode(input), who: _i3.MultiAddress.codec.decode(input)); + return TouchOther( + id: _i1.CompactBigIntCodec.codec.decode(input), + who: _i3.MultiAddress.codec.decode(input), + ); } /// T::AssetIdParameter @@ -2261,8 +3135,11 @@ class TouchOther extends Call { @override Map> toJson() => { - 'touch_other': {'id': id, 'who': who.toJson()}, - }; + 'touch_other': { + 'id': id, + 'who': who.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -2272,16 +3149,33 @@ class TouchOther extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(29, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 29, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is TouchOther && other.id == id && other.who == who; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TouchOther && other.id == id && other.who == who; @override - int get hashCode => Object.hash(id, who); + int get hashCode => Object.hash( + id, + who, + ); } /// Return the deposit (if any) of a target asset account. Useful if you are the depositor. @@ -2298,10 +3192,16 @@ class TouchOther extends Call { /// /// Emits `Refunded` event when successful. class RefundOther extends Call { - const RefundOther({required this.id, required this.who}); + const RefundOther({ + required this.id, + required this.who, + }); factory RefundOther._decode(_i1.Input input) { - return RefundOther(id: _i1.CompactBigIntCodec.codec.decode(input), who: _i3.MultiAddress.codec.decode(input)); + return RefundOther( + id: _i1.CompactBigIntCodec.codec.decode(input), + who: _i3.MultiAddress.codec.decode(input), + ); } /// T::AssetIdParameter @@ -2312,8 +3212,11 @@ class RefundOther extends Call { @override Map> toJson() => { - 'refund_other': {'id': id, 'who': who.toJson()}, - }; + 'refund_other': { + 'id': id, + 'who': who.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -2323,17 +3226,33 @@ class RefundOther extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(30, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 30, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is RefundOther && other.id == id && other.who == who; + identical( + this, + other, + ) || + other is RefundOther && other.id == id && other.who == who; @override - int get hashCode => Object.hash(id, who); + int get hashCode => Object.hash( + id, + who, + ); } /// Disallow further unprivileged transfers of an asset `id` to and from an account `who`. @@ -2347,10 +3266,16 @@ class RefundOther extends Call { /// /// Weight: `O(1)` class Block extends Call { - const Block({required this.id, required this.who}); + const Block({ + required this.id, + required this.who, + }); factory Block._decode(_i1.Input input) { - return Block(id: _i1.CompactBigIntCodec.codec.decode(input), who: _i3.MultiAddress.codec.decode(input)); + return Block( + id: _i1.CompactBigIntCodec.codec.decode(input), + who: _i3.MultiAddress.codec.decode(input), + ); } /// T::AssetIdParameter @@ -2361,8 +3286,11 @@ class Block extends Call { @override Map> toJson() => { - 'block': {'id': id, 'who': who.toJson()}, - }; + 'block': { + 'id': id, + 'who': who.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -2372,16 +3300,33 @@ class Block extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(31, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 31, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Block && other.id == id && other.who == who; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Block && other.id == id && other.who == who; @override - int get hashCode => Object.hash(id, who); + int get hashCode => Object.hash( + id, + who, + ); } /// Transfer the entire transferable balance from the caller asset account. @@ -2401,7 +3346,11 @@ class Block extends Call { /// (false), or transfer everything except at least the minimum balance, which will /// guarantee to keep the sender asset account alive (true). class TransferAll extends Call { - const TransferAll({required this.id, required this.dest, required this.keepAlive}); + const TransferAll({ + required this.id, + required this.dest, + required this.keepAlive, + }); factory TransferAll._decode(_i1.Input input) { return TransferAll( @@ -2422,8 +3371,12 @@ class TransferAll extends Call { @override Map> toJson() => { - 'transfer_all': {'id': id, 'dest': dest.toJson(), 'keepAlive': keepAlive}, - }; + 'transfer_all': { + 'id': id, + 'dest': dest.toJson(), + 'keepAlive': keepAlive, + } + }; int _sizeHint() { int size = 1; @@ -2434,19 +3387,41 @@ class TransferAll extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(32, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - _i3.MultiAddress.codec.encodeTo(dest, output); - _i1.BoolCodec.codec.encodeTo(keepAlive, output); + _i1.U8Codec.codec.encodeTo( + 32, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + _i3.MultiAddress.codec.encodeTo( + dest, + output, + ); + _i1.BoolCodec.codec.encodeTo( + keepAlive, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is TransferAll && other.id == id && other.dest == dest && other.keepAlive == keepAlive; + identical( + this, + other, + ) || + other is TransferAll && + other.id == id && + other.dest == dest && + other.keepAlive == keepAlive; @override - int get hashCode => Object.hash(id, dest, keepAlive); + int get hashCode => Object.hash( + id, + dest, + keepAlive, + ); } /// Sets the trusted reserve information of an asset. @@ -2459,12 +3434,16 @@ class TransferAll extends Call { /// /// Emits `AssetMinBalanceChanged` event when successful. class SetReserves extends Call { - const SetReserves({required this.id, required this.reserves}); + const SetReserves({ + required this.id, + required this.reserves, + }); factory SetReserves._decode(_i1.Input input) { return SetReserves( id: _i1.CompactBigIntCodec.codec.decode(input), - reserves: const _i1.SequenceCodec(_i1.NullCodec.codec).decode(input), + reserves: + const _i1.SequenceCodec(_i1.NullCodec.codec).decode(input), ); } @@ -2476,26 +3455,52 @@ class SetReserves extends Call { @override Map> toJson() => { - 'set_reserves': {'id': id, 'reserves': reserves.map((value) => null).toList()}, - }; + 'set_reserves': { + 'id': id, + 'reserves': reserves.map((value) => null).toList(), + } + }; int _sizeHint() { int size = 1; size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + const _i1.SequenceCodec(_i1.NullCodec.codec).sizeHint(reserves); + size = size + + const _i1.SequenceCodec(_i1.NullCodec.codec) + .sizeHint(reserves); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(33, output); - _i1.CompactBigIntCodec.codec.encodeTo(id, output); - const _i1.SequenceCodec(_i1.NullCodec.codec).encodeTo(reserves, output); + _i1.U8Codec.codec.encodeTo( + 33, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + id, + output, + ); + const _i1.SequenceCodec(_i1.NullCodec.codec).encodeTo( + reserves, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is SetReserves && other.id == id && _i4.listsEqual(other.reserves, reserves); + identical( + this, + other, + ) || + other is SetReserves && + other.id == id && + _i4.listsEqual( + other.reserves, + reserves, + ); @override - int get hashCode => Object.hash(id, reserves); + int get hashCode => Object.hash( + id, + reserves, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/error.dart index e9112c5f..a214f174 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/error.dart @@ -80,7 +80,10 @@ enum Error { /// Tried setting too many reserves. tooManyReserves('TooManyReserves', 23); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -160,7 +163,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/event.dart index 644a3787..7fb97d3a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/event.dart @@ -34,12 +34,28 @@ abstract class Event { class $Event { const $Event(); - Created created({required int assetId, required _i3.AccountId32 creator, required _i3.AccountId32 owner}) { - return Created(assetId: assetId, creator: creator, owner: owner); + Created created({ + required int assetId, + required _i3.AccountId32 creator, + required _i3.AccountId32 owner, + }) { + return Created( + assetId: assetId, + creator: creator, + owner: owner, + ); } - Issued issued({required int assetId, required _i3.AccountId32 owner, required BigInt amount}) { - return Issued(assetId: assetId, owner: owner, amount: amount); + Issued issued({ + required int assetId, + required _i3.AccountId32 owner, + required BigInt amount, + }) { + return Issued( + assetId: assetId, + owner: owner, + amount: amount, + ); } Transferred transferred({ @@ -48,11 +64,24 @@ class $Event { required _i3.AccountId32 to, required BigInt amount, }) { - return Transferred(assetId: assetId, from: from, to: to, amount: amount); + return Transferred( + assetId: assetId, + from: from, + to: to, + amount: amount, + ); } - Burned burned({required int assetId, required _i3.AccountId32 owner, required BigInt balance}) { - return Burned(assetId: assetId, owner: owner, balance: balance); + Burned burned({ + required int assetId, + required _i3.AccountId32 owner, + required BigInt balance, + }) { + return Burned( + assetId: assetId, + owner: owner, + balance: balance, + ); } TeamChanged teamChanged({ @@ -61,19 +90,42 @@ class $Event { required _i3.AccountId32 admin, required _i3.AccountId32 freezer, }) { - return TeamChanged(assetId: assetId, issuer: issuer, admin: admin, freezer: freezer); + return TeamChanged( + assetId: assetId, + issuer: issuer, + admin: admin, + freezer: freezer, + ); } - OwnerChanged ownerChanged({required int assetId, required _i3.AccountId32 owner}) { - return OwnerChanged(assetId: assetId, owner: owner); + OwnerChanged ownerChanged({ + required int assetId, + required _i3.AccountId32 owner, + }) { + return OwnerChanged( + assetId: assetId, + owner: owner, + ); } - Frozen frozen({required int assetId, required _i3.AccountId32 who}) { - return Frozen(assetId: assetId, who: who); + Frozen frozen({ + required int assetId, + required _i3.AccountId32 who, + }) { + return Frozen( + assetId: assetId, + who: who, + ); } - Thawed thawed({required int assetId, required _i3.AccountId32 who}) { - return Thawed(assetId: assetId, who: who); + Thawed thawed({ + required int assetId, + required _i3.AccountId32 who, + }) { + return Thawed( + assetId: assetId, + who: who, + ); } AssetFrozen assetFrozen({required int assetId}) { @@ -116,8 +168,14 @@ class $Event { return Destroyed(assetId: assetId); } - ForceCreated forceCreated({required int assetId, required _i3.AccountId32 owner}) { - return ForceCreated(assetId: assetId, owner: owner); + ForceCreated forceCreated({ + required int assetId, + required _i3.AccountId32 owner, + }) { + return ForceCreated( + assetId: assetId, + owner: owner, + ); } MetadataSet metadataSet({ @@ -127,7 +185,13 @@ class $Event { required int decimals, required bool isFrozen, }) { - return MetadataSet(assetId: assetId, name: name, symbol: symbol, decimals: decimals, isFrozen: isFrozen); + return MetadataSet( + assetId: assetId, + name: name, + symbol: symbol, + decimals: decimals, + isFrozen: isFrozen, + ); } MetadataCleared metadataCleared({required int assetId}) { @@ -140,7 +204,12 @@ class $Event { required _i3.AccountId32 delegate, required BigInt amount, }) { - return ApprovedTransfer(assetId: assetId, source: source, delegate: delegate, amount: amount); + return ApprovedTransfer( + assetId: assetId, + source: source, + delegate: delegate, + amount: amount, + ); } ApprovalCancelled approvalCancelled({ @@ -148,7 +217,11 @@ class $Event { required _i3.AccountId32 owner, required _i3.AccountId32 delegate, }) { - return ApprovalCancelled(assetId: assetId, owner: owner, delegate: delegate); + return ApprovalCancelled( + assetId: assetId, + owner: owner, + delegate: delegate, + ); } TransferredApproved transferredApproved({ @@ -171,28 +244,70 @@ class $Event { return AssetStatusChanged(assetId: assetId); } - AssetMinBalanceChanged assetMinBalanceChanged({required int assetId, required BigInt newMinBalance}) { - return AssetMinBalanceChanged(assetId: assetId, newMinBalance: newMinBalance); + AssetMinBalanceChanged assetMinBalanceChanged({ + required int assetId, + required BigInt newMinBalance, + }) { + return AssetMinBalanceChanged( + assetId: assetId, + newMinBalance: newMinBalance, + ); } - Touched touched({required int assetId, required _i3.AccountId32 who, required _i3.AccountId32 depositor}) { - return Touched(assetId: assetId, who: who, depositor: depositor); + Touched touched({ + required int assetId, + required _i3.AccountId32 who, + required _i3.AccountId32 depositor, + }) { + return Touched( + assetId: assetId, + who: who, + depositor: depositor, + ); } - Blocked blocked({required int assetId, required _i3.AccountId32 who}) { - return Blocked(assetId: assetId, who: who); + Blocked blocked({ + required int assetId, + required _i3.AccountId32 who, + }) { + return Blocked( + assetId: assetId, + who: who, + ); } - Deposited deposited({required int assetId, required _i3.AccountId32 who, required BigInt amount}) { - return Deposited(assetId: assetId, who: who, amount: amount); + Deposited deposited({ + required int assetId, + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Deposited( + assetId: assetId, + who: who, + amount: amount, + ); } - Withdrawn withdrawn({required int assetId, required _i3.AccountId32 who, required BigInt amount}) { - return Withdrawn(assetId: assetId, who: who, amount: amount); + Withdrawn withdrawn({ + required int assetId, + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Withdrawn( + assetId: assetId, + who: who, + amount: amount, + ); } - ReservesUpdated reservesUpdated({required int assetId, required List reserves}) { - return ReservesUpdated(assetId: assetId, reserves: reserves); + ReservesUpdated reservesUpdated({ + required int assetId, + required List reserves, + }) { + return ReservesUpdated( + assetId: assetId, + reserves: reserves, + ); } ReservesRemoved reservesRemoved({required int assetId}) { @@ -269,7 +384,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case Created: (value as Created).encodeTo(output); @@ -356,7 +474,8 @@ class $EventCodec with _i1.Codec { (value as ReservesRemoved).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -420,14 +539,19 @@ class $EventCodec with _i1.Codec { case ReservesRemoved: return (value as ReservesRemoved)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// Some asset class was created. class Created extends Event { - const Created({required this.assetId, required this.creator, required this.owner}); + const Created({ + required this.assetId, + required this.creator, + required this.owner, + }); factory Created._decode(_i1.Input input) { return Created( @@ -448,8 +572,12 @@ class Created extends Event { @override Map> toJson() => { - 'Created': {'assetId': assetId, 'creator': creator.toList(), 'owner': owner.toList()}, - }; + 'Created': { + 'assetId': assetId, + 'creator': creator.toList(), + 'owner': owner.toList(), + } + }; int _sizeHint() { int size = 1; @@ -460,27 +588,56 @@ class Created extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(creator, output); - const _i1.U8ArrayCodec(32).encodeTo(owner, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + creator, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + owner, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Created && other.assetId == assetId && - _i4.listsEqual(other.creator, creator) && - _i4.listsEqual(other.owner, owner); - - @override - int get hashCode => Object.hash(assetId, creator, owner); + _i4.listsEqual( + other.creator, + creator, + ) && + _i4.listsEqual( + other.owner, + owner, + ); + + @override + int get hashCode => Object.hash( + assetId, + creator, + owner, + ); } /// Some assets were issued. class Issued extends Event { - const Issued({required this.assetId, required this.owner, required this.amount}); + const Issued({ + required this.assetId, + required this.owner, + required this.amount, + }); factory Issued._decode(_i1.Input input) { return Issued( @@ -501,8 +658,12 @@ class Issued extends Event { @override Map> toJson() => { - 'Issued': {'assetId': assetId, 'owner': owner.toList(), 'amount': amount}, - }; + 'Issued': { + 'assetId': assetId, + 'owner': owner.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -513,24 +674,54 @@ class Issued extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(owner, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + owner, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Issued && other.assetId == assetId && _i4.listsEqual(other.owner, owner) && other.amount == amount; + identical( + this, + other, + ) || + other is Issued && + other.assetId == assetId && + _i4.listsEqual( + other.owner, + owner, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(assetId, owner, amount); + int get hashCode => Object.hash( + assetId, + owner, + amount, + ); } /// Some assets were transferred. class Transferred extends Event { - const Transferred({required this.assetId, required this.from, required this.to, required this.amount}); + const Transferred({ + required this.assetId, + required this.from, + required this.to, + required this.amount, + }); factory Transferred._decode(_i1.Input input) { return Transferred( @@ -555,8 +746,13 @@ class Transferred extends Event { @override Map> toJson() => { - 'Transferred': {'assetId': assetId, 'from': from.toList(), 'to': to.toList(), 'amount': amount}, - }; + 'Transferred': { + 'assetId': assetId, + 'from': from.toList(), + 'to': to.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -568,29 +764,62 @@ class Transferred extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(from, output); - const _i1.U8ArrayCodec(32).encodeTo(to, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + from, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + to, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Transferred && other.assetId == assetId && - _i4.listsEqual(other.from, from) && - _i4.listsEqual(other.to, to) && + _i4.listsEqual( + other.from, + from, + ) && + _i4.listsEqual( + other.to, + to, + ) && other.amount == amount; @override - int get hashCode => Object.hash(assetId, from, to, amount); + int get hashCode => Object.hash( + assetId, + from, + to, + amount, + ); } /// Some assets were destroyed. class Burned extends Event { - const Burned({required this.assetId, required this.owner, required this.balance}); + const Burned({ + required this.assetId, + required this.owner, + required this.balance, + }); factory Burned._decode(_i1.Input input) { return Burned( @@ -611,8 +840,12 @@ class Burned extends Event { @override Map> toJson() => { - 'Burned': {'assetId': assetId, 'owner': owner.toList(), 'balance': balance}, - }; + 'Burned': { + 'assetId': assetId, + 'owner': owner.toList(), + 'balance': balance, + } + }; int _sizeHint() { int size = 1; @@ -623,24 +856,54 @@ class Burned extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(owner, output); - _i1.U128Codec.codec.encodeTo(balance, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + owner, + output, + ); + _i1.U128Codec.codec.encodeTo( + balance, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Burned && other.assetId == assetId && _i4.listsEqual(other.owner, owner) && other.balance == balance; - - @override - int get hashCode => Object.hash(assetId, owner, balance); + identical( + this, + other, + ) || + other is Burned && + other.assetId == assetId && + _i4.listsEqual( + other.owner, + owner, + ) && + other.balance == balance; + + @override + int get hashCode => Object.hash( + assetId, + owner, + balance, + ); } /// The management team changed. class TeamChanged extends Event { - const TeamChanged({required this.assetId, required this.issuer, required this.admin, required this.freezer}); + const TeamChanged({ + required this.assetId, + required this.issuer, + required this.admin, + required this.freezer, + }); factory TeamChanged._decode(_i1.Input input) { return TeamChanged( @@ -665,13 +928,13 @@ class TeamChanged extends Event { @override Map> toJson() => { - 'TeamChanged': { - 'assetId': assetId, - 'issuer': issuer.toList(), - 'admin': admin.toList(), - 'freezer': freezer.toList(), - }, - }; + 'TeamChanged': { + 'assetId': assetId, + 'issuer': issuer.toList(), + 'admin': admin.toList(), + 'freezer': freezer.toList(), + } + }; int _sizeHint() { int size = 1; @@ -683,32 +946,70 @@ class TeamChanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(issuer, output); - const _i1.U8ArrayCodec(32).encodeTo(admin, output); - const _i1.U8ArrayCodec(32).encodeTo(freezer, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + issuer, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + admin, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + freezer, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is TeamChanged && other.assetId == assetId && - _i4.listsEqual(other.issuer, issuer) && - _i4.listsEqual(other.admin, admin) && - _i4.listsEqual(other.freezer, freezer); - - @override - int get hashCode => Object.hash(assetId, issuer, admin, freezer); + _i4.listsEqual( + other.issuer, + issuer, + ) && + _i4.listsEqual( + other.admin, + admin, + ) && + _i4.listsEqual( + other.freezer, + freezer, + ); + + @override + int get hashCode => Object.hash( + assetId, + issuer, + admin, + freezer, + ); } /// The owner changed. class OwnerChanged extends Event { - const OwnerChanged({required this.assetId, required this.owner}); + const OwnerChanged({ + required this.assetId, + required this.owner, + }); factory OwnerChanged._decode(_i1.Input input) { - return OwnerChanged(assetId: _i1.U32Codec.codec.decode(input), owner: const _i1.U8ArrayCodec(32).decode(input)); + return OwnerChanged( + assetId: _i1.U32Codec.codec.decode(input), + owner: const _i1.U8ArrayCodec(32).decode(input), + ); } /// T::AssetId @@ -719,8 +1020,11 @@ class OwnerChanged extends Event { @override Map> toJson() => { - 'OwnerChanged': {'assetId': assetId, 'owner': owner.toList()}, - }; + 'OwnerChanged': { + 'assetId': assetId, + 'owner': owner.toList(), + } + }; int _sizeHint() { int size = 1; @@ -730,25 +1034,52 @@ class OwnerChanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(owner, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + owner, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is OwnerChanged && other.assetId == assetId && _i4.listsEqual(other.owner, owner); + identical( + this, + other, + ) || + other is OwnerChanged && + other.assetId == assetId && + _i4.listsEqual( + other.owner, + owner, + ); @override - int get hashCode => Object.hash(assetId, owner); + int get hashCode => Object.hash( + assetId, + owner, + ); } /// Some account `who` was frozen. class Frozen extends Event { - const Frozen({required this.assetId, required this.who}); + const Frozen({ + required this.assetId, + required this.who, + }); factory Frozen._decode(_i1.Input input) { - return Frozen(assetId: _i1.U32Codec.codec.decode(input), who: const _i1.U8ArrayCodec(32).decode(input)); + return Frozen( + assetId: _i1.U32Codec.codec.decode(input), + who: const _i1.U8ArrayCodec(32).decode(input), + ); } /// T::AssetId @@ -759,8 +1090,11 @@ class Frozen extends Event { @override Map> toJson() => { - 'Frozen': {'assetId': assetId, 'who': who.toList()}, - }; + 'Frozen': { + 'assetId': assetId, + 'who': who.toList(), + } + }; int _sizeHint() { int size = 1; @@ -770,25 +1104,52 @@ class Frozen extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Frozen && other.assetId == assetId && _i4.listsEqual(other.who, who); + identical( + this, + other, + ) || + other is Frozen && + other.assetId == assetId && + _i4.listsEqual( + other.who, + who, + ); @override - int get hashCode => Object.hash(assetId, who); + int get hashCode => Object.hash( + assetId, + who, + ); } /// Some account `who` was thawed. class Thawed extends Event { - const Thawed({required this.assetId, required this.who}); + const Thawed({ + required this.assetId, + required this.who, + }); factory Thawed._decode(_i1.Input input) { - return Thawed(assetId: _i1.U32Codec.codec.decode(input), who: const _i1.U8ArrayCodec(32).decode(input)); + return Thawed( + assetId: _i1.U32Codec.codec.decode(input), + who: const _i1.U8ArrayCodec(32).decode(input), + ); } /// T::AssetId @@ -799,8 +1160,11 @@ class Thawed extends Event { @override Map> toJson() => { - 'Thawed': {'assetId': assetId, 'who': who.toList()}, - }; + 'Thawed': { + 'assetId': assetId, + 'who': who.toList(), + } + }; int _sizeHint() { int size = 1; @@ -810,17 +1174,38 @@ class Thawed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Thawed && other.assetId == assetId && _i4.listsEqual(other.who, who); + identical( + this, + other, + ) || + other is Thawed && + other.assetId == assetId && + _i4.listsEqual( + other.who, + who, + ); @override - int get hashCode => Object.hash(assetId, who); + int get hashCode => Object.hash( + assetId, + who, + ); } /// Some asset `asset_id` was frozen. @@ -836,8 +1221,8 @@ class AssetFrozen extends Event { @override Map> toJson() => { - 'AssetFrozen': {'assetId': assetId}, - }; + 'AssetFrozen': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -846,12 +1231,23 @@ class AssetFrozen extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i1.U32Codec.codec.encodeTo(assetId, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is AssetFrozen && other.assetId == assetId; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is AssetFrozen && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -870,8 +1266,8 @@ class AssetThawed extends Event { @override Map> toJson() => { - 'AssetThawed': {'assetId': assetId}, - }; + 'AssetThawed': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -880,12 +1276,23 @@ class AssetThawed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i1.U32Codec.codec.encodeTo(assetId, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is AssetThawed && other.assetId == assetId; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is AssetThawed && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -893,7 +1300,11 @@ class AssetThawed extends Event { /// Accounts were destroyed for given asset. class AccountsDestroyed extends Event { - const AccountsDestroyed({required this.assetId, required this.accountsDestroyed, required this.accountsRemaining}); + const AccountsDestroyed({ + required this.assetId, + required this.accountsDestroyed, + required this.accountsRemaining, + }); factory AccountsDestroyed._decode(_i1.Input input) { return AccountsDestroyed( @@ -914,12 +1325,12 @@ class AccountsDestroyed extends Event { @override Map> toJson() => { - 'AccountsDestroyed': { - 'assetId': assetId, - 'accountsDestroyed': accountsDestroyed, - 'accountsRemaining': accountsRemaining, - }, - }; + 'AccountsDestroyed': { + 'assetId': assetId, + 'accountsDestroyed': accountsDestroyed, + 'accountsRemaining': accountsRemaining, + } + }; int _sizeHint() { int size = 1; @@ -930,27 +1341,50 @@ class AccountsDestroyed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - _i1.U32Codec.codec.encodeTo(accountsDestroyed, output); - _i1.U32Codec.codec.encodeTo(accountsRemaining, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + _i1.U32Codec.codec.encodeTo( + accountsDestroyed, + output, + ); + _i1.U32Codec.codec.encodeTo( + accountsRemaining, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is AccountsDestroyed && other.assetId == assetId && other.accountsDestroyed == accountsDestroyed && other.accountsRemaining == accountsRemaining; @override - int get hashCode => Object.hash(assetId, accountsDestroyed, accountsRemaining); + int get hashCode => Object.hash( + assetId, + accountsDestroyed, + accountsRemaining, + ); } /// Approvals were destroyed for given asset. class ApprovalsDestroyed extends Event { - const ApprovalsDestroyed({required this.assetId, required this.approvalsDestroyed, required this.approvalsRemaining}); + const ApprovalsDestroyed({ + required this.assetId, + required this.approvalsDestroyed, + required this.approvalsRemaining, + }); factory ApprovalsDestroyed._decode(_i1.Input input) { return ApprovalsDestroyed( @@ -971,12 +1405,12 @@ class ApprovalsDestroyed extends Event { @override Map> toJson() => { - 'ApprovalsDestroyed': { - 'assetId': assetId, - 'approvalsDestroyed': approvalsDestroyed, - 'approvalsRemaining': approvalsRemaining, - }, - }; + 'ApprovalsDestroyed': { + 'assetId': assetId, + 'approvalsDestroyed': approvalsDestroyed, + 'approvalsRemaining': approvalsRemaining, + } + }; int _sizeHint() { int size = 1; @@ -987,22 +1421,41 @@ class ApprovalsDestroyed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - _i1.U32Codec.codec.encodeTo(approvalsDestroyed, output); - _i1.U32Codec.codec.encodeTo(approvalsRemaining, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + _i1.U32Codec.codec.encodeTo( + approvalsDestroyed, + output, + ); + _i1.U32Codec.codec.encodeTo( + approvalsRemaining, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ApprovalsDestroyed && other.assetId == assetId && other.approvalsDestroyed == approvalsDestroyed && other.approvalsRemaining == approvalsRemaining; @override - int get hashCode => Object.hash(assetId, approvalsDestroyed, approvalsRemaining); + int get hashCode => Object.hash( + assetId, + approvalsDestroyed, + approvalsRemaining, + ); } /// An asset class is in the process of being destroyed. @@ -1018,8 +1471,8 @@ class DestructionStarted extends Event { @override Map> toJson() => { - 'DestructionStarted': {'assetId': assetId}, - }; + 'DestructionStarted': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -1028,12 +1481,23 @@ class DestructionStarted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); - _i1.U32Codec.codec.encodeTo(assetId, output); + _i1.U8Codec.codec.encodeTo( + 12, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is DestructionStarted && other.assetId == assetId; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is DestructionStarted && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -1052,8 +1516,8 @@ class Destroyed extends Event { @override Map> toJson() => { - 'Destroyed': {'assetId': assetId}, - }; + 'Destroyed': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -1062,12 +1526,23 @@ class Destroyed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - _i1.U32Codec.codec.encodeTo(assetId, output); + _i1.U8Codec.codec.encodeTo( + 13, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Destroyed && other.assetId == assetId; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Destroyed && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -1075,10 +1550,16 @@ class Destroyed extends Event { /// Some asset class was force-created. class ForceCreated extends Event { - const ForceCreated({required this.assetId, required this.owner}); + const ForceCreated({ + required this.assetId, + required this.owner, + }); factory ForceCreated._decode(_i1.Input input) { - return ForceCreated(assetId: _i1.U32Codec.codec.decode(input), owner: const _i1.U8ArrayCodec(32).decode(input)); + return ForceCreated( + assetId: _i1.U32Codec.codec.decode(input), + owner: const _i1.U8ArrayCodec(32).decode(input), + ); } /// T::AssetId @@ -1089,8 +1570,11 @@ class ForceCreated extends Event { @override Map> toJson() => { - 'ForceCreated': {'assetId': assetId, 'owner': owner.toList()}, - }; + 'ForceCreated': { + 'assetId': assetId, + 'owner': owner.toList(), + } + }; int _sizeHint() { int size = 1; @@ -1100,17 +1584,38 @@ class ForceCreated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(owner, output); + _i1.U8Codec.codec.encodeTo( + 14, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + owner, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is ForceCreated && other.assetId == assetId && _i4.listsEqual(other.owner, owner); + identical( + this, + other, + ) || + other is ForceCreated && + other.assetId == assetId && + _i4.listsEqual( + other.owner, + owner, + ); @override - int get hashCode => Object.hash(assetId, owner); + int get hashCode => Object.hash( + assetId, + owner, + ); } /// New metadata has been set for an asset. @@ -1150,8 +1655,14 @@ class MetadataSet extends Event { @override Map> toJson() => { - 'MetadataSet': {'assetId': assetId, 'name': name, 'symbol': symbol, 'decimals': decimals, 'isFrozen': isFrozen}, - }; + 'MetadataSet': { + 'assetId': assetId, + 'name': name, + 'symbol': symbol, + 'decimals': decimals, + 'isFrozen': isFrozen, + } + }; int _sizeHint() { int size = 1; @@ -1164,26 +1675,59 @@ class MetadataSet extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - _i1.U8SequenceCodec.codec.encodeTo(name, output); - _i1.U8SequenceCodec.codec.encodeTo(symbol, output); - _i1.U8Codec.codec.encodeTo(decimals, output); - _i1.BoolCodec.codec.encodeTo(isFrozen, output); + _i1.U8Codec.codec.encodeTo( + 15, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + name, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + symbol, + output, + ); + _i1.U8Codec.codec.encodeTo( + decimals, + output, + ); + _i1.BoolCodec.codec.encodeTo( + isFrozen, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is MetadataSet && other.assetId == assetId && - _i4.listsEqual(other.name, name) && - _i4.listsEqual(other.symbol, symbol) && + _i4.listsEqual( + other.name, + name, + ) && + _i4.listsEqual( + other.symbol, + symbol, + ) && other.decimals == decimals && other.isFrozen == isFrozen; @override - int get hashCode => Object.hash(assetId, name, symbol, decimals, isFrozen); + int get hashCode => Object.hash( + assetId, + name, + symbol, + decimals, + isFrozen, + ); } /// Metadata has been cleared for an asset. @@ -1199,8 +1743,8 @@ class MetadataCleared extends Event { @override Map> toJson() => { - 'MetadataCleared': {'assetId': assetId}, - }; + 'MetadataCleared': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -1209,12 +1753,23 @@ class MetadataCleared extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(16, output); - _i1.U32Codec.codec.encodeTo(assetId, output); + _i1.U8Codec.codec.encodeTo( + 16, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is MetadataCleared && other.assetId == assetId; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is MetadataCleared && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -1222,7 +1777,12 @@ class MetadataCleared extends Event { /// (Additional) funds have been approved for transfer to a destination account. class ApprovedTransfer extends Event { - const ApprovedTransfer({required this.assetId, required this.source, required this.delegate, required this.amount}); + const ApprovedTransfer({ + required this.assetId, + required this.source, + required this.delegate, + required this.amount, + }); factory ApprovedTransfer._decode(_i1.Input input) { return ApprovedTransfer( @@ -1247,13 +1807,13 @@ class ApprovedTransfer extends Event { @override Map> toJson() => { - 'ApprovedTransfer': { - 'assetId': assetId, - 'source': source.toList(), - 'delegate': delegate.toList(), - 'amount': amount, - }, - }; + 'ApprovedTransfer': { + 'assetId': assetId, + 'source': source.toList(), + 'delegate': delegate.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1265,29 +1825,62 @@ class ApprovedTransfer extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(17, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(source, output); - const _i1.U8ArrayCodec(32).encodeTo(delegate, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 17, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + source, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + delegate, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ApprovedTransfer && other.assetId == assetId && - _i4.listsEqual(other.source, source) && - _i4.listsEqual(other.delegate, delegate) && + _i4.listsEqual( + other.source, + source, + ) && + _i4.listsEqual( + other.delegate, + delegate, + ) && other.amount == amount; @override - int get hashCode => Object.hash(assetId, source, delegate, amount); + int get hashCode => Object.hash( + assetId, + source, + delegate, + amount, + ); } /// An approval for account `delegate` was cancelled by `owner`. class ApprovalCancelled extends Event { - const ApprovalCancelled({required this.assetId, required this.owner, required this.delegate}); + const ApprovalCancelled({ + required this.assetId, + required this.owner, + required this.delegate, + }); factory ApprovalCancelled._decode(_i1.Input input) { return ApprovalCancelled( @@ -1308,8 +1901,12 @@ class ApprovalCancelled extends Event { @override Map> toJson() => { - 'ApprovalCancelled': {'assetId': assetId, 'owner': owner.toList(), 'delegate': delegate.toList()}, - }; + 'ApprovalCancelled': { + 'assetId': assetId, + 'owner': owner.toList(), + 'delegate': delegate.toList(), + } + }; int _sizeHint() { int size = 1; @@ -1320,22 +1917,47 @@ class ApprovalCancelled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(18, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(owner, output); - const _i1.U8ArrayCodec(32).encodeTo(delegate, output); + _i1.U8Codec.codec.encodeTo( + 18, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + owner, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + delegate, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ApprovalCancelled && other.assetId == assetId && - _i4.listsEqual(other.owner, owner) && - _i4.listsEqual(other.delegate, delegate); - - @override - int get hashCode => Object.hash(assetId, owner, delegate); + _i4.listsEqual( + other.owner, + owner, + ) && + _i4.listsEqual( + other.delegate, + delegate, + ); + + @override + int get hashCode => Object.hash( + assetId, + owner, + delegate, + ); } /// An `amount` was transferred in its entirety from `owner` to `destination` by @@ -1376,14 +1998,14 @@ class TransferredApproved extends Event { @override Map> toJson() => { - 'TransferredApproved': { - 'assetId': assetId, - 'owner': owner.toList(), - 'delegate': delegate.toList(), - 'destination': destination.toList(), - 'amount': amount, - }, - }; + 'TransferredApproved': { + 'assetId': assetId, + 'owner': owner.toList(), + 'delegate': delegate.toList(), + 'destination': destination.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1396,26 +2018,62 @@ class TransferredApproved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(19, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(owner, output); - const _i1.U8ArrayCodec(32).encodeTo(delegate, output); - const _i1.U8ArrayCodec(32).encodeTo(destination, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 19, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + owner, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + delegate, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + destination, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is TransferredApproved && other.assetId == assetId && - _i4.listsEqual(other.owner, owner) && - _i4.listsEqual(other.delegate, delegate) && - _i4.listsEqual(other.destination, destination) && + _i4.listsEqual( + other.owner, + owner, + ) && + _i4.listsEqual( + other.delegate, + delegate, + ) && + _i4.listsEqual( + other.destination, + destination, + ) && other.amount == amount; @override - int get hashCode => Object.hash(assetId, owner, delegate, destination, amount); + int get hashCode => Object.hash( + assetId, + owner, + delegate, + destination, + amount, + ); } /// An asset has had its attributes changed by the `Force` origin. @@ -1431,8 +2089,8 @@ class AssetStatusChanged extends Event { @override Map> toJson() => { - 'AssetStatusChanged': {'assetId': assetId}, - }; + 'AssetStatusChanged': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -1441,12 +2099,23 @@ class AssetStatusChanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(20, output); - _i1.U32Codec.codec.encodeTo(assetId, output); + _i1.U8Codec.codec.encodeTo( + 20, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is AssetStatusChanged && other.assetId == assetId; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is AssetStatusChanged && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -1454,7 +2123,10 @@ class AssetStatusChanged extends Event { /// The min_balance of an asset has been updated by the asset owner. class AssetMinBalanceChanged extends Event { - const AssetMinBalanceChanged({required this.assetId, required this.newMinBalance}); + const AssetMinBalanceChanged({ + required this.assetId, + required this.newMinBalance, + }); factory AssetMinBalanceChanged._decode(_i1.Input input) { return AssetMinBalanceChanged( @@ -1471,8 +2143,11 @@ class AssetMinBalanceChanged extends Event { @override Map> toJson() => { - 'AssetMinBalanceChanged': {'assetId': assetId, 'newMinBalance': newMinBalance}, - }; + 'AssetMinBalanceChanged': { + 'assetId': assetId, + 'newMinBalance': newMinBalance, + } + }; int _sizeHint() { int size = 1; @@ -1482,23 +2157,44 @@ class AssetMinBalanceChanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(21, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - _i1.U128Codec.codec.encodeTo(newMinBalance, output); + _i1.U8Codec.codec.encodeTo( + 21, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + _i1.U128Codec.codec.encodeTo( + newMinBalance, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is AssetMinBalanceChanged && other.assetId == assetId && other.newMinBalance == newMinBalance; + identical( + this, + other, + ) || + other is AssetMinBalanceChanged && + other.assetId == assetId && + other.newMinBalance == newMinBalance; @override - int get hashCode => Object.hash(assetId, newMinBalance); + int get hashCode => Object.hash( + assetId, + newMinBalance, + ); } /// Some account `who` was created with a deposit from `depositor`. class Touched extends Event { - const Touched({required this.assetId, required this.who, required this.depositor}); + const Touched({ + required this.assetId, + required this.who, + required this.depositor, + }); factory Touched._decode(_i1.Input input) { return Touched( @@ -1519,8 +2215,12 @@ class Touched extends Event { @override Map> toJson() => { - 'Touched': {'assetId': assetId, 'who': who.toList(), 'depositor': depositor.toList()}, - }; + 'Touched': { + 'assetId': assetId, + 'who': who.toList(), + 'depositor': depositor.toList(), + } + }; int _sizeHint() { int size = 1; @@ -1531,30 +2231,61 @@ class Touched extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(22, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - const _i1.U8ArrayCodec(32).encodeTo(depositor, output); + _i1.U8Codec.codec.encodeTo( + 22, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + depositor, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Touched && other.assetId == assetId && - _i4.listsEqual(other.who, who) && - _i4.listsEqual(other.depositor, depositor); - - @override - int get hashCode => Object.hash(assetId, who, depositor); + _i4.listsEqual( + other.who, + who, + ) && + _i4.listsEqual( + other.depositor, + depositor, + ); + + @override + int get hashCode => Object.hash( + assetId, + who, + depositor, + ); } /// Some account `who` was blocked. class Blocked extends Event { - const Blocked({required this.assetId, required this.who}); + const Blocked({ + required this.assetId, + required this.who, + }); factory Blocked._decode(_i1.Input input) { - return Blocked(assetId: _i1.U32Codec.codec.decode(input), who: const _i1.U8ArrayCodec(32).decode(input)); + return Blocked( + assetId: _i1.U32Codec.codec.decode(input), + who: const _i1.U8ArrayCodec(32).decode(input), + ); } /// T::AssetId @@ -1565,8 +2296,11 @@ class Blocked extends Event { @override Map> toJson() => { - 'Blocked': {'assetId': assetId, 'who': who.toList()}, - }; + 'Blocked': { + 'assetId': assetId, + 'who': who.toList(), + } + }; int _sizeHint() { int size = 1; @@ -1576,22 +2310,47 @@ class Blocked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(23, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 23, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Blocked && other.assetId == assetId && _i4.listsEqual(other.who, who); + identical( + this, + other, + ) || + other is Blocked && + other.assetId == assetId && + _i4.listsEqual( + other.who, + who, + ); @override - int get hashCode => Object.hash(assetId, who); + int get hashCode => Object.hash( + assetId, + who, + ); } /// Some assets were deposited (e.g. for transaction fees). class Deposited extends Event { - const Deposited({required this.assetId, required this.who, required this.amount}); + const Deposited({ + required this.assetId, + required this.who, + required this.amount, + }); factory Deposited._decode(_i1.Input input) { return Deposited( @@ -1612,8 +2371,12 @@ class Deposited extends Event { @override Map> toJson() => { - 'Deposited': {'assetId': assetId, 'who': who.toList(), 'amount': amount}, - }; + 'Deposited': { + 'assetId': assetId, + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1624,24 +2387,53 @@ class Deposited extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(24, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 24, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Deposited && other.assetId == assetId && _i4.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Deposited && + other.assetId == assetId && + _i4.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(assetId, who, amount); + int get hashCode => Object.hash( + assetId, + who, + amount, + ); } /// Some assets were withdrawn from the account (e.g. for transaction fees). class Withdrawn extends Event { - const Withdrawn({required this.assetId, required this.who, required this.amount}); + const Withdrawn({ + required this.assetId, + required this.who, + required this.amount, + }); factory Withdrawn._decode(_i1.Input input) { return Withdrawn( @@ -1662,8 +2454,12 @@ class Withdrawn extends Event { @override Map> toJson() => { - 'Withdrawn': {'assetId': assetId, 'who': who.toList(), 'amount': amount}, - }; + 'Withdrawn': { + 'assetId': assetId, + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1674,29 +2470,58 @@ class Withdrawn extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(25, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 25, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Withdrawn && other.assetId == assetId && _i4.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Withdrawn && + other.assetId == assetId && + _i4.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(assetId, who, amount); + int get hashCode => Object.hash( + assetId, + who, + amount, + ); } /// Reserve information was set or updated for `asset_id`. class ReservesUpdated extends Event { - const ReservesUpdated({required this.assetId, required this.reserves}); + const ReservesUpdated({ + required this.assetId, + required this.reserves, + }); factory ReservesUpdated._decode(_i1.Input input) { return ReservesUpdated( assetId: _i1.U32Codec.codec.decode(input), - reserves: const _i1.SequenceCodec(_i1.NullCodec.codec).decode(input), + reserves: + const _i1.SequenceCodec(_i1.NullCodec.codec).decode(input), ); } @@ -1708,29 +2533,54 @@ class ReservesUpdated extends Event { @override Map> toJson() => { - 'ReservesUpdated': {'assetId': assetId, 'reserves': reserves.map((value) => null).toList()}, - }; + 'ReservesUpdated': { + 'assetId': assetId, + 'reserves': reserves.map((value) => null).toList(), + } + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i1.SequenceCodec(_i1.NullCodec.codec).sizeHint(reserves); + size = size + + const _i1.SequenceCodec(_i1.NullCodec.codec) + .sizeHint(reserves); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(26, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.SequenceCodec(_i1.NullCodec.codec).encodeTo(reserves, output); + _i1.U8Codec.codec.encodeTo( + 26, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.SequenceCodec(_i1.NullCodec.codec).encodeTo( + reserves, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ReservesUpdated && other.assetId == assetId && _i4.listsEqual(other.reserves, reserves); + identical( + this, + other, + ) || + other is ReservesUpdated && + other.assetId == assetId && + _i4.listsEqual( + other.reserves, + reserves, + ); @override - int get hashCode => Object.hash(assetId, reserves); + int get hashCode => Object.hash( + assetId, + reserves, + ); } /// Reserve information was removed for `asset_id`. @@ -1746,8 +2596,8 @@ class ReservesRemoved extends Event { @override Map> toJson() => { - 'ReservesRemoved': {'assetId': assetId}, - }; + 'ReservesRemoved': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -1756,12 +2606,23 @@ class ReservesRemoved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(27, output); - _i1.U32Codec.codec.encodeTo(assetId, output); + _i1.U8Codec.codec.encodeTo( + 27, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ReservesRemoved && other.assetId == assetId; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ReservesRemoved && other.assetId == assetId; @override int get hashCode => assetId.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/account_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/account_status.dart index 6ad2a4a4..6b3c2a16 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/account_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/account_status.dart @@ -8,7 +8,10 @@ enum AccountStatus { frozen('Frozen', 1), blocked('Blocked', 2); - const AccountStatus(this.variantName, this.codecIndex); + const AccountStatus( + this.variantName, + this.codecIndex, + ); factory AccountStatus.decode(_i1.Input input) { return codec.decode(input); @@ -46,7 +49,13 @@ class $AccountStatusCodec with _i1.Codec { } @override - void encodeTo(AccountStatus value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + AccountStatus value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/approval.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/approval.dart index ef7cbb93..0a616302 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/approval.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/approval.dart @@ -4,7 +4,10 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class Approval { - const Approval({required this.amount, required this.deposit}); + const Approval({ + required this.amount, + required this.deposit, + }); factory Approval.decode(_i1.Input input) { return codec.decode(input); @@ -22,28 +25,50 @@ class Approval { return codec.encode(this); } - Map toJson() => {'amount': amount, 'deposit': deposit}; + Map toJson() => { + 'amount': amount, + 'deposit': deposit, + }; @override bool operator ==(Object other) => - identical(this, other) || other is Approval && other.amount == amount && other.deposit == deposit; + identical( + this, + other, + ) || + other is Approval && other.amount == amount && other.deposit == deposit; @override - int get hashCode => Object.hash(amount, deposit); + int get hashCode => Object.hash( + amount, + deposit, + ); } class $ApprovalCodec with _i1.Codec { const $ApprovalCodec(); @override - void encodeTo(Approval obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.amount, output); - _i1.U128Codec.codec.encodeTo(obj.deposit, output); + void encodeTo( + Approval obj, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.deposit, + output, + ); } @override Approval decode(_i1.Input input) { - return Approval(amount: _i1.U128Codec.codec.decode(input), deposit: _i1.U128Codec.codec.decode(input)); + return Approval( + amount: _i1.U128Codec.codec.decode(input), + deposit: _i1.U128Codec.codec.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_account.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_account.dart index 7002cc2c..05565bfb 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_account.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_account.dart @@ -7,7 +7,12 @@ import 'account_status.dart' as _i2; import 'existence_reason.dart' as _i3; class AssetAccount { - const AssetAccount({required this.balance, required this.status, required this.reason, required this.extra}); + const AssetAccount({ + required this.balance, + required this.status, + required this.reason, + required this.extra, + }); factory AssetAccount.decode(_i1.Input input) { return codec.decode(input); @@ -32,15 +37,18 @@ class AssetAccount { } Map toJson() => { - 'balance': balance, - 'status': status.toJson(), - 'reason': reason.toJson(), - 'extra': null, - }; + 'balance': balance, + 'status': status.toJson(), + 'reason': reason.toJson(), + 'extra': null, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is AssetAccount && other.balance == balance && other.status == status && @@ -48,18 +56,38 @@ class AssetAccount { other.extra == extra; @override - int get hashCode => Object.hash(balance, status, reason, extra); + int get hashCode => Object.hash( + balance, + status, + reason, + extra, + ); } class $AssetAccountCodec with _i1.Codec { const $AssetAccountCodec(); @override - void encodeTo(AssetAccount obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.balance, output); - _i2.AccountStatus.codec.encodeTo(obj.status, output); - _i3.ExistenceReason.codec.encodeTo(obj.reason, output); - _i1.NullCodec.codec.encodeTo(obj.extra, output); + void encodeTo( + AssetAccount obj, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + obj.balance, + output, + ); + _i2.AccountStatus.codec.encodeTo( + obj.status, + output, + ); + _i3.ExistenceReason.codec.encodeTo( + obj.reason, + output, + ); + _i1.NullCodec.codec.encodeTo( + obj.extra, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_details.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_details.dart index 9a721ed9..531aff9a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_details.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_details.dart @@ -70,28 +70,43 @@ class AssetDetails { } Map toJson() => { - 'owner': owner.toList(), - 'issuer': issuer.toList(), - 'admin': admin.toList(), - 'freezer': freezer.toList(), - 'supply': supply, - 'deposit': deposit, - 'minBalance': minBalance, - 'isSufficient': isSufficient, - 'accounts': accounts, - 'sufficients': sufficients, - 'approvals': approvals, - 'status': status.toJson(), - }; + 'owner': owner.toList(), + 'issuer': issuer.toList(), + 'admin': admin.toList(), + 'freezer': freezer.toList(), + 'supply': supply, + 'deposit': deposit, + 'minBalance': minBalance, + 'isSufficient': isSufficient, + 'accounts': accounts, + 'sufficients': sufficients, + 'approvals': approvals, + 'status': status.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is AssetDetails && - _i5.listsEqual(other.owner, owner) && - _i5.listsEqual(other.issuer, issuer) && - _i5.listsEqual(other.admin, admin) && - _i5.listsEqual(other.freezer, freezer) && + _i5.listsEqual( + other.owner, + owner, + ) && + _i5.listsEqual( + other.issuer, + issuer, + ) && + _i5.listsEqual( + other.admin, + admin, + ) && + _i5.listsEqual( + other.freezer, + freezer, + ) && other.supply == supply && other.deposit == deposit && other.minBalance == minBalance && @@ -103,38 +118,77 @@ class AssetDetails { @override int get hashCode => Object.hash( - owner, - issuer, - admin, - freezer, - supply, - deposit, - minBalance, - isSufficient, - accounts, - sufficients, - approvals, - status, - ); + owner, + issuer, + admin, + freezer, + supply, + deposit, + minBalance, + isSufficient, + accounts, + sufficients, + approvals, + status, + ); } class $AssetDetailsCodec with _i1.Codec { const $AssetDetailsCodec(); @override - void encodeTo(AssetDetails obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.owner, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.issuer, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.admin, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.freezer, output); - _i1.U128Codec.codec.encodeTo(obj.supply, output); - _i1.U128Codec.codec.encodeTo(obj.deposit, output); - _i1.U128Codec.codec.encodeTo(obj.minBalance, output); - _i1.BoolCodec.codec.encodeTo(obj.isSufficient, output); - _i1.U32Codec.codec.encodeTo(obj.accounts, output); - _i1.U32Codec.codec.encodeTo(obj.sufficients, output); - _i1.U32Codec.codec.encodeTo(obj.approvals, output); - _i3.AssetStatus.codec.encodeTo(obj.status, output); + void encodeTo( + AssetDetails obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + obj.owner, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + obj.issuer, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + obj.admin, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + obj.freezer, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.supply, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.deposit, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.minBalance, + output, + ); + _i1.BoolCodec.codec.encodeTo( + obj.isSufficient, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.accounts, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.sufficients, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.approvals, + output, + ); + _i3.AssetStatus.codec.encodeTo( + obj.status, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_metadata.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_metadata.dart index 45f1f10f..b24c6ad6 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_metadata.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_metadata.dart @@ -39,37 +39,70 @@ class AssetMetadata { } Map toJson() => { - 'deposit': deposit, - 'name': name, - 'symbol': symbol, - 'decimals': decimals, - 'isFrozen': isFrozen, - }; + 'deposit': deposit, + 'name': name, + 'symbol': symbol, + 'decimals': decimals, + 'isFrozen': isFrozen, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is AssetMetadata && other.deposit == deposit && - _i3.listsEqual(other.name, name) && - _i3.listsEqual(other.symbol, symbol) && + _i3.listsEqual( + other.name, + name, + ) && + _i3.listsEqual( + other.symbol, + symbol, + ) && other.decimals == decimals && other.isFrozen == isFrozen; @override - int get hashCode => Object.hash(deposit, name, symbol, decimals, isFrozen); + int get hashCode => Object.hash( + deposit, + name, + symbol, + decimals, + isFrozen, + ); } class $AssetMetadataCodec with _i1.Codec { const $AssetMetadataCodec(); @override - void encodeTo(AssetMetadata obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.deposit, output); - _i1.U8SequenceCodec.codec.encodeTo(obj.name, output); - _i1.U8SequenceCodec.codec.encodeTo(obj.symbol, output); - _i1.U8Codec.codec.encodeTo(obj.decimals, output); - _i1.BoolCodec.codec.encodeTo(obj.isFrozen, output); + void encodeTo( + AssetMetadata obj, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + obj.deposit, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + obj.name, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + obj.symbol, + output, + ); + _i1.U8Codec.codec.encodeTo( + obj.decimals, + output, + ); + _i1.BoolCodec.codec.encodeTo( + obj.isFrozen, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_status.dart index 38f8219f..a5e47797 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_status.dart @@ -8,7 +8,10 @@ enum AssetStatus { frozen('Frozen', 1), destroying('Destroying', 2); - const AssetStatus(this.variantName, this.codecIndex); + const AssetStatus( + this.variantName, + this.codecIndex, + ); factory AssetStatus.decode(_i1.Input input) { return codec.decode(input); @@ -46,7 +49,13 @@ class $AssetStatusCodec with _i1.Codec { } @override - void encodeTo(AssetStatus value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + AssetStatus value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/existence_reason.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/existence_reason.dart index d0714f82..b2ad2be5 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/existence_reason.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/existence_reason.dart @@ -49,8 +49,14 @@ class $ExistenceReason { return DepositRefunded(); } - DepositFrom depositFrom(_i3.AccountId32 value0, BigInt value1) { - return DepositFrom(value0, value1); + DepositFrom depositFrom( + _i3.AccountId32 value0, + BigInt value1, + ) { + return DepositFrom( + value0, + value1, + ); } } @@ -77,7 +83,10 @@ class $ExistenceReasonCodec with _i1.Codec { } @override - void encodeTo(ExistenceReason value, _i1.Output output) { + void encodeTo( + ExistenceReason value, + _i1.Output output, + ) { switch (value.runtimeType) { case Consumer: (value as Consumer).encodeTo(output); @@ -95,7 +104,8 @@ class $ExistenceReasonCodec with _i1.Codec { (value as DepositFrom).encodeTo(output); break; default: - throw Exception('ExistenceReason: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'ExistenceReason: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -113,7 +123,8 @@ class $ExistenceReasonCodec with _i1.Codec { case DepositFrom: return (value as DepositFrom)._sizeHint(); default: - throw Exception('ExistenceReason: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'ExistenceReason: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -125,7 +136,10 @@ class Consumer extends ExistenceReason { Map toJson() => {'Consumer': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); } @override @@ -142,7 +156,10 @@ class Sufficient extends ExistenceReason { Map toJson() => {'Sufficient': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); } @override @@ -172,12 +189,23 @@ class DepositHeld extends ExistenceReason { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U128Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U128Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is DepositHeld && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is DepositHeld && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -190,7 +218,10 @@ class DepositRefunded extends ExistenceReason { Map toJson() => {'DepositRefunded': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); } @override @@ -201,10 +232,16 @@ class DepositRefunded extends ExistenceReason { } class DepositFrom extends ExistenceReason { - const DepositFrom(this.value0, this.value1); + const DepositFrom( + this.value0, + this.value1, + ); factory DepositFrom._decode(_i1.Input input) { - return DepositFrom(const _i1.U8ArrayCodec(32).decode(input), _i1.U128Codec.codec.decode(input)); + return DepositFrom( + const _i1.U8ArrayCodec(32).decode(input), + _i1.U128Codec.codec.decode(input), + ); } /// AccountId @@ -215,8 +252,11 @@ class DepositFrom extends ExistenceReason { @override Map> toJson() => { - 'DepositFrom': [value0.toList(), value1], - }; + 'DepositFrom': [ + value0.toList(), + value1, + ] + }; int _sizeHint() { int size = 1; @@ -226,15 +266,36 @@ class DepositFrom extends ExistenceReason { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.U8ArrayCodec(32).encodeTo(value0, output); - _i1.U128Codec.codec.encodeTo(value1, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + value0, + output, + ); + _i1.U128Codec.codec.encodeTo( + value1, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is DepositFrom && _i4.listsEqual(other.value0, value0) && other.value1 == value1; + identical( + this, + other, + ) || + other is DepositFrom && + _i4.listsEqual( + other.value0, + value0, + ) && + other.value1 == value1; @override - int get hashCode => Object.hash(value0, value1); + int get hashCode => Object.hash( + value0, + value1, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/error.dart index 36edf4ea..7d1e7b0a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/error.dart @@ -8,7 +8,10 @@ enum Error { /// Number of holds on an account would exceed the count of `RuntimeHoldReason`. tooManyHolds('TooManyHolds', 0); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -42,7 +45,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/event.dart index 1f214086..2ef6221d 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/event.dart @@ -41,7 +41,12 @@ class $Event { required _i4.RuntimeHoldReason reason, required BigInt amount, }) { - return Held(who: who, assetId: assetId, reason: reason, amount: amount); + return Held( + who: who, + assetId: assetId, + reason: reason, + amount: amount, + ); } Released released({ @@ -50,7 +55,12 @@ class $Event { required _i4.RuntimeHoldReason reason, required BigInt amount, }) { - return Released(who: who, assetId: assetId, reason: reason, amount: amount); + return Released( + who: who, + assetId: assetId, + reason: reason, + amount: amount, + ); } Burned burned({ @@ -59,7 +69,12 @@ class $Event { required _i4.RuntimeHoldReason reason, required BigInt amount, }) { - return Burned(who: who, assetId: assetId, reason: reason, amount: amount); + return Burned( + who: who, + assetId: assetId, + reason: reason, + amount: amount, + ); } } @@ -82,7 +97,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case Held: (value as Held).encodeTo(output); @@ -94,7 +112,8 @@ class $EventCodec with _i1.Codec { (value as Burned).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -108,14 +127,20 @@ class $EventCodec with _i1.Codec { case Burned: return (value as Burned)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// `who`s balance on hold was increased by `amount`. class Held extends Event { - const Held({required this.who, required this.assetId, required this.reason, required this.amount}); + const Held({ + required this.who, + required this.assetId, + required this.reason, + required this.amount, + }); factory Held._decode(_i1.Input input) { return Held( @@ -140,8 +165,13 @@ class Held extends Event { @override Map> toJson() => { - 'Held': {'who': who.toList(), 'assetId': assetId, 'reason': reason.toJson(), 'amount': amount}, - }; + 'Held': { + 'who': who.toList(), + 'assetId': assetId, + 'reason': reason.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -153,29 +183,60 @@ class Held extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - _i4.RuntimeHoldReason.codec.encodeTo(reason, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + _i4.RuntimeHoldReason.codec.encodeTo( + reason, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Held && - _i5.listsEqual(other.who, who) && + _i5.listsEqual( + other.who, + who, + ) && other.assetId == assetId && other.reason == reason && other.amount == amount; @override - int get hashCode => Object.hash(who, assetId, reason, amount); + int get hashCode => Object.hash( + who, + assetId, + reason, + amount, + ); } /// `who`s balance on hold was decreased by `amount`. class Released extends Event { - const Released({required this.who, required this.assetId, required this.reason, required this.amount}); + const Released({ + required this.who, + required this.assetId, + required this.reason, + required this.amount, + }); factory Released._decode(_i1.Input input) { return Released( @@ -200,8 +261,13 @@ class Released extends Event { @override Map> toJson() => { - 'Released': {'who': who.toList(), 'assetId': assetId, 'reason': reason.toJson(), 'amount': amount}, - }; + 'Released': { + 'who': who.toList(), + 'assetId': assetId, + 'reason': reason.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -213,29 +279,60 @@ class Released extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - _i4.RuntimeHoldReason.codec.encodeTo(reason, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + _i4.RuntimeHoldReason.codec.encodeTo( + reason, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Released && - _i5.listsEqual(other.who, who) && + _i5.listsEqual( + other.who, + who, + ) && other.assetId == assetId && other.reason == reason && other.amount == amount; @override - int get hashCode => Object.hash(who, assetId, reason, amount); + int get hashCode => Object.hash( + who, + assetId, + reason, + amount, + ); } /// `who`s balance on hold was burned by `amount`. class Burned extends Event { - const Burned({required this.who, required this.assetId, required this.reason, required this.amount}); + const Burned({ + required this.who, + required this.assetId, + required this.reason, + required this.amount, + }); factory Burned._decode(_i1.Input input) { return Burned( @@ -260,8 +357,13 @@ class Burned extends Event { @override Map> toJson() => { - 'Burned': {'who': who.toList(), 'assetId': assetId, 'reason': reason.toJson(), 'amount': amount}, - }; + 'Burned': { + 'who': who.toList(), + 'assetId': assetId, + 'reason': reason.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -273,22 +375,48 @@ class Burned extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - _i4.RuntimeHoldReason.codec.encodeTo(reason, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + _i4.RuntimeHoldReason.codec.encodeTo( + reason, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Burned && - _i5.listsEqual(other.who, who) && + _i5.listsEqual( + other.who, + who, + ) && other.assetId == assetId && other.reason == reason && other.amount == amount; @override - int get hashCode => Object.hash(who, assetId, reason, amount); + int get hashCode => Object.hash( + who, + assetId, + reason, + amount, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/call.dart index 0190e45b..ff111d7a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/call.dart @@ -36,8 +36,14 @@ abstract class Call { class $Call { const $Call(); - TransferAllowDeath transferAllowDeath({required _i3.MultiAddress dest, required BigInt value}) { - return TransferAllowDeath(dest: dest, value: value); + TransferAllowDeath transferAllowDeath({ + required _i3.MultiAddress dest, + required BigInt value, + }) { + return TransferAllowDeath( + dest: dest, + value: value, + ); } ForceTransfer forceTransfer({ @@ -45,38 +51,75 @@ class $Call { required _i3.MultiAddress dest, required BigInt value, }) { - return ForceTransfer(source: source, dest: dest, value: value); + return ForceTransfer( + source: source, + dest: dest, + value: value, + ); } - TransferKeepAlive transferKeepAlive({required _i3.MultiAddress dest, required BigInt value}) { - return TransferKeepAlive(dest: dest, value: value); + TransferKeepAlive transferKeepAlive({ + required _i3.MultiAddress dest, + required BigInt value, + }) { + return TransferKeepAlive( + dest: dest, + value: value, + ); } - TransferAll transferAll({required _i3.MultiAddress dest, required bool keepAlive}) { - return TransferAll(dest: dest, keepAlive: keepAlive); + TransferAll transferAll({ + required _i3.MultiAddress dest, + required bool keepAlive, + }) { + return TransferAll( + dest: dest, + keepAlive: keepAlive, + ); } - ForceUnreserve forceUnreserve({required _i3.MultiAddress who, required BigInt amount}) { - return ForceUnreserve(who: who, amount: amount); + ForceUnreserve forceUnreserve({ + required _i3.MultiAddress who, + required BigInt amount, + }) { + return ForceUnreserve( + who: who, + amount: amount, + ); } UpgradeAccounts upgradeAccounts({required List<_i4.AccountId32> who}) { return UpgradeAccounts(who: who); } - ForceSetBalance forceSetBalance({required _i3.MultiAddress who, required BigInt newFree}) { - return ForceSetBalance(who: who, newFree: newFree); + ForceSetBalance forceSetBalance({ + required _i3.MultiAddress who, + required BigInt newFree, + }) { + return ForceSetBalance( + who: who, + newFree: newFree, + ); } ForceAdjustTotalIssuance forceAdjustTotalIssuance({ required _i5.AdjustmentDirection direction, required BigInt delta, }) { - return ForceAdjustTotalIssuance(direction: direction, delta: delta); + return ForceAdjustTotalIssuance( + direction: direction, + delta: delta, + ); } - Burn burn({required BigInt value, required bool keepAlive}) { - return Burn(value: value, keepAlive: keepAlive); + Burn burn({ + required BigInt value, + required bool keepAlive, + }) { + return Burn( + value: value, + keepAlive: keepAlive, + ); } } @@ -111,7 +154,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case TransferAllowDeath: (value as TransferAllowDeath).encodeTo(output); @@ -141,7 +187,8 @@ class $CallCodec with _i1.Codec { (value as Burn).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -167,7 +214,8 @@ class $CallCodec with _i1.Codec { case Burn: return (value as Burn)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -180,7 +228,10 @@ class $CallCodec with _i1.Codec { /// /// The dispatch origin for this call must be `Signed` by the transactor. class TransferAllowDeath extends Call { - const TransferAllowDeath({required this.dest, required this.value}); + const TransferAllowDeath({ + required this.dest, + required this.value, + }); factory TransferAllowDeath._decode(_i1.Input input) { return TransferAllowDeath( @@ -197,8 +248,11 @@ class TransferAllowDeath extends Call { @override Map> toJson() => { - 'transfer_allow_death': {'dest': dest.toJson(), 'value': value}, - }; + 'transfer_allow_death': { + 'dest': dest.toJson(), + 'value': value, + } + }; int _sizeHint() { int size = 1; @@ -208,23 +262,43 @@ class TransferAllowDeath extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.MultiAddress.codec.encodeTo(dest, output); - _i1.CompactBigIntCodec.codec.encodeTo(value, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.MultiAddress.codec.encodeTo( + dest, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + value, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is TransferAllowDeath && other.dest == dest && other.value == value; + identical( + this, + other, + ) || + other is TransferAllowDeath && other.dest == dest && other.value == value; @override - int get hashCode => Object.hash(dest, value); + int get hashCode => Object.hash( + dest, + value, + ); } /// Exactly as `transfer_allow_death`, except the origin must be root and the source account /// may be specified. class ForceTransfer extends Call { - const ForceTransfer({required this.source, required this.dest, required this.value}); + const ForceTransfer({ + required this.source, + required this.dest, + required this.value, + }); factory ForceTransfer._decode(_i1.Input input) { return ForceTransfer( @@ -245,8 +319,12 @@ class ForceTransfer extends Call { @override Map> toJson() => { - 'force_transfer': {'source': source.toJson(), 'dest': dest.toJson(), 'value': value}, - }; + 'force_transfer': { + 'source': source.toJson(), + 'dest': dest.toJson(), + 'value': value, + } + }; int _sizeHint() { int size = 1; @@ -257,19 +335,41 @@ class ForceTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i3.MultiAddress.codec.encodeTo(source, output); - _i3.MultiAddress.codec.encodeTo(dest, output); - _i1.CompactBigIntCodec.codec.encodeTo(value, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i3.MultiAddress.codec.encodeTo( + source, + output, + ); + _i3.MultiAddress.codec.encodeTo( + dest, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + value, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ForceTransfer && other.source == source && other.dest == dest && other.value == value; + identical( + this, + other, + ) || + other is ForceTransfer && + other.source == source && + other.dest == dest && + other.value == value; @override - int get hashCode => Object.hash(source, dest, value); + int get hashCode => Object.hash( + source, + dest, + value, + ); } /// Same as the [`transfer_allow_death`] call, but with a check that the transfer will not @@ -279,7 +379,10 @@ class ForceTransfer extends Call { /// /// [`transfer_allow_death`]: struct.Pallet.html#method.transfer class TransferKeepAlive extends Call { - const TransferKeepAlive({required this.dest, required this.value}); + const TransferKeepAlive({ + required this.dest, + required this.value, + }); factory TransferKeepAlive._decode(_i1.Input input) { return TransferKeepAlive( @@ -296,8 +399,11 @@ class TransferKeepAlive extends Call { @override Map> toJson() => { - 'transfer_keep_alive': {'dest': dest.toJson(), 'value': value}, - }; + 'transfer_keep_alive': { + 'dest': dest.toJson(), + 'value': value, + } + }; int _sizeHint() { int size = 1; @@ -307,17 +413,33 @@ class TransferKeepAlive extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i3.MultiAddress.codec.encodeTo(dest, output); - _i1.CompactBigIntCodec.codec.encodeTo(value, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i3.MultiAddress.codec.encodeTo( + dest, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + value, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is TransferKeepAlive && other.dest == dest && other.value == value; + identical( + this, + other, + ) || + other is TransferKeepAlive && other.dest == dest && other.value == value; @override - int get hashCode => Object.hash(dest, value); + int get hashCode => Object.hash( + dest, + value, + ); } /// Transfer the entire transferable balance from the caller account. @@ -336,10 +458,16 @@ class TransferKeepAlive extends Call { /// transfer everything except at least the existential deposit, which will guarantee to /// keep the sender account alive (true). class TransferAll extends Call { - const TransferAll({required this.dest, required this.keepAlive}); + const TransferAll({ + required this.dest, + required this.keepAlive, + }); factory TransferAll._decode(_i1.Input input) { - return TransferAll(dest: _i3.MultiAddress.codec.decode(input), keepAlive: _i1.BoolCodec.codec.decode(input)); + return TransferAll( + dest: _i3.MultiAddress.codec.decode(input), + keepAlive: _i1.BoolCodec.codec.decode(input), + ); } /// AccountIdLookupOf @@ -350,8 +478,11 @@ class TransferAll extends Call { @override Map> toJson() => { - 'transfer_all': {'dest': dest.toJson(), 'keepAlive': keepAlive}, - }; + 'transfer_all': { + 'dest': dest.toJson(), + 'keepAlive': keepAlive, + } + }; int _sizeHint() { int size = 1; @@ -361,27 +492,51 @@ class TransferAll extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i3.MultiAddress.codec.encodeTo(dest, output); - _i1.BoolCodec.codec.encodeTo(keepAlive, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i3.MultiAddress.codec.encodeTo( + dest, + output, + ); + _i1.BoolCodec.codec.encodeTo( + keepAlive, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is TransferAll && other.dest == dest && other.keepAlive == keepAlive; + identical( + this, + other, + ) || + other is TransferAll && + other.dest == dest && + other.keepAlive == keepAlive; @override - int get hashCode => Object.hash(dest, keepAlive); + int get hashCode => Object.hash( + dest, + keepAlive, + ); } /// Unreserve some balance from a user by force. /// /// Can only be called by ROOT. class ForceUnreserve extends Call { - const ForceUnreserve({required this.who, required this.amount}); + const ForceUnreserve({ + required this.who, + required this.amount, + }); factory ForceUnreserve._decode(_i1.Input input) { - return ForceUnreserve(who: _i3.MultiAddress.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); + return ForceUnreserve( + who: _i3.MultiAddress.codec.decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// AccountIdLookupOf @@ -392,8 +547,11 @@ class ForceUnreserve extends Call { @override Map> toJson() => { - 'force_unreserve': {'who': who.toJson(), 'amount': amount}, - }; + 'force_unreserve': { + 'who': who.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -403,17 +561,33 @@ class ForceUnreserve extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i3.MultiAddress.codec.encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is ForceUnreserve && other.who == who && other.amount == amount; + identical( + this, + other, + ) || + other is ForceUnreserve && other.who == who && other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Upgrade a specified account. @@ -428,7 +602,9 @@ class UpgradeAccounts extends Call { const UpgradeAccounts({required this.who}); factory UpgradeAccounts._decode(_i1.Input input) { - return UpgradeAccounts(who: const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()).decode(input)); + return UpgradeAccounts( + who: const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()) + .decode(input)); } /// Vec @@ -436,23 +612,39 @@ class UpgradeAccounts extends Call { @override Map>>> toJson() => { - 'upgrade_accounts': {'who': who.map((value) => value.toList()).toList()}, - }; + 'upgrade_accounts': {'who': who.map((value) => value.toList()).toList()} + }; int _sizeHint() { int size = 1; - size = size + const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()).sizeHint(who); + size = size + + const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()) + .sizeHint(who); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()).encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()).encodeTo( + who, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is UpgradeAccounts && _i6.listsEqual(other.who, who); + identical( + this, + other, + ) || + other is UpgradeAccounts && + _i6.listsEqual( + other.who, + who, + ); @override int get hashCode => who.hashCode; @@ -462,7 +654,10 @@ class UpgradeAccounts extends Call { /// /// The dispatch origin for this call is `root`. class ForceSetBalance extends Call { - const ForceSetBalance({required this.who, required this.newFree}); + const ForceSetBalance({ + required this.who, + required this.newFree, + }); factory ForceSetBalance._decode(_i1.Input input) { return ForceSetBalance( @@ -479,8 +674,11 @@ class ForceSetBalance extends Call { @override Map> toJson() => { - 'force_set_balance': {'who': who.toJson(), 'newFree': newFree}, - }; + 'force_set_balance': { + 'who': who.toJson(), + 'newFree': newFree, + } + }; int _sizeHint() { int size = 1; @@ -490,17 +688,33 @@ class ForceSetBalance extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i3.MultiAddress.codec.encodeTo(who, output); - _i1.CompactBigIntCodec.codec.encodeTo(newFree, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + newFree, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is ForceSetBalance && other.who == who && other.newFree == newFree; + identical( + this, + other, + ) || + other is ForceSetBalance && other.who == who && other.newFree == newFree; @override - int get hashCode => Object.hash(who, newFree); + int get hashCode => Object.hash( + who, + newFree, + ); } /// Adjust the total issuance in a saturating way. @@ -509,7 +723,10 @@ class ForceSetBalance extends Call { /// /// # Example class ForceAdjustTotalIssuance extends Call { - const ForceAdjustTotalIssuance({required this.direction, required this.delta}); + const ForceAdjustTotalIssuance({ + required this.direction, + required this.delta, + }); factory ForceAdjustTotalIssuance._decode(_i1.Input input) { return ForceAdjustTotalIssuance( @@ -526,8 +743,11 @@ class ForceAdjustTotalIssuance extends Call { @override Map> toJson() => { - 'force_adjust_total_issuance': {'direction': direction.toJson(), 'delta': delta}, - }; + 'force_adjust_total_issuance': { + 'direction': direction.toJson(), + 'delta': delta, + } + }; int _sizeHint() { int size = 1; @@ -537,18 +757,35 @@ class ForceAdjustTotalIssuance extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i5.AdjustmentDirection.codec.encodeTo(direction, output); - _i1.CompactBigIntCodec.codec.encodeTo(delta, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + _i5.AdjustmentDirection.codec.encodeTo( + direction, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + delta, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ForceAdjustTotalIssuance && other.direction == direction && other.delta == delta; + identical( + this, + other, + ) || + other is ForceAdjustTotalIssuance && + other.direction == direction && + other.delta == delta; @override - int get hashCode => Object.hash(direction, delta); + int get hashCode => Object.hash( + direction, + delta, + ); } /// Burn the specified liquid free balance from the origin account. @@ -559,10 +796,16 @@ class ForceAdjustTotalIssuance extends Call { /// Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, /// this `burn` operation will reduce total issuance by the amount _burned_. class Burn extends Call { - const Burn({required this.value, required this.keepAlive}); + const Burn({ + required this.value, + required this.keepAlive, + }); factory Burn._decode(_i1.Input input) { - return Burn(value: _i1.CompactBigIntCodec.codec.decode(input), keepAlive: _i1.BoolCodec.codec.decode(input)); + return Burn( + value: _i1.CompactBigIntCodec.codec.decode(input), + keepAlive: _i1.BoolCodec.codec.decode(input), + ); } /// T::Balance @@ -573,8 +816,11 @@ class Burn extends Call { @override Map> toJson() => { - 'burn': {'value': value, 'keepAlive': keepAlive}, - }; + 'burn': { + 'value': value, + 'keepAlive': keepAlive, + } + }; int _sizeHint() { int size = 1; @@ -584,15 +830,31 @@ class Burn extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i1.CompactBigIntCodec.codec.encodeTo(value, output); - _i1.BoolCodec.codec.encodeTo(keepAlive, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + value, + output, + ); + _i1.BoolCodec.codec.encodeTo( + keepAlive, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Burn && other.value == value && other.keepAlive == keepAlive; + identical( + this, + other, + ) || + other is Burn && other.value == value && other.keepAlive == keepAlive; @override - int get hashCode => Object.hash(value, keepAlive); + int get hashCode => Object.hash( + value, + keepAlive, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/error.dart index 3cc28b4e..3fe90d47 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/error.dart @@ -41,7 +41,10 @@ enum Error { /// The delta cannot be zero. deltaZero('DeltaZero', 11); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -97,7 +100,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/event.dart index 565949dd..3dc931c3 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/event.dart @@ -37,28 +37,66 @@ abstract class Event { class $Event { const $Event(); - Endowed endowed({required _i3.AccountId32 account, required BigInt freeBalance}) { - return Endowed(account: account, freeBalance: freeBalance); + Endowed endowed({ + required _i3.AccountId32 account, + required BigInt freeBalance, + }) { + return Endowed( + account: account, + freeBalance: freeBalance, + ); } - DustLost dustLost({required _i3.AccountId32 account, required BigInt amount}) { - return DustLost(account: account, amount: amount); + DustLost dustLost({ + required _i3.AccountId32 account, + required BigInt amount, + }) { + return DustLost( + account: account, + amount: amount, + ); } - Transfer transfer({required _i3.AccountId32 from, required _i3.AccountId32 to, required BigInt amount}) { - return Transfer(from: from, to: to, amount: amount); + Transfer transfer({ + required _i3.AccountId32 from, + required _i3.AccountId32 to, + required BigInt amount, + }) { + return Transfer( + from: from, + to: to, + amount: amount, + ); } - BalanceSet balanceSet({required _i3.AccountId32 who, required BigInt free}) { - return BalanceSet(who: who, free: free); + BalanceSet balanceSet({ + required _i3.AccountId32 who, + required BigInt free, + }) { + return BalanceSet( + who: who, + free: free, + ); } - Reserved reserved({required _i3.AccountId32 who, required BigInt amount}) { - return Reserved(who: who, amount: amount); + Reserved reserved({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Reserved( + who: who, + amount: amount, + ); } - Unreserved unreserved({required _i3.AccountId32 who, required BigInt amount}) { - return Unreserved(who: who, amount: amount); + Unreserved unreserved({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Unreserved( + who: who, + amount: amount, + ); } ReserveRepatriated reserveRepatriated({ @@ -67,43 +105,90 @@ class $Event { required BigInt amount, required _i4.BalanceStatus destinationStatus, }) { - return ReserveRepatriated(from: from, to: to, amount: amount, destinationStatus: destinationStatus); + return ReserveRepatriated( + from: from, + to: to, + amount: amount, + destinationStatus: destinationStatus, + ); } - Deposit deposit({required _i3.AccountId32 who, required BigInt amount}) { - return Deposit(who: who, amount: amount); + Deposit deposit({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Deposit( + who: who, + amount: amount, + ); } - Withdraw withdraw({required _i3.AccountId32 who, required BigInt amount}) { - return Withdraw(who: who, amount: amount); + Withdraw withdraw({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Withdraw( + who: who, + amount: amount, + ); } - Slashed slashed({required _i3.AccountId32 who, required BigInt amount}) { - return Slashed(who: who, amount: amount); + Slashed slashed({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Slashed( + who: who, + amount: amount, + ); } - Minted minted({required _i3.AccountId32 who, required BigInt amount}) { - return Minted(who: who, amount: amount); + Minted minted({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Minted( + who: who, + amount: amount, + ); } MintedCredit mintedCredit({required BigInt amount}) { return MintedCredit(amount: amount); } - Burned burned({required _i3.AccountId32 who, required BigInt amount}) { - return Burned(who: who, amount: amount); + Burned burned({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Burned( + who: who, + amount: amount, + ); } BurnedDebt burnedDebt({required BigInt amount}) { return BurnedDebt(amount: amount); } - Suspended suspended({required _i3.AccountId32 who, required BigInt amount}) { - return Suspended(who: who, amount: amount); + Suspended suspended({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Suspended( + who: who, + amount: amount, + ); } - Restored restored({required _i3.AccountId32 who, required BigInt amount}) { - return Restored(who: who, amount: amount); + Restored restored({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Restored( + who: who, + amount: amount, + ); } Upgraded upgraded({required _i3.AccountId32 who}) { @@ -118,32 +203,78 @@ class $Event { return Rescinded(amount: amount); } - Locked locked({required _i3.AccountId32 who, required BigInt amount}) { - return Locked(who: who, amount: amount); + Locked locked({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Locked( + who: who, + amount: amount, + ); } - Unlocked unlocked({required _i3.AccountId32 who, required BigInt amount}) { - return Unlocked(who: who, amount: amount); + Unlocked unlocked({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Unlocked( + who: who, + amount: amount, + ); } - Frozen frozen({required _i3.AccountId32 who, required BigInt amount}) { - return Frozen(who: who, amount: amount); + Frozen frozen({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Frozen( + who: who, + amount: amount, + ); } - Thawed thawed({required _i3.AccountId32 who, required BigInt amount}) { - return Thawed(who: who, amount: amount); + Thawed thawed({ + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Thawed( + who: who, + amount: amount, + ); } - TotalIssuanceForced totalIssuanceForced({required BigInt old, required BigInt new_}) { - return TotalIssuanceForced(old: old, new_: new_); + TotalIssuanceForced totalIssuanceForced({ + required BigInt old, + required BigInt new_, + }) { + return TotalIssuanceForced( + old: old, + new_: new_, + ); } - Held held({required _i5.RuntimeHoldReason reason, required _i3.AccountId32 who, required BigInt amount}) { - return Held(reason: reason, who: who, amount: amount); + Held held({ + required _i5.RuntimeHoldReason reason, + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Held( + reason: reason, + who: who, + amount: amount, + ); } - BurnedHeld burnedHeld({required _i5.RuntimeHoldReason reason, required _i3.AccountId32 who, required BigInt amount}) { - return BurnedHeld(reason: reason, who: who, amount: amount); + BurnedHeld burnedHeld({ + required _i5.RuntimeHoldReason reason, + required _i3.AccountId32 who, + required BigInt amount, + }) { + return BurnedHeld( + reason: reason, + who: who, + amount: amount, + ); } TransferOnHold transferOnHold({ @@ -152,7 +283,12 @@ class $Event { required _i3.AccountId32 dest, required BigInt amount, }) { - return TransferOnHold(reason: reason, source: source, dest: dest, amount: amount); + return TransferOnHold( + reason: reason, + source: source, + dest: dest, + amount: amount, + ); } TransferAndHold transferAndHold({ @@ -161,11 +297,24 @@ class $Event { required _i3.AccountId32 dest, required BigInt transferred, }) { - return TransferAndHold(reason: reason, source: source, dest: dest, transferred: transferred); + return TransferAndHold( + reason: reason, + source: source, + dest: dest, + transferred: transferred, + ); } - Released released({required _i5.RuntimeHoldReason reason, required _i3.AccountId32 who, required BigInt amount}) { - return Released(reason: reason, who: who, amount: amount); + Released released({ + required _i5.RuntimeHoldReason reason, + required _i3.AccountId32 who, + required BigInt amount, + }) { + return Released( + reason: reason, + who: who, + amount: amount, + ); } Unexpected unexpected(_i6.UnexpectedKind value0) { @@ -246,7 +395,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case Endowed: (value as Endowed).encodeTo(output); @@ -339,7 +491,8 @@ class $EventCodec with _i1.Codec { (value as Unexpected).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -407,17 +560,24 @@ class $EventCodec with _i1.Codec { case Unexpected: return (value as Unexpected)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// An account was created with some free balance. class Endowed extends Event { - const Endowed({required this.account, required this.freeBalance}); + const Endowed({ + required this.account, + required this.freeBalance, + }); factory Endowed._decode(_i1.Input input) { - return Endowed(account: const _i1.U8ArrayCodec(32).decode(input), freeBalance: _i1.U128Codec.codec.decode(input)); + return Endowed( + account: const _i1.U8ArrayCodec(32).decode(input), + freeBalance: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -428,8 +588,11 @@ class Endowed extends Event { @override Map> toJson() => { - 'Endowed': {'account': account.toList(), 'freeBalance': freeBalance}, - }; + 'Endowed': { + 'account': account.toList(), + 'freeBalance': freeBalance, + } + }; int _sizeHint() { int size = 1; @@ -439,27 +602,53 @@ class Endowed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); - _i1.U128Codec.codec.encodeTo(freeBalance, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); + _i1.U128Codec.codec.encodeTo( + freeBalance, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Endowed && _i7.listsEqual(other.account, account) && other.freeBalance == freeBalance; - - @override - int get hashCode => Object.hash(account, freeBalance); + identical( + this, + other, + ) || + other is Endowed && + _i7.listsEqual( + other.account, + account, + ) && + other.freeBalance == freeBalance; + + @override + int get hashCode => Object.hash( + account, + freeBalance, + ); } /// An account was removed whose balance was non-zero but below ExistentialDeposit, /// resulting in an outright loss. class DustLost extends Event { - const DustLost({required this.account, required this.amount}); + const DustLost({ + required this.account, + required this.amount, + }); factory DustLost._decode(_i1.Input input) { - return DustLost(account: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return DustLost( + account: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -470,8 +659,11 @@ class DustLost extends Event { @override Map> toJson() => { - 'DustLost': {'account': account.toList(), 'amount': amount}, - }; + 'DustLost': { + 'account': account.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -481,22 +673,47 @@ class DustLost extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is DustLost && _i7.listsEqual(other.account, account) && other.amount == amount; + identical( + this, + other, + ) || + other is DustLost && + _i7.listsEqual( + other.account, + account, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(account, amount); + int get hashCode => Object.hash( + account, + amount, + ); } /// Transfer succeeded. class Transfer extends Event { - const Transfer({required this.from, required this.to, required this.amount}); + const Transfer({ + required this.from, + required this.to, + required this.amount, + }); factory Transfer._decode(_i1.Input input) { return Transfer( @@ -517,8 +734,12 @@ class Transfer extends Event { @override Map> toJson() => { - 'Transfer': {'from': from.toList(), 'to': to.toList(), 'amount': amount}, - }; + 'Transfer': { + 'from': from.toList(), + 'to': to.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -529,27 +750,61 @@ class Transfer extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(from, output); - const _i1.U8ArrayCodec(32).encodeTo(to, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + from, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + to, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Transfer && _i7.listsEqual(other.from, from) && _i7.listsEqual(other.to, to) && other.amount == amount; + identical( + this, + other, + ) || + other is Transfer && + _i7.listsEqual( + other.from, + from, + ) && + _i7.listsEqual( + other.to, + to, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(from, to, amount); + int get hashCode => Object.hash( + from, + to, + amount, + ); } /// A balance was set by root. class BalanceSet extends Event { - const BalanceSet({required this.who, required this.free}); + const BalanceSet({ + required this.who, + required this.free, + }); factory BalanceSet._decode(_i1.Input input) { - return BalanceSet(who: const _i1.U8ArrayCodec(32).decode(input), free: _i1.U128Codec.codec.decode(input)); + return BalanceSet( + who: const _i1.U8ArrayCodec(32).decode(input), + free: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -560,8 +815,11 @@ class BalanceSet extends Event { @override Map> toJson() => { - 'BalanceSet': {'who': who.toList(), 'free': free}, - }; + 'BalanceSet': { + 'who': who.toList(), + 'free': free, + } + }; int _sizeHint() { int size = 1; @@ -571,25 +829,52 @@ class BalanceSet extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(free, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + free, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is BalanceSet && _i7.listsEqual(other.who, who) && other.free == free; - - @override - int get hashCode => Object.hash(who, free); + identical( + this, + other, + ) || + other is BalanceSet && + _i7.listsEqual( + other.who, + who, + ) && + other.free == free; + + @override + int get hashCode => Object.hash( + who, + free, + ); } /// Some balance was reserved (moved from free to reserved). class Reserved extends Event { - const Reserved({required this.who, required this.amount}); + const Reserved({ + required this.who, + required this.amount, + }); factory Reserved._decode(_i1.Input input) { - return Reserved(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Reserved( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -600,8 +885,11 @@ class Reserved extends Event { @override Map> toJson() => { - 'Reserved': {'who': who.toList(), 'amount': amount}, - }; + 'Reserved': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -611,25 +899,52 @@ class Reserved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Reserved && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Reserved && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Some balance was unreserved (moved from reserved to free). class Unreserved extends Event { - const Unreserved({required this.who, required this.amount}); + const Unreserved({ + required this.who, + required this.amount, + }); factory Unreserved._decode(_i1.Input input) { - return Unreserved(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Unreserved( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -640,8 +955,11 @@ class Unreserved extends Event { @override Map> toJson() => { - 'Unreserved': {'who': who.toList(), 'amount': amount}, - }; + 'Unreserved': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -651,17 +969,38 @@ class Unreserved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Unreserved && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Unreserved && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Some balance was moved from the reserve of the first account to the second account. @@ -697,13 +1036,13 @@ class ReserveRepatriated extends Event { @override Map> toJson() => { - 'ReserveRepatriated': { - 'from': from.toList(), - 'to': to.toList(), - 'amount': amount, - 'destinationStatus': destinationStatus.toJson(), - }, - }; + 'ReserveRepatriated': { + 'from': from.toList(), + 'to': to.toList(), + 'amount': amount, + 'destinationStatus': destinationStatus.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -715,32 +1054,67 @@ class ReserveRepatriated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - const _i1.U8ArrayCodec(32).encodeTo(from, output); - const _i1.U8ArrayCodec(32).encodeTo(to, output); - _i1.U128Codec.codec.encodeTo(amount, output); - _i4.BalanceStatus.codec.encodeTo(destinationStatus, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + from, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + to, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); + _i4.BalanceStatus.codec.encodeTo( + destinationStatus, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ReserveRepatriated && - _i7.listsEqual(other.from, from) && - _i7.listsEqual(other.to, to) && + _i7.listsEqual( + other.from, + from, + ) && + _i7.listsEqual( + other.to, + to, + ) && other.amount == amount && other.destinationStatus == destinationStatus; @override - int get hashCode => Object.hash(from, to, amount, destinationStatus); + int get hashCode => Object.hash( + from, + to, + amount, + destinationStatus, + ); } /// Some amount was deposited (e.g. for transaction fees). class Deposit extends Event { - const Deposit({required this.who, required this.amount}); + const Deposit({ + required this.who, + required this.amount, + }); factory Deposit._decode(_i1.Input input) { - return Deposit(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Deposit( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -751,8 +1125,11 @@ class Deposit extends Event { @override Map> toJson() => { - 'Deposit': {'who': who.toList(), 'amount': amount}, - }; + 'Deposit': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -762,25 +1139,52 @@ class Deposit extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Deposit && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Deposit && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Some amount was withdrawn from the account (e.g. for transaction fees). class Withdraw extends Event { - const Withdraw({required this.who, required this.amount}); + const Withdraw({ + required this.who, + required this.amount, + }); factory Withdraw._decode(_i1.Input input) { - return Withdraw(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Withdraw( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -791,8 +1195,11 @@ class Withdraw extends Event { @override Map> toJson() => { - 'Withdraw': {'who': who.toList(), 'amount': amount}, - }; + 'Withdraw': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -802,25 +1209,52 @@ class Withdraw extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Withdraw && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Withdraw && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Some amount was removed from the account (e.g. for misbehavior). class Slashed extends Event { - const Slashed({required this.who, required this.amount}); + const Slashed({ + required this.who, + required this.amount, + }); factory Slashed._decode(_i1.Input input) { - return Slashed(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Slashed( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -831,8 +1265,11 @@ class Slashed extends Event { @override Map> toJson() => { - 'Slashed': {'who': who.toList(), 'amount': amount}, - }; + 'Slashed': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -842,25 +1279,52 @@ class Slashed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Slashed && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Slashed && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Some amount was minted into an account. class Minted extends Event { - const Minted({required this.who, required this.amount}); + const Minted({ + required this.who, + required this.amount, + }); factory Minted._decode(_i1.Input input) { - return Minted(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Minted( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -871,8 +1335,11 @@ class Minted extends Event { @override Map> toJson() => { - 'Minted': {'who': who.toList(), 'amount': amount}, - }; + 'Minted': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -882,17 +1349,38 @@ class Minted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Minted && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Minted && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Some credit was balanced and added to the TotalIssuance. @@ -908,8 +1396,8 @@ class MintedCredit extends Event { @override Map> toJson() => { - 'MintedCredit': {'amount': amount}, - }; + 'MintedCredit': {'amount': amount} + }; int _sizeHint() { int size = 1; @@ -918,12 +1406,23 @@ class MintedCredit extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is MintedCredit && other.amount == amount; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is MintedCredit && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -931,10 +1430,16 @@ class MintedCredit extends Event { /// Some amount was burned from an account. class Burned extends Event { - const Burned({required this.who, required this.amount}); + const Burned({ + required this.who, + required this.amount, + }); factory Burned._decode(_i1.Input input) { - return Burned(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Burned( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -945,8 +1450,11 @@ class Burned extends Event { @override Map> toJson() => { - 'Burned': {'who': who.toList(), 'amount': amount}, - }; + 'Burned': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -956,17 +1464,38 @@ class Burned extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 12, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Burned && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Burned && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Some debt has been dropped from the Total Issuance. @@ -982,8 +1511,8 @@ class BurnedDebt extends Event { @override Map> toJson() => { - 'BurnedDebt': {'amount': amount}, - }; + 'BurnedDebt': {'amount': amount} + }; int _sizeHint() { int size = 1; @@ -992,12 +1521,23 @@ class BurnedDebt extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 13, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is BurnedDebt && other.amount == amount; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is BurnedDebt && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -1005,10 +1545,16 @@ class BurnedDebt extends Event { /// Some amount was suspended from an account (it can be restored later). class Suspended extends Event { - const Suspended({required this.who, required this.amount}); + const Suspended({ + required this.who, + required this.amount, + }); factory Suspended._decode(_i1.Input input) { - return Suspended(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Suspended( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -1019,8 +1565,11 @@ class Suspended extends Event { @override Map> toJson() => { - 'Suspended': {'who': who.toList(), 'amount': amount}, - }; + 'Suspended': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1030,25 +1579,52 @@ class Suspended extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 14, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Suspended && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Suspended && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Some amount was restored into an account. class Restored extends Event { - const Restored({required this.who, required this.amount}); + const Restored({ + required this.who, + required this.amount, + }); factory Restored._decode(_i1.Input input) { - return Restored(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Restored( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -1059,8 +1635,11 @@ class Restored extends Event { @override Map> toJson() => { - 'Restored': {'who': who.toList(), 'amount': amount}, - }; + 'Restored': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1070,17 +1649,38 @@ class Restored extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 15, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Restored && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Restored && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// An account was upgraded. @@ -1096,8 +1696,8 @@ class Upgraded extends Event { @override Map>> toJson() => { - 'Upgraded': {'who': who.toList()}, - }; + 'Upgraded': {'who': who.toList()} + }; int _sizeHint() { int size = 1; @@ -1106,12 +1706,27 @@ class Upgraded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(16, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 16, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Upgraded && _i7.listsEqual(other.who, who); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Upgraded && + _i7.listsEqual( + other.who, + who, + ); @override int get hashCode => who.hashCode; @@ -1130,8 +1745,8 @@ class Issued extends Event { @override Map> toJson() => { - 'Issued': {'amount': amount}, - }; + 'Issued': {'amount': amount} + }; int _sizeHint() { int size = 1; @@ -1140,12 +1755,23 @@ class Issued extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(17, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 17, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Issued && other.amount == amount; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Issued && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -1164,8 +1790,8 @@ class Rescinded extends Event { @override Map> toJson() => { - 'Rescinded': {'amount': amount}, - }; + 'Rescinded': {'amount': amount} + }; int _sizeHint() { int size = 1; @@ -1174,12 +1800,23 @@ class Rescinded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(18, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 18, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Rescinded && other.amount == amount; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Rescinded && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -1187,10 +1824,16 @@ class Rescinded extends Event { /// Some balance was locked. class Locked extends Event { - const Locked({required this.who, required this.amount}); + const Locked({ + required this.who, + required this.amount, + }); factory Locked._decode(_i1.Input input) { - return Locked(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Locked( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -1201,8 +1844,11 @@ class Locked extends Event { @override Map> toJson() => { - 'Locked': {'who': who.toList(), 'amount': amount}, - }; + 'Locked': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1212,25 +1858,52 @@ class Locked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(19, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 19, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Locked && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Locked && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Some balance was unlocked. class Unlocked extends Event { - const Unlocked({required this.who, required this.amount}); + const Unlocked({ + required this.who, + required this.amount, + }); factory Unlocked._decode(_i1.Input input) { - return Unlocked(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Unlocked( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -1241,8 +1914,11 @@ class Unlocked extends Event { @override Map> toJson() => { - 'Unlocked': {'who': who.toList(), 'amount': amount}, - }; + 'Unlocked': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1252,25 +1928,52 @@ class Unlocked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(20, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 20, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Unlocked && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Unlocked && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Some balance was frozen. class Frozen extends Event { - const Frozen({required this.who, required this.amount}); + const Frozen({ + required this.who, + required this.amount, + }); factory Frozen._decode(_i1.Input input) { - return Frozen(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Frozen( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -1281,8 +1984,11 @@ class Frozen extends Event { @override Map> toJson() => { - 'Frozen': {'who': who.toList(), 'amount': amount}, - }; + 'Frozen': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1292,25 +1998,52 @@ class Frozen extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(21, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 21, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Frozen && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Frozen && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// Some balance was thawed. class Thawed extends Event { - const Thawed({required this.who, required this.amount}); + const Thawed({ + required this.who, + required this.amount, + }); factory Thawed._decode(_i1.Input input) { - return Thawed(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Thawed( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -1321,8 +2054,11 @@ class Thawed extends Event { @override Map> toJson() => { - 'Thawed': {'who': who.toList(), 'amount': amount}, - }; + 'Thawed': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1332,25 +2068,52 @@ class Thawed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(22, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 22, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Thawed && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Thawed && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// The `TotalIssuance` was forcefully changed. class TotalIssuanceForced extends Event { - const TotalIssuanceForced({required this.old, required this.new_}); + const TotalIssuanceForced({ + required this.old, + required this.new_, + }); factory TotalIssuanceForced._decode(_i1.Input input) { - return TotalIssuanceForced(old: _i1.U128Codec.codec.decode(input), new_: _i1.U128Codec.codec.decode(input)); + return TotalIssuanceForced( + old: _i1.U128Codec.codec.decode(input), + new_: _i1.U128Codec.codec.decode(input), + ); } /// T::Balance @@ -1361,8 +2124,11 @@ class TotalIssuanceForced extends Event { @override Map> toJson() => { - 'TotalIssuanceForced': {'old': old, 'new': new_}, - }; + 'TotalIssuanceForced': { + 'old': old, + 'new': new_, + } + }; int _sizeHint() { int size = 1; @@ -1372,22 +2138,42 @@ class TotalIssuanceForced extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(23, output); - _i1.U128Codec.codec.encodeTo(old, output); - _i1.U128Codec.codec.encodeTo(new_, output); + _i1.U8Codec.codec.encodeTo( + 23, + output, + ); + _i1.U128Codec.codec.encodeTo( + old, + output, + ); + _i1.U128Codec.codec.encodeTo( + new_, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is TotalIssuanceForced && other.old == old && other.new_ == new_; + identical( + this, + other, + ) || + other is TotalIssuanceForced && other.old == old && other.new_ == new_; @override - int get hashCode => Object.hash(old, new_); + int get hashCode => Object.hash( + old, + new_, + ); } /// Some balance was placed on hold. class Held extends Event { - const Held({required this.reason, required this.who, required this.amount}); + const Held({ + required this.reason, + required this.who, + required this.amount, + }); factory Held._decode(_i1.Input input) { return Held( @@ -1408,8 +2194,12 @@ class Held extends Event { @override Map> toJson() => { - 'Held': {'reason': reason.toJson(), 'who': who.toList(), 'amount': amount}, - }; + 'Held': { + 'reason': reason.toJson(), + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1420,24 +2210,53 @@ class Held extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(24, output); - _i5.RuntimeHoldReason.codec.encodeTo(reason, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 24, + output, + ); + _i5.RuntimeHoldReason.codec.encodeTo( + reason, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Held && other.reason == reason && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Held && + other.reason == reason && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(reason, who, amount); + int get hashCode => Object.hash( + reason, + who, + amount, + ); } /// Held balance was burned from an account. class BurnedHeld extends Event { - const BurnedHeld({required this.reason, required this.who, required this.amount}); + const BurnedHeld({ + required this.reason, + required this.who, + required this.amount, + }); factory BurnedHeld._decode(_i1.Input input) { return BurnedHeld( @@ -1458,8 +2277,12 @@ class BurnedHeld extends Event { @override Map> toJson() => { - 'BurnedHeld': {'reason': reason.toJson(), 'who': who.toList(), 'amount': amount}, - }; + 'BurnedHeld': { + 'reason': reason.toJson(), + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1470,24 +2293,54 @@ class BurnedHeld extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(25, output); - _i5.RuntimeHoldReason.codec.encodeTo(reason, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 25, + output, + ); + _i5.RuntimeHoldReason.codec.encodeTo( + reason, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is BurnedHeld && other.reason == reason && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is BurnedHeld && + other.reason == reason && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(reason, who, amount); + int get hashCode => Object.hash( + reason, + who, + amount, + ); } /// A transfer of `amount` on hold from `source` to `dest` was initiated. class TransferOnHold extends Event { - const TransferOnHold({required this.reason, required this.source, required this.dest, required this.amount}); + const TransferOnHold({ + required this.reason, + required this.source, + required this.dest, + required this.amount, + }); factory TransferOnHold._decode(_i1.Input input) { return TransferOnHold( @@ -1512,8 +2365,13 @@ class TransferOnHold extends Event { @override Map> toJson() => { - 'TransferOnHold': {'reason': reason.toJson(), 'source': source.toList(), 'dest': dest.toList(), 'amount': amount}, - }; + 'TransferOnHold': { + 'reason': reason.toJson(), + 'source': source.toList(), + 'dest': dest.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1525,29 +2383,63 @@ class TransferOnHold extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(26, output); - _i5.RuntimeHoldReason.codec.encodeTo(reason, output); - const _i1.U8ArrayCodec(32).encodeTo(source, output); - const _i1.U8ArrayCodec(32).encodeTo(dest, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 26, + output, + ); + _i5.RuntimeHoldReason.codec.encodeTo( + reason, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + source, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + dest, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is TransferOnHold && other.reason == reason && - _i7.listsEqual(other.source, source) && - _i7.listsEqual(other.dest, dest) && + _i7.listsEqual( + other.source, + source, + ) && + _i7.listsEqual( + other.dest, + dest, + ) && other.amount == amount; @override - int get hashCode => Object.hash(reason, source, dest, amount); + int get hashCode => Object.hash( + reason, + source, + dest, + amount, + ); } /// The `transferred` balance is placed on hold at the `dest` account. class TransferAndHold extends Event { - const TransferAndHold({required this.reason, required this.source, required this.dest, required this.transferred}); + const TransferAndHold({ + required this.reason, + required this.source, + required this.dest, + required this.transferred, + }); factory TransferAndHold._decode(_i1.Input input) { return TransferAndHold( @@ -1572,13 +2464,13 @@ class TransferAndHold extends Event { @override Map> toJson() => { - 'TransferAndHold': { - 'reason': reason.toJson(), - 'source': source.toList(), - 'dest': dest.toList(), - 'transferred': transferred, - }, - }; + 'TransferAndHold': { + 'reason': reason.toJson(), + 'source': source.toList(), + 'dest': dest.toList(), + 'transferred': transferred, + } + }; int _sizeHint() { int size = 1; @@ -1590,29 +2482,62 @@ class TransferAndHold extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(27, output); - _i5.RuntimeHoldReason.codec.encodeTo(reason, output); - const _i1.U8ArrayCodec(32).encodeTo(source, output); - const _i1.U8ArrayCodec(32).encodeTo(dest, output); - _i1.U128Codec.codec.encodeTo(transferred, output); + _i1.U8Codec.codec.encodeTo( + 27, + output, + ); + _i5.RuntimeHoldReason.codec.encodeTo( + reason, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + source, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + dest, + output, + ); + _i1.U128Codec.codec.encodeTo( + transferred, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is TransferAndHold && other.reason == reason && - _i7.listsEqual(other.source, source) && - _i7.listsEqual(other.dest, dest) && + _i7.listsEqual( + other.source, + source, + ) && + _i7.listsEqual( + other.dest, + dest, + ) && other.transferred == transferred; @override - int get hashCode => Object.hash(reason, source, dest, transferred); + int get hashCode => Object.hash( + reason, + source, + dest, + transferred, + ); } /// Some balance was released from hold. class Released extends Event { - const Released({required this.reason, required this.who, required this.amount}); + const Released({ + required this.reason, + required this.who, + required this.amount, + }); factory Released._decode(_i1.Input input) { return Released( @@ -1633,8 +2558,12 @@ class Released extends Event { @override Map> toJson() => { - 'Released': {'reason': reason.toJson(), 'who': who.toList(), 'amount': amount}, - }; + 'Released': { + 'reason': reason.toJson(), + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -1645,19 +2574,44 @@ class Released extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(28, output); - _i5.RuntimeHoldReason.codec.encodeTo(reason, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 28, + output, + ); + _i5.RuntimeHoldReason.codec.encodeTo( + reason, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Released && other.reason == reason && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Released && + other.reason == reason && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(reason, who, amount); + int get hashCode => Object.hash( + reason, + who, + amount, + ); } /// An unexpected/defensive event was triggered. @@ -1681,12 +2635,23 @@ class Unexpected extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(29, output); - _i6.UnexpectedKind.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 29, + output, + ); + _i6.UnexpectedKind.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Unexpected && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Unexpected && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/unexpected_kind.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/unexpected_kind.dart index 98c84a75..29cde5a5 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/unexpected_kind.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/unexpected_kind.dart @@ -7,7 +7,10 @@ enum UnexpectedKind { balanceUpdated('BalanceUpdated', 0), failedToMutateAccount('FailedToMutateAccount', 1); - const UnexpectedKind(this.variantName, this.codecIndex); + const UnexpectedKind( + this.variantName, + this.codecIndex, + ); factory UnexpectedKind.decode(_i1.Input input) { return codec.decode(input); @@ -43,7 +46,13 @@ class $UnexpectedKindCodec with _i1.Codec { } @override - void encodeTo(UnexpectedKind value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + UnexpectedKind value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/account_data.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/account_data.dart index 751ca8ed..e2da160c 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/account_data.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/account_data.dart @@ -6,7 +6,12 @@ import 'package:polkadart/scale_codec.dart' as _i1; import 'extra_flags.dart' as _i2; class AccountData { - const AccountData({required this.free, required this.reserved, required this.frozen, required this.flags}); + const AccountData({ + required this.free, + required this.reserved, + required this.frozen, + required this.flags, + }); factory AccountData.decode(_i1.Input input) { return codec.decode(input); @@ -30,11 +35,19 @@ class AccountData { return codec.encode(this); } - Map toJson() => {'free': free, 'reserved': reserved, 'frozen': frozen, 'flags': flags}; + Map toJson() => { + 'free': free, + 'reserved': reserved, + 'frozen': frozen, + 'flags': flags, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is AccountData && other.free == free && other.reserved == reserved && @@ -42,18 +55,38 @@ class AccountData { other.flags == flags; @override - int get hashCode => Object.hash(free, reserved, frozen, flags); + int get hashCode => Object.hash( + free, + reserved, + frozen, + flags, + ); } class $AccountDataCodec with _i1.Codec { const $AccountDataCodec(); @override - void encodeTo(AccountData obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.free, output); - _i1.U128Codec.codec.encodeTo(obj.reserved, output); - _i1.U128Codec.codec.encodeTo(obj.frozen, output); - _i1.U128Codec.codec.encodeTo(obj.flags, output); + void encodeTo( + AccountData obj, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + obj.free, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.reserved, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.frozen, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.flags, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/adjustment_direction.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/adjustment_direction.dart index 8e87929c..95bf0934 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/adjustment_direction.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/adjustment_direction.dart @@ -7,7 +7,10 @@ enum AdjustmentDirection { increase('Increase', 0), decrease('Decrease', 1); - const AdjustmentDirection(this.variantName, this.codecIndex); + const AdjustmentDirection( + this.variantName, + this.codecIndex, + ); factory AdjustmentDirection.decode(_i1.Input input) { return codec.decode(input); @@ -43,7 +46,13 @@ class $AdjustmentDirectionCodec with _i1.Codec { } @override - void encodeTo(AdjustmentDirection value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + AdjustmentDirection value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/balance_lock.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/balance_lock.dart index 9f9f90bc..4e28efb6 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/balance_lock.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/balance_lock.dart @@ -7,7 +7,11 @@ import 'package:quiver/collection.dart' as _i4; import 'reasons.dart' as _i2; class BalanceLock { - const BalanceLock({required this.id, required this.amount, required this.reasons}); + const BalanceLock({ + required this.id, + required this.amount, + required this.reasons, + }); factory BalanceLock.decode(_i1.Input input) { return codec.decode(input); @@ -28,25 +32,54 @@ class BalanceLock { return codec.encode(this); } - Map toJson() => {'id': id.toList(), 'amount': amount, 'reasons': reasons.toJson()}; + Map toJson() => { + 'id': id.toList(), + 'amount': amount, + 'reasons': reasons.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || - other is BalanceLock && _i4.listsEqual(other.id, id) && other.amount == amount && other.reasons == reasons; + identical( + this, + other, + ) || + other is BalanceLock && + _i4.listsEqual( + other.id, + id, + ) && + other.amount == amount && + other.reasons == reasons; @override - int get hashCode => Object.hash(id, amount, reasons); + int get hashCode => Object.hash( + id, + amount, + reasons, + ); } class $BalanceLockCodec with _i1.Codec { const $BalanceLockCodec(); @override - void encodeTo(BalanceLock obj, _i1.Output output) { - const _i1.U8ArrayCodec(8).encodeTo(obj.id, output); - _i1.U128Codec.codec.encodeTo(obj.amount, output); - _i2.Reasons.codec.encodeTo(obj.reasons, output); + void encodeTo( + BalanceLock obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(8).encodeTo( + obj.id, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); + _i2.Reasons.codec.encodeTo( + obj.reasons, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/extra_flags.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/extra_flags.dart index 275f36a9..d4ef898a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/extra_flags.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/extra_flags.dart @@ -12,8 +12,14 @@ class ExtraFlagsCodec with _i1.Codec { } @override - void encodeTo(ExtraFlags value, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(value, output); + void encodeTo( + ExtraFlags value, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reasons.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reasons.dart index 6fbab947..6fd58c0e 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reasons.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reasons.dart @@ -8,7 +8,10 @@ enum Reasons { misc('Misc', 1), all('All', 2); - const Reasons(this.variantName, this.codecIndex); + const Reasons( + this.variantName, + this.codecIndex, + ); factory Reasons.decode(_i1.Input input) { return codec.decode(input); @@ -46,7 +49,13 @@ class $ReasonsCodec with _i1.Codec { } @override - void encodeTo(Reasons value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Reasons value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reserve_data.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reserve_data.dart index c1436d9a..93664958 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reserve_data.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reserve_data.dart @@ -5,7 +5,10 @@ import 'package:polkadart/scale_codec.dart' as _i1; import 'package:quiver/collection.dart' as _i3; class ReserveData { - const ReserveData({required this.id, required this.amount}); + const ReserveData({ + required this.id, + required this.amount, + }); factory ReserveData.decode(_i1.Input input) { return codec.decode(input); @@ -23,28 +26,55 @@ class ReserveData { return codec.encode(this); } - Map toJson() => {'id': id.toList(), 'amount': amount}; + Map toJson() => { + 'id': id.toList(), + 'amount': amount, + }; @override bool operator ==(Object other) => - identical(this, other) || other is ReserveData && _i3.listsEqual(other.id, id) && other.amount == amount; + identical( + this, + other, + ) || + other is ReserveData && + _i3.listsEqual( + other.id, + id, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(id, amount); + int get hashCode => Object.hash( + id, + amount, + ); } class $ReserveDataCodec with _i1.Codec { const $ReserveDataCodec(); @override - void encodeTo(ReserveData obj, _i1.Output output) { - const _i1.U8ArrayCodec(8).encodeTo(obj.id, output); - _i1.U128Codec.codec.encodeTo(obj.amount, output); + void encodeTo( + ReserveData obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(8).encodeTo( + obj.id, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); } @override ReserveData decode(_i1.Input input) { - return ReserveData(id: const _i1.U8ArrayCodec(8).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return ReserveData( + id: const _i1.U8ArrayCodec(8).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/conviction/conviction.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/conviction/conviction.dart index f4ed4eeb..59822f18 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/conviction/conviction.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/conviction/conviction.dart @@ -12,7 +12,10 @@ enum Conviction { locked5x('Locked5x', 5), locked6x('Locked6x', 6); - const Conviction(this.variantName, this.codecIndex); + const Conviction( + this.variantName, + this.codecIndex, + ); factory Conviction.decode(_i1.Input input) { return codec.decode(input); @@ -58,7 +61,13 @@ class $ConvictionCodec with _i1.Codec { } @override - void encodeTo(Conviction value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Conviction value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/call.dart index 45074a76..34bd45de 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/call.dart @@ -35,8 +35,14 @@ abstract class Call { class $Call { const $Call(); - Vote vote({required BigInt pollIndex, required _i3.AccountVote vote}) { - return Vote(pollIndex: pollIndex, vote: vote); + Vote vote({ + required BigInt pollIndex, + required _i3.AccountVote vote, + }) { + return Vote( + pollIndex: pollIndex, + vote: vote, + ); } Delegate delegate({ @@ -45,23 +51,48 @@ class $Call { required _i5.Conviction conviction, required BigInt balance, }) { - return Delegate(class_: class_, to: to, conviction: conviction, balance: balance); + return Delegate( + class_: class_, + to: to, + conviction: conviction, + balance: balance, + ); } Undelegate undelegate({required int class_}) { return Undelegate(class_: class_); } - Unlock unlock({required int class_, required _i4.MultiAddress target}) { - return Unlock(class_: class_, target: target); + Unlock unlock({ + required int class_, + required _i4.MultiAddress target, + }) { + return Unlock( + class_: class_, + target: target, + ); } - RemoveVote removeVote({int? class_, required int index}) { - return RemoveVote(class_: class_, index: index); + RemoveVote removeVote({ + int? class_, + required int index, + }) { + return RemoveVote( + class_: class_, + index: index, + ); } - RemoveOtherVote removeOtherVote({required _i4.MultiAddress target, required int class_, required int index}) { - return RemoveOtherVote(target: target, class_: class_, index: index); + RemoveOtherVote removeOtherVote({ + required _i4.MultiAddress target, + required int class_, + required int index, + }) { + return RemoveOtherVote( + target: target, + class_: class_, + index: index, + ); } } @@ -90,7 +121,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case Vote: (value as Vote).encodeTo(output); @@ -111,7 +145,8 @@ class $CallCodec with _i1.Codec { (value as RemoveOtherVote).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -131,7 +166,8 @@ class $CallCodec with _i1.Codec { case RemoveOtherVote: return (value as RemoveOtherVote)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -146,10 +182,16 @@ class $CallCodec with _i1.Codec { /// /// Weight: `O(R)` where R is the number of polls the voter has voted on. class Vote extends Call { - const Vote({required this.pollIndex, required this.vote}); + const Vote({ + required this.pollIndex, + required this.vote, + }); factory Vote._decode(_i1.Input input) { - return Vote(pollIndex: _i1.CompactBigIntCodec.codec.decode(input), vote: _i3.AccountVote.codec.decode(input)); + return Vote( + pollIndex: _i1.CompactBigIntCodec.codec.decode(input), + vote: _i3.AccountVote.codec.decode(input), + ); } /// PollIndexOf @@ -160,8 +202,11 @@ class Vote extends Call { @override Map> toJson() => { - 'vote': {'pollIndex': pollIndex, 'vote': vote.toJson()}, - }; + 'vote': { + 'pollIndex': pollIndex, + 'vote': vote.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -171,17 +216,33 @@ class Vote extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.CompactBigIntCodec.codec.encodeTo(pollIndex, output); - _i3.AccountVote.codec.encodeTo(vote, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + pollIndex, + output, + ); + _i3.AccountVote.codec.encodeTo( + vote, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Vote && other.pollIndex == pollIndex && other.vote == vote; + identical( + this, + other, + ) || + other is Vote && other.pollIndex == pollIndex && other.vote == vote; @override - int get hashCode => Object.hash(pollIndex, vote); + int get hashCode => Object.hash( + pollIndex, + vote, + ); } /// Delegate the voting power (with some given conviction) of the sending account for a @@ -208,7 +269,12 @@ class Vote extends Call { /// Weight: `O(R)` where R is the number of polls the voter delegating to has /// voted on. Weight is initially charged as if maximum votes, but is refunded later. class Delegate extends Call { - const Delegate({required this.class_, required this.to, required this.conviction, required this.balance}); + const Delegate({ + required this.class_, + required this.to, + required this.conviction, + required this.balance, + }); factory Delegate._decode(_i1.Input input) { return Delegate( @@ -233,8 +299,13 @@ class Delegate extends Call { @override Map> toJson() => { - 'delegate': {'class': class_, 'to': to.toJson(), 'conviction': conviction.toJson(), 'balance': balance}, - }; + 'delegate': { + 'class': class_, + 'to': to.toJson(), + 'conviction': conviction.toJson(), + 'balance': balance, + } + }; int _sizeHint() { int size = 1; @@ -246,16 +317,34 @@ class Delegate extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U16Codec.codec.encodeTo(class_, output); - _i4.MultiAddress.codec.encodeTo(to, output); - _i5.Conviction.codec.encodeTo(conviction, output); - _i1.U128Codec.codec.encodeTo(balance, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U16Codec.codec.encodeTo( + class_, + output, + ); + _i4.MultiAddress.codec.encodeTo( + to, + output, + ); + _i5.Conviction.codec.encodeTo( + conviction, + output, + ); + _i1.U128Codec.codec.encodeTo( + balance, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Delegate && other.class_ == class_ && other.to == to && @@ -263,7 +352,12 @@ class Delegate extends Call { other.balance == balance; @override - int get hashCode => Object.hash(class_, to, conviction, balance); + int get hashCode => Object.hash( + class_, + to, + conviction, + balance, + ); } /// Undelegate the voting power of the sending account for a particular class of polls. @@ -292,8 +386,8 @@ class Undelegate extends Call { @override Map> toJson() => { - 'undelegate': {'class': class_}, - }; + 'undelegate': {'class': class_} + }; int _sizeHint() { int size = 1; @@ -302,12 +396,23 @@ class Undelegate extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U16Codec.codec.encodeTo(class_, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U16Codec.codec.encodeTo( + class_, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Undelegate && other.class_ == class_; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Undelegate && other.class_ == class_; @override int get hashCode => class_.hashCode; @@ -323,10 +428,16 @@ class Undelegate extends Call { /// /// Weight: `O(R)` with R number of vote of target. class Unlock extends Call { - const Unlock({required this.class_, required this.target}); + const Unlock({ + required this.class_, + required this.target, + }); factory Unlock._decode(_i1.Input input) { - return Unlock(class_: _i1.U16Codec.codec.decode(input), target: _i4.MultiAddress.codec.decode(input)); + return Unlock( + class_: _i1.U16Codec.codec.decode(input), + target: _i4.MultiAddress.codec.decode(input), + ); } /// ClassOf @@ -337,8 +448,11 @@ class Unlock extends Call { @override Map> toJson() => { - 'unlock': {'class': class_, 'target': target.toJson()}, - }; + 'unlock': { + 'class': class_, + 'target': target.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -348,17 +462,33 @@ class Unlock extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U16Codec.codec.encodeTo(class_, output); - _i4.MultiAddress.codec.encodeTo(target, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.U16Codec.codec.encodeTo( + class_, + output, + ); + _i4.MultiAddress.codec.encodeTo( + target, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Unlock && other.class_ == class_ && other.target == target; + identical( + this, + other, + ) || + other is Unlock && other.class_ == class_ && other.target == target; @override - int get hashCode => Object.hash(class_, target); + int get hashCode => Object.hash( + class_, + target, + ); } /// Remove a vote for a poll. @@ -391,7 +521,10 @@ class Unlock extends Call { /// Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. /// Weight is calculated for the maximum number of vote. class RemoveVote extends Call { - const RemoveVote({this.class_, required this.index}); + const RemoveVote({ + this.class_, + required this.index, + }); factory RemoveVote._decode(_i1.Input input) { return RemoveVote( @@ -408,28 +541,48 @@ class RemoveVote extends Call { @override Map> toJson() => { - 'remove_vote': {'class': class_, 'index': index}, - }; + 'remove_vote': { + 'class': class_, + 'index': index, + } + }; int _sizeHint() { int size = 1; - size = size + const _i1.OptionCodec(_i1.U16Codec.codec).sizeHint(class_); + size = + size + const _i1.OptionCodec(_i1.U16Codec.codec).sizeHint(class_); size = size + _i1.U32Codec.codec.sizeHint(index); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.OptionCodec(_i1.U16Codec.codec).encodeTo(class_, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.OptionCodec(_i1.U16Codec.codec).encodeTo( + class_, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is RemoveVote && other.class_ == class_ && other.index == index; + identical( + this, + other, + ) || + other is RemoveVote && other.class_ == class_ && other.index == index; @override - int get hashCode => Object.hash(class_, index); + int get hashCode => Object.hash( + class_, + index, + ); } /// Remove a vote for a poll. @@ -449,7 +602,11 @@ class RemoveVote extends Call { /// Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. /// Weight is calculated for the maximum number of vote. class RemoveOtherVote extends Call { - const RemoveOtherVote({required this.target, required this.class_, required this.index}); + const RemoveOtherVote({ + required this.target, + required this.class_, + required this.index, + }); factory RemoveOtherVote._decode(_i1.Input input) { return RemoveOtherVote( @@ -470,8 +627,12 @@ class RemoveOtherVote extends Call { @override Map> toJson() => { - 'remove_other_vote': {'target': target.toJson(), 'class': class_, 'index': index}, - }; + 'remove_other_vote': { + 'target': target.toJson(), + 'class': class_, + 'index': index, + } + }; int _sizeHint() { int size = 1; @@ -482,17 +643,39 @@ class RemoveOtherVote extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i4.MultiAddress.codec.encodeTo(target, output); - _i1.U16Codec.codec.encodeTo(class_, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i4.MultiAddress.codec.encodeTo( + target, + output, + ); + _i1.U16Codec.codec.encodeTo( + class_, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is RemoveOtherVote && other.target == target && other.class_ == class_ && other.index == index; + identical( + this, + other, + ) || + other is RemoveOtherVote && + other.target == target && + other.class_ == class_ && + other.index == index; @override - int get hashCode => Object.hash(target, class_, index); + int get hashCode => Object.hash( + target, + class_, + index, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/error.dart index 783ece3d..981b9bbc 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/error.dart @@ -42,7 +42,10 @@ enum Error { /// The class ID supplied is invalid. badClass('BadClass', 11); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -98,7 +101,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/event.dart index 7f39dea3..1fa9b655 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/event.dart @@ -35,24 +35,60 @@ abstract class Event { class $Event { const $Event(); - Delegated delegated(_i3.AccountId32 value0, _i3.AccountId32 value1, int value2) { - return Delegated(value0, value1, value2); + Delegated delegated( + _i3.AccountId32 value0, + _i3.AccountId32 value1, + int value2, + ) { + return Delegated( + value0, + value1, + value2, + ); } - Undelegated undelegated(_i3.AccountId32 value0, int value1) { - return Undelegated(value0, value1); + Undelegated undelegated( + _i3.AccountId32 value0, + int value1, + ) { + return Undelegated( + value0, + value1, + ); } - Voted voted({required _i3.AccountId32 who, required _i4.AccountVote vote, required int pollIndex}) { - return Voted(who: who, vote: vote, pollIndex: pollIndex); + Voted voted({ + required _i3.AccountId32 who, + required _i4.AccountVote vote, + required int pollIndex, + }) { + return Voted( + who: who, + vote: vote, + pollIndex: pollIndex, + ); } - VoteRemoved voteRemoved({required _i3.AccountId32 who, required _i4.AccountVote vote, required int pollIndex}) { - return VoteRemoved(who: who, vote: vote, pollIndex: pollIndex); + VoteRemoved voteRemoved({ + required _i3.AccountId32 who, + required _i4.AccountVote vote, + required int pollIndex, + }) { + return VoteRemoved( + who: who, + vote: vote, + pollIndex: pollIndex, + ); } - VoteUnlocked voteUnlocked({required _i3.AccountId32 who, required int class_}) { - return VoteUnlocked(who: who, class_: class_); + VoteUnlocked voteUnlocked({ + required _i3.AccountId32 who, + required int class_, + }) { + return VoteUnlocked( + who: who, + class_: class_, + ); } } @@ -79,7 +115,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case Delegated: (value as Delegated).encodeTo(output); @@ -97,7 +136,8 @@ class $EventCodec with _i1.Codec { (value as VoteUnlocked).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -115,14 +155,19 @@ class $EventCodec with _i1.Codec { case VoteUnlocked: return (value as VoteUnlocked)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// An account has delegated their vote to another account. \[who, target\] class Delegated extends Event { - const Delegated(this.value0, this.value1, this.value2); + const Delegated( + this.value0, + this.value1, + this.value2, + ); factory Delegated._decode(_i1.Input input) { return Delegated( @@ -143,8 +188,12 @@ class Delegated extends Event { @override Map> toJson() => { - 'Delegated': [value0.toList(), value1.toList(), value2], - }; + 'Delegated': [ + value0.toList(), + value1.toList(), + value2, + ] + }; int _sizeHint() { int size = 1; @@ -155,30 +204,61 @@ class Delegated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(value0, output); - const _i1.U8ArrayCodec(32).encodeTo(value1, output); - _i1.U16Codec.codec.encodeTo(value2, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + value0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + value1, + output, + ); + _i1.U16Codec.codec.encodeTo( + value2, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Delegated && - _i5.listsEqual(other.value0, value0) && - _i5.listsEqual(other.value1, value1) && + _i5.listsEqual( + other.value0, + value0, + ) && + _i5.listsEqual( + other.value1, + value1, + ) && other.value2 == value2; @override - int get hashCode => Object.hash(value0, value1, value2); + int get hashCode => Object.hash( + value0, + value1, + value2, + ); } /// An \[account\] has cancelled a previous delegation operation. class Undelegated extends Event { - const Undelegated(this.value0, this.value1); + const Undelegated( + this.value0, + this.value1, + ); factory Undelegated._decode(_i1.Input input) { - return Undelegated(const _i1.U8ArrayCodec(32).decode(input), _i1.U16Codec.codec.decode(input)); + return Undelegated( + const _i1.U8ArrayCodec(32).decode(input), + _i1.U16Codec.codec.decode(input), + ); } /// T::AccountId @@ -189,8 +269,11 @@ class Undelegated extends Event { @override Map> toJson() => { - 'Undelegated': [value0.toList(), value1], - }; + 'Undelegated': [ + value0.toList(), + value1, + ] + }; int _sizeHint() { int size = 1; @@ -200,22 +283,47 @@ class Undelegated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(value0, output); - _i1.U16Codec.codec.encodeTo(value1, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + value0, + output, + ); + _i1.U16Codec.codec.encodeTo( + value1, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Undelegated && _i5.listsEqual(other.value0, value0) && other.value1 == value1; + identical( + this, + other, + ) || + other is Undelegated && + _i5.listsEqual( + other.value0, + value0, + ) && + other.value1 == value1; @override - int get hashCode => Object.hash(value0, value1); + int get hashCode => Object.hash( + value0, + value1, + ); } /// An account has voted class Voted extends Event { - const Voted({required this.who, required this.vote, required this.pollIndex}); + const Voted({ + required this.who, + required this.vote, + required this.pollIndex, + }); factory Voted._decode(_i1.Input input) { return Voted( @@ -236,8 +344,12 @@ class Voted extends Event { @override Map> toJson() => { - 'Voted': {'who': who.toList(), 'vote': vote.toJson(), 'pollIndex': pollIndex}, - }; + 'Voted': { + 'who': who.toList(), + 'vote': vote.toJson(), + 'pollIndex': pollIndex, + } + }; int _sizeHint() { int size = 1; @@ -248,24 +360,53 @@ class Voted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i4.AccountVote.codec.encodeTo(vote, output); - _i1.U32Codec.codec.encodeTo(pollIndex, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i4.AccountVote.codec.encodeTo( + vote, + output, + ); + _i1.U32Codec.codec.encodeTo( + pollIndex, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Voted && _i5.listsEqual(other.who, who) && other.vote == vote && other.pollIndex == pollIndex; + identical( + this, + other, + ) || + other is Voted && + _i5.listsEqual( + other.who, + who, + ) && + other.vote == vote && + other.pollIndex == pollIndex; @override - int get hashCode => Object.hash(who, vote, pollIndex); + int get hashCode => Object.hash( + who, + vote, + pollIndex, + ); } /// A vote has been removed class VoteRemoved extends Event { - const VoteRemoved({required this.who, required this.vote, required this.pollIndex}); + const VoteRemoved({ + required this.who, + required this.vote, + required this.pollIndex, + }); factory VoteRemoved._decode(_i1.Input input) { return VoteRemoved( @@ -286,8 +427,12 @@ class VoteRemoved extends Event { @override Map> toJson() => { - 'VoteRemoved': {'who': who.toList(), 'vote': vote.toJson(), 'pollIndex': pollIndex}, - }; + 'VoteRemoved': { + 'who': who.toList(), + 'vote': vote.toJson(), + 'pollIndex': pollIndex, + } + }; int _sizeHint() { int size = 1; @@ -298,27 +443,58 @@ class VoteRemoved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i4.AccountVote.codec.encodeTo(vote, output); - _i1.U32Codec.codec.encodeTo(pollIndex, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i4.AccountVote.codec.encodeTo( + vote, + output, + ); + _i1.U32Codec.codec.encodeTo( + pollIndex, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is VoteRemoved && _i5.listsEqual(other.who, who) && other.vote == vote && other.pollIndex == pollIndex; + identical( + this, + other, + ) || + other is VoteRemoved && + _i5.listsEqual( + other.who, + who, + ) && + other.vote == vote && + other.pollIndex == pollIndex; @override - int get hashCode => Object.hash(who, vote, pollIndex); + int get hashCode => Object.hash( + who, + vote, + pollIndex, + ); } /// The lockup period of a conviction vote expired, and the funds have been unlocked. class VoteUnlocked extends Event { - const VoteUnlocked({required this.who, required this.class_}); + const VoteUnlocked({ + required this.who, + required this.class_, + }); factory VoteUnlocked._decode(_i1.Input input) { - return VoteUnlocked(who: const _i1.U8ArrayCodec(32).decode(input), class_: _i1.U16Codec.codec.decode(input)); + return VoteUnlocked( + who: const _i1.U8ArrayCodec(32).decode(input), + class_: _i1.U16Codec.codec.decode(input), + ); } /// T::AccountId @@ -329,8 +505,11 @@ class VoteUnlocked extends Event { @override Map> toJson() => { - 'VoteUnlocked': {'who': who.toList(), 'class': class_}, - }; + 'VoteUnlocked': { + 'who': who.toList(), + 'class': class_, + } + }; int _sizeHint() { int size = 1; @@ -340,15 +519,36 @@ class VoteUnlocked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U16Codec.codec.encodeTo(class_, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U16Codec.codec.encodeTo( + class_, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is VoteUnlocked && _i5.listsEqual(other.who, who) && other.class_ == class_; + identical( + this, + other, + ) || + other is VoteUnlocked && + _i5.listsEqual( + other.who, + who, + ) && + other.class_ == class_; @override - int get hashCode => Object.hash(who, class_); + int get hashCode => Object.hash( + who, + class_, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/delegations.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/delegations.dart index fdac6304..8c818a91 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/delegations.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/delegations.dart @@ -4,7 +4,10 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class Delegations { - const Delegations({required this.votes, required this.capital}); + const Delegations({ + required this.votes, + required this.capital, + }); factory Delegations.decode(_i1.Input input) { return codec.decode(input); @@ -22,28 +25,50 @@ class Delegations { return codec.encode(this); } - Map toJson() => {'votes': votes, 'capital': capital}; + Map toJson() => { + 'votes': votes, + 'capital': capital, + }; @override bool operator ==(Object other) => - identical(this, other) || other is Delegations && other.votes == votes && other.capital == capital; + identical( + this, + other, + ) || + other is Delegations && other.votes == votes && other.capital == capital; @override - int get hashCode => Object.hash(votes, capital); + int get hashCode => Object.hash( + votes, + capital, + ); } class $DelegationsCodec with _i1.Codec { const $DelegationsCodec(); @override - void encodeTo(Delegations obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.votes, output); - _i1.U128Codec.codec.encodeTo(obj.capital, output); + void encodeTo( + Delegations obj, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + obj.votes, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.capital, + output, + ); } @override Delegations decode(_i1.Input input) { - return Delegations(votes: _i1.U128Codec.codec.decode(input), capital: _i1.U128Codec.codec.decode(input)); + return Delegations( + votes: _i1.U128Codec.codec.decode(input), + capital: _i1.U128Codec.codec.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/tally.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/tally.dart index 6b84fb7d..a5a4d7bf 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/tally.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/tally.dart @@ -4,7 +4,11 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class Tally { - const Tally({required this.ayes, required this.nays, required this.support}); + const Tally({ + required this.ayes, + required this.nays, + required this.support, + }); factory Tally.decode(_i1.Input input) { return codec.decode(input); @@ -25,24 +29,51 @@ class Tally { return codec.encode(this); } - Map toJson() => {'ayes': ayes, 'nays': nays, 'support': support}; + Map toJson() => { + 'ayes': ayes, + 'nays': nays, + 'support': support, + }; @override bool operator ==(Object other) => - identical(this, other) || other is Tally && other.ayes == ayes && other.nays == nays && other.support == support; + identical( + this, + other, + ) || + other is Tally && + other.ayes == ayes && + other.nays == nays && + other.support == support; @override - int get hashCode => Object.hash(ayes, nays, support); + int get hashCode => Object.hash( + ayes, + nays, + support, + ); } class $TallyCodec with _i1.Codec { const $TallyCodec(); @override - void encodeTo(Tally obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.ayes, output); - _i1.U128Codec.codec.encodeTo(obj.nays, output); - _i1.U128Codec.codec.encodeTo(obj.support, output); + void encodeTo( + Tally obj, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + obj.ayes, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.nays, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.support, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/account_vote.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/account_vote.dart index c0f7997b..3614ca52 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/account_vote.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/account_vote.dart @@ -32,16 +32,36 @@ abstract class AccountVote { class $AccountVote { const $AccountVote(); - Standard standard({required _i3.Vote vote, required BigInt balance}) { - return Standard(vote: vote, balance: balance); + Standard standard({ + required _i3.Vote vote, + required BigInt balance, + }) { + return Standard( + vote: vote, + balance: balance, + ); } - Split split({required BigInt aye, required BigInt nay}) { - return Split(aye: aye, nay: nay); + Split split({ + required BigInt aye, + required BigInt nay, + }) { + return Split( + aye: aye, + nay: nay, + ); } - SplitAbstain splitAbstain({required BigInt aye, required BigInt nay, required BigInt abstain}) { - return SplitAbstain(aye: aye, nay: nay, abstain: abstain); + SplitAbstain splitAbstain({ + required BigInt aye, + required BigInt nay, + required BigInt abstain, + }) { + return SplitAbstain( + aye: aye, + nay: nay, + abstain: abstain, + ); } } @@ -64,7 +84,10 @@ class $AccountVoteCodec with _i1.Codec { } @override - void encodeTo(AccountVote value, _i1.Output output) { + void encodeTo( + AccountVote value, + _i1.Output output, + ) { switch (value.runtimeType) { case Standard: (value as Standard).encodeTo(output); @@ -76,7 +99,8 @@ class $AccountVoteCodec with _i1.Codec { (value as SplitAbstain).encodeTo(output); break; default: - throw Exception('AccountVote: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'AccountVote: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -90,16 +114,23 @@ class $AccountVoteCodec with _i1.Codec { case SplitAbstain: return (value as SplitAbstain)._sizeHint(); default: - throw Exception('AccountVote: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'AccountVote: Unsupported "$value" of type "${value.runtimeType}"'); } } } class Standard extends AccountVote { - const Standard({required this.vote, required this.balance}); + const Standard({ + required this.vote, + required this.balance, + }); factory Standard._decode(_i1.Input input) { - return Standard(vote: _i1.U8Codec.codec.decode(input), balance: _i1.U128Codec.codec.decode(input)); + return Standard( + vote: _i1.U8Codec.codec.decode(input), + balance: _i1.U128Codec.codec.decode(input), + ); } /// Vote @@ -110,8 +141,11 @@ class Standard extends AccountVote { @override Map> toJson() => { - 'Standard': {'vote': vote, 'balance': balance}, - }; + 'Standard': { + 'vote': vote, + 'balance': balance, + } + }; int _sizeHint() { int size = 1; @@ -121,24 +155,46 @@ class Standard extends AccountVote { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U8Codec.codec.encodeTo(vote, output); - _i1.U128Codec.codec.encodeTo(balance, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U8Codec.codec.encodeTo( + vote, + output, + ); + _i1.U128Codec.codec.encodeTo( + balance, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Standard && other.vote == vote && other.balance == balance; + identical( + this, + other, + ) || + other is Standard && other.vote == vote && other.balance == balance; @override - int get hashCode => Object.hash(vote, balance); + int get hashCode => Object.hash( + vote, + balance, + ); } class Split extends AccountVote { - const Split({required this.aye, required this.nay}); + const Split({ + required this.aye, + required this.nay, + }); factory Split._decode(_i1.Input input) { - return Split(aye: _i1.U128Codec.codec.decode(input), nay: _i1.U128Codec.codec.decode(input)); + return Split( + aye: _i1.U128Codec.codec.decode(input), + nay: _i1.U128Codec.codec.decode(input), + ); } /// Balance @@ -149,8 +205,11 @@ class Split extends AccountVote { @override Map> toJson() => { - 'Split': {'aye': aye, 'nay': nay}, - }; + 'Split': { + 'aye': aye, + 'nay': nay, + } + }; int _sizeHint() { int size = 1; @@ -160,20 +219,41 @@ class Split extends AccountVote { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U128Codec.codec.encodeTo(aye, output); - _i1.U128Codec.codec.encodeTo(nay, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U128Codec.codec.encodeTo( + aye, + output, + ); + _i1.U128Codec.codec.encodeTo( + nay, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Split && other.aye == aye && other.nay == nay; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Split && other.aye == aye && other.nay == nay; @override - int get hashCode => Object.hash(aye, nay); + int get hashCode => Object.hash( + aye, + nay, + ); } class SplitAbstain extends AccountVote { - const SplitAbstain({required this.aye, required this.nay, required this.abstain}); + const SplitAbstain({ + required this.aye, + required this.nay, + required this.abstain, + }); factory SplitAbstain._decode(_i1.Input input) { return SplitAbstain( @@ -194,8 +274,12 @@ class SplitAbstain extends AccountVote { @override Map> toJson() => { - 'SplitAbstain': {'aye': aye, 'nay': nay, 'abstain': abstain}, - }; + 'SplitAbstain': { + 'aye': aye, + 'nay': nay, + 'abstain': abstain, + } + }; int _sizeHint() { int size = 1; @@ -206,17 +290,39 @@ class SplitAbstain extends AccountVote { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U128Codec.codec.encodeTo(aye, output); - _i1.U128Codec.codec.encodeTo(nay, output); - _i1.U128Codec.codec.encodeTo(abstain, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U128Codec.codec.encodeTo( + aye, + output, + ); + _i1.U128Codec.codec.encodeTo( + nay, + output, + ); + _i1.U128Codec.codec.encodeTo( + abstain, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is SplitAbstain && other.aye == aye && other.nay == nay && other.abstain == abstain; + identical( + this, + other, + ) || + other is SplitAbstain && + other.aye == aye && + other.nay == nay && + other.abstain == abstain; @override - int get hashCode => Object.hash(aye, nay, abstain); + int get hashCode => Object.hash( + aye, + nay, + abstain, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/casting.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/casting.dart index 851190cf..6313a889 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/casting.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/casting.dart @@ -10,7 +10,11 @@ import 'account_vote.dart' as _i3; import 'prior_lock.dart' as _i5; class Casting { - const Casting({required this.votes, required this.delegations, required this.prior}); + const Casting({ + required this.votes, + required this.delegations, + required this.prior, + }); factory Casting.decode(_i1.Input input) { return codec.decode(input); @@ -32,41 +36,72 @@ class Casting { } Map toJson() => { - 'votes': votes.map((value) => [value.value0, value.value1.toJson()]).toList(), - 'delegations': delegations.toJson(), - 'prior': prior.toJson(), - }; + 'votes': votes + .map((value) => [ + value.value0, + value.value1.toJson(), + ]) + .toList(), + 'delegations': delegations.toJson(), + 'prior': prior.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Casting && - _i7.listsEqual(other.votes, votes) && + _i7.listsEqual( + other.votes, + votes, + ) && other.delegations == delegations && other.prior == prior; @override - int get hashCode => Object.hash(votes, delegations, prior); + int get hashCode => Object.hash( + votes, + delegations, + prior, + ); } class $CastingCodec with _i1.Codec { const $CastingCodec(); @override - void encodeTo(Casting obj, _i1.Output output) { + void encodeTo( + Casting obj, + _i1.Output output, + ) { const _i1.SequenceCodec<_i2.Tuple2>( - _i2.Tuple2Codec(_i1.U32Codec.codec, _i3.AccountVote.codec), - ).encodeTo(obj.votes, output); - _i4.Delegations.codec.encodeTo(obj.delegations, output); - _i5.PriorLock.codec.encodeTo(obj.prior, output); + _i2.Tuple2Codec( + _i1.U32Codec.codec, + _i3.AccountVote.codec, + )).encodeTo( + obj.votes, + output, + ); + _i4.Delegations.codec.encodeTo( + obj.delegations, + output, + ); + _i5.PriorLock.codec.encodeTo( + obj.prior, + output, + ); } @override Casting decode(_i1.Input input) { return Casting( votes: const _i1.SequenceCodec<_i2.Tuple2>( - _i2.Tuple2Codec(_i1.U32Codec.codec, _i3.AccountVote.codec), - ).decode(input), + _i2.Tuple2Codec( + _i1.U32Codec.codec, + _i3.AccountVote.codec, + )).decode(input), delegations: _i4.Delegations.codec.decode(input), prior: _i5.PriorLock.codec.decode(input), ); @@ -75,11 +110,12 @@ class $CastingCodec with _i1.Codec { @override int sizeHint(Casting obj) { int size = 0; - size = - size + + size = size + const _i1.SequenceCodec<_i2.Tuple2>( - _i2.Tuple2Codec(_i1.U32Codec.codec, _i3.AccountVote.codec), - ).sizeHint(obj.votes); + _i2.Tuple2Codec( + _i1.U32Codec.codec, + _i3.AccountVote.codec, + )).sizeHint(obj.votes); size = size + _i4.Delegations.codec.sizeHint(obj.delegations); size = size + _i5.PriorLock.codec.sizeHint(obj.prior); return size; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/delegating.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/delegating.dart index c18056c7..66cc48bd 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/delegating.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/delegating.dart @@ -44,37 +44,67 @@ class Delegating { } Map toJson() => { - 'balance': balance, - 'target': target.toList(), - 'conviction': conviction.toJson(), - 'delegations': delegations.toJson(), - 'prior': prior.toJson(), - }; + 'balance': balance, + 'target': target.toList(), + 'conviction': conviction.toJson(), + 'delegations': delegations.toJson(), + 'prior': prior.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Delegating && other.balance == balance && - _i7.listsEqual(other.target, target) && + _i7.listsEqual( + other.target, + target, + ) && other.conviction == conviction && other.delegations == delegations && other.prior == prior; @override - int get hashCode => Object.hash(balance, target, conviction, delegations, prior); + int get hashCode => Object.hash( + balance, + target, + conviction, + delegations, + prior, + ); } class $DelegatingCodec with _i1.Codec { const $DelegatingCodec(); @override - void encodeTo(Delegating obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.balance, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.target, output); - _i3.Conviction.codec.encodeTo(obj.conviction, output); - _i4.Delegations.codec.encodeTo(obj.delegations, output); - _i5.PriorLock.codec.encodeTo(obj.prior, output); + void encodeTo( + Delegating obj, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + obj.balance, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + obj.target, + output, + ); + _i3.Conviction.codec.encodeTo( + obj.conviction, + output, + ); + _i4.Delegations.codec.encodeTo( + obj.delegations, + output, + ); + _i5.PriorLock.codec.encodeTo( + obj.prior, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/prior_lock.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/prior_lock.dart index 34b7627f..ff2043cb 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/prior_lock.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/prior_lock.dart @@ -4,7 +4,10 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class PriorLock { - const PriorLock(this.value0, this.value1); + const PriorLock( + this.value0, + this.value1, + ); factory PriorLock.decode(_i1.Input input) { return codec.decode(input); @@ -22,28 +25,50 @@ class PriorLock { return codec.encode(this); } - List toJson() => [value0, value1]; + List toJson() => [ + value0, + value1, + ]; @override bool operator ==(Object other) => - identical(this, other) || other is PriorLock && other.value0 == value0 && other.value1 == value1; + identical( + this, + other, + ) || + other is PriorLock && other.value0 == value0 && other.value1 == value1; @override - int get hashCode => Object.hash(value0, value1); + int get hashCode => Object.hash( + value0, + value1, + ); } class $PriorLockCodec with _i1.Codec { const $PriorLockCodec(); @override - void encodeTo(PriorLock obj, _i1.Output output) { - _i1.U32Codec.codec.encodeTo(obj.value0, output); - _i1.U128Codec.codec.encodeTo(obj.value1, output); + void encodeTo( + PriorLock obj, + _i1.Output output, + ) { + _i1.U32Codec.codec.encodeTo( + obj.value0, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.value1, + output, + ); } @override PriorLock decode(_i1.Input input) { - return PriorLock(_i1.U32Codec.codec.decode(input), _i1.U128Codec.codec.decode(input)); + return PriorLock( + _i1.U32Codec.codec.decode(input), + _i1.U128Codec.codec.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/vote.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/vote.dart index c78cd6dc..992c5dbc 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/vote.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/vote.dart @@ -12,8 +12,14 @@ class VoteCodec with _i1.Codec { } @override - void encodeTo(Vote value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value, output); + void encodeTo( + Vote value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/voting.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/voting.dart index 4c150bb6..c520bab0 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/voting.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/voting.dart @@ -59,7 +59,10 @@ class $VotingCodec with _i1.Codec { } @override - void encodeTo(Voting value, _i1.Output output) { + void encodeTo( + Voting value, + _i1.Output output, + ) { switch (value.runtimeType) { case Casting: (value as Casting).encodeTo(output); @@ -68,7 +71,8 @@ class $VotingCodec with _i1.Codec { (value as Delegating).encodeTo(output); break; default: - throw Exception('Voting: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Voting: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -80,7 +84,8 @@ class $VotingCodec with _i1.Codec { case Delegating: return (value as Delegating)._sizeHint(); default: - throw Exception('Voting: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Voting: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -105,12 +110,23 @@ class Casting extends Voting { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.Casting.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.Casting.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Casting && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Casting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -136,12 +152,23 @@ class Delegating extends Voting { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i4.Delegating.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i4.Delegating.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Delegating && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Delegating && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_mining_rewards/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_mining_rewards/pallet/event.dart index 125bb42f..682765a1 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_mining_rewards/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_mining_rewards/pallet/event.dart @@ -34,20 +34,38 @@ abstract class Event { class $Event { const $Event(); - MinerRewarded minerRewarded({required _i3.AccountId32 miner, required BigInt reward}) { - return MinerRewarded(miner: miner, reward: reward); + MinerRewarded minerRewarded({ + required _i3.AccountId32 miner, + required BigInt reward, + }) { + return MinerRewarded( + miner: miner, + reward: reward, + ); } - FeesCollected feesCollected({required BigInt amount, required BigInt total}) { - return FeesCollected(amount: amount, total: total); + FeesCollected feesCollected({ + required BigInt amount, + required BigInt total, + }) { + return FeesCollected( + amount: amount, + total: total, + ); } TreasuryRewarded treasuryRewarded({required BigInt reward}) { return TreasuryRewarded(reward: reward); } - MinerRewardRedirected minerRewardRedirected({required _i3.AccountId32 miner, required BigInt reward}) { - return MinerRewardRedirected(miner: miner, reward: reward); + MinerRewardRedirected minerRewardRedirected({ + required _i3.AccountId32 miner, + required BigInt reward, + }) { + return MinerRewardRedirected( + miner: miner, + reward: reward, + ); } } @@ -72,7 +90,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case MinerRewarded: (value as MinerRewarded).encodeTo(output); @@ -87,7 +108,8 @@ class $EventCodec with _i1.Codec { (value as MinerRewardRedirected).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -103,17 +125,24 @@ class $EventCodec with _i1.Codec { case MinerRewardRedirected: return (value as MinerRewardRedirected)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A miner has been identified for a block class MinerRewarded extends Event { - const MinerRewarded({required this.miner, required this.reward}); + const MinerRewarded({ + required this.miner, + required this.reward, + }); factory MinerRewarded._decode(_i1.Input input) { - return MinerRewarded(miner: const _i1.U8ArrayCodec(32).decode(input), reward: _i1.U128Codec.codec.decode(input)); + return MinerRewarded( + miner: const _i1.U8ArrayCodec(32).decode(input), + reward: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -126,8 +155,11 @@ class MinerRewarded extends Event { @override Map> toJson() => { - 'MinerRewarded': {'miner': miner.toList(), 'reward': reward}, - }; + 'MinerRewarded': { + 'miner': miner.toList(), + 'reward': reward, + } + }; int _sizeHint() { int size = 1; @@ -137,25 +169,52 @@ class MinerRewarded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(miner, output); - _i1.U128Codec.codec.encodeTo(reward, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + miner, + output, + ); + _i1.U128Codec.codec.encodeTo( + reward, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is MinerRewarded && _i4.listsEqual(other.miner, miner) && other.reward == reward; + identical( + this, + other, + ) || + other is MinerRewarded && + _i4.listsEqual( + other.miner, + miner, + ) && + other.reward == reward; @override - int get hashCode => Object.hash(miner, reward); + int get hashCode => Object.hash( + miner, + reward, + ); } /// Transaction fees were collected for later distribution class FeesCollected extends Event { - const FeesCollected({required this.amount, required this.total}); + const FeesCollected({ + required this.amount, + required this.total, + }); factory FeesCollected._decode(_i1.Input input) { - return FeesCollected(amount: _i1.U128Codec.codec.decode(input), total: _i1.U128Codec.codec.decode(input)); + return FeesCollected( + amount: _i1.U128Codec.codec.decode(input), + total: _i1.U128Codec.codec.decode(input), + ); } /// BalanceOf @@ -168,8 +227,11 @@ class FeesCollected extends Event { @override Map> toJson() => { - 'FeesCollected': {'amount': amount, 'total': total}, - }; + 'FeesCollected': { + 'amount': amount, + 'total': total, + } + }; int _sizeHint() { int size = 1; @@ -179,17 +241,33 @@ class FeesCollected extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U128Codec.codec.encodeTo(amount, output); - _i1.U128Codec.codec.encodeTo(total, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); + _i1.U128Codec.codec.encodeTo( + total, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is FeesCollected && other.amount == amount && other.total == total; + identical( + this, + other, + ) || + other is FeesCollected && other.amount == amount && other.total == total; @override - int get hashCode => Object.hash(amount, total); + int get hashCode => Object.hash( + amount, + total, + ); } /// Rewards were sent to Treasury when no miner was specified @@ -206,8 +284,8 @@ class TreasuryRewarded extends Event { @override Map> toJson() => { - 'TreasuryRewarded': {'reward': reward}, - }; + 'TreasuryRewarded': {'reward': reward} + }; int _sizeHint() { int size = 1; @@ -216,12 +294,23 @@ class TreasuryRewarded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U128Codec.codec.encodeTo(reward, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U128Codec.codec.encodeTo( + reward, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is TreasuryRewarded && other.reward == reward; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TreasuryRewarded && other.reward == reward; @override int get hashCode => reward.hashCode; @@ -229,7 +318,10 @@ class TreasuryRewarded extends Event { /// Miner reward was redirected to treasury due to mint failure class MinerRewardRedirected extends Event { - const MinerRewardRedirected({required this.miner, required this.reward}); + const MinerRewardRedirected({ + required this.miner, + required this.reward, + }); factory MinerRewardRedirected._decode(_i1.Input input) { return MinerRewardRedirected( @@ -248,8 +340,11 @@ class MinerRewardRedirected extends Event { @override Map> toJson() => { - 'MinerRewardRedirected': {'miner': miner.toList(), 'reward': reward}, - }; + 'MinerRewardRedirected': { + 'miner': miner.toList(), + 'reward': reward, + } + }; int _sizeHint() { int size = 1; @@ -259,16 +354,36 @@ class MinerRewardRedirected extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(miner, output); - _i1.U128Codec.codec.encodeTo(reward, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + miner, + output, + ); + _i1.U128Codec.codec.encodeTo( + reward, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is MinerRewardRedirected && _i4.listsEqual(other.miner, miner) && other.reward == reward; + identical( + this, + other, + ) || + other is MinerRewardRedirected && + _i4.listsEqual( + other.miner, + miner, + ) && + other.reward == reward; @override - int get hashCode => Object.hash(miner, reward); + int get hashCode => Object.hash( + miner, + reward, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/multisig_data.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/multisig_data.dart index 210b2b18..fbdcc78b 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/multisig_data.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/multisig_data.dart @@ -4,7 +4,8 @@ import 'dart:typed_data' as _i4; import 'package:polkadart/scale_codec.dart' as _i1; import 'package:quiver/collection.dart' as _i5; -import '../bounded_collections/bounded_btree_map/bounded_b_tree_map.dart' as _i3; +import '../bounded_collections/bounded_btree_map/bounded_b_tree_map.dart' + as _i3; import '../sp_core/crypto/account_id32.dart' as _i2; import '../tuples.dart' as _i6; @@ -14,8 +15,6 @@ class MultisigData { required this.signers, required this.threshold, required this.proposalNonce, - required this.deposit, - required this.activeProposals, required this.proposalsPerSigner, }); @@ -35,12 +34,6 @@ class MultisigData { /// u32 final int proposalNonce; - /// Balance - final BigInt deposit; - - /// u32 - final int activeProposals; - /// BoundedProposalsPerSigner final _i3.BoundedBTreeMap proposalsPerSigner; @@ -51,60 +44,95 @@ class MultisigData { } Map toJson() => { - 'creator': creator.toList(), - 'signers': signers.map((value) => value.toList()).toList(), - 'threshold': threshold, - 'proposalNonce': proposalNonce, - 'deposit': deposit, - 'activeProposals': activeProposals, - 'proposalsPerSigner': proposalsPerSigner.map((value) => [value.value0.toList(), value.value1]).toList(), - }; + 'creator': creator.toList(), + 'signers': signers.map((value) => value.toList()).toList(), + 'threshold': threshold, + 'proposalNonce': proposalNonce, + 'proposalsPerSigner': proposalsPerSigner + .map((value) => [ + value.value0.toList(), + value.value1, + ]) + .toList(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is MultisigData && - _i5.listsEqual(other.creator, creator) && - _i5.listsEqual(other.signers, signers) && + _i5.listsEqual( + other.creator, + creator, + ) && + _i5.listsEqual( + other.signers, + signers, + ) && other.threshold == threshold && other.proposalNonce == proposalNonce && - other.deposit == deposit && - other.activeProposals == activeProposals && other.proposalsPerSigner == proposalsPerSigner; @override - int get hashCode => - Object.hash(creator, signers, threshold, proposalNonce, deposit, activeProposals, proposalsPerSigner); + int get hashCode => Object.hash( + creator, + signers, + threshold, + proposalNonce, + proposalsPerSigner, + ); } class $MultisigDataCodec with _i1.Codec { const $MultisigDataCodec(); @override - void encodeTo(MultisigData obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.creator, output); - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo(obj.signers, output); - _i1.U32Codec.codec.encodeTo(obj.threshold, output); - _i1.U32Codec.codec.encodeTo(obj.proposalNonce, output); - _i1.U128Codec.codec.encodeTo(obj.deposit, output); - _i1.U32Codec.codec.encodeTo(obj.activeProposals, output); + void encodeTo( + MultisigData obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + obj.creator, + output, + ); + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo( + obj.signers, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.threshold, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.proposalNonce, + output, + ); const _i1.SequenceCodec<_i6.Tuple2<_i2.AccountId32, int>>( - _i6.Tuple2Codec<_i2.AccountId32, int>(_i2.AccountId32Codec(), _i1.U32Codec.codec), - ).encodeTo(obj.proposalsPerSigner, output); + _i6.Tuple2Codec<_i2.AccountId32, int>( + _i2.AccountId32Codec(), + _i1.U32Codec.codec, + )).encodeTo( + obj.proposalsPerSigner, + output, + ); } @override MultisigData decode(_i1.Input input) { return MultisigData( creator: const _i1.U8ArrayCodec(32).decode(input), - signers: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).decode(input), + signers: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) + .decode(input), threshold: _i1.U32Codec.codec.decode(input), proposalNonce: _i1.U32Codec.codec.decode(input), - deposit: _i1.U128Codec.codec.decode(input), - activeProposals: _i1.U32Codec.codec.decode(input), - proposalsPerSigner: const _i1.SequenceCodec<_i6.Tuple2<_i2.AccountId32, int>>( - _i6.Tuple2Codec<_i2.AccountId32, int>(_i2.AccountId32Codec(), _i1.U32Codec.codec), - ).decode(input), + proposalsPerSigner: + const _i1.SequenceCodec<_i6.Tuple2<_i2.AccountId32, int>>( + _i6.Tuple2Codec<_i2.AccountId32, int>( + _i2.AccountId32Codec(), + _i1.U32Codec.codec, + )).decode(input), ); } @@ -112,12 +140,13 @@ class $MultisigDataCodec with _i1.Codec { int sizeHint(MultisigData obj) { int size = 0; size = size + const _i2.AccountId32Codec().sizeHint(obj.creator); - size = size + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).sizeHint(obj.signers); + size = size + + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) + .sizeHint(obj.signers); size = size + _i1.U32Codec.codec.sizeHint(obj.threshold); size = size + _i1.U32Codec.codec.sizeHint(obj.proposalNonce); - size = size + _i1.U128Codec.codec.sizeHint(obj.deposit); - size = size + _i1.U32Codec.codec.sizeHint(obj.activeProposals); - size = size + const _i3.BoundedBTreeMapCodec().sizeHint(obj.proposalsPerSigner); + size = size + + const _i3.BoundedBTreeMapCodec().sizeHint(obj.proposalsPerSigner); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/call.dart index e36ed900..d47a1a0c 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/call.dart @@ -39,35 +39,67 @@ class $Call { required int threshold, required BigInt nonce, }) { - return CreateMultisig(signers: signers, threshold: threshold, nonce: nonce); + return CreateMultisig( + signers: signers, + threshold: threshold, + nonce: nonce, + ); } - Propose propose({required _i3.AccountId32 multisigAddress, required List call, required int expiry}) { - return Propose(multisigAddress: multisigAddress, call: call, expiry: expiry); + Propose propose({ + required _i3.AccountId32 multisigAddress, + required List call, + required int expiry, + }) { + return Propose( + multisigAddress: multisigAddress, + call: call, + expiry: expiry, + ); } - Approve approve({required _i3.AccountId32 multisigAddress, required int proposalId}) { - return Approve(multisigAddress: multisigAddress, proposalId: proposalId); + Approve approve({ + required _i3.AccountId32 multisigAddress, + required int proposalId, + }) { + return Approve( + multisigAddress: multisigAddress, + proposalId: proposalId, + ); } - Cancel cancel({required _i3.AccountId32 multisigAddress, required int proposalId}) { - return Cancel(multisigAddress: multisigAddress, proposalId: proposalId); + Cancel cancel({ + required _i3.AccountId32 multisigAddress, + required int proposalId, + }) { + return Cancel( + multisigAddress: multisigAddress, + proposalId: proposalId, + ); } - RemoveExpired removeExpired({required _i3.AccountId32 multisigAddress, required int proposalId}) { - return RemoveExpired(multisigAddress: multisigAddress, proposalId: proposalId); + RemoveExpired removeExpired({ + required _i3.AccountId32 multisigAddress, + required int proposalId, + }) { + return RemoveExpired( + multisigAddress: multisigAddress, + proposalId: proposalId, + ); } ClaimDeposits claimDeposits({required _i3.AccountId32 multisigAddress}) { return ClaimDeposits(multisigAddress: multisigAddress); } - Execute execute({required _i3.AccountId32 multisigAddress, required int proposalId}) { - return Execute(multisigAddress: multisigAddress, proposalId: proposalId); - } - - ApproveDissolve approveDissolve({required _i3.AccountId32 multisigAddress}) { - return ApproveDissolve(multisigAddress: multisigAddress); + Execute execute({ + required _i3.AccountId32 multisigAddress, + required int proposalId, + }) { + return Execute( + multisigAddress: multisigAddress, + proposalId: proposalId, + ); } } @@ -90,17 +122,18 @@ class $CallCodec with _i1.Codec { return RemoveExpired._decode(input); case 5: return ClaimDeposits._decode(input); - case 7: - return Execute._decode(input); case 6: - return ApproveDissolve._decode(input); + return Execute._decode(input); default: throw Exception('Call: Invalid variant index: "$index"'); } } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case CreateMultisig: (value as CreateMultisig).encodeTo(output); @@ -123,11 +156,9 @@ class $CallCodec with _i1.Codec { case Execute: (value as Execute).encodeTo(output); break; - case ApproveDissolve: - (value as ApproveDissolve).encodeTo(output); - break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -148,10 +179,9 @@ class $CallCodec with _i1.Codec { return (value as ClaimDeposits)._sizeHint(); case Execute: return (value as Execute)._sizeHint(); - case ApproveDissolve: - return (value as ApproveDissolve)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -170,13 +200,17 @@ class $CallCodec with _i1.Codec { /// /// Economic costs: /// - MultisigFee: burned immediately (spam prevention) -/// - MultisigDeposit: reserved until dissolution, then returned to creator (storage bond) class CreateMultisig extends Call { - const CreateMultisig({required this.signers, required this.threshold, required this.nonce}); + const CreateMultisig({ + required this.signers, + required this.threshold, + required this.nonce, + }); factory CreateMultisig._decode(_i1.Input input) { return CreateMultisig( - signers: const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).decode(input), + signers: const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) + .decode(input), threshold: _i1.U32Codec.codec.decode(input), nonce: _i1.U64Codec.codec.decode(input), ); @@ -193,38 +227,62 @@ class CreateMultisig extends Call { @override Map> toJson() => { - 'create_multisig': { - 'signers': signers.map((value) => value.toList()).toList(), - 'threshold': threshold, - 'nonce': nonce, - }, - }; + 'create_multisig': { + 'signers': signers.map((value) => value.toList()).toList(), + 'threshold': threshold, + 'nonce': nonce, + } + }; int _sizeHint() { int size = 1; - size = size + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).sizeHint(signers); + size = size + + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) + .sizeHint(signers); size = size + _i1.U32Codec.codec.sizeHint(threshold); size = size + _i1.U64Codec.codec.sizeHint(nonce); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo(signers, output); - _i1.U32Codec.codec.encodeTo(threshold, output); - _i1.U64Codec.codec.encodeTo(nonce, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo( + signers, + output, + ); + _i1.U32Codec.codec.encodeTo( + threshold, + output, + ); + _i1.U64Codec.codec.encodeTo( + nonce, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is CreateMultisig && - _i4.listsEqual(other.signers, signers) && + _i4.listsEqual( + other.signers, + signers, + ) && other.threshold == threshold && other.nonce == nonce; @override - int get hashCode => Object.hash(signers, threshold, nonce); + int get hashCode => Object.hash( + signers, + threshold, + nonce, + ); } /// Propose a transaction to be executed by the multisig @@ -244,7 +302,11 @@ class CreateMultisig extends Call { /// **Weight:** Charged upfront for worst-case (high-security path with decode). /// Refunded to actual cost on success based on whether HS path was taken. class Propose extends Call { - const Propose({required this.multisigAddress, required this.call, required this.expiry}); + const Propose({ + required this.multisigAddress, + required this.call, + required this.expiry, + }); factory Propose._decode(_i1.Input input) { return Propose( @@ -257,7 +319,7 @@ class Propose extends Call { /// T::AccountId final _i3.AccountId32 multisigAddress; - /// Vec + /// BoundedCallOf final List call; /// BlockNumberFor @@ -265,8 +327,12 @@ class Propose extends Call { @override Map> toJson() => { - 'propose': {'multisigAddress': multisigAddress.toList(), 'call': call, 'expiry': expiry}, - }; + 'propose': { + 'multisigAddress': multisigAddress.toList(), + 'call': call, + 'expiry': expiry, + } + }; int _sizeHint() { int size = 1; @@ -277,22 +343,47 @@ class Propose extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - _i1.U8SequenceCodec.codec.encodeTo(call, output); - _i1.U32Codec.codec.encodeTo(expiry, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + call, + output, + ); + _i1.U32Codec.codec.encodeTo( + expiry, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Propose && - _i4.listsEqual(other.multisigAddress, multisigAddress) && - _i4.listsEqual(other.call, call) && + _i4.listsEqual( + other.multisigAddress, + multisigAddress, + ) && + _i4.listsEqual( + other.call, + call, + ) && other.expiry == expiry; @override - int get hashCode => Object.hash(multisigAddress, call, expiry); + int get hashCode => Object.hash( + multisigAddress, + call, + expiry, + ); } /// Approve a proposed transaction @@ -306,7 +397,10 @@ class Propose extends Call { /// /// Weight: Charges for MAX call size, refunds based on actual class Approve extends Call { - const Approve({required this.multisigAddress, required this.proposalId}); + const Approve({ + required this.multisigAddress, + required this.proposalId, + }); factory Approve._decode(_i1.Input input) { return Approve( @@ -323,8 +417,11 @@ class Approve extends Call { @override Map> toJson() => { - 'approve': {'multisigAddress': multisigAddress.toList(), 'proposalId': proposalId}, - }; + 'approve': { + 'multisigAddress': multisigAddress.toList(), + 'proposalId': proposalId, + } + }; int _sizeHint() { int size = 1; @@ -334,18 +431,38 @@ class Approve extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - _i1.U32Codec.codec.encodeTo(proposalId, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalId, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Approve && _i4.listsEqual(other.multisigAddress, multisigAddress) && other.proposalId == proposalId; + identical( + this, + other, + ) || + other is Approve && + _i4.listsEqual( + other.multisigAddress, + multisigAddress, + ) && + other.proposalId == proposalId; @override - int get hashCode => Object.hash(multisigAddress, proposalId); + int get hashCode => Object.hash( + multisigAddress, + proposalId, + ); } /// Cancel a proposed transaction (only by proposer) @@ -354,7 +471,10 @@ class Approve extends Call { /// - `multisig_address`: The multisig account /// - `proposal_id`: ID (nonce) of the proposal to cancel class Cancel extends Call { - const Cancel({required this.multisigAddress, required this.proposalId}); + const Cancel({ + required this.multisigAddress, + required this.proposalId, + }); factory Cancel._decode(_i1.Input input) { return Cancel( @@ -371,8 +491,11 @@ class Cancel extends Call { @override Map> toJson() => { - 'cancel': {'multisigAddress': multisigAddress.toList(), 'proposalId': proposalId}, - }; + 'cancel': { + 'multisigAddress': multisigAddress.toList(), + 'proposalId': proposalId, + } + }; int _sizeHint() { int size = 1; @@ -382,18 +505,38 @@ class Cancel extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - _i1.U32Codec.codec.encodeTo(proposalId, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalId, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Cancel && _i4.listsEqual(other.multisigAddress, multisigAddress) && other.proposalId == proposalId; + identical( + this, + other, + ) || + other is Cancel && + _i4.listsEqual( + other.multisigAddress, + multisigAddress, + ) && + other.proposalId == proposalId; @override - int get hashCode => Object.hash(multisigAddress, proposalId); + int get hashCode => Object.hash( + multisigAddress, + proposalId, + ); } /// Remove expired proposals and return deposits to proposers @@ -408,7 +551,10 @@ class Cancel extends Call { /// /// The deposit is always returned to the original proposer, not the caller. class RemoveExpired extends Call { - const RemoveExpired({required this.multisigAddress, required this.proposalId}); + const RemoveExpired({ + required this.multisigAddress, + required this.proposalId, + }); factory RemoveExpired._decode(_i1.Input input) { return RemoveExpired( @@ -425,8 +571,11 @@ class RemoveExpired extends Call { @override Map> toJson() => { - 'remove_expired': {'multisigAddress': multisigAddress.toList(), 'proposalId': proposalId}, - }; + 'remove_expired': { + 'multisigAddress': multisigAddress.toList(), + 'proposalId': proposalId, + } + }; int _sizeHint() { int size = 1; @@ -436,20 +585,38 @@ class RemoveExpired extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - _i1.U32Codec.codec.encodeTo(proposalId, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalId, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is RemoveExpired && - _i4.listsEqual(other.multisigAddress, multisigAddress) && + _i4.listsEqual( + other.multisigAddress, + multisigAddress, + ) && other.proposalId == proposalId; @override - int get hashCode => Object.hash(multisigAddress, proposalId); + int get hashCode => Object.hash( + multisigAddress, + proposalId, + ); } /// Claim all deposits from expired proposals @@ -466,7 +633,8 @@ class ClaimDeposits extends Call { const ClaimDeposits({required this.multisigAddress}); factory ClaimDeposits._decode(_i1.Input input) { - return ClaimDeposits(multisigAddress: const _i1.U8ArrayCodec(32).decode(input)); + return ClaimDeposits( + multisigAddress: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AccountId @@ -474,8 +642,8 @@ class ClaimDeposits extends Call { @override Map>> toJson() => { - 'claim_deposits': {'multisigAddress': multisigAddress.toList()}, - }; + 'claim_deposits': {'multisigAddress': multisigAddress.toList()} + }; int _sizeHint() { int size = 1; @@ -484,13 +652,27 @@ class ClaimDeposits extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is ClaimDeposits && _i4.listsEqual(other.multisigAddress, multisigAddress); + identical( + this, + other, + ) || + other is ClaimDeposits && + _i4.listsEqual( + other.multisigAddress, + multisigAddress, + ); @override int get hashCode => multisigAddress.hashCode; @@ -509,8 +691,15 @@ class ClaimDeposits extends Call { /// Parameters: /// - `multisig_address`: The multisig account /// - `proposal_id`: ID (nonce) of the proposal to execute +/// +/// Note: The weight charged includes both multisig bookkeeping and MaxInnerCallWeight. +/// Actual weight is refunded based on the inner call's post-dispatch info. +/// The inner call's weight is validated against MaxInnerCallWeight at propose time. class Execute extends Call { - const Execute({required this.multisigAddress, required this.proposalId}); + const Execute({ + required this.multisigAddress, + required this.proposalId, + }); factory Execute._decode(_i1.Input input) { return Execute( @@ -527,8 +716,11 @@ class Execute extends Call { @override Map> toJson() => { - 'execute': {'multisigAddress': multisigAddress.toList(), 'proposalId': proposalId}, - }; + 'execute': { + 'multisigAddress': multisigAddress.toList(), + 'proposalId': proposalId, + } + }; int _sizeHint() { int size = 1; @@ -538,63 +730,36 @@ class Execute extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - _i1.U32Codec.codec.encodeTo(proposalId, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Execute && _i4.listsEqual(other.multisigAddress, multisigAddress) && other.proposalId == proposalId; - - @override - int get hashCode => Object.hash(multisigAddress, proposalId); -} - -/// Approve dissolving a multisig account -/// -/// Signers call this to approve dissolving the multisig. -/// When threshold is reached, the multisig is automatically dissolved. -/// -/// Requirements: -/// - Caller must be a signer -/// - No proposals exist (active, executed, or cancelled) - must be fully cleaned up -/// - Multisig account balance must be zero -/// -/// When threshold is reached: -/// - Deposit is returned to creator -/// - Multisig storage is removed -class ApproveDissolve extends Call { - const ApproveDissolve({required this.multisigAddress}); - - factory ApproveDissolve._decode(_i1.Input input) { - return ApproveDissolve(multisigAddress: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 multisigAddress; - - @override - Map>> toJson() => { - 'approve_dissolve': {'multisigAddress': multisigAddress.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(multisigAddress); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalId, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is ApproveDissolve && _i4.listsEqual(other.multisigAddress, multisigAddress); + identical( + this, + other, + ) || + other is Execute && + _i4.listsEqual( + other.multisigAddress, + multisigAddress, + ) && + other.proposalId == proposalId; @override - int get hashCode => multisigAddress.hashCode; + int get hashCode => Object.hash( + multisigAddress, + proposalId, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/error.dart index f9df4998..28a293b1 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/error.dart @@ -6,6 +6,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; /// The `Error` enum of this pallet. enum Error { /// Not enough signers provided + /// Multisig requires at least 2 unique signers notEnoughSigners('NotEnoughSigners', 0), /// Threshold must be greater than zero @@ -17,76 +18,74 @@ enum Error { /// Too many signers tooManySigners('TooManySigners', 3), - /// Duplicate signer in list - duplicateSigner('DuplicateSigner', 4), - /// Multisig already exists - multisigAlreadyExists('MultisigAlreadyExists', 5), + multisigAlreadyExists('MultisigAlreadyExists', 4), /// Multisig not found - multisigNotFound('MultisigNotFound', 6), + multisigNotFound('MultisigNotFound', 5), /// Caller is not a signer of this multisig - notASigner('NotASigner', 7), + notASigner('NotASigner', 6), /// Proposal not found - proposalNotFound('ProposalNotFound', 8), + proposalNotFound('ProposalNotFound', 7), /// Caller is not the proposer - notProposer('NotProposer', 9), + notProposer('NotProposer', 8), /// Already approved by this signer - alreadyApproved('AlreadyApproved', 10), + alreadyApproved('AlreadyApproved', 9), /// Not enough approvals to execute - notEnoughApprovals('NotEnoughApprovals', 11), + notEnoughApprovals('NotEnoughApprovals', 10), /// Proposal expiry is in the past - expiryInPast('ExpiryInPast', 12), + expiryInPast('ExpiryInPast', 11), /// Proposal expiry is too far in the future (exceeds MaxExpiryDuration) - expiryTooFar('ExpiryTooFar', 13), + expiryTooFar('ExpiryTooFar', 12), /// Proposal has expired - proposalExpired('ProposalExpired', 14), - - /// Call data too large - callTooLarge('CallTooLarge', 15), + proposalExpired('ProposalExpired', 13), /// Failed to decode call data - invalidCall('InvalidCall', 16), + invalidCall('InvalidCall', 14), /// Too many total proposals in storage for this multisig (cleanup required) - tooManyProposalsInStorage('TooManyProposalsInStorage', 17), + tooManyProposalsInStorage('TooManyProposalsInStorage', 15), /// This signer has too many proposals in storage (filibuster protection) - tooManyProposalsPerSigner('TooManyProposalsPerSigner', 18), + tooManyProposalsPerSigner('TooManyProposalsPerSigner', 16), /// Insufficient balance for deposit - insufficientBalance('InsufficientBalance', 19), + insufficientBalance('InsufficientBalance', 17), /// Proposal has active deposit - proposalHasDeposit('ProposalHasDeposit', 20), + proposalHasDeposit('ProposalHasDeposit', 18), /// Proposal has not expired yet - proposalNotExpired('ProposalNotExpired', 21), + proposalNotExpired('ProposalNotExpired', 19), - /// Proposal is not active (already executed or cancelled) - proposalNotActive('ProposalNotActive', 22), + /// Proposal is not in a cancellable state (must be Active or Approved) + proposalNotActive('ProposalNotActive', 20), /// Proposal has not been approved yet (threshold not reached) - proposalNotApproved('ProposalNotApproved', 23), + proposalNotApproved('ProposalNotApproved', 21), - /// Cannot dissolve multisig with existing proposals (clear them first) - proposalsExist('ProposalsExist', 24), + /// Call is not allowed for high-security multisig + callNotAllowedForHighSecurityMultisig( + 'CallNotAllowedForHighSecurityMultisig', 22), - /// Multisig account must have zero balance before dissolution - multisigAccountNotZero('MultisigAccountNotZero', 25), + /// Proposal nonce exhausted (u32::MAX reached) + proposalNonceExhausted('ProposalNonceExhausted', 23), - /// Call is not allowed for high-security multisig - callNotAllowedForHighSecurityMultisig('CallNotAllowedForHighSecurityMultisig', 26); + /// Call weight exceeds MaxInnerCallWeight limit + callWeightExceedsLimit('CallWeightExceedsLimit', 24); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -121,58 +120,60 @@ class $ErrorCodec with _i1.Codec { case 3: return Error.tooManySigners; case 4: - return Error.duplicateSigner; - case 5: return Error.multisigAlreadyExists; - case 6: + case 5: return Error.multisigNotFound; - case 7: + case 6: return Error.notASigner; - case 8: + case 7: return Error.proposalNotFound; - case 9: + case 8: return Error.notProposer; - case 10: + case 9: return Error.alreadyApproved; - case 11: + case 10: return Error.notEnoughApprovals; - case 12: + case 11: return Error.expiryInPast; - case 13: + case 12: return Error.expiryTooFar; - case 14: + case 13: return Error.proposalExpired; + case 14: + return Error.invalidCall; case 15: - return Error.callTooLarge; + return Error.tooManyProposalsInStorage; case 16: - return Error.invalidCall; + return Error.tooManyProposalsPerSigner; case 17: - return Error.tooManyProposalsInStorage; + return Error.insufficientBalance; case 18: - return Error.tooManyProposalsPerSigner; + return Error.proposalHasDeposit; case 19: - return Error.insufficientBalance; + return Error.proposalNotExpired; case 20: - return Error.proposalHasDeposit; + return Error.proposalNotActive; case 21: - return Error.proposalNotExpired; + return Error.proposalNotApproved; case 22: - return Error.proposalNotActive; + return Error.callNotAllowedForHighSecurityMultisig; case 23: - return Error.proposalNotApproved; + return Error.proposalNonceExhausted; case 24: - return Error.proposalsExist; - case 25: - return Error.multisigAccountNotZero; - case 26: - return Error.callNotAllowedForHighSecurityMultisig; + return Error.callWeightExceedsLimit; default: throw Exception('Error: Invalid variant index: "$index"'); } } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/event.dart index a791a3ea..1d3b92fc 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/event.dart @@ -56,16 +56,20 @@ class $Event { required _i3.AccountId32 proposer, required int proposalId, }) { - return ProposalCreated(multisigAddress: multisigAddress, proposer: proposer, proposalId: proposalId); + return ProposalCreated( + multisigAddress: multisigAddress, + proposer: proposer, + proposalId: proposalId, + ); } - ProposalApproved proposalApproved({ + SignerApproved signerApproved({ required _i3.AccountId32 multisigAddress, required _i3.AccountId32 approver, required int proposalId, required int approvalsCount, }) { - return ProposalApproved( + return SignerApproved( multisigAddress: multisigAddress, approver: approver, proposalId: proposalId, @@ -108,7 +112,11 @@ class $Event { required _i3.AccountId32 proposer, required int proposalId, }) { - return ProposalCancelled(multisigAddress: multisigAddress, proposer: proposer, proposalId: proposalId); + return ProposalCancelled( + multisigAddress: multisigAddress, + proposer: proposer, + proposalId: proposalId, + ); } ProposalRemoved proposalRemoved({ @@ -130,32 +138,14 @@ class $Event { required _i3.AccountId32 claimer, required BigInt totalReturned, required int proposalsRemoved, - required bool multisigRemoved, }) { return DepositsClaimed( multisigAddress: multisigAddress, claimer: claimer, totalReturned: totalReturned, proposalsRemoved: proposalsRemoved, - multisigRemoved: multisigRemoved, ); } - - DissolveApproved dissolveApproved({ - required _i3.AccountId32 multisigAddress, - required _i3.AccountId32 approver, - required int approvalsCount, - }) { - return DissolveApproved(multisigAddress: multisigAddress, approver: approver, approvalsCount: approvalsCount); - } - - MultisigDissolved multisigDissolved({ - required _i3.AccountId32 multisigAddress, - required _i3.AccountId32 depositReturned, - required List<_i3.AccountId32> approvers, - }) { - return MultisigDissolved(multisigAddress: multisigAddress, depositReturned: depositReturned, approvers: approvers); - } } class $EventCodec with _i1.Codec { @@ -170,7 +160,7 @@ class $EventCodec with _i1.Codec { case 1: return ProposalCreated._decode(input); case 2: - return ProposalApproved._decode(input); + return SignerApproved._decode(input); case 3: return ProposalReadyToExecute._decode(input); case 4: @@ -181,17 +171,16 @@ class $EventCodec with _i1.Codec { return ProposalRemoved._decode(input); case 7: return DepositsClaimed._decode(input); - case 8: - return DissolveApproved._decode(input); - case 9: - return MultisigDissolved._decode(input); default: throw Exception('Event: Invalid variant index: "$index"'); } } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case MultisigCreated: (value as MultisigCreated).encodeTo(output); @@ -199,8 +188,8 @@ class $EventCodec with _i1.Codec { case ProposalCreated: (value as ProposalCreated).encodeTo(output); break; - case ProposalApproved: - (value as ProposalApproved).encodeTo(output); + case SignerApproved: + (value as SignerApproved).encodeTo(output); break; case ProposalReadyToExecute: (value as ProposalReadyToExecute).encodeTo(output); @@ -217,14 +206,9 @@ class $EventCodec with _i1.Codec { case DepositsClaimed: (value as DepositsClaimed).encodeTo(output); break; - case DissolveApproved: - (value as DissolveApproved).encodeTo(output); - break; - case MultisigDissolved: - (value as MultisigDissolved).encodeTo(output); - break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -235,8 +219,8 @@ class $EventCodec with _i1.Codec { return (value as MultisigCreated)._sizeHint(); case ProposalCreated: return (value as ProposalCreated)._sizeHint(); - case ProposalApproved: - return (value as ProposalApproved)._sizeHint(); + case SignerApproved: + return (value as SignerApproved)._sizeHint(); case ProposalReadyToExecute: return (value as ProposalReadyToExecute)._sizeHint(); case ProposalExecuted: @@ -247,12 +231,9 @@ class $EventCodec with _i1.Codec { return (value as ProposalRemoved)._sizeHint(); case DepositsClaimed: return (value as DepositsClaimed)._sizeHint(); - case DissolveApproved: - return (value as DissolveApproved)._sizeHint(); - case MultisigDissolved: - return (value as MultisigDissolved)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -272,7 +253,8 @@ class MultisigCreated extends Event { return MultisigCreated( creator: const _i1.U8ArrayCodec(32).decode(input), multisigAddress: const _i1.U8ArrayCodec(32).decode(input), - signers: const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).decode(input), + signers: const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) + .decode(input), threshold: _i1.U32Codec.codec.decode(input), nonce: _i1.U64Codec.codec.decode(input), ); @@ -295,51 +277,93 @@ class MultisigCreated extends Event { @override Map> toJson() => { - 'MultisigCreated': { - 'creator': creator.toList(), - 'multisigAddress': multisigAddress.toList(), - 'signers': signers.map((value) => value.toList()).toList(), - 'threshold': threshold, - 'nonce': nonce, - }, - }; + 'MultisigCreated': { + 'creator': creator.toList(), + 'multisigAddress': multisigAddress.toList(), + 'signers': signers.map((value) => value.toList()).toList(), + 'threshold': threshold, + 'nonce': nonce, + } + }; int _sizeHint() { int size = 1; size = size + const _i3.AccountId32Codec().sizeHint(creator); size = size + const _i3.AccountId32Codec().sizeHint(multisigAddress); - size = size + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).sizeHint(signers); + size = size + + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) + .sizeHint(signers); size = size + _i1.U32Codec.codec.sizeHint(threshold); size = size + _i1.U64Codec.codec.sizeHint(nonce); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(creator, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo(signers, output); - _i1.U32Codec.codec.encodeTo(threshold, output); - _i1.U64Codec.codec.encodeTo(nonce, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + creator, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo( + signers, + output, + ); + _i1.U32Codec.codec.encodeTo( + threshold, + output, + ); + _i1.U64Codec.codec.encodeTo( + nonce, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is MultisigCreated && - _i5.listsEqual(other.creator, creator) && - _i5.listsEqual(other.multisigAddress, multisigAddress) && - _i5.listsEqual(other.signers, signers) && + _i5.listsEqual( + other.creator, + creator, + ) && + _i5.listsEqual( + other.multisigAddress, + multisigAddress, + ) && + _i5.listsEqual( + other.signers, + signers, + ) && other.threshold == threshold && other.nonce == nonce; @override - int get hashCode => Object.hash(creator, multisigAddress, signers, threshold, nonce); + int get hashCode => Object.hash( + creator, + multisigAddress, + signers, + threshold, + nonce, + ); } /// A proposal has been created class ProposalCreated extends Event { - const ProposalCreated({required this.multisigAddress, required this.proposer, required this.proposalId}); + const ProposalCreated({ + required this.multisigAddress, + required this.proposer, + required this.proposalId, + }); factory ProposalCreated._decode(_i1.Input input) { return ProposalCreated( @@ -360,12 +384,12 @@ class ProposalCreated extends Event { @override Map> toJson() => { - 'ProposalCreated': { - 'multisigAddress': multisigAddress.toList(), - 'proposer': proposer.toList(), - 'proposalId': proposalId, - }, - }; + 'ProposalCreated': { + 'multisigAddress': multisigAddress.toList(), + 'proposer': proposer.toList(), + 'proposalId': proposalId, + } + }; int _sizeHint() { int size = 1; @@ -376,35 +400,60 @@ class ProposalCreated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - const _i1.U8ArrayCodec(32).encodeTo(proposer, output); - _i1.U32Codec.codec.encodeTo(proposalId, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + proposer, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalId, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ProposalCreated && - _i5.listsEqual(other.multisigAddress, multisigAddress) && - _i5.listsEqual(other.proposer, proposer) && + _i5.listsEqual( + other.multisigAddress, + multisigAddress, + ) && + _i5.listsEqual( + other.proposer, + proposer, + ) && other.proposalId == proposalId; @override - int get hashCode => Object.hash(multisigAddress, proposer, proposalId); + int get hashCode => Object.hash( + multisigAddress, + proposer, + proposalId, + ); } -/// A proposal has been approved by a signer -class ProposalApproved extends Event { - const ProposalApproved({ +/// A signer has approved a proposal (does not imply threshold reached) +class SignerApproved extends Event { + const SignerApproved({ required this.multisigAddress, required this.approver, required this.proposalId, required this.approvalsCount, }); - factory ProposalApproved._decode(_i1.Input input) { - return ProposalApproved( + factory SignerApproved._decode(_i1.Input input) { + return SignerApproved( multisigAddress: const _i1.U8ArrayCodec(32).decode(input), approver: const _i1.U8ArrayCodec(32).decode(input), proposalId: _i1.U32Codec.codec.decode(input), @@ -426,13 +475,13 @@ class ProposalApproved extends Event { @override Map> toJson() => { - 'ProposalApproved': { - 'multisigAddress': multisigAddress.toList(), - 'approver': approver.toList(), - 'proposalId': proposalId, - 'approvalsCount': approvalsCount, - }, - }; + 'SignerApproved': { + 'multisigAddress': multisigAddress.toList(), + 'approver': approver.toList(), + 'proposalId': proposalId, + 'approvalsCount': approvalsCount, + } + }; int _sizeHint() { int size = 1; @@ -444,29 +493,62 @@ class ProposalApproved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - const _i1.U8ArrayCodec(32).encodeTo(approver, output); - _i1.U32Codec.codec.encodeTo(proposalId, output); - _i1.U32Codec.codec.encodeTo(approvalsCount, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + approver, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalId, + output, + ); + _i1.U32Codec.codec.encodeTo( + approvalsCount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ProposalApproved && - _i5.listsEqual(other.multisigAddress, multisigAddress) && - _i5.listsEqual(other.approver, approver) && + identical( + this, + other, + ) || + other is SignerApproved && + _i5.listsEqual( + other.multisigAddress, + multisigAddress, + ) && + _i5.listsEqual( + other.approver, + approver, + ) && other.proposalId == proposalId && other.approvalsCount == approvalsCount; @override - int get hashCode => Object.hash(multisigAddress, approver, proposalId, approvalsCount); + int get hashCode => Object.hash( + multisigAddress, + approver, + proposalId, + approvalsCount, + ); } /// A proposal has reached threshold and is ready to execute class ProposalReadyToExecute extends Event { - const ProposalReadyToExecute({required this.multisigAddress, required this.proposalId, required this.approvalsCount}); + const ProposalReadyToExecute({ + required this.multisigAddress, + required this.proposalId, + required this.approvalsCount, + }); factory ProposalReadyToExecute._decode(_i1.Input input) { return ProposalReadyToExecute( @@ -487,12 +569,12 @@ class ProposalReadyToExecute extends Event { @override Map> toJson() => { - 'ProposalReadyToExecute': { - 'multisigAddress': multisigAddress.toList(), - 'proposalId': proposalId, - 'approvalsCount': approvalsCount, - }, - }; + 'ProposalReadyToExecute': { + 'multisigAddress': multisigAddress.toList(), + 'proposalId': proposalId, + 'approvalsCount': approvalsCount, + } + }; int _sizeHint() { int size = 1; @@ -503,22 +585,44 @@ class ProposalReadyToExecute extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - _i1.U32Codec.codec.encodeTo(proposalId, output); - _i1.U32Codec.codec.encodeTo(approvalsCount, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalId, + output, + ); + _i1.U32Codec.codec.encodeTo( + approvalsCount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ProposalReadyToExecute && - _i5.listsEqual(other.multisigAddress, multisigAddress) && + _i5.listsEqual( + other.multisigAddress, + multisigAddress, + ) && other.proposalId == proposalId && other.approvalsCount == approvalsCount; @override - int get hashCode => Object.hash(multisigAddress, proposalId, approvalsCount); + int get hashCode => Object.hash( + multisigAddress, + proposalId, + approvalsCount, + ); } /// A proposal has been executed @@ -539,7 +643,9 @@ class ProposalExecuted extends Event { proposalId: _i1.U32Codec.codec.decode(input), proposer: const _i1.U8ArrayCodec(32).decode(input), call: _i1.U8SequenceCodec.codec.decode(input), - approvers: const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).decode(input), + approvers: + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) + .decode(input), result: const _i1.ResultCodec( _i1.NullCodec.codec, _i4.DispatchError.codec, @@ -567,15 +673,15 @@ class ProposalExecuted extends Event { @override Map> toJson() => { - 'ProposalExecuted': { - 'multisigAddress': multisigAddress.toList(), - 'proposalId': proposalId, - 'proposer': proposer.toList(), - 'call': call, - 'approvers': approvers.map((value) => value.toList()).toList(), - 'result': result.toJson(), - }, - }; + 'ProposalExecuted': { + 'multisigAddress': multisigAddress.toList(), + 'proposalId': proposalId, + 'proposer': proposer.toList(), + 'call': call, + 'approvers': approvers.map((value) => value.toList()).toList(), + 'result': result.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -583,9 +689,10 @@ class ProposalExecuted extends Event { size = size + _i1.U32Codec.codec.sizeHint(proposalId); size = size + const _i3.AccountId32Codec().sizeHint(proposer); size = size + _i1.U8SequenceCodec.codec.sizeHint(call); - size = size + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).sizeHint(approvers); - size = - size + + size = size + + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) + .sizeHint(approvers); + size = size + const _i1.ResultCodec( _i1.NullCodec.codec, _i4.DispatchError.codec, @@ -594,36 +701,83 @@ class ProposalExecuted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - _i1.U32Codec.codec.encodeTo(proposalId, output); - const _i1.U8ArrayCodec(32).encodeTo(proposer, output); - _i1.U8SequenceCodec.codec.encodeTo(call, output); - const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo(approvers, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + proposer, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + call, + output, + ); + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo( + approvers, + output, + ); const _i1.ResultCodec( _i1.NullCodec.codec, _i4.DispatchError.codec, - ).encodeTo(result, output); + ).encodeTo( + result, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ProposalExecuted && - _i5.listsEqual(other.multisigAddress, multisigAddress) && + _i5.listsEqual( + other.multisigAddress, + multisigAddress, + ) && other.proposalId == proposalId && - _i5.listsEqual(other.proposer, proposer) && - _i5.listsEqual(other.call, call) && - _i5.listsEqual(other.approvers, approvers) && + _i5.listsEqual( + other.proposer, + proposer, + ) && + _i5.listsEqual( + other.call, + call, + ) && + _i5.listsEqual( + other.approvers, + approvers, + ) && other.result == result; @override - int get hashCode => Object.hash(multisigAddress, proposalId, proposer, call, approvers, result); + int get hashCode => Object.hash( + multisigAddress, + proposalId, + proposer, + call, + approvers, + result, + ); } /// A proposal has been cancelled by the proposer class ProposalCancelled extends Event { - const ProposalCancelled({required this.multisigAddress, required this.proposer, required this.proposalId}); + const ProposalCancelled({ + required this.multisigAddress, + required this.proposer, + required this.proposalId, + }); factory ProposalCancelled._decode(_i1.Input input) { return ProposalCancelled( @@ -644,12 +798,12 @@ class ProposalCancelled extends Event { @override Map> toJson() => { - 'ProposalCancelled': { - 'multisigAddress': multisigAddress.toList(), - 'proposer': proposer.toList(), - 'proposalId': proposalId, - }, - }; + 'ProposalCancelled': { + 'multisigAddress': multisigAddress.toList(), + 'proposer': proposer.toList(), + 'proposalId': proposalId, + } + }; int _sizeHint() { int size = 1; @@ -660,22 +814,47 @@ class ProposalCancelled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - const _i1.U8ArrayCodec(32).encodeTo(proposer, output); - _i1.U32Codec.codec.encodeTo(proposalId, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + proposer, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalId, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ProposalCancelled && - _i5.listsEqual(other.multisigAddress, multisigAddress) && - _i5.listsEqual(other.proposer, proposer) && + _i5.listsEqual( + other.multisigAddress, + multisigAddress, + ) && + _i5.listsEqual( + other.proposer, + proposer, + ) && other.proposalId == proposalId; @override - int get hashCode => Object.hash(multisigAddress, proposer, proposalId); + int get hashCode => Object.hash( + multisigAddress, + proposer, + proposalId, + ); } /// Expired proposal was removed from storage @@ -710,13 +889,13 @@ class ProposalRemoved extends Event { @override Map> toJson() => { - 'ProposalRemoved': { - 'multisigAddress': multisigAddress.toList(), - 'proposalId': proposalId, - 'proposer': proposer.toList(), - 'removedBy': removedBy.toList(), - }, - }; + 'ProposalRemoved': { + 'multisigAddress': multisigAddress.toList(), + 'proposalId': proposalId, + 'proposer': proposer.toList(), + 'removedBy': removedBy.toList(), + } + }; int _sizeHint() { int size = 1; @@ -728,24 +907,56 @@ class ProposalRemoved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - _i1.U32Codec.codec.encodeTo(proposalId, output); - const _i1.U8ArrayCodec(32).encodeTo(proposer, output); - const _i1.U8ArrayCodec(32).encodeTo(removedBy, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + proposer, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + removedBy, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ProposalRemoved && - _i5.listsEqual(other.multisigAddress, multisigAddress) && + _i5.listsEqual( + other.multisigAddress, + multisigAddress, + ) && other.proposalId == proposalId && - _i5.listsEqual(other.proposer, proposer) && - _i5.listsEqual(other.removedBy, removedBy); + _i5.listsEqual( + other.proposer, + proposer, + ) && + _i5.listsEqual( + other.removedBy, + removedBy, + ); @override - int get hashCode => Object.hash(multisigAddress, proposalId, proposer, removedBy); + int get hashCode => Object.hash( + multisigAddress, + proposalId, + proposer, + removedBy, + ); } /// Batch deposits claimed @@ -755,7 +966,6 @@ class DepositsClaimed extends Event { required this.claimer, required this.totalReturned, required this.proposalsRemoved, - required this.multisigRemoved, }); factory DepositsClaimed._decode(_i1.Input input) { @@ -764,7 +974,6 @@ class DepositsClaimed extends Event { claimer: const _i1.U8ArrayCodec(32).decode(input), totalReturned: _i1.U128Codec.codec.decode(input), proposalsRemoved: _i1.U32Codec.codec.decode(input), - multisigRemoved: _i1.BoolCodec.codec.decode(input), ); } @@ -780,19 +989,15 @@ class DepositsClaimed extends Event { /// u32 final int proposalsRemoved; - /// bool - final bool multisigRemoved; - @override Map> toJson() => { - 'DepositsClaimed': { - 'multisigAddress': multisigAddress.toList(), - 'claimer': claimer.toList(), - 'totalReturned': totalReturned, - 'proposalsRemoved': proposalsRemoved, - 'multisigRemoved': multisigRemoved, - }, - }; + 'DepositsClaimed': { + 'multisigAddress': multisigAddress.toList(), + 'claimer': claimer.toList(), + 'totalReturned': totalReturned, + 'proposalsRemoved': proposalsRemoved, + } + }; int _sizeHint() { int size = 1; @@ -800,143 +1005,55 @@ class DepositsClaimed extends Event { size = size + const _i3.AccountId32Codec().sizeHint(claimer); size = size + _i1.U128Codec.codec.sizeHint(totalReturned); size = size + _i1.U32Codec.codec.sizeHint(proposalsRemoved); - size = size + _i1.BoolCodec.codec.sizeHint(multisigRemoved); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - const _i1.U8ArrayCodec(32).encodeTo(claimer, output); - _i1.U128Codec.codec.encodeTo(totalReturned, output); - _i1.U32Codec.codec.encodeTo(proposalsRemoved, output); - _i1.BoolCodec.codec.encodeTo(multisigRemoved, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is DepositsClaimed && - _i5.listsEqual(other.multisigAddress, multisigAddress) && - _i5.listsEqual(other.claimer, claimer) && - other.totalReturned == totalReturned && - other.proposalsRemoved == proposalsRemoved && - other.multisigRemoved == multisigRemoved; - - @override - int get hashCode => Object.hash(multisigAddress, claimer, totalReturned, proposalsRemoved, multisigRemoved); -} - -/// A signer approved dissolving the multisig -class DissolveApproved extends Event { - const DissolveApproved({required this.multisigAddress, required this.approver, required this.approvalsCount}); - - factory DissolveApproved._decode(_i1.Input input) { - return DissolveApproved( - multisigAddress: const _i1.U8ArrayCodec(32).decode(input), - approver: const _i1.U8ArrayCodec(32).decode(input), - approvalsCount: _i1.U32Codec.codec.decode(input), + _i1.U8Codec.codec.encodeTo( + 7, + output, ); - } - - /// T::AccountId - final _i3.AccountId32 multisigAddress; - - /// T::AccountId - final _i3.AccountId32 approver; - - /// u32 - final int approvalsCount; - - @override - Map> toJson() => { - 'DissolveApproved': { - 'multisigAddress': multisigAddress.toList(), - 'approver': approver.toList(), - 'approvalsCount': approvalsCount, - }, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(multisigAddress); - size = size + const _i3.AccountId32Codec().sizeHint(approver); - size = size + _i1.U32Codec.codec.sizeHint(approvalsCount); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - const _i1.U8ArrayCodec(32).encodeTo(approver, output); - _i1.U32Codec.codec.encodeTo(approvalsCount, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is DissolveApproved && - _i5.listsEqual(other.multisigAddress, multisigAddress) && - _i5.listsEqual(other.approver, approver) && - other.approvalsCount == approvalsCount; - - @override - int get hashCode => Object.hash(multisigAddress, approver, approvalsCount); -} - -/// A multisig account was dissolved (threshold reached) -class MultisigDissolved extends Event { - const MultisigDissolved({required this.multisigAddress, required this.depositReturned, required this.approvers}); - - factory MultisigDissolved._decode(_i1.Input input) { - return MultisigDissolved( - multisigAddress: const _i1.U8ArrayCodec(32).decode(input), - depositReturned: const _i1.U8ArrayCodec(32).decode(input), - approvers: const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).decode(input), + const _i1.U8ArrayCodec(32).encodeTo( + multisigAddress, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + claimer, + output, + ); + _i1.U128Codec.codec.encodeTo( + totalReturned, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalsRemoved, + output, ); - } - - /// T::AccountId - final _i3.AccountId32 multisigAddress; - - /// T::AccountId - final _i3.AccountId32 depositReturned; - - /// Vec - final List<_i3.AccountId32> approvers; - - @override - Map>> toJson() => { - 'MultisigDissolved': { - 'multisigAddress': multisigAddress.toList(), - 'depositReturned': depositReturned.toList(), - 'approvers': approvers.map((value) => value.toList()).toList(), - }, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(multisigAddress); - size = size + const _i3.AccountId32Codec().sizeHint(depositReturned); - size = size + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).sizeHint(approvers); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); - const _i1.U8ArrayCodec(32).encodeTo(depositReturned, output); - const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo(approvers, output); } @override bool operator ==(Object other) => - identical(this, other) || - other is MultisigDissolved && - _i5.listsEqual(other.multisigAddress, multisigAddress) && - _i5.listsEqual(other.depositReturned, depositReturned) && - _i5.listsEqual(other.approvers, approvers); + identical( + this, + other, + ) || + other is DepositsClaimed && + _i5.listsEqual( + other.multisigAddress, + multisigAddress, + ) && + _i5.listsEqual( + other.claimer, + claimer, + ) && + other.totalReturned == totalReturned && + other.proposalsRemoved == proposalsRemoved; @override - int get hashCode => Object.hash(multisigAddress, depositReturned, approvers); + int get hashCode => Object.hash( + multisigAddress, + claimer, + totalReturned, + proposalsRemoved, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_data.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_data.dart index 13274bad..55ac362d 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_data.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_data.dart @@ -1,16 +1,18 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i4; +import 'dart:typed_data' as _i5; import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; +import 'package:quiver/collection.dart' as _i6; import '../sp_core/crypto/account_id32.dart' as _i2; -import 'proposal_status.dart' as _i3; +import '../sp_weights/weight_v2/weight.dart' as _i3; +import 'proposal_status.dart' as _i4; class ProposalData { const ProposalData({ required this.proposer, required this.call, + required this.callWeight, required this.expiry, required this.approvals, required this.deposit, @@ -27,6 +29,9 @@ class ProposalData { /// BoundedCall final List call; + /// Weight + final _i3.Weight callWeight; + /// BlockNumber final int expiry; @@ -37,49 +42,96 @@ class ProposalData { final BigInt deposit; /// ProposalStatus - final _i3.ProposalStatus status; + final _i4.ProposalStatus status; static const $ProposalDataCodec codec = $ProposalDataCodec(); - _i4.Uint8List encode() { + _i5.Uint8List encode() { return codec.encode(this); } Map toJson() => { - 'proposer': proposer.toList(), - 'call': call, - 'expiry': expiry, - 'approvals': approvals.map((value) => value.toList()).toList(), - 'deposit': deposit, - 'status': status.toJson(), - }; + 'proposer': proposer.toList(), + 'call': call, + 'callWeight': callWeight.toJson(), + 'expiry': expiry, + 'approvals': approvals.map((value) => value.toList()).toList(), + 'deposit': deposit, + 'status': status.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ProposalData && - _i5.listsEqual(other.proposer, proposer) && - _i5.listsEqual(other.call, call) && + _i6.listsEqual( + other.proposer, + proposer, + ) && + _i6.listsEqual( + other.call, + call, + ) && + other.callWeight == callWeight && other.expiry == expiry && - _i5.listsEqual(other.approvals, approvals) && + _i6.listsEqual( + other.approvals, + approvals, + ) && other.deposit == deposit && other.status == status; @override - int get hashCode => Object.hash(proposer, call, expiry, approvals, deposit, status); + int get hashCode => Object.hash( + proposer, + call, + callWeight, + expiry, + approvals, + deposit, + status, + ); } class $ProposalDataCodec with _i1.Codec { const $ProposalDataCodec(); @override - void encodeTo(ProposalData obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.proposer, output); - _i1.U8SequenceCodec.codec.encodeTo(obj.call, output); - _i1.U32Codec.codec.encodeTo(obj.expiry, output); - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo(obj.approvals, output); - _i1.U128Codec.codec.encodeTo(obj.deposit, output); - _i3.ProposalStatus.codec.encodeTo(obj.status, output); + void encodeTo( + ProposalData obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + obj.proposer, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + obj.call, + output, + ); + _i3.Weight.codec.encodeTo( + obj.callWeight, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.expiry, + output, + ); + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo( + obj.approvals, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.deposit, + output, + ); + _i4.ProposalStatus.codec.encodeTo( + obj.status, + output, + ); } @override @@ -87,10 +139,13 @@ class $ProposalDataCodec with _i1.Codec { return ProposalData( proposer: const _i1.U8ArrayCodec(32).decode(input), call: _i1.U8SequenceCodec.codec.decode(input), + callWeight: _i3.Weight.codec.decode(input), expiry: _i1.U32Codec.codec.decode(input), - approvals: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).decode(input), + approvals: + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) + .decode(input), deposit: _i1.U128Codec.codec.decode(input), - status: _i3.ProposalStatus.codec.decode(input), + status: _i4.ProposalStatus.codec.decode(input), ); } @@ -99,10 +154,13 @@ class $ProposalDataCodec with _i1.Codec { int size = 0; size = size + const _i2.AccountId32Codec().sizeHint(obj.proposer); size = size + _i1.U8SequenceCodec.codec.sizeHint(obj.call); + size = size + _i3.Weight.codec.sizeHint(obj.callWeight); size = size + _i1.U32Codec.codec.sizeHint(obj.expiry); - size = size + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).sizeHint(obj.approvals); + size = size + + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) + .sizeHint(obj.approvals); size = size + _i1.U128Codec.codec.sizeHint(obj.deposit); - size = size + _i3.ProposalStatus.codec.sizeHint(obj.status); + size = size + _i4.ProposalStatus.codec.sizeHint(obj.status); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_status.dart index 53c02569..cf8700b7 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_status.dart @@ -5,11 +5,12 @@ import 'package:polkadart/scale_codec.dart' as _i1; enum ProposalStatus { active('Active', 0), - approved('Approved', 1), - executed('Executed', 2), - cancelled('Cancelled', 3); + approved('Approved', 1); - const ProposalStatus(this.variantName, this.codecIndex); + const ProposalStatus( + this.variantName, + this.codecIndex, + ); factory ProposalStatus.decode(_i1.Input input) { return codec.decode(input); @@ -39,17 +40,19 @@ class $ProposalStatusCodec with _i1.Codec { return ProposalStatus.active; case 1: return ProposalStatus.approved; - case 2: - return ProposalStatus.executed; - case 3: - return ProposalStatus.cancelled; default: throw Exception('ProposalStatus: Invalid variant index: "$index"'); } } @override - void encodeTo(ProposalStatus value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + ProposalStatus value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/old_request_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/old_request_status.dart index 69303e64..89471be7 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/old_request_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/old_request_status.dart @@ -33,12 +33,26 @@ abstract class OldRequestStatus { class $OldRequestStatus { const $OldRequestStatus(); - Unrequested unrequested({required _i3.Tuple2<_i4.AccountId32, BigInt> deposit, required int len}) { - return Unrequested(deposit: deposit, len: len); + Unrequested unrequested({ + required _i3.Tuple2<_i4.AccountId32, BigInt> deposit, + required int len, + }) { + return Unrequested( + deposit: deposit, + len: len, + ); } - Requested requested({_i3.Tuple2<_i4.AccountId32, BigInt>? deposit, required int count, int? len}) { - return Requested(deposit: deposit, count: count, len: len); + Requested requested({ + _i3.Tuple2<_i4.AccountId32, BigInt>? deposit, + required int count, + int? len, + }) { + return Requested( + deposit: deposit, + count: count, + len: len, + ); } } @@ -59,7 +73,10 @@ class $OldRequestStatusCodec with _i1.Codec { } @override - void encodeTo(OldRequestStatus value, _i1.Output output) { + void encodeTo( + OldRequestStatus value, + _i1.Output output, + ) { switch (value.runtimeType) { case Unrequested: (value as Unrequested).encodeTo(output); @@ -68,7 +85,8 @@ class $OldRequestStatusCodec with _i1.Codec { (value as Requested).encodeTo(output); break; default: - throw Exception('OldRequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'OldRequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -80,13 +98,17 @@ class $OldRequestStatusCodec with _i1.Codec { case Requested: return (value as Requested)._sizeHint(); default: - throw Exception('OldRequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'OldRequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); } } } class Unrequested extends OldRequestStatus { - const Unrequested({required this.deposit, required this.len}); + const Unrequested({ + required this.deposit, + required this.len, + }); factory Unrequested._decode(_i1.Input input) { return Unrequested( @@ -106,46 +128,73 @@ class Unrequested extends OldRequestStatus { @override Map> toJson() => { - 'Unrequested': { - 'deposit': [deposit.value0.toList(), deposit.value1], - 'len': len, - }, - }; + 'Unrequested': { + 'deposit': [ + deposit.value0.toList(), + deposit.value1, + ], + 'len': len, + } + }; int _sizeHint() { int size = 1; - size = - size + - const _i3.Tuple2Codec<_i4.AccountId32, BigInt>(_i4.AccountId32Codec(), _i1.U128Codec.codec).sizeHint(deposit); + size = size + + const _i3.Tuple2Codec<_i4.AccountId32, BigInt>( + _i4.AccountId32Codec(), + _i1.U128Codec.codec, + ).sizeHint(deposit); size = size + _i1.U32Codec.codec.sizeHint(len); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); const _i3.Tuple2Codec<_i4.AccountId32, BigInt>( _i4.AccountId32Codec(), _i1.U128Codec.codec, - ).encodeTo(deposit, output); - _i1.U32Codec.codec.encodeTo(len, output); + ).encodeTo( + deposit, + output, + ); + _i1.U32Codec.codec.encodeTo( + len, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Unrequested && other.deposit == deposit && other.len == len; + identical( + this, + other, + ) || + other is Unrequested && other.deposit == deposit && other.len == len; @override - int get hashCode => Object.hash(deposit, len); + int get hashCode => Object.hash( + deposit, + len, + ); } class Requested extends OldRequestStatus { - const Requested({this.deposit, required this.count, this.len}); + const Requested({ + this.deposit, + required this.count, + this.len, + }); factory Requested._decode(_i1.Input input) { return Requested( deposit: const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, BigInt>>( - _i3.Tuple2Codec<_i4.AccountId32, BigInt>(_i4.AccountId32Codec(), _i1.U128Codec.codec), - ).decode(input), + _i3.Tuple2Codec<_i4.AccountId32, BigInt>( + _i4.AccountId32Codec(), + _i1.U128Codec.codec, + )).decode(input), count: _i1.U32Codec.codec.decode(input), len: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), ); @@ -162,39 +211,67 @@ class Requested extends OldRequestStatus { @override Map> toJson() => { - 'Requested': { - 'deposit': [deposit?.value0.toList(), deposit?.value1], - 'count': count, - 'len': len, - }, - }; + 'Requested': { + 'deposit': [ + deposit?.value0.toList(), + deposit?.value1, + ], + 'count': count, + 'len': len, + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, BigInt>>( - _i3.Tuple2Codec<_i4.AccountId32, BigInt>(_i4.AccountId32Codec(), _i1.U128Codec.codec), - ).sizeHint(deposit); + _i3.Tuple2Codec<_i4.AccountId32, BigInt>( + _i4.AccountId32Codec(), + _i1.U128Codec.codec, + )).sizeHint(deposit); size = size + _i1.U32Codec.codec.sizeHint(count); size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(len); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, BigInt>>( - _i3.Tuple2Codec<_i4.AccountId32, BigInt>(_i4.AccountId32Codec(), _i1.U128Codec.codec), - ).encodeTo(deposit, output); - _i1.U32Codec.codec.encodeTo(count, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(len, output); + _i3.Tuple2Codec<_i4.AccountId32, BigInt>( + _i4.AccountId32Codec(), + _i1.U128Codec.codec, + )).encodeTo( + deposit, + output, + ); + _i1.U32Codec.codec.encodeTo( + count, + output, + ); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( + len, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Requested && other.deposit == deposit && other.count == count && other.len == len; + identical( + this, + other, + ) || + other is Requested && + other.deposit == deposit && + other.count == count && + other.len == len; @override - int get hashCode => Object.hash(deposit, count, len); + int get hashCode => Object.hash( + deposit, + count, + len, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/call.dart index 246d31d2..8a69a1dd 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/call.dart @@ -78,7 +78,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case NotePreimage: (value as NotePreimage).encodeTo(output); @@ -96,7 +99,8 @@ class $CallCodec with _i1.Codec { (value as EnsureUpdated).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -114,7 +118,8 @@ class $CallCodec with _i1.Codec { case EnsureUpdated: return (value as EnsureUpdated)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -135,8 +140,8 @@ class NotePreimage extends Call { @override Map>> toJson() => { - 'note_preimage': {'bytes': bytes}, - }; + 'note_preimage': {'bytes': bytes} + }; int _sizeHint() { int size = 1; @@ -145,13 +150,27 @@ class NotePreimage extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U8SequenceCodec.codec.encodeTo(bytes, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + bytes, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is NotePreimage && _i4.listsEqual(other.bytes, bytes); + identical( + this, + other, + ) || + other is NotePreimage && + _i4.listsEqual( + other.bytes, + bytes, + ); @override int get hashCode => bytes.hashCode; @@ -175,8 +194,8 @@ class UnnotePreimage extends Call { @override Map>> toJson() => { - 'unnote_preimage': {'hash': hash.toList()}, - }; + 'unnote_preimage': {'hash': hash.toList()} + }; int _sizeHint() { int size = 1; @@ -185,13 +204,27 @@ class UnnotePreimage extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is UnnotePreimage && _i4.listsEqual(other.hash, hash); + identical( + this, + other, + ) || + other is UnnotePreimage && + _i4.listsEqual( + other.hash, + hash, + ); @override int get hashCode => hash.hashCode; @@ -213,8 +246,8 @@ class RequestPreimage extends Call { @override Map>> toJson() => { - 'request_preimage': {'hash': hash.toList()}, - }; + 'request_preimage': {'hash': hash.toList()} + }; int _sizeHint() { int size = 1; @@ -223,13 +256,27 @@ class RequestPreimage extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is RequestPreimage && _i4.listsEqual(other.hash, hash); + identical( + this, + other, + ) || + other is RequestPreimage && + _i4.listsEqual( + other.hash, + hash, + ); @override int get hashCode => hash.hashCode; @@ -250,8 +297,8 @@ class UnrequestPreimage extends Call { @override Map>> toJson() => { - 'unrequest_preimage': {'hash': hash.toList()}, - }; + 'unrequest_preimage': {'hash': hash.toList()} + }; int _sizeHint() { int size = 1; @@ -260,13 +307,27 @@ class UnrequestPreimage extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is UnrequestPreimage && _i4.listsEqual(other.hash, hash); + identical( + this, + other, + ) || + other is UnrequestPreimage && + _i4.listsEqual( + other.hash, + hash, + ); @override int get hashCode => hash.hashCode; @@ -279,7 +340,9 @@ class EnsureUpdated extends Call { const EnsureUpdated({required this.hashes}); factory EnsureUpdated._decode(_i1.Input input) { - return EnsureUpdated(hashes: const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).decode(input)); + return EnsureUpdated( + hashes: + const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).decode(input)); } /// Vec @@ -287,23 +350,40 @@ class EnsureUpdated extends Call { @override Map>>> toJson() => { - 'ensure_updated': {'hashes': hashes.map((value) => value.toList()).toList()}, - }; + 'ensure_updated': { + 'hashes': hashes.map((value) => value.toList()).toList() + } + }; int _sizeHint() { int size = 1; - size = size + const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).sizeHint(hashes); + size = size + + const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).sizeHint(hashes); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).encodeTo(hashes, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).encodeTo( + hashes, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is EnsureUpdated && _i4.listsEqual(other.hashes, hashes); + identical( + this, + other, + ) || + other is EnsureUpdated && + _i4.listsEqual( + other.hashes, + hashes, + ); @override int get hashCode => hashes.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/error.dart index 74a1a50f..b6dce94a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/error.dart @@ -29,7 +29,10 @@ enum Error { /// Too few hashes were requested to be upgraded (i.e. zero). tooFew('TooFew', 7); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -77,7 +80,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/event.dart index 26f10fba..f54cb52b 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/event.dart @@ -66,7 +66,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case Noted: (value as Noted).encodeTo(output); @@ -78,7 +81,8 @@ class $EventCodec with _i1.Codec { (value as Cleared).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -92,7 +96,8 @@ class $EventCodec with _i1.Codec { case Cleared: return (value as Cleared)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -110,8 +115,8 @@ class Noted extends Event { @override Map>> toJson() => { - 'Noted': {'hash': hash.toList()}, - }; + 'Noted': {'hash': hash.toList()} + }; int _sizeHint() { int size = 1; @@ -120,12 +125,27 @@ class Noted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Noted && _i4.listsEqual(other.hash, hash); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Noted && + _i4.listsEqual( + other.hash, + hash, + ); @override int get hashCode => hash.hashCode; @@ -144,8 +164,8 @@ class Requested extends Event { @override Map>> toJson() => { - 'Requested': {'hash': hash.toList()}, - }; + 'Requested': {'hash': hash.toList()} + }; int _sizeHint() { int size = 1; @@ -154,12 +174,27 @@ class Requested extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Requested && _i4.listsEqual(other.hash, hash); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Requested && + _i4.listsEqual( + other.hash, + hash, + ); @override int get hashCode => hash.hashCode; @@ -178,8 +213,8 @@ class Cleared extends Event { @override Map>> toJson() => { - 'Cleared': {'hash': hash.toList()}, - }; + 'Cleared': {'hash': hash.toList()} + }; int _sizeHint() { int size = 1; @@ -188,12 +223,27 @@ class Cleared extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Cleared && _i4.listsEqual(other.hash, hash); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Cleared && + _i4.listsEqual( + other.hash, + hash, + ); @override int get hashCode => hash.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/hold_reason.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/hold_reason.dart index 6bcca1d8..ac2a0290 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/hold_reason.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/hold_reason.dart @@ -6,7 +6,10 @@ import 'package:polkadart/scale_codec.dart' as _i1; enum HoldReason { preimage('Preimage', 0); - const HoldReason(this.variantName, this.codecIndex); + const HoldReason( + this.variantName, + this.codecIndex, + ); factory HoldReason.decode(_i1.Input input) { return codec.decode(input); @@ -40,7 +43,13 @@ class $HoldReasonCodec with _i1.Codec { } @override - void encodeTo(HoldReason value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + HoldReason value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/request_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/request_status.dart index c3a46ad8..573053c2 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/request_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/request_status.dart @@ -34,8 +34,14 @@ abstract class RequestStatus { class $RequestStatus { const $RequestStatus(); - Unrequested unrequested({required _i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit> ticket, required int len}) { - return Unrequested(ticket: ticket, len: len); + Unrequested unrequested({ + required _i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit> ticket, + required int len, + }) { + return Unrequested( + ticket: ticket, + len: len, + ); } Requested requested({ @@ -43,7 +49,11 @@ class $RequestStatus { required int count, int? maybeLen, }) { - return Requested(maybeTicket: maybeTicket, count: count, maybeLen: maybeLen); + return Requested( + maybeTicket: maybeTicket, + count: count, + maybeLen: maybeLen, + ); } } @@ -64,7 +74,10 @@ class $RequestStatusCodec with _i1.Codec { } @override - void encodeTo(RequestStatus value, _i1.Output output) { + void encodeTo( + RequestStatus value, + _i1.Output output, + ) { switch (value.runtimeType) { case Unrequested: (value as Unrequested).encodeTo(output); @@ -73,7 +86,8 @@ class $RequestStatusCodec with _i1.Codec { (value as Requested).encodeTo(output); break; default: - throw Exception('RequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -85,13 +99,17 @@ class $RequestStatusCodec with _i1.Codec { case Requested: return (value as Requested)._sizeHint(); default: - throw Exception('RequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); } } } class Unrequested extends RequestStatus { - const Unrequested({required this.ticket, required this.len}); + const Unrequested({ + required this.ticket, + required this.len, + }); factory Unrequested._decode(_i1.Input input) { return Unrequested( @@ -111,16 +129,18 @@ class Unrequested extends RequestStatus { @override Map> toJson() => { - 'Unrequested': { - 'ticket': [ticket.value0.toList(), ticket.value1.toJson()], - 'len': len, - }, - }; + 'Unrequested': { + 'ticket': [ + ticket.value0.toList(), + ticket.value1.toJson(), + ], + 'len': len, + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( _i4.AccountId32Codec(), _i5.PreimageDeposit.codec, @@ -130,30 +150,53 @@ class Unrequested extends RequestStatus { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); const _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( _i4.AccountId32Codec(), _i5.PreimageDeposit.codec, - ).encodeTo(ticket, output); - _i1.U32Codec.codec.encodeTo(len, output); + ).encodeTo( + ticket, + output, + ); + _i1.U32Codec.codec.encodeTo( + len, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Unrequested && other.ticket == ticket && other.len == len; + identical( + this, + other, + ) || + other is Unrequested && other.ticket == ticket && other.len == len; @override - int get hashCode => Object.hash(ticket, len); + int get hashCode => Object.hash( + ticket, + len, + ); } class Requested extends RequestStatus { - const Requested({this.maybeTicket, required this.count, this.maybeLen}); + const Requested({ + this.maybeTicket, + required this.count, + this.maybeLen, + }); factory Requested._decode(_i1.Input input) { return Requested( - maybeTicket: const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit>>( - _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>(_i4.AccountId32Codec(), _i5.PreimageDeposit.codec), - ).decode(input), + maybeTicket: const _i1 + .OptionCodec<_i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit>>( + _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( + _i4.AccountId32Codec(), + _i5.PreimageDeposit.codec, + )).decode(input), count: _i1.U32Codec.codec.decode(input), maybeLen: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), ); @@ -170,39 +213,68 @@ class Requested extends RequestStatus { @override Map> toJson() => { - 'Requested': { - 'maybeTicket': [maybeTicket?.value0.toList(), maybeTicket?.value1.toJson()], - 'count': count, - 'maybeLen': maybeLen, - }, - }; + 'Requested': { + 'maybeTicket': [ + maybeTicket?.value0.toList(), + maybeTicket?.value1.toJson(), + ], + 'count': count, + 'maybeLen': maybeLen, + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit>>( - _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>(_i4.AccountId32Codec(), _i5.PreimageDeposit.codec), - ).sizeHint(maybeTicket); + _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( + _i4.AccountId32Codec(), + _i5.PreimageDeposit.codec, + )).sizeHint(maybeTicket); size = size + _i1.U32Codec.codec.sizeHint(count); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(maybeLen); + size = size + + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(maybeLen); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit>>( - _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>(_i4.AccountId32Codec(), _i5.PreimageDeposit.codec), - ).encodeTo(maybeTicket, output); - _i1.U32Codec.codec.encodeTo(count, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(maybeLen, output); + _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( + _i4.AccountId32Codec(), + _i5.PreimageDeposit.codec, + )).encodeTo( + maybeTicket, + output, + ); + _i1.U32Codec.codec.encodeTo( + count, + output, + ); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( + maybeLen, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Requested && other.maybeTicket == maybeTicket && other.count == count && other.maybeLen == maybeLen; + identical( + this, + other, + ) || + other is Requested && + other.maybeTicket == maybeTicket && + other.count == count && + other.maybeLen == maybeLen; @override - int get hashCode => Object.hash(maybeTicket, count, maybeLen); + int get hashCode => Object.hash( + maybeTicket, + count, + maybeLen, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_qpow/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_qpow/pallet/event.dart index e35e03cc..45174ad5 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_qpow/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_qpow/pallet/event.dart @@ -39,7 +39,11 @@ class $Event { required _i3.U512 difficulty, required _i3.U512 hashAchieved, }) { - return ProofSubmitted(nonce: nonce, difficulty: difficulty, hashAchieved: hashAchieved); + return ProofSubmitted( + nonce: nonce, + difficulty: difficulty, + hashAchieved: hashAchieved, + ); } DifficultyAdjusted difficultyAdjusted({ @@ -72,7 +76,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case ProofSubmitted: (value as ProofSubmitted).encodeTo(output); @@ -81,7 +88,8 @@ class $EventCodec with _i1.Codec { (value as DifficultyAdjusted).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -93,13 +101,18 @@ class $EventCodec with _i1.Codec { case DifficultyAdjusted: return (value as DifficultyAdjusted)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } class ProofSubmitted extends Event { - const ProofSubmitted({required this.nonce, required this.difficulty, required this.hashAchieved}); + const ProofSubmitted({ + required this.nonce, + required this.difficulty, + required this.hashAchieved, + }); factory ProofSubmitted._decode(_i1.Input input) { return ProofSubmitted( @@ -120,12 +133,12 @@ class ProofSubmitted extends Event { @override Map>> toJson() => { - 'ProofSubmitted': { - 'nonce': nonce.toList(), - 'difficulty': difficulty.toList(), - 'hashAchieved': hashAchieved.toList(), - }, - }; + 'ProofSubmitted': { + 'nonce': nonce.toList(), + 'difficulty': difficulty.toList(), + 'hashAchieved': hashAchieved.toList(), + } + }; int _sizeHint() { int size = 1; @@ -136,26 +149,58 @@ class ProofSubmitted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(64).encodeTo(nonce, output); - const _i1.U64ArrayCodec(8).encodeTo(difficulty, output); - const _i1.U64ArrayCodec(8).encodeTo(hashAchieved, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(64).encodeTo( + nonce, + output, + ); + const _i1.U64ArrayCodec(8).encodeTo( + difficulty, + output, + ); + const _i1.U64ArrayCodec(8).encodeTo( + hashAchieved, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ProofSubmitted && - _i4.listsEqual(other.nonce, nonce) && - _i4.listsEqual(other.difficulty, difficulty) && - _i4.listsEqual(other.hashAchieved, hashAchieved); + _i4.listsEqual( + other.nonce, + nonce, + ) && + _i4.listsEqual( + other.difficulty, + difficulty, + ) && + _i4.listsEqual( + other.hashAchieved, + hashAchieved, + ); @override - int get hashCode => Object.hash(nonce, difficulty, hashAchieved); + int get hashCode => Object.hash( + nonce, + difficulty, + hashAchieved, + ); } class DifficultyAdjusted extends Event { - const DifficultyAdjusted({required this.oldDifficulty, required this.newDifficulty, required this.observedBlockTime}); + const DifficultyAdjusted({ + required this.oldDifficulty, + required this.newDifficulty, + required this.observedBlockTime, + }); factory DifficultyAdjusted._decode(_i1.Input input) { return DifficultyAdjusted( @@ -176,12 +221,12 @@ class DifficultyAdjusted extends Event { @override Map> toJson() => { - 'DifficultyAdjusted': { - 'oldDifficulty': oldDifficulty.toList(), - 'newDifficulty': newDifficulty.toList(), - 'observedBlockTime': observedBlockTime, - }, - }; + 'DifficultyAdjusted': { + 'oldDifficulty': oldDifficulty.toList(), + 'newDifficulty': newDifficulty.toList(), + 'observedBlockTime': observedBlockTime, + } + }; int _sizeHint() { int size = 1; @@ -192,20 +237,45 @@ class DifficultyAdjusted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U64ArrayCodec(8).encodeTo(oldDifficulty, output); - const _i1.U64ArrayCodec(8).encodeTo(newDifficulty, output); - _i1.U64Codec.codec.encodeTo(observedBlockTime, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U64ArrayCodec(8).encodeTo( + oldDifficulty, + output, + ); + const _i1.U64ArrayCodec(8).encodeTo( + newDifficulty, + output, + ); + _i1.U64Codec.codec.encodeTo( + observedBlockTime, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is DifficultyAdjusted && - _i4.listsEqual(other.oldDifficulty, oldDifficulty) && - _i4.listsEqual(other.newDifficulty, newDifficulty) && + _i4.listsEqual( + other.oldDifficulty, + oldDifficulty, + ) && + _i4.listsEqual( + other.newDifficulty, + newDifficulty, + ) && other.observedBlockTime == observedBlockTime; @override - int get hashCode => Object.hash(oldDifficulty, newDifficulty, observedBlockTime); + int get hashCode => Object.hash( + oldDifficulty, + newDifficulty, + observedBlockTime, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/member_record.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/member_record.dart index bbcabb46..66c7e5db 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/member_record.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/member_record.dart @@ -22,7 +22,12 @@ class MemberRecord { Map toJson() => {'rank': rank}; @override - bool operator ==(Object other) => identical(this, other) || other is MemberRecord && other.rank == rank; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is MemberRecord && other.rank == rank; @override int get hashCode => rank.hashCode; @@ -32,8 +37,14 @@ class $MemberRecordCodec with _i1.Codec { const $MemberRecordCodec(); @override - void encodeTo(MemberRecord obj, _i1.Output output) { - _i1.U16Codec.codec.encodeTo(obj.rank, output); + void encodeTo( + MemberRecord obj, + _i1.Output output, + ) { + _i1.U16Codec.codec.encodeTo( + obj.rank, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/call.dart index 430c043f..a7c7d089 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/call.dart @@ -45,20 +45,44 @@ class $Call { return DemoteMember(who: who); } - RemoveMember removeMember({required _i3.MultiAddress who, required int minRank}) { - return RemoveMember(who: who, minRank: minRank); - } - - Vote vote({required int poll, required bool aye}) { - return Vote(poll: poll, aye: aye); - } - - CleanupPoll cleanupPoll({required int pollIndex, required int max}) { - return CleanupPoll(pollIndex: pollIndex, max: max); - } - - ExchangeMember exchangeMember({required _i3.MultiAddress who, required _i3.MultiAddress newWho}) { - return ExchangeMember(who: who, newWho: newWho); + RemoveMember removeMember({ + required _i3.MultiAddress who, + required int minRank, + }) { + return RemoveMember( + who: who, + minRank: minRank, + ); + } + + Vote vote({ + required int poll, + required bool aye, + }) { + return Vote( + poll: poll, + aye: aye, + ); + } + + CleanupPoll cleanupPoll({ + required int pollIndex, + required int max, + }) { + return CleanupPoll( + pollIndex: pollIndex, + max: max, + ); + } + + ExchangeMember exchangeMember({ + required _i3.MultiAddress who, + required _i3.MultiAddress newWho, + }) { + return ExchangeMember( + who: who, + newWho: newWho, + ); } } @@ -89,7 +113,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case AddMember: (value as AddMember).encodeTo(output); @@ -113,7 +140,8 @@ class $CallCodec with _i1.Codec { (value as ExchangeMember).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -135,7 +163,8 @@ class $CallCodec with _i1.Codec { case ExchangeMember: return (value as ExchangeMember)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -158,8 +187,8 @@ class AddMember extends Call { @override Map>> toJson() => { - 'add_member': {'who': who.toJson()}, - }; + 'add_member': {'who': who.toJson()} + }; int _sizeHint() { int size = 1; @@ -168,12 +197,23 @@ class AddMember extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.MultiAddress.codec.encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is AddMember && other.who == who; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is AddMember && other.who == who; @override int get hashCode => who.hashCode; @@ -197,8 +237,8 @@ class PromoteMember extends Call { @override Map>> toJson() => { - 'promote_member': {'who': who.toJson()}, - }; + 'promote_member': {'who': who.toJson()} + }; int _sizeHint() { int size = 1; @@ -207,12 +247,23 @@ class PromoteMember extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i3.MultiAddress.codec.encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is PromoteMember && other.who == who; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is PromoteMember && other.who == who; @override int get hashCode => who.hashCode; @@ -237,8 +288,8 @@ class DemoteMember extends Call { @override Map>> toJson() => { - 'demote_member': {'who': who.toJson()}, - }; + 'demote_member': {'who': who.toJson()} + }; int _sizeHint() { int size = 1; @@ -247,12 +298,23 @@ class DemoteMember extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i3.MultiAddress.codec.encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is DemoteMember && other.who == who; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is DemoteMember && other.who == who; @override int get hashCode => who.hashCode; @@ -266,10 +328,16 @@ class DemoteMember extends Call { /// /// Weight: `O(min_rank)`. class RemoveMember extends Call { - const RemoveMember({required this.who, required this.minRank}); + const RemoveMember({ + required this.who, + required this.minRank, + }); factory RemoveMember._decode(_i1.Input input) { - return RemoveMember(who: _i3.MultiAddress.codec.decode(input), minRank: _i1.U16Codec.codec.decode(input)); + return RemoveMember( + who: _i3.MultiAddress.codec.decode(input), + minRank: _i1.U16Codec.codec.decode(input), + ); } /// AccountIdLookupOf @@ -280,8 +348,11 @@ class RemoveMember extends Call { @override Map> toJson() => { - 'remove_member': {'who': who.toJson(), 'minRank': minRank}, - }; + 'remove_member': { + 'who': who.toJson(), + 'minRank': minRank, + } + }; int _sizeHint() { int size = 1; @@ -291,17 +362,33 @@ class RemoveMember extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i3.MultiAddress.codec.encodeTo(who, output); - _i1.U16Codec.codec.encodeTo(minRank, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); + _i1.U16Codec.codec.encodeTo( + minRank, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is RemoveMember && other.who == who && other.minRank == minRank; + identical( + this, + other, + ) || + other is RemoveMember && other.who == who && other.minRank == minRank; @override - int get hashCode => Object.hash(who, minRank); + int get hashCode => Object.hash( + who, + minRank, + ); } /// Add an aye or nay vote for the sender to the given proposal. @@ -316,10 +403,16 @@ class RemoveMember extends Call { /// /// Weight: `O(1)`, less if there was no previous vote on the poll by the member. class Vote extends Call { - const Vote({required this.poll, required this.aye}); + const Vote({ + required this.poll, + required this.aye, + }); factory Vote._decode(_i1.Input input) { - return Vote(poll: _i1.U32Codec.codec.decode(input), aye: _i1.BoolCodec.codec.decode(input)); + return Vote( + poll: _i1.U32Codec.codec.decode(input), + aye: _i1.BoolCodec.codec.decode(input), + ); } /// PollIndexOf @@ -330,8 +423,11 @@ class Vote extends Call { @override Map> toJson() => { - 'vote': {'poll': poll, 'aye': aye}, - }; + 'vote': { + 'poll': poll, + 'aye': aye, + } + }; int _sizeHint() { int size = 1; @@ -341,16 +437,33 @@ class Vote extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U32Codec.codec.encodeTo(poll, output); - _i1.BoolCodec.codec.encodeTo(aye, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.U32Codec.codec.encodeTo( + poll, + output, + ); + _i1.BoolCodec.codec.encodeTo( + aye, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Vote && other.poll == poll && other.aye == aye; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Vote && other.poll == poll && other.aye == aye; @override - int get hashCode => Object.hash(poll, aye); + int get hashCode => Object.hash( + poll, + aye, + ); } /// Remove votes from the given poll. It must have ended. @@ -364,10 +477,16 @@ class Vote extends Call { /// /// Weight `O(max)` (less if there are fewer items to remove than `max`). class CleanupPoll extends Call { - const CleanupPoll({required this.pollIndex, required this.max}); + const CleanupPoll({ + required this.pollIndex, + required this.max, + }); factory CleanupPoll._decode(_i1.Input input) { - return CleanupPoll(pollIndex: _i1.U32Codec.codec.decode(input), max: _i1.U32Codec.codec.decode(input)); + return CleanupPoll( + pollIndex: _i1.U32Codec.codec.decode(input), + max: _i1.U32Codec.codec.decode(input), + ); } /// PollIndexOf @@ -378,8 +497,11 @@ class CleanupPoll extends Call { @override Map> toJson() => { - 'cleanup_poll': {'pollIndex': pollIndex, 'max': max}, - }; + 'cleanup_poll': { + 'pollIndex': pollIndex, + 'max': max, + } + }; int _sizeHint() { int size = 1; @@ -389,17 +511,33 @@ class CleanupPoll extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U32Codec.codec.encodeTo(pollIndex, output); - _i1.U32Codec.codec.encodeTo(max, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.U32Codec.codec.encodeTo( + pollIndex, + output, + ); + _i1.U32Codec.codec.encodeTo( + max, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is CleanupPoll && other.pollIndex == pollIndex && other.max == max; + identical( + this, + other, + ) || + other is CleanupPoll && other.pollIndex == pollIndex && other.max == max; @override - int get hashCode => Object.hash(pollIndex, max); + int get hashCode => Object.hash( + pollIndex, + max, + ); } /// Exchanges a member with a new account and the same existing rank. @@ -408,10 +546,16 @@ class CleanupPoll extends Call { /// - `who`: Account of existing member of rank greater than zero to be exchanged. /// - `new_who`: New Account of existing member of rank greater than zero to exchanged to. class ExchangeMember extends Call { - const ExchangeMember({required this.who, required this.newWho}); + const ExchangeMember({ + required this.who, + required this.newWho, + }); factory ExchangeMember._decode(_i1.Input input) { - return ExchangeMember(who: _i3.MultiAddress.codec.decode(input), newWho: _i3.MultiAddress.codec.decode(input)); + return ExchangeMember( + who: _i3.MultiAddress.codec.decode(input), + newWho: _i3.MultiAddress.codec.decode(input), + ); } /// AccountIdLookupOf @@ -422,8 +566,11 @@ class ExchangeMember extends Call { @override Map>> toJson() => { - 'exchange_member': {'who': who.toJson(), 'newWho': newWho.toJson()}, - }; + 'exchange_member': { + 'who': who.toJson(), + 'newWho': newWho.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -433,15 +580,31 @@ class ExchangeMember extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i3.MultiAddress.codec.encodeTo(who, output); - _i3.MultiAddress.codec.encodeTo(newWho, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i3.MultiAddress.codec.encodeTo( + who, + output, + ); + _i3.MultiAddress.codec.encodeTo( + newWho, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is ExchangeMember && other.who == who && other.newWho == newWho; + identical( + this, + other, + ) || + other is ExchangeMember && other.who == who && other.newWho == newWho; @override - int get hashCode => Object.hash(who, newWho); + int get hashCode => Object.hash( + who, + newWho, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/error.dart index a0939c33..64a40299 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/error.dart @@ -38,7 +38,10 @@ enum Error { /// The max member count for the rank has been reached. tooManyMembers('TooManyMembers', 10); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -92,7 +95,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/event.dart index 380795e3..44350e40 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/event.dart @@ -40,12 +40,24 @@ class $Event { return MemberAdded(who: who); } - RankChanged rankChanged({required _i3.AccountId32 who, required int rank}) { - return RankChanged(who: who, rank: rank); + RankChanged rankChanged({ + required _i3.AccountId32 who, + required int rank, + }) { + return RankChanged( + who: who, + rank: rank, + ); } - MemberRemoved memberRemoved({required _i3.AccountId32 who, required int rank}) { - return MemberRemoved(who: who, rank: rank); + MemberRemoved memberRemoved({ + required _i3.AccountId32 who, + required int rank, + }) { + return MemberRemoved( + who: who, + rank: rank, + ); } Voted voted({ @@ -54,11 +66,22 @@ class $Event { required _i4.VoteRecord vote, required _i5.Tally tally, }) { - return Voted(who: who, poll: poll, vote: vote, tally: tally); + return Voted( + who: who, + poll: poll, + vote: vote, + tally: tally, + ); } - MemberExchanged memberExchanged({required _i3.AccountId32 who, required _i3.AccountId32 newWho}) { - return MemberExchanged(who: who, newWho: newWho); + MemberExchanged memberExchanged({ + required _i3.AccountId32 who, + required _i3.AccountId32 newWho, + }) { + return MemberExchanged( + who: who, + newWho: newWho, + ); } } @@ -85,7 +108,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case MemberAdded: (value as MemberAdded).encodeTo(output); @@ -103,7 +129,8 @@ class $EventCodec with _i1.Codec { (value as MemberExchanged).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -121,7 +148,8 @@ class $EventCodec with _i1.Codec { case MemberExchanged: return (value as MemberExchanged)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -139,8 +167,8 @@ class MemberAdded extends Event { @override Map>> toJson() => { - 'MemberAdded': {'who': who.toList()}, - }; + 'MemberAdded': {'who': who.toList()} + }; int _sizeHint() { int size = 1; @@ -149,12 +177,27 @@ class MemberAdded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is MemberAdded && _i6.listsEqual(other.who, who); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is MemberAdded && + _i6.listsEqual( + other.who, + who, + ); @override int get hashCode => who.hashCode; @@ -162,10 +205,16 @@ class MemberAdded extends Event { /// The member `who`se rank has been changed to the given `rank`. class RankChanged extends Event { - const RankChanged({required this.who, required this.rank}); + const RankChanged({ + required this.who, + required this.rank, + }); factory RankChanged._decode(_i1.Input input) { - return RankChanged(who: const _i1.U8ArrayCodec(32).decode(input), rank: _i1.U16Codec.codec.decode(input)); + return RankChanged( + who: const _i1.U8ArrayCodec(32).decode(input), + rank: _i1.U16Codec.codec.decode(input), + ); } /// T::AccountId @@ -176,8 +225,11 @@ class RankChanged extends Event { @override Map> toJson() => { - 'RankChanged': {'who': who.toList(), 'rank': rank}, - }; + 'RankChanged': { + 'who': who.toList(), + 'rank': rank, + } + }; int _sizeHint() { int size = 1; @@ -187,25 +239,52 @@ class RankChanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U16Codec.codec.encodeTo(rank, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U16Codec.codec.encodeTo( + rank, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is RankChanged && _i6.listsEqual(other.who, who) && other.rank == rank; + identical( + this, + other, + ) || + other is RankChanged && + _i6.listsEqual( + other.who, + who, + ) && + other.rank == rank; @override - int get hashCode => Object.hash(who, rank); + int get hashCode => Object.hash( + who, + rank, + ); } /// The member `who` of given `rank` has been removed from the collective. class MemberRemoved extends Event { - const MemberRemoved({required this.who, required this.rank}); + const MemberRemoved({ + required this.who, + required this.rank, + }); factory MemberRemoved._decode(_i1.Input input) { - return MemberRemoved(who: const _i1.U8ArrayCodec(32).decode(input), rank: _i1.U16Codec.codec.decode(input)); + return MemberRemoved( + who: const _i1.U8ArrayCodec(32).decode(input), + rank: _i1.U16Codec.codec.decode(input), + ); } /// T::AccountId @@ -216,8 +295,11 @@ class MemberRemoved extends Event { @override Map> toJson() => { - 'MemberRemoved': {'who': who.toList(), 'rank': rank}, - }; + 'MemberRemoved': { + 'who': who.toList(), + 'rank': rank, + } + }; int _sizeHint() { int size = 1; @@ -227,23 +309,49 @@ class MemberRemoved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U16Codec.codec.encodeTo(rank, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U16Codec.codec.encodeTo( + rank, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is MemberRemoved && _i6.listsEqual(other.who, who) && other.rank == rank; + identical( + this, + other, + ) || + other is MemberRemoved && + _i6.listsEqual( + other.who, + who, + ) && + other.rank == rank; @override - int get hashCode => Object.hash(who, rank); + int get hashCode => Object.hash( + who, + rank, + ); } /// The member `who` has voted for the `poll` with the given `vote` leading to an updated /// `tally`. class Voted extends Event { - const Voted({required this.who, required this.poll, required this.vote, required this.tally}); + const Voted({ + required this.who, + required this.poll, + required this.vote, + required this.tally, + }); factory Voted._decode(_i1.Input input) { return Voted( @@ -268,8 +376,13 @@ class Voted extends Event { @override Map> toJson() => { - 'Voted': {'who': who.toList(), 'poll': poll, 'vote': vote.toJson(), 'tally': tally.toJson()}, - }; + 'Voted': { + 'who': who.toList(), + 'poll': poll, + 'vote': vote.toJson(), + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -281,29 +394,58 @@ class Voted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U32Codec.codec.encodeTo(poll, output); - _i4.VoteRecord.codec.encodeTo(vote, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U32Codec.codec.encodeTo( + poll, + output, + ); + _i4.VoteRecord.codec.encodeTo( + vote, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Voted && - _i6.listsEqual(other.who, who) && + _i6.listsEqual( + other.who, + who, + ) && other.poll == poll && other.vote == vote && other.tally == tally; @override - int get hashCode => Object.hash(who, poll, vote, tally); + int get hashCode => Object.hash( + who, + poll, + vote, + tally, + ); } /// The member `who` had their `AccountId` changed to `new_who`. class MemberExchanged extends Event { - const MemberExchanged({required this.who, required this.newWho}); + const MemberExchanged({ + required this.who, + required this.newWho, + }); factory MemberExchanged._decode(_i1.Input input) { return MemberExchanged( @@ -320,8 +462,11 @@ class MemberExchanged extends Event { @override Map>> toJson() => { - 'MemberExchanged': {'who': who.toList(), 'newWho': newWho.toList()}, - }; + 'MemberExchanged': { + 'who': who.toList(), + 'newWho': newWho.toList(), + } + }; int _sizeHint() { int size = 1; @@ -331,16 +476,39 @@ class MemberExchanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - const _i1.U8ArrayCodec(32).encodeTo(newWho, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + newWho, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is MemberExchanged && _i6.listsEqual(other.who, who) && _i6.listsEqual(other.newWho, newWho); + identical( + this, + other, + ) || + other is MemberExchanged && + _i6.listsEqual( + other.who, + who, + ) && + _i6.listsEqual( + other.newWho, + newWho, + ); @override - int get hashCode => Object.hash(who, newWho); + int get hashCode => Object.hash( + who, + newWho, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/tally.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/tally.dart index dcacb46c..77fac349 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/tally.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/tally.dart @@ -4,7 +4,11 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class Tally { - const Tally({required this.bareAyes, required this.ayes, required this.nays}); + const Tally({ + required this.bareAyes, + required this.ayes, + required this.nays, + }); factory Tally.decode(_i1.Input input) { return codec.decode(input); @@ -25,25 +29,51 @@ class Tally { return codec.encode(this); } - Map toJson() => {'bareAyes': bareAyes, 'ayes': ayes, 'nays': nays}; + Map toJson() => { + 'bareAyes': bareAyes, + 'ayes': ayes, + 'nays': nays, + }; @override bool operator ==(Object other) => - identical(this, other) || - other is Tally && other.bareAyes == bareAyes && other.ayes == ayes && other.nays == nays; + identical( + this, + other, + ) || + other is Tally && + other.bareAyes == bareAyes && + other.ayes == ayes && + other.nays == nays; @override - int get hashCode => Object.hash(bareAyes, ayes, nays); + int get hashCode => Object.hash( + bareAyes, + ayes, + nays, + ); } class $TallyCodec with _i1.Codec { const $TallyCodec(); @override - void encodeTo(Tally obj, _i1.Output output) { - _i1.U32Codec.codec.encodeTo(obj.bareAyes, output); - _i1.U32Codec.codec.encodeTo(obj.ayes, output); - _i1.U32Codec.codec.encodeTo(obj.nays, output); + void encodeTo( + Tally obj, + _i1.Output output, + ) { + _i1.U32Codec.codec.encodeTo( + obj.bareAyes, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.ayes, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.nays, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/vote_record.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/vote_record.dart index 8a05fdc3..4a5a5ccf 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/vote_record.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/vote_record.dart @@ -56,7 +56,10 @@ class $VoteRecordCodec with _i1.Codec { } @override - void encodeTo(VoteRecord value, _i1.Output output) { + void encodeTo( + VoteRecord value, + _i1.Output output, + ) { switch (value.runtimeType) { case Aye: (value as Aye).encodeTo(output); @@ -65,7 +68,8 @@ class $VoteRecordCodec with _i1.Codec { (value as Nay).encodeTo(output); break; default: - throw Exception('VoteRecord: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'VoteRecord: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -77,7 +81,8 @@ class $VoteRecordCodec with _i1.Codec { case Nay: return (value as Nay)._sizeHint(); default: - throw Exception('VoteRecord: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'VoteRecord: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -102,12 +107,23 @@ class Aye extends VoteRecord { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Aye && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Aye && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -133,12 +149,23 @@ class Nay extends VoteRecord { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Nay && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Nay && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/active_recovery.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/active_recovery.dart index 2df5af34..dda7b5da 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/active_recovery.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/active_recovery.dart @@ -7,7 +7,11 @@ import 'package:quiver/collection.dart' as _i4; import '../sp_core/crypto/account_id32.dart' as _i2; class ActiveRecovery { - const ActiveRecovery({required this.created, required this.deposit, required this.friends}); + const ActiveRecovery({ + required this.created, + required this.deposit, + required this.friends, + }); factory ActiveRecovery.decode(_i1.Input input) { return codec.decode(input); @@ -29,31 +33,53 @@ class ActiveRecovery { } Map toJson() => { - 'created': created, - 'deposit': deposit, - 'friends': friends.map((value) => value.toList()).toList(), - }; + 'created': created, + 'deposit': deposit, + 'friends': friends.map((value) => value.toList()).toList(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ActiveRecovery && other.created == created && other.deposit == deposit && - _i4.listsEqual(other.friends, friends); + _i4.listsEqual( + other.friends, + friends, + ); @override - int get hashCode => Object.hash(created, deposit, friends); + int get hashCode => Object.hash( + created, + deposit, + friends, + ); } class $ActiveRecoveryCodec with _i1.Codec { const $ActiveRecoveryCodec(); @override - void encodeTo(ActiveRecovery obj, _i1.Output output) { - _i1.U32Codec.codec.encodeTo(obj.created, output); - _i1.U128Codec.codec.encodeTo(obj.deposit, output); - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo(obj.friends, output); + void encodeTo( + ActiveRecovery obj, + _i1.Output output, + ) { + _i1.U32Codec.codec.encodeTo( + obj.created, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.deposit, + output, + ); + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo( + obj.friends, + output, + ); } @override @@ -61,7 +87,8 @@ class $ActiveRecoveryCodec with _i1.Codec { return ActiveRecovery( created: _i1.U32Codec.codec.decode(input), deposit: _i1.U128Codec.codec.decode(input), - friends: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).decode(input), + friends: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) + .decode(input), ); } @@ -70,7 +97,9 @@ class $ActiveRecoveryCodec with _i1.Codec { int size = 0; size = size + _i1.U32Codec.codec.sizeHint(obj.created); size = size + _i1.U128Codec.codec.sizeHint(obj.deposit); - size = size + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).sizeHint(obj.friends); + size = size + + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) + .sizeHint(obj.friends); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/deposit_kind.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/deposit_kind.dart index 8e0a6d10..f9b5c57b 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/deposit_kind.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/deposit_kind.dart @@ -59,7 +59,10 @@ class $DepositKindCodec with _i1.Codec { } @override - void encodeTo(DepositKind value, _i1.Output output) { + void encodeTo( + DepositKind value, + _i1.Output output, + ) { switch (value.runtimeType) { case RecoveryConfig: (value as RecoveryConfig).encodeTo(output); @@ -68,7 +71,8 @@ class $DepositKindCodec with _i1.Codec { (value as ActiveRecoveryFor).encodeTo(output); break; default: - throw Exception('DepositKind: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DepositKind: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -80,7 +84,8 @@ class $DepositKindCodec with _i1.Codec { case ActiveRecoveryFor: return (value as ActiveRecoveryFor)._sizeHint(); default: - throw Exception('DepositKind: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DepositKind: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -92,7 +97,10 @@ class RecoveryConfig extends DepositKind { Map toJson() => {'RecoveryConfig': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); } @override @@ -122,13 +130,27 @@ class ActiveRecoveryFor extends DepositKind { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + value0, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is ActiveRecoveryFor && _i4.listsEqual(other.value0, value0); + identical( + this, + other, + ) || + other is ActiveRecoveryFor && + _i4.listsEqual( + other.value0, + value0, + ); @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/call.dart index 6aa962cb..cfb0f532 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/call.dart @@ -36,12 +36,24 @@ abstract class Call { class $Call { const $Call(); - AsRecovered asRecovered({required _i3.MultiAddress account, required _i4.RuntimeCall call}) { - return AsRecovered(account: account, call: call); + AsRecovered asRecovered({ + required _i3.MultiAddress account, + required _i4.RuntimeCall call, + }) { + return AsRecovered( + account: account, + call: call, + ); } - SetRecovered setRecovered({required _i3.MultiAddress lost, required _i3.MultiAddress rescuer}) { - return SetRecovered(lost: lost, rescuer: rescuer); + SetRecovered setRecovered({ + required _i3.MultiAddress lost, + required _i3.MultiAddress rescuer, + }) { + return SetRecovered( + lost: lost, + rescuer: rescuer, + ); } CreateRecovery createRecovery({ @@ -49,15 +61,25 @@ class $Call { required int threshold, required int delayPeriod, }) { - return CreateRecovery(friends: friends, threshold: threshold, delayPeriod: delayPeriod); + return CreateRecovery( + friends: friends, + threshold: threshold, + delayPeriod: delayPeriod, + ); } InitiateRecovery initiateRecovery({required _i3.MultiAddress account}) { return InitiateRecovery(account: account); } - VouchRecovery vouchRecovery({required _i3.MultiAddress lost, required _i3.MultiAddress rescuer}) { - return VouchRecovery(lost: lost, rescuer: rescuer); + VouchRecovery vouchRecovery({ + required _i3.MultiAddress lost, + required _i3.MultiAddress rescuer, + }) { + return VouchRecovery( + lost: lost, + rescuer: rescuer, + ); } ClaimRecovery claimRecovery({required _i3.MultiAddress account}) { @@ -114,7 +136,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case AsRecovered: (value as AsRecovered).encodeTo(output); @@ -147,7 +172,8 @@ class $CallCodec with _i1.Codec { (value as PokeDeposit).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -175,7 +201,8 @@ class $CallCodec with _i1.Codec { case PokeDeposit: return (value as PokeDeposit)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -189,10 +216,16 @@ class $CallCodec with _i1.Codec { /// - `account`: The recovered account you want to make a call on-behalf-of. /// - `call`: The call you want to make with the recovered account. class AsRecovered extends Call { - const AsRecovered({required this.account, required this.call}); + const AsRecovered({ + required this.account, + required this.call, + }); factory AsRecovered._decode(_i1.Input input) { - return AsRecovered(account: _i3.MultiAddress.codec.decode(input), call: _i4.RuntimeCall.codec.decode(input)); + return AsRecovered( + account: _i3.MultiAddress.codec.decode(input), + call: _i4.RuntimeCall.codec.decode(input), + ); } /// AccountIdLookupOf @@ -203,8 +236,11 @@ class AsRecovered extends Call { @override Map>> toJson() => { - 'as_recovered': {'account': account.toJson(), 'call': call.toJson()}, - }; + 'as_recovered': { + 'account': account.toJson(), + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -214,17 +250,33 @@ class AsRecovered extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.MultiAddress.codec.encodeTo(account, output); - _i4.RuntimeCall.codec.encodeTo(call, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.MultiAddress.codec.encodeTo( + account, + output, + ); + _i4.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is AsRecovered && other.account == account && other.call == call; + identical( + this, + other, + ) || + other is AsRecovered && other.account == account && other.call == call; @override - int get hashCode => Object.hash(account, call); + int get hashCode => Object.hash( + account, + call, + ); } /// Allow ROOT to bypass the recovery process and set a rescuer account @@ -236,10 +288,16 @@ class AsRecovered extends Call { /// - `lost`: The "lost account" to be recovered. /// - `rescuer`: The "rescuer account" which can call as the lost account. class SetRecovered extends Call { - const SetRecovered({required this.lost, required this.rescuer}); + const SetRecovered({ + required this.lost, + required this.rescuer, + }); factory SetRecovered._decode(_i1.Input input) { - return SetRecovered(lost: _i3.MultiAddress.codec.decode(input), rescuer: _i3.MultiAddress.codec.decode(input)); + return SetRecovered( + lost: _i3.MultiAddress.codec.decode(input), + rescuer: _i3.MultiAddress.codec.decode(input), + ); } /// AccountIdLookupOf @@ -250,8 +308,11 @@ class SetRecovered extends Call { @override Map>> toJson() => { - 'set_recovered': {'lost': lost.toJson(), 'rescuer': rescuer.toJson()}, - }; + 'set_recovered': { + 'lost': lost.toJson(), + 'rescuer': rescuer.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -261,17 +322,33 @@ class SetRecovered extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i3.MultiAddress.codec.encodeTo(lost, output); - _i3.MultiAddress.codec.encodeTo(rescuer, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i3.MultiAddress.codec.encodeTo( + lost, + output, + ); + _i3.MultiAddress.codec.encodeTo( + rescuer, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is SetRecovered && other.lost == lost && other.rescuer == rescuer; + identical( + this, + other, + ) || + other is SetRecovered && other.lost == lost && other.rescuer == rescuer; @override - int get hashCode => Object.hash(lost, rescuer); + int get hashCode => Object.hash( + lost, + rescuer, + ); } /// Create a recovery configuration for your account. This makes your account recoverable. @@ -291,11 +368,16 @@ class SetRecovered extends Call { /// - `delay_period`: The number of blocks after a recovery attempt is initialized that /// needs to pass before the account can be recovered. class CreateRecovery extends Call { - const CreateRecovery({required this.friends, required this.threshold, required this.delayPeriod}); + const CreateRecovery({ + required this.friends, + required this.threshold, + required this.delayPeriod, + }); factory CreateRecovery._decode(_i1.Input input) { return CreateRecovery( - friends: const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()).decode(input), + friends: const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()) + .decode(input), threshold: _i1.U16Codec.codec.decode(input), delayPeriod: _i1.U32Codec.codec.decode(input), ); @@ -312,38 +394,62 @@ class CreateRecovery extends Call { @override Map> toJson() => { - 'create_recovery': { - 'friends': friends.map((value) => value.toList()).toList(), - 'threshold': threshold, - 'delayPeriod': delayPeriod, - }, - }; + 'create_recovery': { + 'friends': friends.map((value) => value.toList()).toList(), + 'threshold': threshold, + 'delayPeriod': delayPeriod, + } + }; int _sizeHint() { int size = 1; - size = size + const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()).sizeHint(friends); + size = size + + const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()) + .sizeHint(friends); size = size + _i1.U16Codec.codec.sizeHint(threshold); size = size + _i1.U32Codec.codec.sizeHint(delayPeriod); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()).encodeTo(friends, output); - _i1.U16Codec.codec.encodeTo(threshold, output); - _i1.U32Codec.codec.encodeTo(delayPeriod, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()).encodeTo( + friends, + output, + ); + _i1.U16Codec.codec.encodeTo( + threshold, + output, + ); + _i1.U32Codec.codec.encodeTo( + delayPeriod, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is CreateRecovery && - _i6.listsEqual(other.friends, friends) && + _i6.listsEqual( + other.friends, + friends, + ) && other.threshold == threshold && other.delayPeriod == delayPeriod; @override - int get hashCode => Object.hash(friends, threshold, delayPeriod); + int get hashCode => Object.hash( + friends, + threshold, + delayPeriod, + ); } /// Initiate the process for recovering a recoverable account. @@ -369,8 +475,8 @@ class InitiateRecovery extends Call { @override Map>> toJson() => { - 'initiate_recovery': {'account': account.toJson()}, - }; + 'initiate_recovery': {'account': account.toJson()} + }; int _sizeHint() { int size = 1; @@ -379,12 +485,23 @@ class InitiateRecovery extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i3.MultiAddress.codec.encodeTo(account, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i3.MultiAddress.codec.encodeTo( + account, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is InitiateRecovery && other.account == account; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is InitiateRecovery && other.account == account; @override int get hashCode => account.hashCode; @@ -403,10 +520,16 @@ class InitiateRecovery extends Call { /// The combination of these two parameters must point to an active recovery /// process. class VouchRecovery extends Call { - const VouchRecovery({required this.lost, required this.rescuer}); + const VouchRecovery({ + required this.lost, + required this.rescuer, + }); factory VouchRecovery._decode(_i1.Input input) { - return VouchRecovery(lost: _i3.MultiAddress.codec.decode(input), rescuer: _i3.MultiAddress.codec.decode(input)); + return VouchRecovery( + lost: _i3.MultiAddress.codec.decode(input), + rescuer: _i3.MultiAddress.codec.decode(input), + ); } /// AccountIdLookupOf @@ -417,8 +540,11 @@ class VouchRecovery extends Call { @override Map>> toJson() => { - 'vouch_recovery': {'lost': lost.toJson(), 'rescuer': rescuer.toJson()}, - }; + 'vouch_recovery': { + 'lost': lost.toJson(), + 'rescuer': rescuer.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -428,17 +554,33 @@ class VouchRecovery extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i3.MultiAddress.codec.encodeTo(lost, output); - _i3.MultiAddress.codec.encodeTo(rescuer, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i3.MultiAddress.codec.encodeTo( + lost, + output, + ); + _i3.MultiAddress.codec.encodeTo( + rescuer, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is VouchRecovery && other.lost == lost && other.rescuer == rescuer; + identical( + this, + other, + ) || + other is VouchRecovery && other.lost == lost && other.rescuer == rescuer; @override - int get hashCode => Object.hash(lost, rescuer); + int get hashCode => Object.hash( + lost, + rescuer, + ); } /// Allow a successful rescuer to claim their recovered account. @@ -462,8 +604,8 @@ class ClaimRecovery extends Call { @override Map>> toJson() => { - 'claim_recovery': {'account': account.toJson()}, - }; + 'claim_recovery': {'account': account.toJson()} + }; int _sizeHint() { int size = 1; @@ -472,12 +614,23 @@ class ClaimRecovery extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i3.MultiAddress.codec.encodeTo(account, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i3.MultiAddress.codec.encodeTo( + account, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ClaimRecovery && other.account == account; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ClaimRecovery && other.account == account; @override int get hashCode => account.hashCode; @@ -506,8 +659,8 @@ class CloseRecovery extends Call { @override Map>> toJson() => { - 'close_recovery': {'rescuer': rescuer.toJson()}, - }; + 'close_recovery': {'rescuer': rescuer.toJson()} + }; int _sizeHint() { int size = 1; @@ -516,12 +669,23 @@ class CloseRecovery extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i3.MultiAddress.codec.encodeTo(rescuer, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i3.MultiAddress.codec.encodeTo( + rescuer, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is CloseRecovery && other.rescuer == rescuer; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is CloseRecovery && other.rescuer == rescuer; @override int get hashCode => rescuer.hashCode; @@ -545,7 +709,10 @@ class RemoveRecovery extends Call { Map toJson() => {'remove_recovery': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); } @override @@ -574,8 +741,8 @@ class CancelRecovered extends Call { @override Map>> toJson() => { - 'cancel_recovered': {'account': account.toJson()}, - }; + 'cancel_recovered': {'account': account.toJson()} + }; int _sizeHint() { int size = 1; @@ -584,12 +751,23 @@ class CancelRecovered extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i3.MultiAddress.codec.encodeTo(account, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i3.MultiAddress.codec.encodeTo( + account, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is CancelRecovered && other.account == account; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is CancelRecovered && other.account == account; @override int get hashCode => account.hashCode; @@ -622,7 +800,10 @@ class PokeDeposit extends Call { const PokeDeposit({this.maybeAccount}); factory PokeDeposit._decode(_i1.Input input) { - return PokeDeposit(maybeAccount: const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec).decode(input)); + return PokeDeposit( + maybeAccount: + const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec) + .decode(input)); } /// Option> @@ -630,23 +811,35 @@ class PokeDeposit extends Call { @override Map?>> toJson() => { - 'poke_deposit': {'maybeAccount': maybeAccount?.toJson()}, - }; + 'poke_deposit': {'maybeAccount': maybeAccount?.toJson()} + }; int _sizeHint() { int size = 1; - size = size + const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec).sizeHint(maybeAccount); + size = size + + const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec) + .sizeHint(maybeAccount); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec).encodeTo(maybeAccount, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec).encodeTo( + maybeAccount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is PokeDeposit && other.maybeAccount == maybeAccount; + identical( + this, + other, + ) || + other is PokeDeposit && other.maybeAccount == maybeAccount; @override int get hashCode => maybeAccount.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/error.dart index 7a117318..e8555cf7 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/error.dart @@ -53,7 +53,10 @@ enum Error { /// Some internal state is broken. badState('BadState', 15); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -117,7 +120,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/event.dart index 6544b0b1..a69b27fd 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/event.dart @@ -39,8 +39,14 @@ class $Event { return RecoveryCreated(account: account); } - RecoveryInitiated recoveryInitiated({required _i3.AccountId32 lostAccount, required _i3.AccountId32 rescuerAccount}) { - return RecoveryInitiated(lostAccount: lostAccount, rescuerAccount: rescuerAccount); + RecoveryInitiated recoveryInitiated({ + required _i3.AccountId32 lostAccount, + required _i3.AccountId32 rescuerAccount, + }) { + return RecoveryInitiated( + lostAccount: lostAccount, + rescuerAccount: rescuerAccount, + ); } RecoveryVouched recoveryVouched({ @@ -48,15 +54,31 @@ class $Event { required _i3.AccountId32 rescuerAccount, required _i3.AccountId32 sender, }) { - return RecoveryVouched(lostAccount: lostAccount, rescuerAccount: rescuerAccount, sender: sender); + return RecoveryVouched( + lostAccount: lostAccount, + rescuerAccount: rescuerAccount, + sender: sender, + ); } - RecoveryClosed recoveryClosed({required _i3.AccountId32 lostAccount, required _i3.AccountId32 rescuerAccount}) { - return RecoveryClosed(lostAccount: lostAccount, rescuerAccount: rescuerAccount); + RecoveryClosed recoveryClosed({ + required _i3.AccountId32 lostAccount, + required _i3.AccountId32 rescuerAccount, + }) { + return RecoveryClosed( + lostAccount: lostAccount, + rescuerAccount: rescuerAccount, + ); } - AccountRecovered accountRecovered({required _i3.AccountId32 lostAccount, required _i3.AccountId32 rescuerAccount}) { - return AccountRecovered(lostAccount: lostAccount, rescuerAccount: rescuerAccount); + AccountRecovered accountRecovered({ + required _i3.AccountId32 lostAccount, + required _i3.AccountId32 rescuerAccount, + }) { + return AccountRecovered( + lostAccount: lostAccount, + rescuerAccount: rescuerAccount, + ); } RecoveryRemoved recoveryRemoved({required _i3.AccountId32 lostAccount}) { @@ -69,7 +91,12 @@ class $Event { required BigInt oldDeposit, required BigInt newDeposit, }) { - return DepositPoked(who: who, kind: kind, oldDeposit: oldDeposit, newDeposit: newDeposit); + return DepositPoked( + who: who, + kind: kind, + oldDeposit: oldDeposit, + newDeposit: newDeposit, + ); } } @@ -100,7 +127,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case RecoveryCreated: (value as RecoveryCreated).encodeTo(output); @@ -124,7 +154,8 @@ class $EventCodec with _i1.Codec { (value as DepositPoked).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -146,7 +177,8 @@ class $EventCodec with _i1.Codec { case DepositPoked: return (value as DepositPoked)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -164,8 +196,8 @@ class RecoveryCreated extends Event { @override Map>> toJson() => { - 'RecoveryCreated': {'account': account.toList()}, - }; + 'RecoveryCreated': {'account': account.toList()} + }; int _sizeHint() { int size = 1; @@ -174,13 +206,27 @@ class RecoveryCreated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is RecoveryCreated && _i5.listsEqual(other.account, account); + identical( + this, + other, + ) || + other is RecoveryCreated && + _i5.listsEqual( + other.account, + account, + ); @override int get hashCode => account.hashCode; @@ -188,7 +234,10 @@ class RecoveryCreated extends Event { /// A recovery process has been initiated for lost account by rescuer account. class RecoveryInitiated extends Event { - const RecoveryInitiated({required this.lostAccount, required this.rescuerAccount}); + const RecoveryInitiated({ + required this.lostAccount, + required this.rescuerAccount, + }); factory RecoveryInitiated._decode(_i1.Input input) { return RecoveryInitiated( @@ -205,8 +254,11 @@ class RecoveryInitiated extends Event { @override Map>> toJson() => { - 'RecoveryInitiated': {'lostAccount': lostAccount.toList(), 'rescuerAccount': rescuerAccount.toList()}, - }; + 'RecoveryInitiated': { + 'lostAccount': lostAccount.toList(), + 'rescuerAccount': rescuerAccount.toList(), + } + }; int _sizeHint() { int size = 1; @@ -216,25 +268,50 @@ class RecoveryInitiated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(lostAccount, output); - const _i1.U8ArrayCodec(32).encodeTo(rescuerAccount, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + lostAccount, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + rescuerAccount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is RecoveryInitiated && - _i5.listsEqual(other.lostAccount, lostAccount) && - _i5.listsEqual(other.rescuerAccount, rescuerAccount); + _i5.listsEqual( + other.lostAccount, + lostAccount, + ) && + _i5.listsEqual( + other.rescuerAccount, + rescuerAccount, + ); @override - int get hashCode => Object.hash(lostAccount, rescuerAccount); + int get hashCode => Object.hash( + lostAccount, + rescuerAccount, + ); } /// A recovery process for lost account by rescuer account has been vouched for by sender. class RecoveryVouched extends Event { - const RecoveryVouched({required this.lostAccount, required this.rescuerAccount, required this.sender}); + const RecoveryVouched({ + required this.lostAccount, + required this.rescuerAccount, + required this.sender, + }); factory RecoveryVouched._decode(_i1.Input input) { return RecoveryVouched( @@ -255,12 +332,12 @@ class RecoveryVouched extends Event { @override Map>> toJson() => { - 'RecoveryVouched': { - 'lostAccount': lostAccount.toList(), - 'rescuerAccount': rescuerAccount.toList(), - 'sender': sender.toList(), - }, - }; + 'RecoveryVouched': { + 'lostAccount': lostAccount.toList(), + 'rescuerAccount': rescuerAccount.toList(), + 'sender': sender.toList(), + } + }; int _sizeHint() { int size = 1; @@ -271,27 +348,58 @@ class RecoveryVouched extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(lostAccount, output); - const _i1.U8ArrayCodec(32).encodeTo(rescuerAccount, output); - const _i1.U8ArrayCodec(32).encodeTo(sender, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + lostAccount, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + rescuerAccount, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + sender, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is RecoveryVouched && - _i5.listsEqual(other.lostAccount, lostAccount) && - _i5.listsEqual(other.rescuerAccount, rescuerAccount) && - _i5.listsEqual(other.sender, sender); + _i5.listsEqual( + other.lostAccount, + lostAccount, + ) && + _i5.listsEqual( + other.rescuerAccount, + rescuerAccount, + ) && + _i5.listsEqual( + other.sender, + sender, + ); @override - int get hashCode => Object.hash(lostAccount, rescuerAccount, sender); + int get hashCode => Object.hash( + lostAccount, + rescuerAccount, + sender, + ); } /// A recovery process for lost account by rescuer account has been closed. class RecoveryClosed extends Event { - const RecoveryClosed({required this.lostAccount, required this.rescuerAccount}); + const RecoveryClosed({ + required this.lostAccount, + required this.rescuerAccount, + }); factory RecoveryClosed._decode(_i1.Input input) { return RecoveryClosed( @@ -308,8 +416,11 @@ class RecoveryClosed extends Event { @override Map>> toJson() => { - 'RecoveryClosed': {'lostAccount': lostAccount.toList(), 'rescuerAccount': rescuerAccount.toList()}, - }; + 'RecoveryClosed': { + 'lostAccount': lostAccount.toList(), + 'rescuerAccount': rescuerAccount.toList(), + } + }; int _sizeHint() { int size = 1; @@ -319,25 +430,49 @@ class RecoveryClosed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(lostAccount, output); - const _i1.U8ArrayCodec(32).encodeTo(rescuerAccount, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + lostAccount, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + rescuerAccount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is RecoveryClosed && - _i5.listsEqual(other.lostAccount, lostAccount) && - _i5.listsEqual(other.rescuerAccount, rescuerAccount); + _i5.listsEqual( + other.lostAccount, + lostAccount, + ) && + _i5.listsEqual( + other.rescuerAccount, + rescuerAccount, + ); @override - int get hashCode => Object.hash(lostAccount, rescuerAccount); + int get hashCode => Object.hash( + lostAccount, + rescuerAccount, + ); } /// Lost account has been successfully recovered by rescuer account. class AccountRecovered extends Event { - const AccountRecovered({required this.lostAccount, required this.rescuerAccount}); + const AccountRecovered({ + required this.lostAccount, + required this.rescuerAccount, + }); factory AccountRecovered._decode(_i1.Input input) { return AccountRecovered( @@ -354,8 +489,11 @@ class AccountRecovered extends Event { @override Map>> toJson() => { - 'AccountRecovered': {'lostAccount': lostAccount.toList(), 'rescuerAccount': rescuerAccount.toList()}, - }; + 'AccountRecovered': { + 'lostAccount': lostAccount.toList(), + 'rescuerAccount': rescuerAccount.toList(), + } + }; int _sizeHint() { int size = 1; @@ -365,20 +503,41 @@ class AccountRecovered extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.U8ArrayCodec(32).encodeTo(lostAccount, output); - const _i1.U8ArrayCodec(32).encodeTo(rescuerAccount, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + lostAccount, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + rescuerAccount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is AccountRecovered && - _i5.listsEqual(other.lostAccount, lostAccount) && - _i5.listsEqual(other.rescuerAccount, rescuerAccount); + _i5.listsEqual( + other.lostAccount, + lostAccount, + ) && + _i5.listsEqual( + other.rescuerAccount, + rescuerAccount, + ); @override - int get hashCode => Object.hash(lostAccount, rescuerAccount); + int get hashCode => Object.hash( + lostAccount, + rescuerAccount, + ); } /// A recovery process has been removed for an account. @@ -386,7 +545,8 @@ class RecoveryRemoved extends Event { const RecoveryRemoved({required this.lostAccount}); factory RecoveryRemoved._decode(_i1.Input input) { - return RecoveryRemoved(lostAccount: const _i1.U8ArrayCodec(32).decode(input)); + return RecoveryRemoved( + lostAccount: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AccountId @@ -394,8 +554,8 @@ class RecoveryRemoved extends Event { @override Map>> toJson() => { - 'RecoveryRemoved': {'lostAccount': lostAccount.toList()}, - }; + 'RecoveryRemoved': {'lostAccount': lostAccount.toList()} + }; int _sizeHint() { int size = 1; @@ -404,13 +564,27 @@ class RecoveryRemoved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - const _i1.U8ArrayCodec(32).encodeTo(lostAccount, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + lostAccount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is RecoveryRemoved && _i5.listsEqual(other.lostAccount, lostAccount); + identical( + this, + other, + ) || + other is RecoveryRemoved && + _i5.listsEqual( + other.lostAccount, + lostAccount, + ); @override int get hashCode => lostAccount.hashCode; @@ -418,7 +592,12 @@ class RecoveryRemoved extends Event { /// A deposit has been updated. class DepositPoked extends Event { - const DepositPoked({required this.who, required this.kind, required this.oldDeposit, required this.newDeposit}); + const DepositPoked({ + required this.who, + required this.kind, + required this.oldDeposit, + required this.newDeposit, + }); factory DepositPoked._decode(_i1.Input input) { return DepositPoked( @@ -443,8 +622,13 @@ class DepositPoked extends Event { @override Map> toJson() => { - 'DepositPoked': {'who': who.toList(), 'kind': kind.toJson(), 'oldDeposit': oldDeposit, 'newDeposit': newDeposit}, - }; + 'DepositPoked': { + 'who': who.toList(), + 'kind': kind.toJson(), + 'oldDeposit': oldDeposit, + 'newDeposit': newDeposit, + } + }; int _sizeHint() { int size = 1; @@ -456,22 +640,48 @@ class DepositPoked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i4.DepositKind.codec.encodeTo(kind, output); - _i1.U128Codec.codec.encodeTo(oldDeposit, output); - _i1.U128Codec.codec.encodeTo(newDeposit, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i4.DepositKind.codec.encodeTo( + kind, + output, + ); + _i1.U128Codec.codec.encodeTo( + oldDeposit, + output, + ); + _i1.U128Codec.codec.encodeTo( + newDeposit, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is DepositPoked && - _i5.listsEqual(other.who, who) && + _i5.listsEqual( + other.who, + who, + ) && other.kind == kind && other.oldDeposit == oldDeposit && other.newDeposit == newDeposit; @override - int get hashCode => Object.hash(who, kind, oldDeposit, newDeposit); + int get hashCode => Object.hash( + who, + kind, + oldDeposit, + newDeposit, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/recovery_config.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/recovery_config.dart index 2a6992a2..75daa32a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/recovery_config.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/recovery_config.dart @@ -37,34 +37,60 @@ class RecoveryConfig { } Map toJson() => { - 'delayPeriod': delayPeriod, - 'deposit': deposit, - 'friends': friends.map((value) => value.toList()).toList(), - 'threshold': threshold, - }; + 'delayPeriod': delayPeriod, + 'deposit': deposit, + 'friends': friends.map((value) => value.toList()).toList(), + 'threshold': threshold, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is RecoveryConfig && other.delayPeriod == delayPeriod && other.deposit == deposit && - _i4.listsEqual(other.friends, friends) && + _i4.listsEqual( + other.friends, + friends, + ) && other.threshold == threshold; @override - int get hashCode => Object.hash(delayPeriod, deposit, friends, threshold); + int get hashCode => Object.hash( + delayPeriod, + deposit, + friends, + threshold, + ); } class $RecoveryConfigCodec with _i1.Codec { const $RecoveryConfigCodec(); @override - void encodeTo(RecoveryConfig obj, _i1.Output output) { - _i1.U32Codec.codec.encodeTo(obj.delayPeriod, output); - _i1.U128Codec.codec.encodeTo(obj.deposit, output); - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo(obj.friends, output); - _i1.U16Codec.codec.encodeTo(obj.threshold, output); + void encodeTo( + RecoveryConfig obj, + _i1.Output output, + ) { + _i1.U32Codec.codec.encodeTo( + obj.delayPeriod, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.deposit, + output, + ); + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo( + obj.friends, + output, + ); + _i1.U16Codec.codec.encodeTo( + obj.threshold, + output, + ); } @override @@ -72,7 +98,8 @@ class $RecoveryConfigCodec with _i1.Codec { return RecoveryConfig( delayPeriod: _i1.U32Codec.codec.decode(input), deposit: _i1.U128Codec.codec.decode(input), - friends: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).decode(input), + friends: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) + .decode(input), threshold: _i1.U16Codec.codec.decode(input), ); } @@ -82,7 +109,9 @@ class $RecoveryConfigCodec with _i1.Codec { int size = 0; size = size + _i1.U32Codec.codec.sizeHint(obj.delayPeriod); size = size + _i1.U128Codec.codec.sizeHint(obj.deposit); - size = size + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).sizeHint(obj.friends); + size = size + + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) + .sizeHint(obj.friends); size = size + _i1.U16Codec.codec.sizeHint(obj.threshold); return size; } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_1.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_1.dart index bb798313..1e8b28e5 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_1.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_1.dart @@ -41,7 +41,11 @@ class $Call { required _i4.Bounded proposal, required _i5.DispatchTime enactmentMoment, }) { - return Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment); + return Submit( + proposalOrigin: proposalOrigin, + proposal: proposal, + enactmentMoment: enactmentMoment, + ); } PlaceDecisionDeposit placeDecisionDeposit({required int index}) { @@ -72,8 +76,14 @@ class $Call { return RefundSubmissionDeposit(index: index); } - SetMetadata setMetadata({required int index, _i6.H256? maybeHash}) { - return SetMetadata(index: index, maybeHash: maybeHash); + SetMetadata setMetadata({ + required int index, + _i6.H256? maybeHash, + }) { + return SetMetadata( + index: index, + maybeHash: maybeHash, + ); } } @@ -108,7 +118,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case Submit: (value as Submit).encodeTo(output); @@ -138,7 +151,8 @@ class $CallCodec with _i1.Codec { (value as SetMetadata).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -164,7 +178,8 @@ class $CallCodec with _i1.Codec { case SetMetadata: return (value as SetMetadata)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -179,7 +194,11 @@ class $CallCodec with _i1.Codec { /// /// Emits `Submitted`. class Submit extends Call { - const Submit({required this.proposalOrigin, required this.proposal, required this.enactmentMoment}); + const Submit({ + required this.proposalOrigin, + required this.proposal, + required this.enactmentMoment, + }); factory Submit._decode(_i1.Input input) { return Submit( @@ -200,12 +219,12 @@ class Submit extends Call { @override Map>> toJson() => { - 'submit': { - 'proposalOrigin': proposalOrigin.toJson(), - 'proposal': proposal.toJson(), - 'enactmentMoment': enactmentMoment.toJson(), - }, - }; + 'submit': { + 'proposalOrigin': proposalOrigin.toJson(), + 'proposal': proposal.toJson(), + 'enactmentMoment': enactmentMoment.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -216,22 +235,41 @@ class Submit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.OriginCaller.codec.encodeTo(proposalOrigin, output); - _i4.Bounded.codec.encodeTo(proposal, output); - _i5.DispatchTime.codec.encodeTo(enactmentMoment, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.OriginCaller.codec.encodeTo( + proposalOrigin, + output, + ); + _i4.Bounded.codec.encodeTo( + proposal, + output, + ); + _i5.DispatchTime.codec.encodeTo( + enactmentMoment, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Submit && other.proposalOrigin == proposalOrigin && other.proposal == proposal && other.enactmentMoment == enactmentMoment; @override - int get hashCode => Object.hash(proposalOrigin, proposal, enactmentMoment); + int get hashCode => Object.hash( + proposalOrigin, + proposal, + enactmentMoment, + ); } /// Post the Decision Deposit for a referendum. @@ -254,8 +292,8 @@ class PlaceDecisionDeposit extends Call { @override Map> toJson() => { - 'place_decision_deposit': {'index': index}, - }; + 'place_decision_deposit': {'index': index} + }; int _sizeHint() { int size = 1; @@ -264,12 +302,23 @@ class PlaceDecisionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is PlaceDecisionDeposit && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is PlaceDecisionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -294,8 +343,8 @@ class RefundDecisionDeposit extends Call { @override Map> toJson() => { - 'refund_decision_deposit': {'index': index}, - }; + 'refund_decision_deposit': {'index': index} + }; int _sizeHint() { int size = 1; @@ -304,12 +353,23 @@ class RefundDecisionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is RefundDecisionDeposit && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is RefundDecisionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -333,8 +393,8 @@ class Cancel extends Call { @override Map> toJson() => { - 'cancel': {'index': index}, - }; + 'cancel': {'index': index} + }; int _sizeHint() { int size = 1; @@ -343,12 +403,23 @@ class Cancel extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Cancel && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Cancel && other.index == index; @override int get hashCode => index.hashCode; @@ -372,8 +443,8 @@ class Kill extends Call { @override Map> toJson() => { - 'kill': {'index': index}, - }; + 'kill': {'index': index} + }; int _sizeHint() { int size = 1; @@ -382,12 +453,23 @@ class Kill extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Kill && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Kill && other.index == index; @override int get hashCode => index.hashCode; @@ -409,8 +491,8 @@ class NudgeReferendum extends Call { @override Map> toJson() => { - 'nudge_referendum': {'index': index}, - }; + 'nudge_referendum': {'index': index} + }; int _sizeHint() { int size = 1; @@ -419,12 +501,23 @@ class NudgeReferendum extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is NudgeReferendum && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is NudgeReferendum && other.index == index; @override int get hashCode => index.hashCode; @@ -451,8 +544,8 @@ class OneFewerDeciding extends Call { @override Map> toJson() => { - 'one_fewer_deciding': {'track': track}, - }; + 'one_fewer_deciding': {'track': track} + }; int _sizeHint() { int size = 1; @@ -461,12 +554,23 @@ class OneFewerDeciding extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.U16Codec.codec.encodeTo(track, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i1.U16Codec.codec.encodeTo( + track, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is OneFewerDeciding && other.track == track; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is OneFewerDeciding && other.track == track; @override int get hashCode => track.hashCode; @@ -491,8 +595,8 @@ class RefundSubmissionDeposit extends Call { @override Map> toJson() => { - 'refund_submission_deposit': {'index': index}, - }; + 'refund_submission_deposit': {'index': index} + }; int _sizeHint() { int size = 1; @@ -501,12 +605,23 @@ class RefundSubmissionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is RefundSubmissionDeposit && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is RefundSubmissionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -520,7 +635,10 @@ class RefundSubmissionDeposit extends Call { /// - `index`: The index of a referendum to set or clear metadata for. /// - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. class SetMetadata extends Call { - const SetMetadata({required this.index, this.maybeHash}); + const SetMetadata({ + required this.index, + this.maybeHash, + }); factory SetMetadata._decode(_i1.Input input) { return SetMetadata( @@ -537,26 +655,48 @@ class SetMetadata extends Call { @override Map> toJson() => { - 'set_metadata': {'index': index, 'maybeHash': maybeHash?.toList()}, - }; + 'set_metadata': { + 'index': index, + 'maybeHash': maybeHash?.toList(), + } + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).sizeHint(maybeHash); + size = size + + const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).sizeHint(maybeHash); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).encodeTo(maybeHash, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).encodeTo( + maybeHash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is SetMetadata && other.index == index && other.maybeHash == maybeHash; + identical( + this, + other, + ) || + other is SetMetadata && + other.index == index && + other.maybeHash == maybeHash; @override - int get hashCode => Object.hash(index, maybeHash); + int get hashCode => Object.hash( + index, + maybeHash, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_2.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_2.dart index bb798313..1e8b28e5 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_2.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_2.dart @@ -41,7 +41,11 @@ class $Call { required _i4.Bounded proposal, required _i5.DispatchTime enactmentMoment, }) { - return Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment); + return Submit( + proposalOrigin: proposalOrigin, + proposal: proposal, + enactmentMoment: enactmentMoment, + ); } PlaceDecisionDeposit placeDecisionDeposit({required int index}) { @@ -72,8 +76,14 @@ class $Call { return RefundSubmissionDeposit(index: index); } - SetMetadata setMetadata({required int index, _i6.H256? maybeHash}) { - return SetMetadata(index: index, maybeHash: maybeHash); + SetMetadata setMetadata({ + required int index, + _i6.H256? maybeHash, + }) { + return SetMetadata( + index: index, + maybeHash: maybeHash, + ); } } @@ -108,7 +118,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case Submit: (value as Submit).encodeTo(output); @@ -138,7 +151,8 @@ class $CallCodec with _i1.Codec { (value as SetMetadata).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -164,7 +178,8 @@ class $CallCodec with _i1.Codec { case SetMetadata: return (value as SetMetadata)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -179,7 +194,11 @@ class $CallCodec with _i1.Codec { /// /// Emits `Submitted`. class Submit extends Call { - const Submit({required this.proposalOrigin, required this.proposal, required this.enactmentMoment}); + const Submit({ + required this.proposalOrigin, + required this.proposal, + required this.enactmentMoment, + }); factory Submit._decode(_i1.Input input) { return Submit( @@ -200,12 +219,12 @@ class Submit extends Call { @override Map>> toJson() => { - 'submit': { - 'proposalOrigin': proposalOrigin.toJson(), - 'proposal': proposal.toJson(), - 'enactmentMoment': enactmentMoment.toJson(), - }, - }; + 'submit': { + 'proposalOrigin': proposalOrigin.toJson(), + 'proposal': proposal.toJson(), + 'enactmentMoment': enactmentMoment.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -216,22 +235,41 @@ class Submit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.OriginCaller.codec.encodeTo(proposalOrigin, output); - _i4.Bounded.codec.encodeTo(proposal, output); - _i5.DispatchTime.codec.encodeTo(enactmentMoment, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.OriginCaller.codec.encodeTo( + proposalOrigin, + output, + ); + _i4.Bounded.codec.encodeTo( + proposal, + output, + ); + _i5.DispatchTime.codec.encodeTo( + enactmentMoment, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Submit && other.proposalOrigin == proposalOrigin && other.proposal == proposal && other.enactmentMoment == enactmentMoment; @override - int get hashCode => Object.hash(proposalOrigin, proposal, enactmentMoment); + int get hashCode => Object.hash( + proposalOrigin, + proposal, + enactmentMoment, + ); } /// Post the Decision Deposit for a referendum. @@ -254,8 +292,8 @@ class PlaceDecisionDeposit extends Call { @override Map> toJson() => { - 'place_decision_deposit': {'index': index}, - }; + 'place_decision_deposit': {'index': index} + }; int _sizeHint() { int size = 1; @@ -264,12 +302,23 @@ class PlaceDecisionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is PlaceDecisionDeposit && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is PlaceDecisionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -294,8 +343,8 @@ class RefundDecisionDeposit extends Call { @override Map> toJson() => { - 'refund_decision_deposit': {'index': index}, - }; + 'refund_decision_deposit': {'index': index} + }; int _sizeHint() { int size = 1; @@ -304,12 +353,23 @@ class RefundDecisionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is RefundDecisionDeposit && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is RefundDecisionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -333,8 +393,8 @@ class Cancel extends Call { @override Map> toJson() => { - 'cancel': {'index': index}, - }; + 'cancel': {'index': index} + }; int _sizeHint() { int size = 1; @@ -343,12 +403,23 @@ class Cancel extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Cancel && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Cancel && other.index == index; @override int get hashCode => index.hashCode; @@ -372,8 +443,8 @@ class Kill extends Call { @override Map> toJson() => { - 'kill': {'index': index}, - }; + 'kill': {'index': index} + }; int _sizeHint() { int size = 1; @@ -382,12 +453,23 @@ class Kill extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Kill && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Kill && other.index == index; @override int get hashCode => index.hashCode; @@ -409,8 +491,8 @@ class NudgeReferendum extends Call { @override Map> toJson() => { - 'nudge_referendum': {'index': index}, - }; + 'nudge_referendum': {'index': index} + }; int _sizeHint() { int size = 1; @@ -419,12 +501,23 @@ class NudgeReferendum extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is NudgeReferendum && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is NudgeReferendum && other.index == index; @override int get hashCode => index.hashCode; @@ -451,8 +544,8 @@ class OneFewerDeciding extends Call { @override Map> toJson() => { - 'one_fewer_deciding': {'track': track}, - }; + 'one_fewer_deciding': {'track': track} + }; int _sizeHint() { int size = 1; @@ -461,12 +554,23 @@ class OneFewerDeciding extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.U16Codec.codec.encodeTo(track, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i1.U16Codec.codec.encodeTo( + track, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is OneFewerDeciding && other.track == track; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is OneFewerDeciding && other.track == track; @override int get hashCode => track.hashCode; @@ -491,8 +595,8 @@ class RefundSubmissionDeposit extends Call { @override Map> toJson() => { - 'refund_submission_deposit': {'index': index}, - }; + 'refund_submission_deposit': {'index': index} + }; int _sizeHint() { int size = 1; @@ -501,12 +605,23 @@ class RefundSubmissionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is RefundSubmissionDeposit && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is RefundSubmissionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -520,7 +635,10 @@ class RefundSubmissionDeposit extends Call { /// - `index`: The index of a referendum to set or clear metadata for. /// - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. class SetMetadata extends Call { - const SetMetadata({required this.index, this.maybeHash}); + const SetMetadata({ + required this.index, + this.maybeHash, + }); factory SetMetadata._decode(_i1.Input input) { return SetMetadata( @@ -537,26 +655,48 @@ class SetMetadata extends Call { @override Map> toJson() => { - 'set_metadata': {'index': index, 'maybeHash': maybeHash?.toList()}, - }; + 'set_metadata': { + 'index': index, + 'maybeHash': maybeHash?.toList(), + } + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).sizeHint(maybeHash); + size = size + + const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).sizeHint(maybeHash); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).encodeTo(maybeHash, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).encodeTo( + maybeHash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is SetMetadata && other.index == index && other.maybeHash == maybeHash; + identical( + this, + other, + ) || + other is SetMetadata && + other.index == index && + other.maybeHash == maybeHash; @override - int get hashCode => Object.hash(index, maybeHash); + int get hashCode => Object.hash( + index, + maybeHash, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_1.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_1.dart index 79d21e4a..b238e661 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_1.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_1.dart @@ -47,7 +47,10 @@ enum Error { /// The preimage is stored with a different length than the one provided. preimageStoredWithDifferentLength('PreimageStoredWithDifferentLength', 13); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -107,7 +110,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_2.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_2.dart index 79d21e4a..b238e661 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_2.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_2.dart @@ -47,7 +47,10 @@ enum Error { /// The preimage is stored with a different length than the one provided. preimageStoredWithDifferentLength('PreimageStoredWithDifferentLength', 13); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -107,7 +110,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_1.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_1.dart index 1be40aae..af8eb6e4 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_1.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_1.dart @@ -37,8 +37,16 @@ abstract class Event { class $Event { const $Event(); - Submitted submitted({required int index, required int track, required _i3.Bounded proposal}) { - return Submitted(index: index, track: track, proposal: proposal); + Submitted submitted({ + required int index, + required int track, + required _i3.Bounded proposal, + }) { + return Submitted( + index: index, + track: track, + proposal: proposal, + ); } DecisionDepositPlaced decisionDepositPlaced({ @@ -46,7 +54,11 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return DecisionDepositPlaced(index: index, who: who, amount: amount); + return DecisionDepositPlaced( + index: index, + who: who, + amount: amount, + ); } DecisionDepositRefunded decisionDepositRefunded({ @@ -54,11 +66,21 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return DecisionDepositRefunded(index: index, who: who, amount: amount); + return DecisionDepositRefunded( + index: index, + who: who, + amount: amount, + ); } - DepositSlashed depositSlashed({required _i4.AccountId32 who, required BigInt amount}) { - return DepositSlashed(who: who, amount: amount); + DepositSlashed depositSlashed({ + required _i4.AccountId32 who, + required BigInt amount, + }) { + return DepositSlashed( + who: who, + amount: amount, + ); } DecisionStarted decisionStarted({ @@ -67,7 +89,12 @@ class $Event { required _i3.Bounded proposal, required _i5.Tally tally, }) { - return DecisionStarted(index: index, track: track, proposal: proposal, tally: tally); + return DecisionStarted( + index: index, + track: track, + proposal: proposal, + tally: tally, + ); } ConfirmStarted confirmStarted({required int index}) { @@ -78,28 +105,58 @@ class $Event { return ConfirmAborted(index: index); } - Confirmed confirmed({required int index, required _i5.Tally tally}) { - return Confirmed(index: index, tally: tally); + Confirmed confirmed({ + required int index, + required _i5.Tally tally, + }) { + return Confirmed( + index: index, + tally: tally, + ); } Approved approved({required int index}) { return Approved(index: index); } - Rejected rejected({required int index, required _i5.Tally tally}) { - return Rejected(index: index, tally: tally); + Rejected rejected({ + required int index, + required _i5.Tally tally, + }) { + return Rejected( + index: index, + tally: tally, + ); } - TimedOut timedOut({required int index, required _i5.Tally tally}) { - return TimedOut(index: index, tally: tally); + TimedOut timedOut({ + required int index, + required _i5.Tally tally, + }) { + return TimedOut( + index: index, + tally: tally, + ); } - Cancelled cancelled({required int index, required _i5.Tally tally}) { - return Cancelled(index: index, tally: tally); + Cancelled cancelled({ + required int index, + required _i5.Tally tally, + }) { + return Cancelled( + index: index, + tally: tally, + ); } - Killed killed({required int index, required _i5.Tally tally}) { - return Killed(index: index, tally: tally); + Killed killed({ + required int index, + required _i5.Tally tally, + }) { + return Killed( + index: index, + tally: tally, + ); } SubmissionDepositRefunded submissionDepositRefunded({ @@ -107,15 +164,31 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return SubmissionDepositRefunded(index: index, who: who, amount: amount); + return SubmissionDepositRefunded( + index: index, + who: who, + amount: amount, + ); } - MetadataSet metadataSet({required int index, required _i6.H256 hash}) { - return MetadataSet(index: index, hash: hash); + MetadataSet metadataSet({ + required int index, + required _i6.H256 hash, + }) { + return MetadataSet( + index: index, + hash: hash, + ); } - MetadataCleared metadataCleared({required int index, required _i6.H256 hash}) { - return MetadataCleared(index: index, hash: hash); + MetadataCleared metadataCleared({ + required int index, + required _i6.H256 hash, + }) { + return MetadataCleared( + index: index, + hash: hash, + ); } } @@ -164,7 +237,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case Submitted: (value as Submitted).encodeTo(output); @@ -215,7 +291,8 @@ class $EventCodec with _i1.Codec { (value as MetadataCleared).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -255,14 +332,19 @@ class $EventCodec with _i1.Codec { case MetadataCleared: return (value as MetadataCleared)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A referendum has been submitted. class Submitted extends Event { - const Submitted({required this.index, required this.track, required this.proposal}); + const Submitted({ + required this.index, + required this.track, + required this.proposal, + }); factory Submitted._decode(_i1.Input input) { return Submitted( @@ -286,8 +368,12 @@ class Submitted extends Event { @override Map> toJson() => { - 'Submitted': {'index': index, 'track': track, 'proposal': proposal.toJson()}, - }; + 'Submitted': { + 'index': index, + 'track': track, + 'proposal': proposal.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -298,24 +384,50 @@ class Submitted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i1.U16Codec.codec.encodeTo(track, output); - _i3.Bounded.codec.encodeTo(proposal, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i1.U16Codec.codec.encodeTo( + track, + output, + ); + _i3.Bounded.codec.encodeTo( + proposal, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Submitted && other.index == index && other.track == track && other.proposal == proposal; + identical( + this, + other, + ) || + other is Submitted && + other.index == index && + other.track == track && + other.proposal == proposal; @override - int get hashCode => Object.hash(index, track, proposal); + int get hashCode => Object.hash( + index, + track, + proposal, + ); } /// The decision deposit has been placed. class DecisionDepositPlaced extends Event { - const DecisionDepositPlaced({required this.index, required this.who, required this.amount}); + const DecisionDepositPlaced({ + required this.index, + required this.who, + required this.amount, + }); factory DecisionDepositPlaced._decode(_i1.Input input) { return DecisionDepositPlaced( @@ -339,8 +451,12 @@ class DecisionDepositPlaced extends Event { @override Map> toJson() => { - 'DecisionDepositPlaced': {'index': index, 'who': who.toList(), 'amount': amount}, - }; + 'DecisionDepositPlaced': { + 'index': index, + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -351,27 +467,53 @@ class DecisionDepositPlaced extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is DecisionDepositPlaced && other.index == index && - _i7.listsEqual(other.who, who) && + _i7.listsEqual( + other.who, + who, + ) && other.amount == amount; @override - int get hashCode => Object.hash(index, who, amount); + int get hashCode => Object.hash( + index, + who, + amount, + ); } /// The decision deposit has been refunded. class DecisionDepositRefunded extends Event { - const DecisionDepositRefunded({required this.index, required this.who, required this.amount}); + const DecisionDepositRefunded({ + required this.index, + required this.who, + required this.amount, + }); factory DecisionDepositRefunded._decode(_i1.Input input) { return DecisionDepositRefunded( @@ -395,8 +537,12 @@ class DecisionDepositRefunded extends Event { @override Map> toJson() => { - 'DecisionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, - }; + 'DecisionDepositRefunded': { + 'index': index, + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -407,30 +553,58 @@ class DecisionDepositRefunded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is DecisionDepositRefunded && other.index == index && - _i7.listsEqual(other.who, who) && + _i7.listsEqual( + other.who, + who, + ) && other.amount == amount; @override - int get hashCode => Object.hash(index, who, amount); + int get hashCode => Object.hash( + index, + who, + amount, + ); } /// A deposit has been slashed. class DepositSlashed extends Event { - const DepositSlashed({required this.who, required this.amount}); + const DepositSlashed({ + required this.who, + required this.amount, + }); factory DepositSlashed._decode(_i1.Input input) { - return DepositSlashed(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return DepositSlashed( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -443,8 +617,11 @@ class DepositSlashed extends Event { @override Map> toJson() => { - 'DepositSlashed': {'who': who.toList(), 'amount': amount}, - }; + 'DepositSlashed': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -454,22 +631,48 @@ class DepositSlashed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is DepositSlashed && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is DepositSlashed && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// A referendum has moved into the deciding phase. class DecisionStarted extends Event { - const DecisionStarted({required this.index, required this.track, required this.proposal, required this.tally}); + const DecisionStarted({ + required this.index, + required this.track, + required this.proposal, + required this.tally, + }); factory DecisionStarted._decode(_i1.Input input) { return DecisionStarted( @@ -498,8 +701,13 @@ class DecisionStarted extends Event { @override Map> toJson() => { - 'DecisionStarted': {'index': index, 'track': track, 'proposal': proposal.toJson(), 'tally': tally.toJson()}, - }; + 'DecisionStarted': { + 'index': index, + 'track': track, + 'proposal': proposal.toJson(), + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -511,16 +719,34 @@ class DecisionStarted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i1.U16Codec.codec.encodeTo(track, output); - _i3.Bounded.codec.encodeTo(proposal, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i1.U16Codec.codec.encodeTo( + track, + output, + ); + _i3.Bounded.codec.encodeTo( + proposal, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is DecisionStarted && other.index == index && other.track == track && @@ -528,7 +754,12 @@ class DecisionStarted extends Event { other.tally == tally; @override - int get hashCode => Object.hash(index, track, proposal, tally); + int get hashCode => Object.hash( + index, + track, + proposal, + tally, + ); } class ConfirmStarted extends Event { @@ -544,8 +775,8 @@ class ConfirmStarted extends Event { @override Map> toJson() => { - 'ConfirmStarted': {'index': index}, - }; + 'ConfirmStarted': {'index': index} + }; int _sizeHint() { int size = 1; @@ -554,12 +785,23 @@ class ConfirmStarted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ConfirmStarted && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ConfirmStarted && other.index == index; @override int get hashCode => index.hashCode; @@ -578,8 +820,8 @@ class ConfirmAborted extends Event { @override Map> toJson() => { - 'ConfirmAborted': {'index': index}, - }; + 'ConfirmAborted': {'index': index} + }; int _sizeHint() { int size = 1; @@ -588,12 +830,23 @@ class ConfirmAborted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ConfirmAborted && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ConfirmAborted && other.index == index; @override int get hashCode => index.hashCode; @@ -601,10 +854,16 @@ class ConfirmAborted extends Event { /// A referendum has ended its confirmation phase and is ready for approval. class Confirmed extends Event { - const Confirmed({required this.index, required this.tally}); + const Confirmed({ + required this.index, + required this.tally, + }); factory Confirmed._decode(_i1.Input input) { - return Confirmed(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); + return Confirmed( + index: _i1.U32Codec.codec.decode(input), + tally: _i5.Tally.codec.decode(input), + ); } /// ReferendumIndex @@ -617,8 +876,11 @@ class Confirmed extends Event { @override Map> toJson() => { - 'Confirmed': {'index': index, 'tally': tally.toJson()}, - }; + 'Confirmed': { + 'index': index, + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -628,17 +890,33 @@ class Confirmed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Confirmed && other.index == index && other.tally == tally; + identical( + this, + other, + ) || + other is Confirmed && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash(index, tally); + int get hashCode => Object.hash( + index, + tally, + ); } /// A referendum has been approved and its proposal has been scheduled. @@ -655,8 +933,8 @@ class Approved extends Event { @override Map> toJson() => { - 'Approved': {'index': index}, - }; + 'Approved': {'index': index} + }; int _sizeHint() { int size = 1; @@ -665,12 +943,23 @@ class Approved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Approved && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Approved && other.index == index; @override int get hashCode => index.hashCode; @@ -678,10 +967,16 @@ class Approved extends Event { /// A proposal has been rejected by referendum. class Rejected extends Event { - const Rejected({required this.index, required this.tally}); + const Rejected({ + required this.index, + required this.tally, + }); factory Rejected._decode(_i1.Input input) { - return Rejected(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); + return Rejected( + index: _i1.U32Codec.codec.decode(input), + tally: _i5.Tally.codec.decode(input), + ); } /// ReferendumIndex @@ -694,8 +989,11 @@ class Rejected extends Event { @override Map> toJson() => { - 'Rejected': {'index': index, 'tally': tally.toJson()}, - }; + 'Rejected': { + 'index': index, + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -705,25 +1003,47 @@ class Rejected extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Rejected && other.index == index && other.tally == tally; + identical( + this, + other, + ) || + other is Rejected && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash(index, tally); + int get hashCode => Object.hash( + index, + tally, + ); } /// A referendum has been timed out without being decided. class TimedOut extends Event { - const TimedOut({required this.index, required this.tally}); + const TimedOut({ + required this.index, + required this.tally, + }); factory TimedOut._decode(_i1.Input input) { - return TimedOut(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); + return TimedOut( + index: _i1.U32Codec.codec.decode(input), + tally: _i5.Tally.codec.decode(input), + ); } /// ReferendumIndex @@ -736,8 +1056,11 @@ class TimedOut extends Event { @override Map> toJson() => { - 'TimedOut': {'index': index, 'tally': tally.toJson()}, - }; + 'TimedOut': { + 'index': index, + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -747,25 +1070,47 @@ class TimedOut extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is TimedOut && other.index == index && other.tally == tally; + identical( + this, + other, + ) || + other is TimedOut && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash(index, tally); + int get hashCode => Object.hash( + index, + tally, + ); } /// A referendum has been cancelled. class Cancelled extends Event { - const Cancelled({required this.index, required this.tally}); + const Cancelled({ + required this.index, + required this.tally, + }); factory Cancelled._decode(_i1.Input input) { - return Cancelled(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); + return Cancelled( + index: _i1.U32Codec.codec.decode(input), + tally: _i5.Tally.codec.decode(input), + ); } /// ReferendumIndex @@ -778,8 +1123,11 @@ class Cancelled extends Event { @override Map> toJson() => { - 'Cancelled': {'index': index, 'tally': tally.toJson()}, - }; + 'Cancelled': { + 'index': index, + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -789,25 +1137,47 @@ class Cancelled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Cancelled && other.index == index && other.tally == tally; + identical( + this, + other, + ) || + other is Cancelled && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash(index, tally); + int get hashCode => Object.hash( + index, + tally, + ); } /// A referendum has been killed. class Killed extends Event { - const Killed({required this.index, required this.tally}); + const Killed({ + required this.index, + required this.tally, + }); factory Killed._decode(_i1.Input input) { - return Killed(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); + return Killed( + index: _i1.U32Codec.codec.decode(input), + tally: _i5.Tally.codec.decode(input), + ); } /// ReferendumIndex @@ -820,8 +1190,11 @@ class Killed extends Event { @override Map> toJson() => { - 'Killed': {'index': index, 'tally': tally.toJson()}, - }; + 'Killed': { + 'index': index, + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -831,22 +1204,42 @@ class Killed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 12, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Killed && other.index == index && other.tally == tally; + identical( + this, + other, + ) || + other is Killed && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash(index, tally); + int get hashCode => Object.hash( + index, + tally, + ); } /// The submission deposit has been refunded. class SubmissionDepositRefunded extends Event { - const SubmissionDepositRefunded({required this.index, required this.who, required this.amount}); + const SubmissionDepositRefunded({ + required this.index, + required this.who, + required this.amount, + }); factory SubmissionDepositRefunded._decode(_i1.Input input) { return SubmissionDepositRefunded( @@ -870,8 +1263,12 @@ class SubmissionDepositRefunded extends Event { @override Map> toJson() => { - 'SubmissionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, - }; + 'SubmissionDepositRefunded': { + 'index': index, + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -882,30 +1279,58 @@ class SubmissionDepositRefunded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 13, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is SubmissionDepositRefunded && other.index == index && - _i7.listsEqual(other.who, who) && + _i7.listsEqual( + other.who, + who, + ) && other.amount == amount; @override - int get hashCode => Object.hash(index, who, amount); + int get hashCode => Object.hash( + index, + who, + amount, + ); } /// Metadata for a referendum has been set. class MetadataSet extends Event { - const MetadataSet({required this.index, required this.hash}); + const MetadataSet({ + required this.index, + required this.hash, + }); factory MetadataSet._decode(_i1.Input input) { - return MetadataSet(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); + return MetadataSet( + index: _i1.U32Codec.codec.decode(input), + hash: const _i1.U8ArrayCodec(32).decode(input), + ); } /// ReferendumIndex @@ -918,8 +1343,11 @@ class MetadataSet extends Event { @override Map> toJson() => { - 'MetadataSet': {'index': index, 'hash': hash.toList()}, - }; + 'MetadataSet': { + 'index': index, + 'hash': hash.toList(), + } + }; int _sizeHint() { int size = 1; @@ -929,25 +1357,52 @@ class MetadataSet extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 14, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is MetadataSet && other.index == index && _i7.listsEqual(other.hash, hash); + identical( + this, + other, + ) || + other is MetadataSet && + other.index == index && + _i7.listsEqual( + other.hash, + hash, + ); @override - int get hashCode => Object.hash(index, hash); + int get hashCode => Object.hash( + index, + hash, + ); } /// Metadata for a referendum has been cleared. class MetadataCleared extends Event { - const MetadataCleared({required this.index, required this.hash}); + const MetadataCleared({ + required this.index, + required this.hash, + }); factory MetadataCleared._decode(_i1.Input input) { - return MetadataCleared(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); + return MetadataCleared( + index: _i1.U32Codec.codec.decode(input), + hash: const _i1.U8ArrayCodec(32).decode(input), + ); } /// ReferendumIndex @@ -960,8 +1415,11 @@ class MetadataCleared extends Event { @override Map> toJson() => { - 'MetadataCleared': {'index': index, 'hash': hash.toList()}, - }; + 'MetadataCleared': { + 'index': index, + 'hash': hash.toList(), + } + }; int _sizeHint() { int size = 1; @@ -971,15 +1429,36 @@ class MetadataCleared extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 15, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is MetadataCleared && other.index == index && _i7.listsEqual(other.hash, hash); + identical( + this, + other, + ) || + other is MetadataCleared && + other.index == index && + _i7.listsEqual( + other.hash, + hash, + ); @override - int get hashCode => Object.hash(index, hash); + int get hashCode => Object.hash( + index, + hash, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_2.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_2.dart index 4010a513..a205a0a7 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_2.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_2.dart @@ -37,8 +37,16 @@ abstract class Event { class $Event { const $Event(); - Submitted submitted({required int index, required int track, required _i3.Bounded proposal}) { - return Submitted(index: index, track: track, proposal: proposal); + Submitted submitted({ + required int index, + required int track, + required _i3.Bounded proposal, + }) { + return Submitted( + index: index, + track: track, + proposal: proposal, + ); } DecisionDepositPlaced decisionDepositPlaced({ @@ -46,7 +54,11 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return DecisionDepositPlaced(index: index, who: who, amount: amount); + return DecisionDepositPlaced( + index: index, + who: who, + amount: amount, + ); } DecisionDepositRefunded decisionDepositRefunded({ @@ -54,11 +66,21 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return DecisionDepositRefunded(index: index, who: who, amount: amount); + return DecisionDepositRefunded( + index: index, + who: who, + amount: amount, + ); } - DepositSlashed depositSlashed({required _i4.AccountId32 who, required BigInt amount}) { - return DepositSlashed(who: who, amount: amount); + DepositSlashed depositSlashed({ + required _i4.AccountId32 who, + required BigInt amount, + }) { + return DepositSlashed( + who: who, + amount: amount, + ); } DecisionStarted decisionStarted({ @@ -67,7 +89,12 @@ class $Event { required _i3.Bounded proposal, required _i5.Tally tally, }) { - return DecisionStarted(index: index, track: track, proposal: proposal, tally: tally); + return DecisionStarted( + index: index, + track: track, + proposal: proposal, + tally: tally, + ); } ConfirmStarted confirmStarted({required int index}) { @@ -78,28 +105,58 @@ class $Event { return ConfirmAborted(index: index); } - Confirmed confirmed({required int index, required _i5.Tally tally}) { - return Confirmed(index: index, tally: tally); + Confirmed confirmed({ + required int index, + required _i5.Tally tally, + }) { + return Confirmed( + index: index, + tally: tally, + ); } Approved approved({required int index}) { return Approved(index: index); } - Rejected rejected({required int index, required _i5.Tally tally}) { - return Rejected(index: index, tally: tally); + Rejected rejected({ + required int index, + required _i5.Tally tally, + }) { + return Rejected( + index: index, + tally: tally, + ); } - TimedOut timedOut({required int index, required _i5.Tally tally}) { - return TimedOut(index: index, tally: tally); + TimedOut timedOut({ + required int index, + required _i5.Tally tally, + }) { + return TimedOut( + index: index, + tally: tally, + ); } - Cancelled cancelled({required int index, required _i5.Tally tally}) { - return Cancelled(index: index, tally: tally); + Cancelled cancelled({ + required int index, + required _i5.Tally tally, + }) { + return Cancelled( + index: index, + tally: tally, + ); } - Killed killed({required int index, required _i5.Tally tally}) { - return Killed(index: index, tally: tally); + Killed killed({ + required int index, + required _i5.Tally tally, + }) { + return Killed( + index: index, + tally: tally, + ); } SubmissionDepositRefunded submissionDepositRefunded({ @@ -107,15 +164,31 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return SubmissionDepositRefunded(index: index, who: who, amount: amount); + return SubmissionDepositRefunded( + index: index, + who: who, + amount: amount, + ); } - MetadataSet metadataSet({required int index, required _i6.H256 hash}) { - return MetadataSet(index: index, hash: hash); + MetadataSet metadataSet({ + required int index, + required _i6.H256 hash, + }) { + return MetadataSet( + index: index, + hash: hash, + ); } - MetadataCleared metadataCleared({required int index, required _i6.H256 hash}) { - return MetadataCleared(index: index, hash: hash); + MetadataCleared metadataCleared({ + required int index, + required _i6.H256 hash, + }) { + return MetadataCleared( + index: index, + hash: hash, + ); } } @@ -164,7 +237,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case Submitted: (value as Submitted).encodeTo(output); @@ -215,7 +291,8 @@ class $EventCodec with _i1.Codec { (value as MetadataCleared).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -255,14 +332,19 @@ class $EventCodec with _i1.Codec { case MetadataCleared: return (value as MetadataCleared)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A referendum has been submitted. class Submitted extends Event { - const Submitted({required this.index, required this.track, required this.proposal}); + const Submitted({ + required this.index, + required this.track, + required this.proposal, + }); factory Submitted._decode(_i1.Input input) { return Submitted( @@ -286,8 +368,12 @@ class Submitted extends Event { @override Map> toJson() => { - 'Submitted': {'index': index, 'track': track, 'proposal': proposal.toJson()}, - }; + 'Submitted': { + 'index': index, + 'track': track, + 'proposal': proposal.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -298,24 +384,50 @@ class Submitted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i1.U16Codec.codec.encodeTo(track, output); - _i3.Bounded.codec.encodeTo(proposal, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i1.U16Codec.codec.encodeTo( + track, + output, + ); + _i3.Bounded.codec.encodeTo( + proposal, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Submitted && other.index == index && other.track == track && other.proposal == proposal; + identical( + this, + other, + ) || + other is Submitted && + other.index == index && + other.track == track && + other.proposal == proposal; @override - int get hashCode => Object.hash(index, track, proposal); + int get hashCode => Object.hash( + index, + track, + proposal, + ); } /// The decision deposit has been placed. class DecisionDepositPlaced extends Event { - const DecisionDepositPlaced({required this.index, required this.who, required this.amount}); + const DecisionDepositPlaced({ + required this.index, + required this.who, + required this.amount, + }); factory DecisionDepositPlaced._decode(_i1.Input input) { return DecisionDepositPlaced( @@ -339,8 +451,12 @@ class DecisionDepositPlaced extends Event { @override Map> toJson() => { - 'DecisionDepositPlaced': {'index': index, 'who': who.toList(), 'amount': amount}, - }; + 'DecisionDepositPlaced': { + 'index': index, + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -351,27 +467,53 @@ class DecisionDepositPlaced extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is DecisionDepositPlaced && other.index == index && - _i7.listsEqual(other.who, who) && + _i7.listsEqual( + other.who, + who, + ) && other.amount == amount; @override - int get hashCode => Object.hash(index, who, amount); + int get hashCode => Object.hash( + index, + who, + amount, + ); } /// The decision deposit has been refunded. class DecisionDepositRefunded extends Event { - const DecisionDepositRefunded({required this.index, required this.who, required this.amount}); + const DecisionDepositRefunded({ + required this.index, + required this.who, + required this.amount, + }); factory DecisionDepositRefunded._decode(_i1.Input input) { return DecisionDepositRefunded( @@ -395,8 +537,12 @@ class DecisionDepositRefunded extends Event { @override Map> toJson() => { - 'DecisionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, - }; + 'DecisionDepositRefunded': { + 'index': index, + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -407,30 +553,58 @@ class DecisionDepositRefunded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is DecisionDepositRefunded && other.index == index && - _i7.listsEqual(other.who, who) && + _i7.listsEqual( + other.who, + who, + ) && other.amount == amount; @override - int get hashCode => Object.hash(index, who, amount); + int get hashCode => Object.hash( + index, + who, + amount, + ); } /// A deposit has been slashed. class DepositSlashed extends Event { - const DepositSlashed({required this.who, required this.amount}); + const DepositSlashed({ + required this.who, + required this.amount, + }); factory DepositSlashed._decode(_i1.Input input) { - return DepositSlashed(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return DepositSlashed( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// T::AccountId @@ -443,8 +617,11 @@ class DepositSlashed extends Event { @override Map> toJson() => { - 'DepositSlashed': {'who': who.toList(), 'amount': amount}, - }; + 'DepositSlashed': { + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -454,22 +631,48 @@ class DepositSlashed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is DepositSlashed && _i7.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is DepositSlashed && + _i7.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } /// A referendum has moved into the deciding phase. class DecisionStarted extends Event { - const DecisionStarted({required this.index, required this.track, required this.proposal, required this.tally}); + const DecisionStarted({ + required this.index, + required this.track, + required this.proposal, + required this.tally, + }); factory DecisionStarted._decode(_i1.Input input) { return DecisionStarted( @@ -498,8 +701,13 @@ class DecisionStarted extends Event { @override Map> toJson() => { - 'DecisionStarted': {'index': index, 'track': track, 'proposal': proposal.toJson(), 'tally': tally.toJson()}, - }; + 'DecisionStarted': { + 'index': index, + 'track': track, + 'proposal': proposal.toJson(), + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -511,16 +719,34 @@ class DecisionStarted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i1.U16Codec.codec.encodeTo(track, output); - _i3.Bounded.codec.encodeTo(proposal, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i1.U16Codec.codec.encodeTo( + track, + output, + ); + _i3.Bounded.codec.encodeTo( + proposal, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is DecisionStarted && other.index == index && other.track == track && @@ -528,7 +754,12 @@ class DecisionStarted extends Event { other.tally == tally; @override - int get hashCode => Object.hash(index, track, proposal, tally); + int get hashCode => Object.hash( + index, + track, + proposal, + tally, + ); } class ConfirmStarted extends Event { @@ -544,8 +775,8 @@ class ConfirmStarted extends Event { @override Map> toJson() => { - 'ConfirmStarted': {'index': index}, - }; + 'ConfirmStarted': {'index': index} + }; int _sizeHint() { int size = 1; @@ -554,12 +785,23 @@ class ConfirmStarted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ConfirmStarted && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ConfirmStarted && other.index == index; @override int get hashCode => index.hashCode; @@ -578,8 +820,8 @@ class ConfirmAborted extends Event { @override Map> toJson() => { - 'ConfirmAborted': {'index': index}, - }; + 'ConfirmAborted': {'index': index} + }; int _sizeHint() { int size = 1; @@ -588,12 +830,23 @@ class ConfirmAborted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ConfirmAborted && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ConfirmAborted && other.index == index; @override int get hashCode => index.hashCode; @@ -601,10 +854,16 @@ class ConfirmAborted extends Event { /// A referendum has ended its confirmation phase and is ready for approval. class Confirmed extends Event { - const Confirmed({required this.index, required this.tally}); + const Confirmed({ + required this.index, + required this.tally, + }); factory Confirmed._decode(_i1.Input input) { - return Confirmed(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); + return Confirmed( + index: _i1.U32Codec.codec.decode(input), + tally: _i5.Tally.codec.decode(input), + ); } /// ReferendumIndex @@ -617,8 +876,11 @@ class Confirmed extends Event { @override Map> toJson() => { - 'Confirmed': {'index': index, 'tally': tally.toJson()}, - }; + 'Confirmed': { + 'index': index, + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -628,17 +890,33 @@ class Confirmed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Confirmed && other.index == index && other.tally == tally; + identical( + this, + other, + ) || + other is Confirmed && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash(index, tally); + int get hashCode => Object.hash( + index, + tally, + ); } /// A referendum has been approved and its proposal has been scheduled. @@ -655,8 +933,8 @@ class Approved extends Event { @override Map> toJson() => { - 'Approved': {'index': index}, - }; + 'Approved': {'index': index} + }; int _sizeHint() { int size = 1; @@ -665,12 +943,23 @@ class Approved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Approved && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Approved && other.index == index; @override int get hashCode => index.hashCode; @@ -678,10 +967,16 @@ class Approved extends Event { /// A proposal has been rejected by referendum. class Rejected extends Event { - const Rejected({required this.index, required this.tally}); + const Rejected({ + required this.index, + required this.tally, + }); factory Rejected._decode(_i1.Input input) { - return Rejected(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); + return Rejected( + index: _i1.U32Codec.codec.decode(input), + tally: _i5.Tally.codec.decode(input), + ); } /// ReferendumIndex @@ -694,8 +989,11 @@ class Rejected extends Event { @override Map> toJson() => { - 'Rejected': {'index': index, 'tally': tally.toJson()}, - }; + 'Rejected': { + 'index': index, + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -705,25 +1003,47 @@ class Rejected extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Rejected && other.index == index && other.tally == tally; + identical( + this, + other, + ) || + other is Rejected && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash(index, tally); + int get hashCode => Object.hash( + index, + tally, + ); } /// A referendum has been timed out without being decided. class TimedOut extends Event { - const TimedOut({required this.index, required this.tally}); + const TimedOut({ + required this.index, + required this.tally, + }); factory TimedOut._decode(_i1.Input input) { - return TimedOut(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); + return TimedOut( + index: _i1.U32Codec.codec.decode(input), + tally: _i5.Tally.codec.decode(input), + ); } /// ReferendumIndex @@ -736,8 +1056,11 @@ class TimedOut extends Event { @override Map> toJson() => { - 'TimedOut': {'index': index, 'tally': tally.toJson()}, - }; + 'TimedOut': { + 'index': index, + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -747,25 +1070,47 @@ class TimedOut extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is TimedOut && other.index == index && other.tally == tally; + identical( + this, + other, + ) || + other is TimedOut && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash(index, tally); + int get hashCode => Object.hash( + index, + tally, + ); } /// A referendum has been cancelled. class Cancelled extends Event { - const Cancelled({required this.index, required this.tally}); + const Cancelled({ + required this.index, + required this.tally, + }); factory Cancelled._decode(_i1.Input input) { - return Cancelled(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); + return Cancelled( + index: _i1.U32Codec.codec.decode(input), + tally: _i5.Tally.codec.decode(input), + ); } /// ReferendumIndex @@ -778,8 +1123,11 @@ class Cancelled extends Event { @override Map> toJson() => { - 'Cancelled': {'index': index, 'tally': tally.toJson()}, - }; + 'Cancelled': { + 'index': index, + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -789,25 +1137,47 @@ class Cancelled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Cancelled && other.index == index && other.tally == tally; + identical( + this, + other, + ) || + other is Cancelled && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash(index, tally); + int get hashCode => Object.hash( + index, + tally, + ); } /// A referendum has been killed. class Killed extends Event { - const Killed({required this.index, required this.tally}); + const Killed({ + required this.index, + required this.tally, + }); factory Killed._decode(_i1.Input input) { - return Killed(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); + return Killed( + index: _i1.U32Codec.codec.decode(input), + tally: _i5.Tally.codec.decode(input), + ); } /// ReferendumIndex @@ -820,8 +1190,11 @@ class Killed extends Event { @override Map> toJson() => { - 'Killed': {'index': index, 'tally': tally.toJson()}, - }; + 'Killed': { + 'index': index, + 'tally': tally.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -831,22 +1204,42 @@ class Killed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i5.Tally.codec.encodeTo(tally, output); + _i1.U8Codec.codec.encodeTo( + 12, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i5.Tally.codec.encodeTo( + tally, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Killed && other.index == index && other.tally == tally; + identical( + this, + other, + ) || + other is Killed && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash(index, tally); + int get hashCode => Object.hash( + index, + tally, + ); } /// The submission deposit has been refunded. class SubmissionDepositRefunded extends Event { - const SubmissionDepositRefunded({required this.index, required this.who, required this.amount}); + const SubmissionDepositRefunded({ + required this.index, + required this.who, + required this.amount, + }); factory SubmissionDepositRefunded._decode(_i1.Input input) { return SubmissionDepositRefunded( @@ -870,8 +1263,12 @@ class SubmissionDepositRefunded extends Event { @override Map> toJson() => { - 'SubmissionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, - }; + 'SubmissionDepositRefunded': { + 'index': index, + 'who': who.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -882,30 +1279,58 @@ class SubmissionDepositRefunded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 13, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is SubmissionDepositRefunded && other.index == index && - _i7.listsEqual(other.who, who) && + _i7.listsEqual( + other.who, + who, + ) && other.amount == amount; @override - int get hashCode => Object.hash(index, who, amount); + int get hashCode => Object.hash( + index, + who, + amount, + ); } /// Metadata for a referendum has been set. class MetadataSet extends Event { - const MetadataSet({required this.index, required this.hash}); + const MetadataSet({ + required this.index, + required this.hash, + }); factory MetadataSet._decode(_i1.Input input) { - return MetadataSet(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); + return MetadataSet( + index: _i1.U32Codec.codec.decode(input), + hash: const _i1.U8ArrayCodec(32).decode(input), + ); } /// ReferendumIndex @@ -918,8 +1343,11 @@ class MetadataSet extends Event { @override Map> toJson() => { - 'MetadataSet': {'index': index, 'hash': hash.toList()}, - }; + 'MetadataSet': { + 'index': index, + 'hash': hash.toList(), + } + }; int _sizeHint() { int size = 1; @@ -929,25 +1357,52 @@ class MetadataSet extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 14, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is MetadataSet && other.index == index && _i7.listsEqual(other.hash, hash); + identical( + this, + other, + ) || + other is MetadataSet && + other.index == index && + _i7.listsEqual( + other.hash, + hash, + ); @override - int get hashCode => Object.hash(index, hash); + int get hashCode => Object.hash( + index, + hash, + ); } /// Metadata for a referendum has been cleared. class MetadataCleared extends Event { - const MetadataCleared({required this.index, required this.hash}); + const MetadataCleared({ + required this.index, + required this.hash, + }); factory MetadataCleared._decode(_i1.Input input) { - return MetadataCleared(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); + return MetadataCleared( + index: _i1.U32Codec.codec.decode(input), + hash: const _i1.U8ArrayCodec(32).decode(input), + ); } /// ReferendumIndex @@ -960,8 +1415,11 @@ class MetadataCleared extends Event { @override Map> toJson() => { - 'MetadataCleared': {'index': index, 'hash': hash.toList()}, - }; + 'MetadataCleared': { + 'index': index, + 'hash': hash.toList(), + } + }; int _sizeHint() { int size = 1; @@ -971,15 +1429,36 @@ class MetadataCleared extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - _i1.U32Codec.codec.encodeTo(index, output); - const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U8Codec.codec.encodeTo( + 15, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + hash, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is MetadataCleared && other.index == index && _i7.listsEqual(other.hash, hash); + identical( + this, + other, + ) || + other is MetadataCleared && + other.index == index && + _i7.listsEqual( + other.hash, + hash, + ); @override - int get hashCode => Object.hash(index, hash); + int get hashCode => Object.hash( + index, + hash, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/curve.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/curve.dart index 79a32460..4650f0d1 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/curve.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/curve.dart @@ -38,7 +38,11 @@ class $Curve { required _i3.Perbill floor, required _i3.Perbill ceil, }) { - return LinearDecreasing(length: length, floor: floor, ceil: ceil); + return LinearDecreasing( + length: length, + floor: floor, + ceil: ceil, + ); } SteppedDecreasing steppedDecreasing({ @@ -47,11 +51,24 @@ class $Curve { required _i3.Perbill step, required _i3.Perbill period, }) { - return SteppedDecreasing(begin: begin, end: end, step: step, period: period); + return SteppedDecreasing( + begin: begin, + end: end, + step: step, + period: period, + ); } - Reciprocal reciprocal({required _i4.FixedI64 factor, required _i4.FixedI64 xOffset, required _i4.FixedI64 yOffset}) { - return Reciprocal(factor: factor, xOffset: xOffset, yOffset: yOffset); + Reciprocal reciprocal({ + required _i4.FixedI64 factor, + required _i4.FixedI64 xOffset, + required _i4.FixedI64 yOffset, + }) { + return Reciprocal( + factor: factor, + xOffset: xOffset, + yOffset: yOffset, + ); } } @@ -74,7 +91,10 @@ class $CurveCodec with _i1.Codec { } @override - void encodeTo(Curve value, _i1.Output output) { + void encodeTo( + Curve value, + _i1.Output output, + ) { switch (value.runtimeType) { case LinearDecreasing: (value as LinearDecreasing).encodeTo(output); @@ -86,7 +106,8 @@ class $CurveCodec with _i1.Codec { (value as Reciprocal).encodeTo(output); break; default: - throw Exception('Curve: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Curve: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -100,13 +121,18 @@ class $CurveCodec with _i1.Codec { case Reciprocal: return (value as Reciprocal)._sizeHint(); default: - throw Exception('Curve: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Curve: Unsupported "$value" of type "${value.runtimeType}"'); } } } class LinearDecreasing extends Curve { - const LinearDecreasing({required this.length, required this.floor, required this.ceil}); + const LinearDecreasing({ + required this.length, + required this.floor, + required this.ceil, + }); factory LinearDecreasing._decode(_i1.Input input) { return LinearDecreasing( @@ -127,8 +153,12 @@ class LinearDecreasing extends Curve { @override Map> toJson() => { - 'LinearDecreasing': {'length': length, 'floor': floor, 'ceil': ceil}, - }; + 'LinearDecreasing': { + 'length': length, + 'floor': floor, + 'ceil': ceil, + } + }; int _sizeHint() { int size = 1; @@ -139,23 +169,50 @@ class LinearDecreasing extends Curve { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(length, output); - _i1.U32Codec.codec.encodeTo(floor, output); - _i1.U32Codec.codec.encodeTo(ceil, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + length, + output, + ); + _i1.U32Codec.codec.encodeTo( + floor, + output, + ); + _i1.U32Codec.codec.encodeTo( + ceil, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is LinearDecreasing && other.length == length && other.floor == floor && other.ceil == ceil; + identical( + this, + other, + ) || + other is LinearDecreasing && + other.length == length && + other.floor == floor && + other.ceil == ceil; @override - int get hashCode => Object.hash(length, floor, ceil); + int get hashCode => Object.hash( + length, + floor, + ceil, + ); } class SteppedDecreasing extends Curve { - const SteppedDecreasing({required this.begin, required this.end, required this.step, required this.period}); + const SteppedDecreasing({ + required this.begin, + required this.end, + required this.step, + required this.period, + }); factory SteppedDecreasing._decode(_i1.Input input) { return SteppedDecreasing( @@ -180,8 +237,13 @@ class SteppedDecreasing extends Curve { @override Map> toJson() => { - 'SteppedDecreasing': {'begin': begin, 'end': end, 'step': step, 'period': period}, - }; + 'SteppedDecreasing': { + 'begin': begin, + 'end': end, + 'step': step, + 'period': period, + } + }; int _sizeHint() { int size = 1; @@ -193,16 +255,34 @@ class SteppedDecreasing extends Curve { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(begin, output); - _i1.U32Codec.codec.encodeTo(end, output); - _i1.U32Codec.codec.encodeTo(step, output); - _i1.U32Codec.codec.encodeTo(period, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + begin, + output, + ); + _i1.U32Codec.codec.encodeTo( + end, + output, + ); + _i1.U32Codec.codec.encodeTo( + step, + output, + ); + _i1.U32Codec.codec.encodeTo( + period, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is SteppedDecreasing && other.begin == begin && other.end == end && @@ -210,11 +290,20 @@ class SteppedDecreasing extends Curve { other.period == period; @override - int get hashCode => Object.hash(begin, end, step, period); + int get hashCode => Object.hash( + begin, + end, + step, + period, + ); } class Reciprocal extends Curve { - const Reciprocal({required this.factor, required this.xOffset, required this.yOffset}); + const Reciprocal({ + required this.factor, + required this.xOffset, + required this.yOffset, + }); factory Reciprocal._decode(_i1.Input input) { return Reciprocal( @@ -235,8 +324,12 @@ class Reciprocal extends Curve { @override Map> toJson() => { - 'Reciprocal': {'factor': factor, 'xOffset': xOffset, 'yOffset': yOffset}, - }; + 'Reciprocal': { + 'factor': factor, + 'xOffset': xOffset, + 'yOffset': yOffset, + } + }; int _sizeHint() { int size = 1; @@ -247,17 +340,39 @@ class Reciprocal extends Curve { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.I64Codec.codec.encodeTo(factor, output); - _i1.I64Codec.codec.encodeTo(xOffset, output); - _i1.I64Codec.codec.encodeTo(yOffset, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.I64Codec.codec.encodeTo( + factor, + output, + ); + _i1.I64Codec.codec.encodeTo( + xOffset, + output, + ); + _i1.I64Codec.codec.encodeTo( + yOffset, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Reciprocal && other.factor == factor && other.xOffset == xOffset && other.yOffset == yOffset; + identical( + this, + other, + ) || + other is Reciprocal && + other.factor == factor && + other.xOffset == xOffset && + other.yOffset == yOffset; @override - int get hashCode => Object.hash(factor, xOffset, yOffset); + int get hashCode => Object.hash( + factor, + xOffset, + yOffset, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deciding_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deciding_status.dart index 0330544f..96baa433 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deciding_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deciding_status.dart @@ -4,7 +4,10 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class DecidingStatus { - const DecidingStatus({required this.since, this.confirming}); + const DecidingStatus({ + required this.since, + this.confirming, + }); factory DecidingStatus.decode(_i1.Input input) { return codec.decode(input); @@ -22,23 +25,44 @@ class DecidingStatus { return codec.encode(this); } - Map toJson() => {'since': since, 'confirming': confirming}; + Map toJson() => { + 'since': since, + 'confirming': confirming, + }; @override bool operator ==(Object other) => - identical(this, other) || other is DecidingStatus && other.since == since && other.confirming == confirming; + identical( + this, + other, + ) || + other is DecidingStatus && + other.since == since && + other.confirming == confirming; @override - int get hashCode => Object.hash(since, confirming); + int get hashCode => Object.hash( + since, + confirming, + ); } class $DecidingStatusCodec with _i1.Codec { const $DecidingStatusCodec(); @override - void encodeTo(DecidingStatus obj, _i1.Output output) { - _i1.U32Codec.codec.encodeTo(obj.since, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(obj.confirming, output); + void encodeTo( + DecidingStatus obj, + _i1.Output output, + ) { + _i1.U32Codec.codec.encodeTo( + obj.since, + output, + ); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( + obj.confirming, + output, + ); } @override @@ -53,7 +77,8 @@ class $DecidingStatusCodec with _i1.Codec { int sizeHint(DecidingStatus obj) { int size = 0; size = size + _i1.U32Codec.codec.sizeHint(obj.since); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.confirming); + size = size + + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.confirming); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deposit.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deposit.dart index 7477eb42..50fa863e 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deposit.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deposit.dart @@ -7,7 +7,10 @@ import 'package:quiver/collection.dart' as _i4; import '../../sp_core/crypto/account_id32.dart' as _i2; class Deposit { - const Deposit({required this.who, required this.amount}); + const Deposit({ + required this.who, + required this.amount, + }); factory Deposit.decode(_i1.Input input) { return codec.decode(input); @@ -25,28 +28,55 @@ class Deposit { return codec.encode(this); } - Map toJson() => {'who': who.toList(), 'amount': amount}; + Map toJson() => { + 'who': who.toList(), + 'amount': amount, + }; @override bool operator ==(Object other) => - identical(this, other) || other is Deposit && _i4.listsEqual(other.who, who) && other.amount == amount; + identical( + this, + other, + ) || + other is Deposit && + _i4.listsEqual( + other.who, + who, + ) && + other.amount == amount; @override - int get hashCode => Object.hash(who, amount); + int get hashCode => Object.hash( + who, + amount, + ); } class $DepositCodec with _i1.Codec { const $DepositCodec(); @override - void encodeTo(Deposit obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.who, output); - _i1.U128Codec.codec.encodeTo(obj.amount, output); + void encodeTo( + Deposit obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + obj.who, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); } @override Deposit decode(_i1.Input input) { - return Deposit(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); + return Deposit( + who: const _i1.U8ArrayCodec(32).decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_1.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_1.dart index a4fe6c9b..6e81d583 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_1.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_1.dart @@ -37,20 +37,52 @@ class $ReferendumInfo { return Ongoing(value0); } - Approved approved(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { - return Approved(value0, value1, value2); + Approved approved( + int value0, + _i4.Deposit? value1, + _i4.Deposit? value2, + ) { + return Approved( + value0, + value1, + value2, + ); } - Rejected rejected(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { - return Rejected(value0, value1, value2); + Rejected rejected( + int value0, + _i4.Deposit? value1, + _i4.Deposit? value2, + ) { + return Rejected( + value0, + value1, + value2, + ); } - Cancelled cancelled(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { - return Cancelled(value0, value1, value2); + Cancelled cancelled( + int value0, + _i4.Deposit? value1, + _i4.Deposit? value2, + ) { + return Cancelled( + value0, + value1, + value2, + ); } - TimedOut timedOut(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { - return TimedOut(value0, value1, value2); + TimedOut timedOut( + int value0, + _i4.Deposit? value1, + _i4.Deposit? value2, + ) { + return TimedOut( + value0, + value1, + value2, + ); } Killed killed(int value0) { @@ -83,7 +115,10 @@ class $ReferendumInfoCodec with _i1.Codec { } @override - void encodeTo(ReferendumInfo value, _i1.Output output) { + void encodeTo( + ReferendumInfo value, + _i1.Output output, + ) { switch (value.runtimeType) { case Ongoing: (value as Ongoing).encodeTo(output); @@ -104,7 +139,8 @@ class $ReferendumInfoCodec with _i1.Codec { (value as Killed).encodeTo(output); break; default: - throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -124,7 +160,8 @@ class $ReferendumInfoCodec with _i1.Codec { case Killed: return (value as Killed)._sizeHint(); default: - throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -150,19 +187,34 @@ class Ongoing extends ReferendumInfo { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.ReferendumStatus.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.ReferendumStatus.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Ongoing && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Ongoing && other.value0 == value0; @override int get hashCode => value0.hashCode; } class Approved extends ReferendumInfo { - const Approved(this.value0, this.value1, this.value2); + const Approved( + this.value0, + this.value1, + this.value2, + ); factory Approved._decode(_i1.Input input) { return Approved( @@ -183,35 +235,67 @@ class Approved extends ReferendumInfo { @override Map> toJson() => { - 'Approved': [value0, value1?.toJson(), value2?.toJson()], - }; + 'Approved': [ + value0, + value1?.toJson(), + value2?.toJson(), + ] + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(value0, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value1, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value2, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Approved && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; + identical( + this, + other, + ) || + other is Approved && + other.value0 == value0 && + other.value1 == value1 && + other.value2 == value2; @override - int get hashCode => Object.hash(value0, value1, value2); + int get hashCode => Object.hash( + value0, + value1, + value2, + ); } class Rejected extends ReferendumInfo { - const Rejected(this.value0, this.value1, this.value2); + const Rejected( + this.value0, + this.value1, + this.value2, + ); factory Rejected._decode(_i1.Input input) { return Rejected( @@ -232,35 +316,67 @@ class Rejected extends ReferendumInfo { @override Map> toJson() => { - 'Rejected': [value0, value1?.toJson(), value2?.toJson()], - }; + 'Rejected': [ + value0, + value1?.toJson(), + value2?.toJson(), + ] + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U32Codec.codec.encodeTo(value0, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value1, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value2, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Rejected && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; + identical( + this, + other, + ) || + other is Rejected && + other.value0 == value0 && + other.value1 == value1 && + other.value2 == value2; @override - int get hashCode => Object.hash(value0, value1, value2); + int get hashCode => Object.hash( + value0, + value1, + value2, + ); } class Cancelled extends ReferendumInfo { - const Cancelled(this.value0, this.value1, this.value2); + const Cancelled( + this.value0, + this.value1, + this.value2, + ); factory Cancelled._decode(_i1.Input input) { return Cancelled( @@ -281,35 +397,67 @@ class Cancelled extends ReferendumInfo { @override Map> toJson() => { - 'Cancelled': [value0, value1?.toJson(), value2?.toJson()], - }; + 'Cancelled': [ + value0, + value1?.toJson(), + value2?.toJson(), + ] + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U32Codec.codec.encodeTo(value0, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value1, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value2, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Cancelled && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; + identical( + this, + other, + ) || + other is Cancelled && + other.value0 == value0 && + other.value1 == value1 && + other.value2 == value2; @override - int get hashCode => Object.hash(value0, value1, value2); + int get hashCode => Object.hash( + value0, + value1, + value2, + ); } class TimedOut extends ReferendumInfo { - const TimedOut(this.value0, this.value1, this.value2); + const TimedOut( + this.value0, + this.value1, + this.value2, + ); factory TimedOut._decode(_i1.Input input) { return TimedOut( @@ -330,31 +478,59 @@ class TimedOut extends ReferendumInfo { @override Map> toJson() => { - 'TimedOut': [value0, value1?.toJson(), value2?.toJson()], - }; + 'TimedOut': [ + value0, + value1?.toJson(), + value2?.toJson(), + ] + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U32Codec.codec.encodeTo(value0, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value1, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value2, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is TimedOut && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; + identical( + this, + other, + ) || + other is TimedOut && + other.value0 == value0 && + other.value1 == value1 && + other.value2 == value2; @override - int get hashCode => Object.hash(value0, value1, value2); + int get hashCode => Object.hash( + value0, + value1, + value2, + ); } class Killed extends ReferendumInfo { @@ -377,12 +553,23 @@ class Killed extends ReferendumInfo { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U32Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Killed && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Killed && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_2.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_2.dart index 90cca436..566ef150 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_2.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_2.dart @@ -37,20 +37,52 @@ class $ReferendumInfo { return Ongoing(value0); } - Approved approved(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { - return Approved(value0, value1, value2); + Approved approved( + int value0, + _i4.Deposit? value1, + _i4.Deposit? value2, + ) { + return Approved( + value0, + value1, + value2, + ); } - Rejected rejected(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { - return Rejected(value0, value1, value2); + Rejected rejected( + int value0, + _i4.Deposit? value1, + _i4.Deposit? value2, + ) { + return Rejected( + value0, + value1, + value2, + ); } - Cancelled cancelled(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { - return Cancelled(value0, value1, value2); + Cancelled cancelled( + int value0, + _i4.Deposit? value1, + _i4.Deposit? value2, + ) { + return Cancelled( + value0, + value1, + value2, + ); } - TimedOut timedOut(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { - return TimedOut(value0, value1, value2); + TimedOut timedOut( + int value0, + _i4.Deposit? value1, + _i4.Deposit? value2, + ) { + return TimedOut( + value0, + value1, + value2, + ); } Killed killed(int value0) { @@ -83,7 +115,10 @@ class $ReferendumInfoCodec with _i1.Codec { } @override - void encodeTo(ReferendumInfo value, _i1.Output output) { + void encodeTo( + ReferendumInfo value, + _i1.Output output, + ) { switch (value.runtimeType) { case Ongoing: (value as Ongoing).encodeTo(output); @@ -104,7 +139,8 @@ class $ReferendumInfoCodec with _i1.Codec { (value as Killed).encodeTo(output); break; default: - throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -124,7 +160,8 @@ class $ReferendumInfoCodec with _i1.Codec { case Killed: return (value as Killed)._sizeHint(); default: - throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -150,19 +187,34 @@ class Ongoing extends ReferendumInfo { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.ReferendumStatus.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.ReferendumStatus.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Ongoing && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Ongoing && other.value0 == value0; @override int get hashCode => value0.hashCode; } class Approved extends ReferendumInfo { - const Approved(this.value0, this.value1, this.value2); + const Approved( + this.value0, + this.value1, + this.value2, + ); factory Approved._decode(_i1.Input input) { return Approved( @@ -183,35 +235,67 @@ class Approved extends ReferendumInfo { @override Map> toJson() => { - 'Approved': [value0, value1?.toJson(), value2?.toJson()], - }; + 'Approved': [ + value0, + value1?.toJson(), + value2?.toJson(), + ] + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(value0, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value1, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value2, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Approved && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; + identical( + this, + other, + ) || + other is Approved && + other.value0 == value0 && + other.value1 == value1 && + other.value2 == value2; @override - int get hashCode => Object.hash(value0, value1, value2); + int get hashCode => Object.hash( + value0, + value1, + value2, + ); } class Rejected extends ReferendumInfo { - const Rejected(this.value0, this.value1, this.value2); + const Rejected( + this.value0, + this.value1, + this.value2, + ); factory Rejected._decode(_i1.Input input) { return Rejected( @@ -232,35 +316,67 @@ class Rejected extends ReferendumInfo { @override Map> toJson() => { - 'Rejected': [value0, value1?.toJson(), value2?.toJson()], - }; + 'Rejected': [ + value0, + value1?.toJson(), + value2?.toJson(), + ] + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U32Codec.codec.encodeTo(value0, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value1, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value2, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Rejected && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; + identical( + this, + other, + ) || + other is Rejected && + other.value0 == value0 && + other.value1 == value1 && + other.value2 == value2; @override - int get hashCode => Object.hash(value0, value1, value2); + int get hashCode => Object.hash( + value0, + value1, + value2, + ); } class Cancelled extends ReferendumInfo { - const Cancelled(this.value0, this.value1, this.value2); + const Cancelled( + this.value0, + this.value1, + this.value2, + ); factory Cancelled._decode(_i1.Input input) { return Cancelled( @@ -281,35 +397,67 @@ class Cancelled extends ReferendumInfo { @override Map> toJson() => { - 'Cancelled': [value0, value1?.toJson(), value2?.toJson()], - }; + 'Cancelled': [ + value0, + value1?.toJson(), + value2?.toJson(), + ] + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U32Codec.codec.encodeTo(value0, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value1, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value2, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Cancelled && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; + identical( + this, + other, + ) || + other is Cancelled && + other.value0 == value0 && + other.value1 == value1 && + other.value2 == value2; @override - int get hashCode => Object.hash(value0, value1, value2); + int get hashCode => Object.hash( + value0, + value1, + value2, + ); } class TimedOut extends ReferendumInfo { - const TimedOut(this.value0, this.value1, this.value2); + const TimedOut( + this.value0, + this.value1, + this.value2, + ); factory TimedOut._decode(_i1.Input input) { return TimedOut( @@ -330,31 +478,59 @@ class TimedOut extends ReferendumInfo { @override Map> toJson() => { - 'TimedOut': [value0, value1?.toJson(), value2?.toJson()], - }; + 'TimedOut': [ + value0, + value1?.toJson(), + value2?.toJson(), + ] + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U32Codec.codec.encodeTo(value0, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value1, + output, + ); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( + value2, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is TimedOut && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; + identical( + this, + other, + ) || + other is TimedOut && + other.value0 == value0 && + other.value1 == value1 && + other.value2 == value2; @override - int get hashCode => Object.hash(value0, value1, value2); + int get hashCode => Object.hash( + value0, + value1, + value2, + ); } class Killed extends ReferendumInfo { @@ -377,12 +553,23 @@ class Killed extends ReferendumInfo { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U32Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Killed && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Killed && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_1.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_1.dart index 8bd8a9f7..0b48bec7 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_1.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_1.dart @@ -72,25 +72,31 @@ class ReferendumStatus { } Map toJson() => { - 'track': track, - 'origin': origin.toJson(), - 'proposal': proposal.toJson(), - 'enactment': enactment.toJson(), - 'submitted': submitted, - 'submissionDeposit': submissionDeposit.toJson(), - 'decisionDeposit': decisionDeposit?.toJson(), - 'deciding': deciding?.toJson(), - 'tally': tally.toJson(), - 'inQueue': inQueue, - 'alarm': [ - alarm?.value0, - [alarm?.value1.value0.toJson(), alarm?.value1.value1], - ], - }; + 'track': track, + 'origin': origin.toJson(), + 'proposal': proposal.toJson(), + 'enactment': enactment.toJson(), + 'submitted': submitted, + 'submissionDeposit': submissionDeposit.toJson(), + 'decisionDeposit': decisionDeposit?.toJson(), + 'deciding': deciding?.toJson(), + 'tally': tally.toJson(), + 'inQueue': inQueue, + 'alarm': [ + alarm?.value0, + [ + alarm?.value1.value0.toJson(), + alarm?.value1.value1, + ], + ], + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ReferendumStatus && other.track == track && other.origin == origin && @@ -106,41 +112,81 @@ class ReferendumStatus { @override int get hashCode => Object.hash( - track, - origin, - proposal, - enactment, - submitted, - submissionDeposit, - decisionDeposit, - deciding, - tally, - inQueue, - alarm, - ); + track, + origin, + proposal, + enactment, + submitted, + submissionDeposit, + decisionDeposit, + deciding, + tally, + inQueue, + alarm, + ); } class $ReferendumStatusCodec with _i1.Codec { const $ReferendumStatusCodec(); @override - void encodeTo(ReferendumStatus obj, _i1.Output output) { - _i1.U16Codec.codec.encodeTo(obj.track, output); - _i2.OriginCaller.codec.encodeTo(obj.origin, output); - _i3.Bounded.codec.encodeTo(obj.proposal, output); - _i4.DispatchTime.codec.encodeTo(obj.enactment, output); - _i1.U32Codec.codec.encodeTo(obj.submitted, output); - _i5.Deposit.codec.encodeTo(obj.submissionDeposit, output); - const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).encodeTo(obj.decisionDeposit, output); - const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).encodeTo(obj.deciding, output); - _i7.Tally.codec.encodeTo(obj.tally, output); - _i1.BoolCodec.codec.encodeTo(obj.inQueue, output); - const _i1.OptionCodec<_i8.Tuple2>>( - _i8.Tuple2Codec>( + void encodeTo( + ReferendumStatus obj, + _i1.Output output, + ) { + _i1.U16Codec.codec.encodeTo( + obj.track, + output, + ); + _i2.OriginCaller.codec.encodeTo( + obj.origin, + output, + ); + _i3.Bounded.codec.encodeTo( + obj.proposal, + output, + ); + _i4.DispatchTime.codec.encodeTo( + obj.enactment, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.submitted, + output, + ); + _i5.Deposit.codec.encodeTo( + obj.submissionDeposit, + output, + ); + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).encodeTo( + obj.decisionDeposit, + output, + ); + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) + .encodeTo( + obj.deciding, + output, + ); + _i7.Tally.codec.encodeTo( + obj.tally, + output, + ); + _i1.BoolCodec.codec.encodeTo( + obj.inQueue, + output, + ); + const _i1.OptionCodec< + _i8.Tuple2>>( + _i8.Tuple2Codec>( + _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( + _i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - ).encodeTo(obj.alarm, output); + )).encodeTo( + obj.alarm, + output, + ); } @override @@ -152,16 +198,22 @@ class $ReferendumStatusCodec with _i1.Codec { enactment: _i4.DispatchTime.codec.decode(input), submitted: _i1.U32Codec.codec.decode(input), submissionDeposit: _i5.Deposit.codec.decode(input), - decisionDeposit: const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).decode(input), - deciding: const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).decode(input), + decisionDeposit: + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).decode(input), + deciding: + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) + .decode(input), tally: _i7.Tally.codec.decode(input), inQueue: _i1.BoolCodec.codec.decode(input), - alarm: const _i1.OptionCodec<_i8.Tuple2>>( - _i8.Tuple2Codec>( + alarm: const _i1.OptionCodec< + _i8.Tuple2>>( + _i8.Tuple2Codec>( + _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( + _i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - ).decode(input), + )).decode(input), ); } @@ -174,18 +226,24 @@ class $ReferendumStatusCodec with _i1.Codec { size = size + _i4.DispatchTime.codec.sizeHint(obj.enactment); size = size + _i1.U32Codec.codec.sizeHint(obj.submitted); size = size + _i5.Deposit.codec.sizeHint(obj.submissionDeposit); - size = size + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).sizeHint(obj.decisionDeposit); - size = size + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).sizeHint(obj.deciding); + size = size + + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec) + .sizeHint(obj.decisionDeposit); + size = size + + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) + .sizeHint(obj.deciding); size = size + _i7.Tally.codec.sizeHint(obj.tally); size = size + _i1.BoolCodec.codec.sizeHint(obj.inQueue); - size = - size + - const _i1.OptionCodec<_i8.Tuple2>>( - _i8.Tuple2Codec>( + size = size + + const _i1.OptionCodec< + _i8.Tuple2>>( + _i8.Tuple2Codec>( + _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( + _i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - ).sizeHint(obj.alarm); + )).sizeHint(obj.alarm); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_2.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_2.dart index 80e244fd..c910cc13 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_2.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_2.dart @@ -72,25 +72,31 @@ class ReferendumStatus { } Map toJson() => { - 'track': track, - 'origin': origin.toJson(), - 'proposal': proposal.toJson(), - 'enactment': enactment.toJson(), - 'submitted': submitted, - 'submissionDeposit': submissionDeposit.toJson(), - 'decisionDeposit': decisionDeposit?.toJson(), - 'deciding': deciding?.toJson(), - 'tally': tally.toJson(), - 'inQueue': inQueue, - 'alarm': [ - alarm?.value0, - [alarm?.value1.value0.toJson(), alarm?.value1.value1], - ], - }; + 'track': track, + 'origin': origin.toJson(), + 'proposal': proposal.toJson(), + 'enactment': enactment.toJson(), + 'submitted': submitted, + 'submissionDeposit': submissionDeposit.toJson(), + 'decisionDeposit': decisionDeposit?.toJson(), + 'deciding': deciding?.toJson(), + 'tally': tally.toJson(), + 'inQueue': inQueue, + 'alarm': [ + alarm?.value0, + [ + alarm?.value1.value0.toJson(), + alarm?.value1.value1, + ], + ], + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ReferendumStatus && other.track == track && other.origin == origin && @@ -106,41 +112,81 @@ class ReferendumStatus { @override int get hashCode => Object.hash( - track, - origin, - proposal, - enactment, - submitted, - submissionDeposit, - decisionDeposit, - deciding, - tally, - inQueue, - alarm, - ); + track, + origin, + proposal, + enactment, + submitted, + submissionDeposit, + decisionDeposit, + deciding, + tally, + inQueue, + alarm, + ); } class $ReferendumStatusCodec with _i1.Codec { const $ReferendumStatusCodec(); @override - void encodeTo(ReferendumStatus obj, _i1.Output output) { - _i1.U16Codec.codec.encodeTo(obj.track, output); - _i2.OriginCaller.codec.encodeTo(obj.origin, output); - _i3.Bounded.codec.encodeTo(obj.proposal, output); - _i4.DispatchTime.codec.encodeTo(obj.enactment, output); - _i1.U32Codec.codec.encodeTo(obj.submitted, output); - _i5.Deposit.codec.encodeTo(obj.submissionDeposit, output); - const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).encodeTo(obj.decisionDeposit, output); - const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).encodeTo(obj.deciding, output); - _i7.Tally.codec.encodeTo(obj.tally, output); - _i1.BoolCodec.codec.encodeTo(obj.inQueue, output); - const _i1.OptionCodec<_i8.Tuple2>>( - _i8.Tuple2Codec>( + void encodeTo( + ReferendumStatus obj, + _i1.Output output, + ) { + _i1.U16Codec.codec.encodeTo( + obj.track, + output, + ); + _i2.OriginCaller.codec.encodeTo( + obj.origin, + output, + ); + _i3.Bounded.codec.encodeTo( + obj.proposal, + output, + ); + _i4.DispatchTime.codec.encodeTo( + obj.enactment, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.submitted, + output, + ); + _i5.Deposit.codec.encodeTo( + obj.submissionDeposit, + output, + ); + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).encodeTo( + obj.decisionDeposit, + output, + ); + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) + .encodeTo( + obj.deciding, + output, + ); + _i7.Tally.codec.encodeTo( + obj.tally, + output, + ); + _i1.BoolCodec.codec.encodeTo( + obj.inQueue, + output, + ); + const _i1.OptionCodec< + _i8.Tuple2>>( + _i8.Tuple2Codec>( + _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( + _i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - ).encodeTo(obj.alarm, output); + )).encodeTo( + obj.alarm, + output, + ); } @override @@ -152,16 +198,22 @@ class $ReferendumStatusCodec with _i1.Codec { enactment: _i4.DispatchTime.codec.decode(input), submitted: _i1.U32Codec.codec.decode(input), submissionDeposit: _i5.Deposit.codec.decode(input), - decisionDeposit: const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).decode(input), - deciding: const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).decode(input), + decisionDeposit: + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).decode(input), + deciding: + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) + .decode(input), tally: _i7.Tally.codec.decode(input), inQueue: _i1.BoolCodec.codec.decode(input), - alarm: const _i1.OptionCodec<_i8.Tuple2>>( - _i8.Tuple2Codec>( + alarm: const _i1.OptionCodec< + _i8.Tuple2>>( + _i8.Tuple2Codec>( + _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( + _i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - ).decode(input), + )).decode(input), ); } @@ -174,18 +226,24 @@ class $ReferendumStatusCodec with _i1.Codec { size = size + _i4.DispatchTime.codec.sizeHint(obj.enactment); size = size + _i1.U32Codec.codec.sizeHint(obj.submitted); size = size + _i5.Deposit.codec.sizeHint(obj.submissionDeposit); - size = size + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).sizeHint(obj.decisionDeposit); - size = size + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).sizeHint(obj.deciding); + size = size + + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec) + .sizeHint(obj.decisionDeposit); + size = size + + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) + .sizeHint(obj.deciding); size = size + _i7.Tally.codec.sizeHint(obj.tally); size = size + _i1.BoolCodec.codec.sizeHint(obj.inQueue); - size = - size + - const _i1.OptionCodec<_i8.Tuple2>>( - _i8.Tuple2Codec>( + size = size + + const _i1.OptionCodec< + _i8.Tuple2>>( + _i8.Tuple2Codec>( + _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( + _i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - ).sizeHint(obj.alarm); + )).sizeHint(obj.alarm); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/track_details.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/track_details.dart index fe353521..c17b1809 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/track_details.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/track_details.dart @@ -56,20 +56,23 @@ class TrackDetails { } Map toJson() => { - 'name': name, - 'maxDeciding': maxDeciding, - 'decisionDeposit': decisionDeposit, - 'preparePeriod': preparePeriod, - 'decisionPeriod': decisionPeriod, - 'confirmPeriod': confirmPeriod, - 'minEnactmentPeriod': minEnactmentPeriod, - 'minApproval': minApproval.toJson(), - 'minSupport': minSupport.toJson(), - }; + 'name': name, + 'maxDeciding': maxDeciding, + 'decisionDeposit': decisionDeposit, + 'preparePeriod': preparePeriod, + 'decisionPeriod': decisionPeriod, + 'confirmPeriod': confirmPeriod, + 'minEnactmentPeriod': minEnactmentPeriod, + 'minApproval': minApproval.toJson(), + 'minSupport': minSupport.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is TrackDetails && other.name == name && other.maxDeciding == maxDeciding && @@ -83,32 +86,62 @@ class TrackDetails { @override int get hashCode => Object.hash( - name, - maxDeciding, - decisionDeposit, - preparePeriod, - decisionPeriod, - confirmPeriod, - minEnactmentPeriod, - minApproval, - minSupport, - ); + name, + maxDeciding, + decisionDeposit, + preparePeriod, + decisionPeriod, + confirmPeriod, + minEnactmentPeriod, + minApproval, + minSupport, + ); } class $TrackDetailsCodec with _i1.Codec { const $TrackDetailsCodec(); @override - void encodeTo(TrackDetails obj, _i1.Output output) { - _i1.StrCodec.codec.encodeTo(obj.name, output); - _i1.U32Codec.codec.encodeTo(obj.maxDeciding, output); - _i1.U128Codec.codec.encodeTo(obj.decisionDeposit, output); - _i1.U32Codec.codec.encodeTo(obj.preparePeriod, output); - _i1.U32Codec.codec.encodeTo(obj.decisionPeriod, output); - _i1.U32Codec.codec.encodeTo(obj.confirmPeriod, output); - _i1.U32Codec.codec.encodeTo(obj.minEnactmentPeriod, output); - _i2.Curve.codec.encodeTo(obj.minApproval, output); - _i2.Curve.codec.encodeTo(obj.minSupport, output); + void encodeTo( + TrackDetails obj, + _i1.Output output, + ) { + _i1.StrCodec.codec.encodeTo( + obj.name, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.maxDeciding, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.decisionDeposit, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.preparePeriod, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.decisionPeriod, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.confirmPeriod, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.minEnactmentPeriod, + output, + ); + _i2.Curve.codec.encodeTo( + obj.minApproval, + output, + ); + _i2.Curve.codec.encodeTo( + obj.minSupport, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/high_security_account_data.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/high_security_account_data.dart index 34d86c1e..29a7a79e 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/high_security_account_data.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/high_security_account_data.dart @@ -8,48 +8,75 @@ import '../qp_scheduler/block_number_or_timestamp.dart' as _i3; import '../sp_core/crypto/account_id32.dart' as _i2; class HighSecurityAccountData { - const HighSecurityAccountData({required this.interceptor, required this.delay}); + const HighSecurityAccountData({ + required this.guardian, + required this.delay, + }); factory HighSecurityAccountData.decode(_i1.Input input) { return codec.decode(input); } /// AccountId - final _i2.AccountId32 interceptor; + final _i2.AccountId32 guardian; /// Delay final _i3.BlockNumberOrTimestamp delay; - static const $HighSecurityAccountDataCodec codec = $HighSecurityAccountDataCodec(); + static const $HighSecurityAccountDataCodec codec = + $HighSecurityAccountDataCodec(); _i4.Uint8List encode() { return codec.encode(this); } - Map toJson() => {'interceptor': interceptor.toList(), 'delay': delay.toJson()}; + Map toJson() => { + 'guardian': guardian.toList(), + 'delay': delay.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || - other is HighSecurityAccountData && _i5.listsEqual(other.interceptor, interceptor) && other.delay == delay; + identical( + this, + other, + ) || + other is HighSecurityAccountData && + _i5.listsEqual( + other.guardian, + guardian, + ) && + other.delay == delay; @override - int get hashCode => Object.hash(interceptor, delay); + int get hashCode => Object.hash( + guardian, + delay, + ); } class $HighSecurityAccountDataCodec with _i1.Codec { const $HighSecurityAccountDataCodec(); @override - void encodeTo(HighSecurityAccountData obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.interceptor, output); - _i3.BlockNumberOrTimestamp.codec.encodeTo(obj.delay, output); + void encodeTo( + HighSecurityAccountData obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + obj.guardian, + output, + ); + _i3.BlockNumberOrTimestamp.codec.encodeTo( + obj.delay, + output, + ); } @override HighSecurityAccountData decode(_i1.Input input) { return HighSecurityAccountData( - interceptor: const _i1.U8ArrayCodec(32).decode(input), + guardian: const _i1.U8ArrayCodec(32).decode(input), delay: _i3.BlockNumberOrTimestamp.codec.decode(input), ); } @@ -57,7 +84,7 @@ class $HighSecurityAccountDataCodec with _i1.Codec { @override int sizeHint(HighSecurityAccountData obj) { int size = 0; - size = size + const _i2.AccountId32Codec().sizeHint(obj.interceptor); + size = size + const _i2.AccountId32Codec().sizeHint(obj.guardian); size = size + _i3.BlockNumberOrTimestamp.codec.sizeHint(obj.delay); return size; } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/call.dart index 8d75300f..6c4755a3 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/call.dart @@ -37,8 +37,14 @@ abstract class Call { class $Call { const $Call(); - SetHighSecurity setHighSecurity({required _i3.BlockNumberOrTimestamp delay, required _i4.AccountId32 interceptor}) { - return SetHighSecurity(delay: delay, interceptor: interceptor); + SetHighSecurity setHighSecurity({ + required _i3.BlockNumberOrTimestamp delay, + required _i4.AccountId32 guardian, + }) { + return SetHighSecurity( + delay: delay, + guardian: guardian, + ); } Cancel cancel({required _i5.H256 txId}) { @@ -49,8 +55,14 @@ class $Call { return ExecuteTransfer(txId: txId); } - ScheduleTransfer scheduleTransfer({required _i6.MultiAddress dest, required BigInt amount}) { - return ScheduleTransfer(dest: dest, amount: amount); + ScheduleTransfer scheduleTransfer({ + required _i6.MultiAddress dest, + required BigInt amount, + }) { + return ScheduleTransfer( + dest: dest, + amount: amount, + ); } ScheduleTransferWithDelay scheduleTransferWithDelay({ @@ -58,7 +70,11 @@ class $Call { required BigInt amount, required _i3.BlockNumberOrTimestamp delay, }) { - return ScheduleTransferWithDelay(dest: dest, amount: amount, delay: delay); + return ScheduleTransferWithDelay( + dest: dest, + amount: amount, + delay: delay, + ); } ScheduleAssetTransfer scheduleAssetTransfer({ @@ -66,7 +82,11 @@ class $Call { required _i6.MultiAddress dest, required BigInt amount, }) { - return ScheduleAssetTransfer(assetId: assetId, dest: dest, amount: amount); + return ScheduleAssetTransfer( + assetId: assetId, + dest: dest, + amount: amount, + ); } ScheduleAssetTransferWithDelay scheduleAssetTransferWithDelay({ @@ -75,7 +95,12 @@ class $Call { required BigInt amount, required _i3.BlockNumberOrTimestamp delay, }) { - return ScheduleAssetTransferWithDelay(assetId: assetId, dest: dest, amount: amount, delay: delay); + return ScheduleAssetTransferWithDelay( + assetId: assetId, + dest: dest, + amount: amount, + delay: delay, + ); } RecoverFunds recoverFunds({required _i4.AccountId32 account}) { @@ -112,7 +137,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case SetHighSecurity: (value as SetHighSecurity).encodeTo(output); @@ -139,7 +167,8 @@ class $CallCodec with _i1.Codec { (value as RecoverFunds).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -163,7 +192,8 @@ class $CallCodec with _i1.Codec { case RecoverFunds: return (value as RecoverFunds)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -171,23 +201,45 @@ class $CallCodec with _i1.Codec { /// Enable high-security for the calling account with a specified /// reversibility delay. /// -/// Recoverer and interceptor (aka guardian) could be the same account or -/// different accounts. -/// /// Once an account is set as high security it can only make reversible /// transfers. It is not allowed any other calls. /// -/// - `delay`: The reversibility time for any transfer made by the high -/// security account. -/// - interceptor: The account that can intercept transctions from the -/// high security account. +/// # Warning: Permanent and Irreversible +/// +/// **Enabling high security mode is a one-way operation that cannot be undone.** +/// +/// Once this function is called successfully, the account is permanently restricted +/// to only the following operations: +/// - [`schedule_transfer`](Self::schedule_transfer) - Schedule delayed native token +/// transfers +/// - [`schedule_asset_transfer`](Self::schedule_asset_transfer) - Schedule delayed asset +/// transfers +/// - [`cancel`](Self::cancel) - Cancel pending transfers +/// - [`recover_funds`](Self::recover_funds) - Guardian-initiated emergency fund recovery +/// +/// There is no mechanism to disable high security mode or restore normal account +/// functionality. This design is intentional to provide maximum security guarantees: +/// an attacker who gains access to the account cannot simply disable the protections. +/// +/// Users who no longer wish to use high-security features can simply transfer their +/// funds to a different account using [`schedule_transfer`](Self::schedule_transfer) +/// or [`schedule_asset_transfer`](Self::schedule_asset_transfer). +/// +/// # Parameters +/// +/// - `delay`: The reversibility time for any transfer made by the high-security account. +/// - `guardian`: The guardian account that can cancel pending transfers and recover funds +/// from this high-security account. class SetHighSecurity extends Call { - const SetHighSecurity({required this.delay, required this.interceptor}); + const SetHighSecurity({ + required this.delay, + required this.guardian, + }); factory SetHighSecurity._decode(_i1.Input input) { return SetHighSecurity( delay: _i3.BlockNumberOrTimestamp.codec.decode(input), - interceptor: const _i1.U8ArrayCodec(32).decode(input), + guardian: const _i1.U8ArrayCodec(32).decode(input), ); } @@ -195,33 +247,56 @@ class SetHighSecurity extends Call { final _i3.BlockNumberOrTimestamp delay; /// T::AccountId - final _i4.AccountId32 interceptor; + final _i4.AccountId32 guardian; @override Map> toJson() => { - 'set_high_security': {'delay': delay.toJson(), 'interceptor': interceptor.toList()}, - }; + 'set_high_security': { + 'delay': delay.toJson(), + 'guardian': guardian.toList(), + } + }; int _sizeHint() { int size = 1; size = size + _i3.BlockNumberOrTimestamp.codec.sizeHint(delay); - size = size + const _i4.AccountId32Codec().sizeHint(interceptor); + size = size + const _i4.AccountId32Codec().sizeHint(guardian); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.BlockNumberOrTimestamp.codec.encodeTo(delay, output); - const _i1.U8ArrayCodec(32).encodeTo(interceptor, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.BlockNumberOrTimestamp.codec.encodeTo( + delay, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + guardian, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is SetHighSecurity && other.delay == delay && _i7.listsEqual(other.interceptor, interceptor); + identical( + this, + other, + ) || + other is SetHighSecurity && + other.delay == delay && + _i7.listsEqual( + other.guardian, + guardian, + ); @override - int get hashCode => Object.hash(delay, interceptor); + int get hashCode => Object.hash( + delay, + guardian, + ); } /// Cancel a pending reversible transaction scheduled by the caller. @@ -239,8 +314,8 @@ class Cancel extends Call { @override Map>> toJson() => { - 'cancel': {'txId': txId.toList()}, - }; + 'cancel': {'txId': txId.toList()} + }; int _sizeHint() { int size = 1; @@ -249,20 +324,48 @@ class Cancel extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(txId, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + txId, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Cancel && _i7.listsEqual(other.txId, txId); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Cancel && + _i7.listsEqual( + other.txId, + txId, + ); @override int get hashCode => txId.hashCode; } -/// Called by the Scheduler to finalize the scheduled task/call +/// Executes a previously scheduled transfer after the delay period has elapsed. +/// +/// This extrinsic is called automatically by the Scheduler pallet when the +/// delay period expires. It must be signed by this pallet's account (not a user). +/// The pallet account is set as the origin when scheduling via +/// [`do_schedule_transfer_inner`](Self::do_schedule_transfer_inner). +/// +/// # Parameters +/// +/// - `tx_id`: The unique identifier of the pending transfer to execute. +/// +/// # Errors /// -/// - `tx_id`: The unique id of the transaction to finalize and dispatch. +/// - [`InvalidSchedulerOrigin`](Error::InvalidSchedulerOrigin): Called by an account other +/// than this pallet's account. +/// - [`PendingTxNotFound`](Error::PendingTxNotFound): No pending transfer with this ID. class ExecuteTransfer extends Call { const ExecuteTransfer({required this.txId}); @@ -275,8 +378,8 @@ class ExecuteTransfer extends Call { @override Map>> toJson() => { - 'execute_transfer': {'txId': txId.toList()}, - }; + 'execute_transfer': {'txId': txId.toList()} + }; int _sizeHint() { int size = 1; @@ -285,13 +388,27 @@ class ExecuteTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(txId, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + txId, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is ExecuteTransfer && _i7.listsEqual(other.txId, txId); + identical( + this, + other, + ) || + other is ExecuteTransfer && + _i7.listsEqual( + other.txId, + txId, + ); @override int get hashCode => txId.hashCode; @@ -299,10 +416,16 @@ class ExecuteTransfer extends Call { /// Schedule a transaction for delayed execution. class ScheduleTransfer extends Call { - const ScheduleTransfer({required this.dest, required this.amount}); + const ScheduleTransfer({ + required this.dest, + required this.amount, + }); factory ScheduleTransfer._decode(_i1.Input input) { - return ScheduleTransfer(dest: _i6.MultiAddress.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); + return ScheduleTransfer( + dest: _i6.MultiAddress.codec.decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// <::Lookup as StaticLookup>::Source @@ -313,8 +436,11 @@ class ScheduleTransfer extends Call { @override Map> toJson() => { - 'schedule_transfer': {'dest': dest.toJson(), 'amount': amount}, - }; + 'schedule_transfer': { + 'dest': dest.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -324,17 +450,33 @@ class ScheduleTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i6.MultiAddress.codec.encodeTo(dest, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i6.MultiAddress.codec.encodeTo( + dest, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is ScheduleTransfer && other.dest == dest && other.amount == amount; + identical( + this, + other, + ) || + other is ScheduleTransfer && other.dest == dest && other.amount == amount; @override - int get hashCode => Object.hash(dest, amount); + int get hashCode => Object.hash( + dest, + amount, + ); } /// Schedule a transaction for delayed execution with a custom, one-time delay. @@ -344,7 +486,11 @@ class ScheduleTransfer extends Call { /// /// - `delay`: The time (in blocks or milliseconds) before the transaction executes. class ScheduleTransferWithDelay extends Call { - const ScheduleTransferWithDelay({required this.dest, required this.amount, required this.delay}); + const ScheduleTransferWithDelay({ + required this.dest, + required this.amount, + required this.delay, + }); factory ScheduleTransferWithDelay._decode(_i1.Input input) { return ScheduleTransferWithDelay( @@ -365,8 +511,12 @@ class ScheduleTransferWithDelay extends Call { @override Map> toJson() => { - 'schedule_transfer_with_delay': {'dest': dest.toJson(), 'amount': amount, 'delay': delay.toJson()}, - }; + 'schedule_transfer_with_delay': { + 'dest': dest.toJson(), + 'amount': amount, + 'delay': delay.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -377,25 +527,51 @@ class ScheduleTransferWithDelay extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i6.MultiAddress.codec.encodeTo(dest, output); - _i1.U128Codec.codec.encodeTo(amount, output); - _i3.BlockNumberOrTimestamp.codec.encodeTo(delay, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i6.MultiAddress.codec.encodeTo( + dest, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); + _i3.BlockNumberOrTimestamp.codec.encodeTo( + delay, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ScheduleTransferWithDelay && other.dest == dest && other.amount == amount && other.delay == delay; + identical( + this, + other, + ) || + other is ScheduleTransferWithDelay && + other.dest == dest && + other.amount == amount && + other.delay == delay; @override - int get hashCode => Object.hash(dest, amount, delay); + int get hashCode => Object.hash( + dest, + amount, + delay, + ); } /// Schedule an asset transfer (pallet-assets) for delayed execution using the configured /// delay. class ScheduleAssetTransfer extends Call { - const ScheduleAssetTransfer({required this.assetId, required this.dest, required this.amount}); + const ScheduleAssetTransfer({ + required this.assetId, + required this.dest, + required this.amount, + }); factory ScheduleAssetTransfer._decode(_i1.Input input) { return ScheduleAssetTransfer( @@ -416,8 +592,12 @@ class ScheduleAssetTransfer extends Call { @override Map> toJson() => { - 'schedule_asset_transfer': {'assetId': assetId, 'dest': dest.toJson(), 'amount': amount}, - }; + 'schedule_asset_transfer': { + 'assetId': assetId, + 'dest': dest.toJson(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -428,19 +608,41 @@ class ScheduleAssetTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - _i6.MultiAddress.codec.encodeTo(dest, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + _i6.MultiAddress.codec.encodeTo( + dest, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ScheduleAssetTransfer && other.assetId == assetId && other.dest == dest && other.amount == amount; + identical( + this, + other, + ) || + other is ScheduleAssetTransfer && + other.assetId == assetId && + other.dest == dest && + other.amount == amount; @override - int get hashCode => Object.hash(assetId, dest, amount); + int get hashCode => Object.hash( + assetId, + dest, + amount, + ); } /// Schedule an asset transfer (pallet-assets) with a custom one-time delay. @@ -475,13 +677,13 @@ class ScheduleAssetTransferWithDelay extends Call { @override Map> toJson() => { - 'schedule_asset_transfer_with_delay': { - 'assetId': assetId, - 'dest': dest.toJson(), - 'amount': amount, - 'delay': delay.toJson(), - }, - }; + 'schedule_asset_transfer_with_delay': { + 'assetId': assetId, + 'dest': dest.toJson(), + 'amount': amount, + 'delay': delay.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -493,16 +695,34 @@ class ScheduleAssetTransferWithDelay extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - _i6.MultiAddress.codec.encodeTo(dest, output); - _i1.U128Codec.codec.encodeTo(amount, output); - _i3.BlockNumberOrTimestamp.codec.encodeTo(delay, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + _i6.MultiAddress.codec.encodeTo( + dest, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); + _i3.BlockNumberOrTimestamp.codec.encodeTo( + delay, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ScheduleAssetTransferWithDelay && other.assetId == assetId && other.dest == dest && @@ -510,15 +730,24 @@ class ScheduleAssetTransferWithDelay extends Call { other.delay == delay; @override - int get hashCode => Object.hash(assetId, dest, amount, delay); + int get hashCode => Object.hash( + assetId, + dest, + amount, + delay, + ); } -/// Allows the guardian (interceptor) to recover all funds from a high security -/// account by transferring the entire balance to themselves. +/// Allows the guardian to recover all funds from a high-security account +/// by transferring the entire balance to themselves. /// -/// This is an emergency function for when the high security account may be compromised. +/// This is an emergency function for when the high-security account may be compromised. /// It cancels all pending transfers first (applying volume fees), then transfers /// the remaining free balance to the guardian. +/// +/// If releasing held funds fails for any transfer, that transfer is skipped (metadata +/// preserved for manual retry via `cancel`) and a `TransferRecoveryFailed` event is +/// emitted. Other transfers continue to be processed. class RecoverFunds extends Call { const RecoverFunds({required this.account}); @@ -531,8 +760,8 @@ class RecoverFunds extends Call { @override Map>> toJson() => { - 'recover_funds': {'account': account.toList()}, - }; + 'recover_funds': {'account': account.toList()} + }; int _sizeHint() { int size = 1; @@ -541,13 +770,27 @@ class RecoverFunds extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is RecoverFunds && _i7.listsEqual(other.account, account); + identical( + this, + other, + ) || + other is RecoverFunds && + _i7.listsEqual( + other.account, + account, + ); @override int get hashCode => account.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/error.dart index fe4a30c2..d1f5bc7e 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/error.dart @@ -11,8 +11,8 @@ enum Error { /// The account attempting the action is not marked as high security. accountNotHighSecurity('AccountNotHighSecurity', 1), - /// Interceptor can not be the account itself, because it is redundant. - interceptorCannotBeSelf('InterceptorCannotBeSelf', 2), + /// Guardian cannot be the account itself, because it is redundant. + guardianCannotBeSelf('GuardianCannotBeSelf', 2), /// Recoverer cannot be the account itself, because it is redundant. recovererCannotBeSelf('RecovererCannotBeSelf', 3), @@ -49,12 +49,16 @@ enum Error { /// Cannot schedule one time reversible transaction when account is reversible (theft /// deterrence) - accountAlreadyReversibleCannotScheduleOneTime('AccountAlreadyReversibleCannotScheduleOneTime', 14), + accountAlreadyReversibleCannotScheduleOneTime( + 'AccountAlreadyReversibleCannotScheduleOneTime', 14), - /// The interceptor has reached the maximum number of accounts they can intercept for. - tooManyInterceptorAccounts('TooManyInterceptorAccounts', 15); + /// The guardian has reached the maximum number of accounts they can protect. + tooManyGuardianAccounts('TooManyGuardianAccounts', 15); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -85,7 +89,7 @@ class $ErrorCodec with _i1.Codec { case 1: return Error.accountNotHighSecurity; case 2: - return Error.interceptorCannotBeSelf; + return Error.guardianCannotBeSelf; case 3: return Error.recovererCannotBeSelf; case 4: @@ -111,14 +115,20 @@ class $ErrorCodec with _i1.Codec { case 14: return Error.accountAlreadyReversibleCannotScheduleOneTime; case 15: - return Error.tooManyInterceptorAccounts; + return Error.tooManyGuardianAccounts; default: throw Exception('Error: Invalid variant index: "$index"'); } } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/event.dart index 6d0203f2..c34bf9e2 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/event.dart @@ -41,16 +41,20 @@ class $Event { HighSecuritySet highSecuritySet({ required _i3.AccountId32 who, - required _i3.AccountId32 interceptor, + required _i3.AccountId32 guardian, required _i4.BlockNumberOrTimestamp delay, }) { - return HighSecuritySet(who: who, interceptor: interceptor, delay: delay); + return HighSecuritySet( + who: who, + guardian: guardian, + delay: delay, + ); } TransactionScheduled transactionScheduled({ required _i3.AccountId32 from, required _i3.AccountId32 to, - required _i3.AccountId32 interceptor, + required _i3.AccountId32 guardian, int? assetId, required BigInt amount, required _i5.H256 txId, @@ -59,7 +63,7 @@ class $Event { return TransactionScheduled( from: from, to: to, - interceptor: interceptor, + guardian: guardian, assetId: assetId, amount: amount, txId: txId, @@ -67,19 +71,39 @@ class $Event { ); } - TransactionCancelled transactionCancelled({required _i3.AccountId32 who, required _i5.H256 txId}) { - return TransactionCancelled(who: who, txId: txId); + TransactionCancelled transactionCancelled({ + required _i3.AccountId32 who, + required _i5.H256 txId, + }) { + return TransactionCancelled( + who: who, + txId: txId, + ); } TransactionExecuted transactionExecuted({ required _i5.H256 txId, - required _i1.Result<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo> result, + required _i1.Result<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo> + result, + }) { + return TransactionExecuted( + txId: txId, + result: result, + ); + } + + FundsRecovered fundsRecovered({ + required _i3.AccountId32 account, + required _i3.AccountId32 guardian, }) { - return TransactionExecuted(txId: txId, result: result); + return FundsRecovered( + account: account, + guardian: guardian, + ); } - FundsRecovered fundsRecovered({required _i3.AccountId32 account, required _i3.AccountId32 guardian}) { - return FundsRecovered(account: account, guardian: guardian); + TransferRecoveryFailed transferRecoveryFailed({required _i5.H256 txId}) { + return TransferRecoveryFailed(txId: txId); } } @@ -100,13 +124,18 @@ class $EventCodec with _i1.Codec { return TransactionExecuted._decode(input); case 4: return FundsRecovered._decode(input); + case 5: + return TransferRecoveryFailed._decode(input); default: throw Exception('Event: Invalid variant index: "$index"'); } } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case HighSecuritySet: (value as HighSecuritySet).encodeTo(output); @@ -123,8 +152,12 @@ class $EventCodec with _i1.Codec { case FundsRecovered: (value as FundsRecovered).encodeTo(output); break; + case TransferRecoveryFailed: + (value as TransferRecoveryFailed).encodeTo(output); + break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -141,21 +174,27 @@ class $EventCodec with _i1.Codec { return (value as TransactionExecuted)._sizeHint(); case FundsRecovered: return (value as FundsRecovered)._sizeHint(); + case TransferRecoveryFailed: + return (value as TransferRecoveryFailed)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A user has enabled their high-security settings. -/// [who, interceptor, recoverer, delay] class HighSecuritySet extends Event { - const HighSecuritySet({required this.who, required this.interceptor, required this.delay}); + const HighSecuritySet({ + required this.who, + required this.guardian, + required this.delay, + }); factory HighSecuritySet._decode(_i1.Input input) { return HighSecuritySet( who: const _i1.U8ArrayCodec(32).decode(input), - interceptor: const _i1.U8ArrayCodec(32).decode(input), + guardian: const _i1.U8ArrayCodec(32).decode(input), delay: _i4.BlockNumberOrTimestamp.codec.decode(input), ); } @@ -164,50 +203,79 @@ class HighSecuritySet extends Event { final _i3.AccountId32 who; /// T::AccountId - final _i3.AccountId32 interceptor; + /// The guardian who can cancel transfers and recover funds. + final _i3.AccountId32 guardian; /// BlockNumberOrTimestampOf final _i4.BlockNumberOrTimestamp delay; @override Map> toJson() => { - 'HighSecuritySet': {'who': who.toList(), 'interceptor': interceptor.toList(), 'delay': delay.toJson()}, - }; + 'HighSecuritySet': { + 'who': who.toList(), + 'guardian': guardian.toList(), + 'delay': delay.toJson(), + } + }; int _sizeHint() { int size = 1; size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + const _i3.AccountId32Codec().sizeHint(interceptor); + size = size + const _i3.AccountId32Codec().sizeHint(guardian); size = size + _i4.BlockNumberOrTimestamp.codec.sizeHint(delay); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - const _i1.U8ArrayCodec(32).encodeTo(interceptor, output); - _i4.BlockNumberOrTimestamp.codec.encodeTo(delay, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + guardian, + output, + ); + _i4.BlockNumberOrTimestamp.codec.encodeTo( + delay, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is HighSecuritySet && - _i9.listsEqual(other.who, who) && - _i9.listsEqual(other.interceptor, interceptor) && + _i9.listsEqual( + other.who, + who, + ) && + _i9.listsEqual( + other.guardian, + guardian, + ) && other.delay == delay; @override - int get hashCode => Object.hash(who, interceptor, delay); + int get hashCode => Object.hash( + who, + guardian, + delay, + ); } -/// A transaction has been intercepted and scheduled for delayed execution. -/// [from, to, interceptor, amount, tx_id, execute_at_moment] +/// A transaction has been scheduled for delayed execution. class TransactionScheduled extends Event { const TransactionScheduled({ required this.from, required this.to, - required this.interceptor, + required this.guardian, this.assetId, required this.amount, required this.txId, @@ -218,7 +286,7 @@ class TransactionScheduled extends Event { return TransactionScheduled( from: const _i1.U8ArrayCodec(32).decode(input), to: const _i1.U8ArrayCodec(32).decode(input), - interceptor: const _i1.U8ArrayCodec(32).decode(input), + guardian: const _i1.U8ArrayCodec(32).decode(input), assetId: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), amount: _i1.U128Codec.codec.decode(input), txId: const _i1.U8ArrayCodec(32).decode(input), @@ -233,7 +301,8 @@ class TransactionScheduled extends Event { final _i3.AccountId32 to; /// T::AccountId - final _i3.AccountId32 interceptor; + /// The guardian who can cancel this transfer. + final _i3.AccountId32 guardian; /// Option> final int? assetId; @@ -249,23 +318,24 @@ class TransactionScheduled extends Event { @override Map> toJson() => { - 'TransactionScheduled': { - 'from': from.toList(), - 'to': to.toList(), - 'interceptor': interceptor.toList(), - 'assetId': assetId, - 'amount': amount, - 'txId': txId.toList(), - 'executeAt': executeAt.toJson(), - }, - }; + 'TransactionScheduled': { + 'from': from.toList(), + 'to': to.toList(), + 'guardian': guardian.toList(), + 'assetId': assetId, + 'amount': amount, + 'txId': txId.toList(), + 'executeAt': executeAt.toJson(), + } + }; int _sizeHint() { int size = 1; size = size + const _i3.AccountId32Codec().sizeHint(from); size = size + const _i3.AccountId32Codec().sizeHint(to); - size = size + const _i3.AccountId32Codec().sizeHint(interceptor); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(assetId); + size = size + const _i3.AccountId32Codec().sizeHint(guardian); + size = + size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(assetId); size = size + _i1.U128Codec.codec.sizeHint(amount); size = size + const _i5.H256Codec().sizeHint(txId); size = size + _i6.DispatchTime.codec.sizeHint(executeAt); @@ -273,35 +343,85 @@ class TransactionScheduled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(from, output); - const _i1.U8ArrayCodec(32).encodeTo(to, output); - const _i1.U8ArrayCodec(32).encodeTo(interceptor, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(assetId, output); - _i1.U128Codec.codec.encodeTo(amount, output); - const _i1.U8ArrayCodec(32).encodeTo(txId, output); - _i6.DispatchTime.codec.encodeTo(executeAt, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + from, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + to, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + guardian, + output, + ); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( + assetId, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + txId, + output, + ); + _i6.DispatchTime.codec.encodeTo( + executeAt, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is TransactionScheduled && - _i9.listsEqual(other.from, from) && - _i9.listsEqual(other.to, to) && - _i9.listsEqual(other.interceptor, interceptor) && + _i9.listsEqual( + other.from, + from, + ) && + _i9.listsEqual( + other.to, + to, + ) && + _i9.listsEqual( + other.guardian, + guardian, + ) && other.assetId == assetId && other.amount == amount && - _i9.listsEqual(other.txId, txId) && + _i9.listsEqual( + other.txId, + txId, + ) && other.executeAt == executeAt; @override - int get hashCode => Object.hash(from, to, interceptor, assetId, amount, txId, executeAt); + int get hashCode => Object.hash( + from, + to, + guardian, + assetId, + amount, + txId, + executeAt, + ); } -/// A scheduled transaction has been successfully cancelled by the owner. +/// A scheduled transaction has been successfully cancelled. class TransactionCancelled extends Event { - const TransactionCancelled({required this.who, required this.txId}); + const TransactionCancelled({ + required this.who, + required this.txId, + }); factory TransactionCancelled._decode(_i1.Input input) { return TransactionCancelled( @@ -318,8 +438,11 @@ class TransactionCancelled extends Event { @override Map>> toJson() => { - 'TransactionCancelled': {'who': who.toList(), 'txId': txId.toList()}, - }; + 'TransactionCancelled': { + 'who': who.toList(), + 'txId': txId.toList(), + } + }; int _sizeHint() { int size = 1; @@ -329,28 +452,55 @@ class TransactionCancelled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - const _i1.U8ArrayCodec(32).encodeTo(txId, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + txId, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is TransactionCancelled && _i9.listsEqual(other.who, who) && _i9.listsEqual(other.txId, txId); + identical( + this, + other, + ) || + other is TransactionCancelled && + _i9.listsEqual( + other.who, + who, + ) && + _i9.listsEqual( + other.txId, + txId, + ); @override - int get hashCode => Object.hash(who, txId); + int get hashCode => Object.hash( + who, + txId, + ); } /// A scheduled transaction was executed by the scheduler. class TransactionExecuted extends Event { - const TransactionExecuted({required this.txId, required this.result}); + const TransactionExecuted({ + required this.txId, + required this.result, + }); factory TransactionExecuted._decode(_i1.Input input) { return TransactionExecuted( txId: const _i1.U8ArrayCodec(32).decode(input), - result: const _i1.ResultCodec<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo>( + result: const _i1 + .ResultCodec<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo>( _i7.PostDispatchInfo.codec, _i8.DispatchErrorWithPostInfo.codec, ).decode(input), @@ -365,15 +515,18 @@ class TransactionExecuted extends Event { @override Map> toJson() => { - 'TransactionExecuted': {'txId': txId.toList(), 'result': result.toJson()}, - }; + 'TransactionExecuted': { + 'txId': txId.toList(), + 'result': result.toJson(), + } + }; int _sizeHint() { int size = 1; size = size + const _i5.H256Codec().sizeHint(txId); - size = - size + - const _i1.ResultCodec<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo>( + size = size + + const _i1 + .ResultCodec<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo>( _i7.PostDispatchInfo.codec, _i8.DispatchErrorWithPostInfo.codec, ).sizeHint(result); @@ -381,26 +534,49 @@ class TransactionExecuted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(txId, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + txId, + output, + ); const _i1.ResultCodec<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo>( _i7.PostDispatchInfo.codec, _i8.DispatchErrorWithPostInfo.codec, - ).encodeTo(result, output); + ).encodeTo( + result, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is TransactionExecuted && _i9.listsEqual(other.txId, txId) && other.result == result; + identical( + this, + other, + ) || + other is TransactionExecuted && + _i9.listsEqual( + other.txId, + txId, + ) && + other.result == result; @override - int get hashCode => Object.hash(txId, result); + int get hashCode => Object.hash( + txId, + result, + ); } -/// Funds were recovered from a high security account by its guardian. +/// All funds were recovered from a high-security account by its guardian. class FundsRecovered extends Event { - const FundsRecovered({required this.account, required this.guardian}); + const FundsRecovered({ + required this.account, + required this.guardian, + }); factory FundsRecovered._decode(_i1.Input input) { return FundsRecovered( @@ -417,8 +593,11 @@ class FundsRecovered extends Event { @override Map>> toJson() => { - 'FundsRecovered': {'account': account.toList(), 'guardian': guardian.toList()}, - }; + 'FundsRecovered': { + 'account': account.toList(), + 'guardian': guardian.toList(), + } + }; int _sizeHint() { int size = 1; @@ -428,16 +607,90 @@ class FundsRecovered extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); - const _i1.U8ArrayCodec(32).encodeTo(guardian, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + guardian, + output, + ); + } + + @override + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is FundsRecovered && + _i9.listsEqual( + other.account, + account, + ) && + _i9.listsEqual( + other.guardian, + guardian, + ); + + @override + int get hashCode => Object.hash( + account, + guardian, + ); +} + +/// Failed to release held funds during recovery. The transfer metadata is preserved +/// for manual retry via `cancel`. +class TransferRecoveryFailed extends Event { + const TransferRecoveryFailed({required this.txId}); + + factory TransferRecoveryFailed._decode(_i1.Input input) { + return TransferRecoveryFailed( + txId: const _i1.U8ArrayCodec(32).decode(input)); + } + + /// T::Hash + final _i5.H256 txId; + + @override + Map>> toJson() => { + 'TransferRecoveryFailed': {'txId': txId.toList()} + }; + + int _sizeHint() { + int size = 1; + size = size + const _i5.H256Codec().sizeHint(txId); + return size; + } + + void encodeTo(_i1.Output output) { + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + txId, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is FundsRecovered && _i9.listsEqual(other.account, account) && _i9.listsEqual(other.guardian, guardian); + identical( + this, + other, + ) || + other is TransferRecoveryFailed && + _i9.listsEqual( + other.txId, + txId, + ); @override - int get hashCode => Object.hash(account, guardian); + int get hashCode => txId.hashCode; } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/hold_reason.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/hold_reason.dart index 12bf569f..00e3a2aa 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/hold_reason.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/hold_reason.dart @@ -6,7 +6,10 @@ import 'package:polkadart/scale_codec.dart' as _i1; enum HoldReason { scheduledTransfer('ScheduledTransfer', 0); - const HoldReason(this.variantName, this.codecIndex); + const HoldReason( + this.variantName, + this.codecIndex, + ); factory HoldReason.decode(_i1.Input input) { return codec.decode(input); @@ -40,7 +43,13 @@ class $HoldReasonCodec with _i1.Codec { } @override - void encodeTo(HoldReason value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + HoldReason value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pending_transfer.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pending_transfer.dart index 823f72db..7b98b1a6 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pending_transfer.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pending_transfer.dart @@ -1,18 +1,17 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i4; +import 'dart:typed_data' as _i3; import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; +import 'package:quiver/collection.dart' as _i4; -import '../frame_support/traits/preimages/bounded.dart' as _i3; import '../sp_core/crypto/account_id32.dart' as _i2; class PendingTransfer { const PendingTransfer({ required this.from, required this.to, - required this.interceptor, - required this.call, + required this.guardian, + this.assetId, required this.amount, }); @@ -27,52 +26,88 @@ class PendingTransfer { final _i2.AccountId32 to; /// AccountId - final _i2.AccountId32 interceptor; + final _i2.AccountId32 guardian; - /// Call - final _i3.Bounded call; + /// Option + final int? assetId; /// Balance final BigInt amount; static const $PendingTransferCodec codec = $PendingTransferCodec(); - _i4.Uint8List encode() { + _i3.Uint8List encode() { return codec.encode(this); } Map toJson() => { - 'from': from.toList(), - 'to': to.toList(), - 'interceptor': interceptor.toList(), - 'call': call.toJson(), - 'amount': amount, - }; + 'from': from.toList(), + 'to': to.toList(), + 'guardian': guardian.toList(), + 'assetId': assetId, + 'amount': amount, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is PendingTransfer && - _i5.listsEqual(other.from, from) && - _i5.listsEqual(other.to, to) && - _i5.listsEqual(other.interceptor, interceptor) && - other.call == call && + _i4.listsEqual( + other.from, + from, + ) && + _i4.listsEqual( + other.to, + to, + ) && + _i4.listsEqual( + other.guardian, + guardian, + ) && + other.assetId == assetId && other.amount == amount; @override - int get hashCode => Object.hash(from, to, interceptor, call, amount); + int get hashCode => Object.hash( + from, + to, + guardian, + assetId, + amount, + ); } class $PendingTransferCodec with _i1.Codec { const $PendingTransferCodec(); @override - void encodeTo(PendingTransfer obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.from, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.to, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.interceptor, output); - _i3.Bounded.codec.encodeTo(obj.call, output); - _i1.U128Codec.codec.encodeTo(obj.amount, output); + void encodeTo( + PendingTransfer obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + obj.from, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + obj.to, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + obj.guardian, + output, + ); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( + obj.assetId, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); } @override @@ -80,8 +115,8 @@ class $PendingTransferCodec with _i1.Codec { return PendingTransfer( from: const _i1.U8ArrayCodec(32).decode(input), to: const _i1.U8ArrayCodec(32).decode(input), - interceptor: const _i1.U8ArrayCodec(32).decode(input), - call: _i3.Bounded.codec.decode(input), + guardian: const _i1.U8ArrayCodec(32).decode(input), + assetId: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), amount: _i1.U128Codec.codec.decode(input), ); } @@ -91,8 +126,9 @@ class $PendingTransferCodec with _i1.Codec { int size = 0; size = size + const _i2.AccountId32Codec().sizeHint(obj.from); size = size + const _i2.AccountId32Codec().sizeHint(obj.to); - size = size + const _i2.AccountId32Codec().sizeHint(obj.interceptor); - size = size + _i3.Bounded.codec.sizeHint(obj.call); + size = size + const _i2.AccountId32Codec().sizeHint(obj.guardian); + size = size + + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.assetId); size = size + _i1.U128Codec.codec.sizeHint(obj.amount); return size; } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/call.dart index 4a7529e6..a7609870 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/call.dart @@ -36,12 +36,26 @@ abstract class Call { class $Call { const $Call(); - Schedule schedule({required int when, required int priority, required _i3.RuntimeCall call}) { - return Schedule(when: when, priority: priority, call: call); + Schedule schedule({ + required int when, + required int priority, + required _i3.RuntimeCall call, + }) { + return Schedule( + when: when, + priority: priority, + call: call, + ); } - Cancel cancel({required _i4.BlockNumberOrTimestamp when, required int index}) { - return Cancel(when: when, index: index); + Cancel cancel({ + required _i4.BlockNumberOrTimestamp when, + required int index, + }) { + return Cancel( + when: when, + index: index, + ); } ScheduleNamed scheduleNamed({ @@ -50,7 +64,12 @@ class $Call { required int priority, required _i3.RuntimeCall call, }) { - return ScheduleNamed(id: id, when: when, priority: priority, call: call); + return ScheduleNamed( + id: id, + when: when, + priority: priority, + call: call, + ); } CancelNamed cancelNamed({required List id}) { @@ -62,7 +81,11 @@ class $Call { required int priority, required _i3.RuntimeCall call, }) { - return ScheduleAfter(after: after, priority: priority, call: call); + return ScheduleAfter( + after: after, + priority: priority, + call: call, + ); } ScheduleNamedAfter scheduleNamedAfter({ @@ -71,7 +94,12 @@ class $Call { required int priority, required _i3.RuntimeCall call, }) { - return ScheduleNamedAfter(id: id, after: after, priority: priority, call: call); + return ScheduleNamedAfter( + id: id, + after: after, + priority: priority, + call: call, + ); } SetRetry setRetry({ @@ -79,7 +107,11 @@ class $Call { required int retries, required _i4.BlockNumberOrTimestamp period, }) { - return SetRetry(task: task, retries: retries, period: period); + return SetRetry( + task: task, + retries: retries, + period: period, + ); } SetRetryNamed setRetryNamed({ @@ -87,10 +119,15 @@ class $Call { required int retries, required _i4.BlockNumberOrTimestamp period, }) { - return SetRetryNamed(id: id, retries: retries, period: period); + return SetRetryNamed( + id: id, + retries: retries, + period: period, + ); } - CancelRetry cancelRetry({required _i5.Tuple2<_i4.BlockNumberOrTimestamp, int> task}) { + CancelRetry cancelRetry( + {required _i5.Tuple2<_i4.BlockNumberOrTimestamp, int> task}) { return CancelRetry(task: task); } @@ -132,7 +169,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case Schedule: (value as Schedule).encodeTo(output); @@ -165,7 +205,8 @@ class $CallCodec with _i1.Codec { (value as CancelRetryNamed).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -193,13 +234,18 @@ class $CallCodec with _i1.Codec { case CancelRetryNamed: return (value as CancelRetryNamed)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } class Schedule extends Call { - const Schedule({required this.when, required this.priority, required this.call}); + const Schedule({ + required this.when, + required this.priority, + required this.call, + }); factory Schedule._decode(_i1.Input input) { return Schedule( @@ -220,8 +266,12 @@ class Schedule extends Call { @override Map> toJson() => { - 'schedule': {'when': when, 'priority': priority, 'call': call.toJson()}, - }; + 'schedule': { + 'when': when, + 'priority': priority, + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -232,27 +282,55 @@ class Schedule extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(when, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i3.RuntimeCall.codec.encodeTo(call, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + when, + output, + ); + _i1.U8Codec.codec.encodeTo( + priority, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Schedule && other.when == when && other.priority == priority && other.call == call; + identical( + this, + other, + ) || + other is Schedule && + other.when == when && + other.priority == priority && + other.call == call; @override - int get hashCode => Object.hash(when, priority, call); + int get hashCode => Object.hash( + when, + priority, + call, + ); } /// Cancel an anonymously scheduled task. class Cancel extends Call { - const Cancel({required this.when, required this.index}); + const Cancel({ + required this.when, + required this.index, + }); factory Cancel._decode(_i1.Input input) { - return Cancel(when: _i4.BlockNumberOrTimestamp.codec.decode(input), index: _i1.U32Codec.codec.decode(input)); + return Cancel( + when: _i4.BlockNumberOrTimestamp.codec.decode(input), + index: _i1.U32Codec.codec.decode(input), + ); } /// BlockNumberOrTimestampOf @@ -263,8 +341,11 @@ class Cancel extends Call { @override Map> toJson() => { - 'cancel': {'when': when.toJson(), 'index': index}, - }; + 'cancel': { + 'when': when.toJson(), + 'index': index, + } + }; int _sizeHint() { int size = 1; @@ -274,21 +355,42 @@ class Cancel extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i4.BlockNumberOrTimestamp.codec.encodeTo(when, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i4.BlockNumberOrTimestamp.codec.encodeTo( + when, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Cancel && other.when == when && other.index == index; + identical( + this, + other, + ) || + other is Cancel && other.when == when && other.index == index; @override - int get hashCode => Object.hash(when, index); + int get hashCode => Object.hash( + when, + index, + ); } class ScheduleNamed extends Call { - const ScheduleNamed({required this.id, required this.when, required this.priority, required this.call}); + const ScheduleNamed({ + required this.id, + required this.when, + required this.priority, + required this.call, + }); factory ScheduleNamed._decode(_i1.Input input) { return ScheduleNamed( @@ -313,8 +415,13 @@ class ScheduleNamed extends Call { @override Map> toJson() => { - 'schedule_named': {'id': id.toList(), 'when': when, 'priority': priority, 'call': call.toJson()}, - }; + 'schedule_named': { + 'id': id.toList(), + 'when': when, + 'priority': priority, + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -326,24 +433,50 @@ class ScheduleNamed extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(id, output); - _i1.U32Codec.codec.encodeTo(when, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i3.RuntimeCall.codec.encodeTo(call, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + id, + output, + ); + _i1.U32Codec.codec.encodeTo( + when, + output, + ); + _i1.U8Codec.codec.encodeTo( + priority, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ScheduleNamed && - _i6.listsEqual(other.id, id) && + _i6.listsEqual( + other.id, + id, + ) && other.when == when && other.priority == priority && other.call == call; @override - int get hashCode => Object.hash(id, when, priority, call); + int get hashCode => Object.hash( + id, + when, + priority, + call, + ); } /// Cancel a named scheduled task. @@ -359,8 +492,8 @@ class CancelNamed extends Call { @override Map>> toJson() => { - 'cancel_named': {'id': id.toList()}, - }; + 'cancel_named': {'id': id.toList()} + }; int _sizeHint() { int size = 1; @@ -369,19 +502,38 @@ class CancelNamed extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is CancelNamed && _i6.listsEqual(other.id, id); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is CancelNamed && + _i6.listsEqual( + other.id, + id, + ); @override int get hashCode => id.hashCode; } class ScheduleAfter extends Call { - const ScheduleAfter({required this.after, required this.priority, required this.call}); + const ScheduleAfter({ + required this.after, + required this.priority, + required this.call, + }); factory ScheduleAfter._decode(_i1.Input input) { return ScheduleAfter( @@ -402,8 +554,12 @@ class ScheduleAfter extends Call { @override Map> toJson() => { - 'schedule_after': {'after': after.toJson(), 'priority': priority, 'call': call.toJson()}, - }; + 'schedule_after': { + 'after': after.toJson(), + 'priority': priority, + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -414,23 +570,50 @@ class ScheduleAfter extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i4.BlockNumberOrTimestamp.codec.encodeTo(after, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i3.RuntimeCall.codec.encodeTo(call, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i4.BlockNumberOrTimestamp.codec.encodeTo( + after, + output, + ); + _i1.U8Codec.codec.encodeTo( + priority, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ScheduleAfter && other.after == after && other.priority == priority && other.call == call; + identical( + this, + other, + ) || + other is ScheduleAfter && + other.after == after && + other.priority == priority && + other.call == call; @override - int get hashCode => Object.hash(after, priority, call); + int get hashCode => Object.hash( + after, + priority, + call, + ); } class ScheduleNamedAfter extends Call { - const ScheduleNamedAfter({required this.id, required this.after, required this.priority, required this.call}); + const ScheduleNamedAfter({ + required this.id, + required this.after, + required this.priority, + required this.call, + }); factory ScheduleNamedAfter._decode(_i1.Input input) { return ScheduleNamedAfter( @@ -455,8 +638,13 @@ class ScheduleNamedAfter extends Call { @override Map> toJson() => { - 'schedule_named_after': {'id': id.toList(), 'after': after.toJson(), 'priority': priority, 'call': call.toJson()}, - }; + 'schedule_named_after': { + 'id': id.toList(), + 'after': after.toJson(), + 'priority': priority, + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -468,24 +656,50 @@ class ScheduleNamedAfter extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - const _i1.U8ArrayCodec(32).encodeTo(id, output); - _i4.BlockNumberOrTimestamp.codec.encodeTo(after, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i3.RuntimeCall.codec.encodeTo(call, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + id, + output, + ); + _i4.BlockNumberOrTimestamp.codec.encodeTo( + after, + output, + ); + _i1.U8Codec.codec.encodeTo( + priority, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ScheduleNamedAfter && - _i6.listsEqual(other.id, id) && + _i6.listsEqual( + other.id, + id, + ) && other.after == after && other.priority == priority && other.call == call; @override - int get hashCode => Object.hash(id, after, priority, call); + int get hashCode => Object.hash( + id, + after, + priority, + call, + ); } /// Set a retry configuration for a task so that, in case its scheduled run fails, it will @@ -499,8 +713,16 @@ class ScheduleNamedAfter extends Call { /// clones of the original task. Their retry configuration will be derived from the /// original task's configuration, but will have a lower value for `remaining` than the /// original `total_retries`. +/// +/// The `period` type must match the task's scheduling type: block-scheduled tasks +/// require a block-number period, and timestamp-scheduled tasks require a timestamp +/// period. Mismatched types will return [`Error::RetryPeriodMismatch`]. class SetRetry extends Call { - const SetRetry({required this.task, required this.retries, required this.period}); + const SetRetry({ + required this.task, + required this.retries, + required this.period, + }); factory SetRetry._decode(_i1.Input input) { return SetRetry( @@ -524,17 +746,19 @@ class SetRetry extends Call { @override Map> toJson() => { - 'set_retry': { - 'task': [task.value0.toJson(), task.value1], - 'retries': retries, - 'period': period.toJson(), - }, - }; + 'set_retry': { + 'task': [ + task.value0.toJson(), + task.value1, + ], + 'retries': retries, + 'period': period.toJson(), + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, @@ -545,22 +769,44 @@ class SetRetry extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo(task, output); - _i1.U8Codec.codec.encodeTo(retries, output); - _i4.BlockNumberOrTimestamp.codec.encodeTo(period, output); + ).encodeTo( + task, + output, + ); + _i1.U8Codec.codec.encodeTo( + retries, + output, + ); + _i4.BlockNumberOrTimestamp.codec.encodeTo( + period, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is SetRetry && other.task == task && other.retries == retries && other.period == period; - - @override - int get hashCode => Object.hash(task, retries, period); + identical( + this, + other, + ) || + other is SetRetry && + other.task == task && + other.retries == retries && + other.period == period; + + @override + int get hashCode => Object.hash( + task, + retries, + period, + ); } /// Set a retry configuration for a named task so that, in case its scheduled run fails, it @@ -574,8 +820,16 @@ class SetRetry extends Call { /// clones of the original task. Their retry configuration will be derived from the /// original task's configuration, but will have a lower value for `remaining` than the /// original `total_retries`. +/// +/// The `period` type must match the task's scheduling type: block-scheduled tasks +/// require a block-number period, and timestamp-scheduled tasks require a timestamp +/// period. Mismatched types will return [`Error::RetryPeriodMismatch`]. class SetRetryNamed extends Call { - const SetRetryNamed({required this.id, required this.retries, required this.period}); + const SetRetryNamed({ + required this.id, + required this.retries, + required this.period, + }); factory SetRetryNamed._decode(_i1.Input input) { return SetRetryNamed( @@ -596,8 +850,12 @@ class SetRetryNamed extends Call { @override Map> toJson() => { - 'set_retry_named': {'id': id.toList(), 'retries': retries, 'period': period.toJson()}, - }; + 'set_retry_named': { + 'id': id.toList(), + 'retries': retries, + 'period': period.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -608,19 +866,44 @@ class SetRetryNamed extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - const _i1.U8ArrayCodec(32).encodeTo(id, output); - _i1.U8Codec.codec.encodeTo(retries, output); - _i4.BlockNumberOrTimestamp.codec.encodeTo(period, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + id, + output, + ); + _i1.U8Codec.codec.encodeTo( + retries, + output, + ); + _i4.BlockNumberOrTimestamp.codec.encodeTo( + period, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is SetRetryNamed && _i6.listsEqual(other.id, id) && other.retries == retries && other.period == period; - - @override - int get hashCode => Object.hash(id, retries, period); + identical( + this, + other, + ) || + other is SetRetryNamed && + _i6.listsEqual( + other.id, + id, + ) && + other.retries == retries && + other.period == period; + + @override + int get hashCode => Object.hash( + id, + retries, + period, + ); } /// Removes the retry configuration of a task. @@ -629,11 +912,10 @@ class CancelRetry extends Call { factory CancelRetry._decode(_i1.Input input) { return CancelRetry( - task: const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input), - ); + task: const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + ).decode(input)); } /// TaskAddressOf @@ -641,15 +923,17 @@ class CancelRetry extends Call { @override Map>> toJson() => { - 'cancel_retry': { - 'task': [task.value0.toJson(), task.value1], - }, - }; + 'cancel_retry': { + 'task': [ + task.value0.toJson(), + task.value1, + ] + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, @@ -658,15 +942,26 @@ class CancelRetry extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo(task, output); + ).encodeTo( + task, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is CancelRetry && other.task == task; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is CancelRetry && other.task == task; @override int get hashCode => task.hashCode; @@ -685,8 +980,8 @@ class CancelRetryNamed extends Call { @override Map>> toJson() => { - 'cancel_retry_named': {'id': id.toList()}, - }; + 'cancel_retry_named': {'id': id.toList()} + }; int _sizeHint() { int size = 1; @@ -695,12 +990,27 @@ class CancelRetryNamed extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - const _i1.U8ArrayCodec(32).encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is CancelRetryNamed && _i6.listsEqual(other.id, id); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is CancelRetryNamed && + _i6.listsEqual( + other.id, + id, + ); @override int get hashCode => id.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/error.dart index bacc30eb..a77fbc42 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/error.dart @@ -24,9 +24,18 @@ enum Error { named('Named', 5), /// Periodic scheduling is not supported. - periodicNotSupported('PeriodicNotSupported', 6); + periodicNotSupported('PeriodicNotSupported', 6), - const Error(this.variantName, this.codecIndex); + /// Retry period type does not match task scheduling type. + /// + /// Block-scheduled tasks require a block-number retry period, + /// and timestamp-scheduled tasks require a timestamp retry period. + retryPeriodMismatch('RetryPeriodMismatch', 7); + + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -66,13 +75,21 @@ class $ErrorCodec with _i1.Codec { return Error.named; case 6: return Error.periodicNotSupported; + case 7: + return Error.retryPeriodMismatch; default: throw Exception('Error: Invalid variant index: "$index"'); } } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/event.dart index d0b914ec..41214b9d 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/event.dart @@ -35,12 +35,24 @@ abstract class Event { class $Event { const $Event(); - Scheduled scheduled({required _i3.BlockNumberOrTimestamp when, required int index}) { - return Scheduled(when: when, index: index); + Scheduled scheduled({ + required _i3.BlockNumberOrTimestamp when, + required int index, + }) { + return Scheduled( + when: when, + index: index, + ); } - Canceled canceled({required _i3.BlockNumberOrTimestamp when, required int index}) { - return Canceled(when: when, index: index); + Canceled canceled({ + required _i3.BlockNumberOrTimestamp when, + required int index, + }) { + return Canceled( + when: when, + index: index, + ); } Dispatched dispatched({ @@ -48,7 +60,11 @@ class $Event { List? id, required _i1.Result result, }) { - return Dispatched(task: task, id: id, result: result); + return Dispatched( + task: task, + id: id, + result: result, + ); } RetrySet retrySet({ @@ -57,26 +73,52 @@ class $Event { required _i3.BlockNumberOrTimestamp period, required int retries, }) { - return RetrySet(task: task, id: id, period: period, retries: retries); + return RetrySet( + task: task, + id: id, + period: period, + retries: retries, + ); } - RetryCancelled retryCancelled({required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id}) { - return RetryCancelled(task: task, id: id); + RetryCancelled retryCancelled({ + required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, + List? id, + }) { + return RetryCancelled( + task: task, + id: id, + ); } - CallUnavailable callUnavailable({required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id}) { - return CallUnavailable(task: task, id: id); + CallUnavailable callUnavailable({ + required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, + List? id, + }) { + return CallUnavailable( + task: task, + id: id, + ); } - RetryFailed retryFailed({required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id}) { - return RetryFailed(task: task, id: id); + RetryFailed retryFailed({ + required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, + List? id, + }) { + return RetryFailed( + task: task, + id: id, + ); } PermanentlyOverweight permanentlyOverweight({ required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id, }) { - return PermanentlyOverweight(task: task, id: id); + return PermanentlyOverweight( + task: task, + id: id, + ); } } @@ -109,7 +151,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case Scheduled: (value as Scheduled).encodeTo(output); @@ -136,7 +181,8 @@ class $EventCodec with _i1.Codec { (value as PermanentlyOverweight).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -160,17 +206,24 @@ class $EventCodec with _i1.Codec { case PermanentlyOverweight: return (value as PermanentlyOverweight)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// Scheduled some task. class Scheduled extends Event { - const Scheduled({required this.when, required this.index}); + const Scheduled({ + required this.when, + required this.index, + }); factory Scheduled._decode(_i1.Input input) { - return Scheduled(when: _i3.BlockNumberOrTimestamp.codec.decode(input), index: _i1.U32Codec.codec.decode(input)); + return Scheduled( + when: _i3.BlockNumberOrTimestamp.codec.decode(input), + index: _i1.U32Codec.codec.decode(input), + ); } /// BlockNumberOrTimestampOf @@ -181,8 +234,11 @@ class Scheduled extends Event { @override Map> toJson() => { - 'Scheduled': {'when': when.toJson(), 'index': index}, - }; + 'Scheduled': { + 'when': when.toJson(), + 'index': index, + } + }; int _sizeHint() { int size = 1; @@ -192,25 +248,47 @@ class Scheduled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.BlockNumberOrTimestamp.codec.encodeTo(when, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.BlockNumberOrTimestamp.codec.encodeTo( + when, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Scheduled && other.when == when && other.index == index; + identical( + this, + other, + ) || + other is Scheduled && other.when == when && other.index == index; @override - int get hashCode => Object.hash(when, index); + int get hashCode => Object.hash( + when, + index, + ); } /// Canceled some task. class Canceled extends Event { - const Canceled({required this.when, required this.index}); + const Canceled({ + required this.when, + required this.index, + }); factory Canceled._decode(_i1.Input input) { - return Canceled(when: _i3.BlockNumberOrTimestamp.codec.decode(input), index: _i1.U32Codec.codec.decode(input)); + return Canceled( + when: _i3.BlockNumberOrTimestamp.codec.decode(input), + index: _i1.U32Codec.codec.decode(input), + ); } /// BlockNumberOrTimestampOf @@ -221,8 +299,11 @@ class Canceled extends Event { @override Map> toJson() => { - 'Canceled': {'when': when.toJson(), 'index': index}, - }; + 'Canceled': { + 'when': when.toJson(), + 'index': index, + } + }; int _sizeHint() { int size = 1; @@ -232,22 +313,42 @@ class Canceled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i3.BlockNumberOrTimestamp.codec.encodeTo(when, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i3.BlockNumberOrTimestamp.codec.encodeTo( + when, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Canceled && other.when == when && other.index == index; + identical( + this, + other, + ) || + other is Canceled && other.when == when && other.index == index; @override - int get hashCode => Object.hash(when, index); + int get hashCode => Object.hash( + when, + index, + ); } /// Dispatched some task. class Dispatched extends Event { - const Dispatched({required this.task, this.id, required this.result}); + const Dispatched({ + required this.task, + this.id, + required this.result, + }); factory Dispatched._decode(_i1.Input input) { return Dispatched( @@ -274,24 +375,26 @@ class Dispatched extends Event { @override Map> toJson() => { - 'Dispatched': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - 'result': result.toJson(), - }, - }; + 'Dispatched': { + 'task': [ + task.value0.toJson(), + task.value1, + ], + 'id': id?.toList(), + 'result': result.toJson(), + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); - size = - size + + size = size + + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = size + const _i1.ResultCodec( _i1.NullCodec.codec, _i5.DispatchError.codec, @@ -300,29 +403,57 @@ class Dispatched extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo(task, output); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); + ).encodeTo( + task, + output, + ); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( + id, + output, + ); const _i1.ResultCodec( _i1.NullCodec.codec, _i5.DispatchError.codec, - ).encodeTo(result, output); + ).encodeTo( + result, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Dispatched && other.task == task && other.id == id && other.result == result; + identical( + this, + other, + ) || + other is Dispatched && + other.task == task && + other.id == id && + other.result == result; @override - int get hashCode => Object.hash(task, id, result); + int get hashCode => Object.hash( + task, + id, + result, + ); } /// Set a retry configuration for some task. class RetrySet extends Event { - const RetrySet({required this.task, this.id, required this.period, required this.retries}); + const RetrySet({ + required this.task, + this.id, + required this.period, + required this.retries, + }); factory RetrySet._decode(_i1.Input input) { return RetrySet( @@ -350,51 +481,84 @@ class RetrySet extends Event { @override Map> toJson() => { - 'RetrySet': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - 'period': period.toJson(), - 'retries': retries, - }, - }; + 'RetrySet': { + 'task': [ + task.value0.toJson(), + task.value1, + ], + 'id': id?.toList(), + 'period': period.toJson(), + 'retries': retries, + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = size + + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); size = size + _i3.BlockNumberOrTimestamp.codec.sizeHint(period); size = size + _i1.U8Codec.codec.sizeHint(retries); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo(task, output); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); - _i3.BlockNumberOrTimestamp.codec.encodeTo(period, output); - _i1.U8Codec.codec.encodeTo(retries, output); + ).encodeTo( + task, + output, + ); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( + id, + output, + ); + _i3.BlockNumberOrTimestamp.codec.encodeTo( + period, + output, + ); + _i1.U8Codec.codec.encodeTo( + retries, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is RetrySet && other.task == task && other.id == id && other.period == period && other.retries == retries; + identical( + this, + other, + ) || + other is RetrySet && + other.task == task && + other.id == id && + other.period == period && + other.retries == retries; @override - int get hashCode => Object.hash(task, id, period, retries); + int get hashCode => Object.hash( + task, + id, + period, + retries, + ); } /// Cancel a retry configuration for some task. class RetryCancelled extends Event { - const RetryCancelled({required this.task, this.id}); + const RetryCancelled({ + required this.task, + this.id, + }); factory RetryCancelled._decode(_i1.Input input) { return RetryCancelled( @@ -414,44 +578,66 @@ class RetryCancelled extends Event { @override Map?>> toJson() => { - 'RetryCancelled': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - }, - }; + 'RetryCancelled': { + 'task': [ + task.value0.toJson(), + task.value1, + ], + 'id': id?.toList(), + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = size + + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo(task, output); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); + ).encodeTo( + task, + output, + ); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( + id, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is RetryCancelled && other.task == task && other.id == id; + identical( + this, + other, + ) || + other is RetryCancelled && other.task == task && other.id == id; @override - int get hashCode => Object.hash(task, id); + int get hashCode => Object.hash( + task, + id, + ); } /// The call for the provided hash was not found so the task has been aborted. class CallUnavailable extends Event { - const CallUnavailable({required this.task, this.id}); + const CallUnavailable({ + required this.task, + this.id, + }); factory CallUnavailable._decode(_i1.Input input) { return CallUnavailable( @@ -471,45 +657,67 @@ class CallUnavailable extends Event { @override Map?>> toJson() => { - 'CallUnavailable': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - }, - }; + 'CallUnavailable': { + 'task': [ + task.value0.toJson(), + task.value1, + ], + 'id': id?.toList(), + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = size + + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo(task, output); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); + ).encodeTo( + task, + output, + ); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( + id, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is CallUnavailable && other.task == task && other.id == id; + identical( + this, + other, + ) || + other is CallUnavailable && other.task == task && other.id == id; @override - int get hashCode => Object.hash(task, id); + int get hashCode => Object.hash( + task, + id, + ); } /// The given task was unable to be retried since the agenda is full at that block or there /// was not enough weight to reschedule it. class RetryFailed extends Event { - const RetryFailed({required this.task, this.id}); + const RetryFailed({ + required this.task, + this.id, + }); factory RetryFailed._decode(_i1.Input input) { return RetryFailed( @@ -529,44 +737,66 @@ class RetryFailed extends Event { @override Map?>> toJson() => { - 'RetryFailed': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - }, - }; + 'RetryFailed': { + 'task': [ + task.value0.toJson(), + task.value1, + ], + 'id': id?.toList(), + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = size + + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo(task, output); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); + ).encodeTo( + task, + output, + ); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( + id, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is RetryFailed && other.task == task && other.id == id; + identical( + this, + other, + ) || + other is RetryFailed && other.task == task && other.id == id; @override - int get hashCode => Object.hash(task, id); + int get hashCode => Object.hash( + task, + id, + ); } /// The given task can never be executed since it is overweight. class PermanentlyOverweight extends Event { - const PermanentlyOverweight({required this.task, this.id}); + const PermanentlyOverweight({ + required this.task, + this.id, + }); factory PermanentlyOverweight._decode(_i1.Input input) { return PermanentlyOverweight( @@ -586,37 +816,56 @@ class PermanentlyOverweight extends Event { @override Map?>> toJson() => { - 'PermanentlyOverweight': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - }, - }; + 'PermanentlyOverweight': { + 'task': [ + task.value0.toJson(), + task.value1, + ], + 'id': id?.toList(), + } + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = size + + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo(task, output); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); + ).encodeTo( + task, + output, + ); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( + id, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is PermanentlyOverweight && other.task == task && other.id == id; + identical( + this, + other, + ) || + other is PermanentlyOverweight && other.task == task && other.id == id; @override - int get hashCode => Object.hash(task, id); + int get hashCode => Object.hash( + task, + id, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/retry_config.dart b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/retry_config.dart index 57203819..efcc08b7 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/retry_config.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/retry_config.dart @@ -6,7 +6,11 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../qp_scheduler/block_number_or_timestamp.dart' as _i2; class RetryConfig { - const RetryConfig({required this.totalRetries, required this.remaining, required this.period}); + const RetryConfig({ + required this.totalRetries, + required this.remaining, + required this.period, + }); factory RetryConfig.decode(_i1.Input input) { return codec.decode(input); @@ -27,28 +31,51 @@ class RetryConfig { return codec.encode(this); } - Map toJson() => {'totalRetries': totalRetries, 'remaining': remaining, 'period': period.toJson()}; + Map toJson() => { + 'totalRetries': totalRetries, + 'remaining': remaining, + 'period': period.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is RetryConfig && other.totalRetries == totalRetries && other.remaining == remaining && other.period == period; @override - int get hashCode => Object.hash(totalRetries, remaining, period); + int get hashCode => Object.hash( + totalRetries, + remaining, + period, + ); } class $RetryConfigCodec with _i1.Codec { const $RetryConfigCodec(); @override - void encodeTo(RetryConfig obj, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(obj.totalRetries, output); - _i1.U8Codec.codec.encodeTo(obj.remaining, output); - _i2.BlockNumberOrTimestamp.codec.encodeTo(obj.period, output); + void encodeTo( + RetryConfig obj, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + obj.totalRetries, + output, + ); + _i1.U8Codec.codec.encodeTo( + obj.remaining, + output, + ); + _i2.BlockNumberOrTimestamp.codec.encodeTo( + obj.period, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/scheduled.dart b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/scheduled.dart index db227595..28c0364f 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/scheduled.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/scheduled.dart @@ -7,7 +7,12 @@ import '../frame_support/traits/preimages/bounded.dart' as _i2; import '../quantus_runtime/origin_caller.dart' as _i3; class Scheduled { - const Scheduled({this.maybeId, required this.priority, required this.call, required this.origin}); + const Scheduled({ + this.maybeId, + required this.priority, + required this.call, + required this.origin, + }); factory Scheduled.decode(_i1.Input input) { return codec.decode(input); @@ -32,15 +37,18 @@ class Scheduled { } Map toJson() => { - 'maybeId': maybeId?.toList(), - 'priority': priority, - 'call': call.toJson(), - 'origin': origin.toJson(), - }; + 'maybeId': maybeId?.toList(), + 'priority': priority, + 'call': call.toJson(), + 'origin': origin.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Scheduled && other.maybeId == maybeId && other.priority == priority && @@ -48,24 +56,45 @@ class Scheduled { other.origin == origin; @override - int get hashCode => Object.hash(maybeId, priority, call, origin); + int get hashCode => Object.hash( + maybeId, + priority, + call, + origin, + ); } class $ScheduledCodec with _i1.Codec { const $ScheduledCodec(); @override - void encodeTo(Scheduled obj, _i1.Output output) { - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(obj.maybeId, output); - _i1.U8Codec.codec.encodeTo(obj.priority, output); - _i2.Bounded.codec.encodeTo(obj.call, output); - _i3.OriginCaller.codec.encodeTo(obj.origin, output); + void encodeTo( + Scheduled obj, + _i1.Output output, + ) { + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( + obj.maybeId, + output, + ); + _i1.U8Codec.codec.encodeTo( + obj.priority, + output, + ); + _i2.Bounded.codec.encodeTo( + obj.call, + output, + ); + _i3.OriginCaller.codec.encodeTo( + obj.origin, + output, + ); } @override Scheduled decode(_i1.Input input) { return Scheduled( - maybeId: const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), + maybeId: + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), priority: _i1.U8Codec.codec.decode(input), call: _i2.Bounded.codec.decode(input), origin: _i3.OriginCaller.codec.decode(input), @@ -75,7 +104,9 @@ class $ScheduledCodec with _i1.Codec { @override int sizeHint(Scheduled obj) { int size = 0; - size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(obj.maybeId); + size = size + + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)) + .sizeHint(obj.maybeId); size = size + _i1.U8Codec.codec.sizeHint(obj.priority); size = size + _i2.Bounded.codec.sizeHint(obj.call); size = size + _i3.OriginCaller.codec.sizeHint(obj.origin); diff --git a/quantus_sdk/lib/generated/planck/types/pallet_timestamp/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_timestamp/pallet/call.dart index 513d9777..784b0d7c 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_timestamp/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_timestamp/pallet/call.dart @@ -51,13 +51,17 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case Set: (value as Set).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -67,7 +71,8 @@ class $CallCodec with _i1.Codec { case Set: return (value as Set)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -103,8 +108,8 @@ class Set extends Call { @override Map> toJson() => { - 'set': {'now': now}, - }; + 'set': {'now': now} + }; int _sizeHint() { int size = 1; @@ -113,12 +118,23 @@ class Set extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.CompactBigIntCodec.codec.encodeTo(now, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + now, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Set && other.now == now; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Set && other.now == now; @override int get hashCode => now.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/charge_transaction_payment.dart b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/charge_transaction_payment.dart index 7146a0fb..3abf4a8d 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/charge_transaction_payment.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/charge_transaction_payment.dart @@ -12,8 +12,14 @@ class ChargeTransactionPaymentCodec with _i1.Codec { } @override - void encodeTo(ChargeTransactionPayment value, _i1.Output output) { - _i1.CompactBigIntCodec.codec.encodeTo(value, output); + void encodeTo( + ChargeTransactionPayment value, + _i1.Output output, + ) { + _i1.CompactBigIntCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/pallet/event.dart index a0f28f9a..c596daed 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/pallet/event.dart @@ -39,7 +39,11 @@ class $Event { required BigInt actualFee, required BigInt tip, }) { - return TransactionFeePaid(who: who, actualFee: actualFee, tip: tip); + return TransactionFeePaid( + who: who, + actualFee: actualFee, + tip: tip, + ); } } @@ -58,13 +62,17 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case TransactionFeePaid: (value as TransactionFeePaid).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -74,7 +82,8 @@ class $EventCodec with _i1.Codec { case TransactionFeePaid: return (value as TransactionFeePaid)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -82,7 +91,11 @@ class $EventCodec with _i1.Codec { /// A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee, /// has been paid by `who`. class TransactionFeePaid extends Event { - const TransactionFeePaid({required this.who, required this.actualFee, required this.tip}); + const TransactionFeePaid({ + required this.who, + required this.actualFee, + required this.tip, + }); factory TransactionFeePaid._decode(_i1.Input input) { return TransactionFeePaid( @@ -103,8 +116,12 @@ class TransactionFeePaid extends Event { @override Map> toJson() => { - 'TransactionFeePaid': {'who': who.toList(), 'actualFee': actualFee, 'tip': tip}, - }; + 'TransactionFeePaid': { + 'who': who.toList(), + 'actualFee': actualFee, + 'tip': tip, + } + }; int _sizeHint() { int size = 1; @@ -115,17 +132,42 @@ class TransactionFeePaid extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(actualFee, output); - _i1.U128Codec.codec.encodeTo(tip, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i1.U128Codec.codec.encodeTo( + actualFee, + output, + ); + _i1.U128Codec.codec.encodeTo( + tip, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is TransactionFeePaid && _i4.listsEqual(other.who, who) && other.actualFee == actualFee && other.tip == tip; + identical( + this, + other, + ) || + other is TransactionFeePaid && + _i4.listsEqual( + other.who, + who, + ) && + other.actualFee == actualFee && + other.tip == tip; @override - int get hashCode => Object.hash(who, actualFee, tip); + int get hashCode => Object.hash( + who, + actualFee, + tip, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/releases.dart b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/releases.dart index 8669e3ca..641a7e2e 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/releases.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/releases.dart @@ -7,7 +7,10 @@ enum Releases { v1Ancient('V1Ancient', 0), v2('V2', 1); - const Releases(this.variantName, this.codecIndex); + const Releases( + this.variantName, + this.codecIndex, + ); factory Releases.decode(_i1.Input input) { return codec.decode(input); @@ -43,7 +46,13 @@ class $ReleasesCodec with _i1.Codec { } @override - void encodeTo(Releases value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Releases value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/call.dart index d813375f..9ee64514 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/call.dart @@ -61,7 +61,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case SetTreasuryAccount: (value as SetTreasuryAccount).encodeTo(output); @@ -70,7 +73,8 @@ class $CallCodec with _i1.Codec { (value as SetTreasuryPortion).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -82,17 +86,24 @@ class $CallCodec with _i1.Codec { case SetTreasuryPortion: return (value as SetTreasuryPortion)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// Set the treasury account. Root only. Zero address is rejected (funds would be locked). +/// +/// **Important**: This only changes where *future* mining rewards are sent. Any balance +/// that has already accumulated in the current treasury account is NOT automatically +/// migrated to the new account. If you need to move existing funds, perform a separate +/// balance transfer (e.g., via governance proposal) after updating the account. class SetTreasuryAccount extends Call { const SetTreasuryAccount({required this.account}); factory SetTreasuryAccount._decode(_i1.Input input) { - return SetTreasuryAccount(account: const _i1.U8ArrayCodec(32).decode(input)); + return SetTreasuryAccount( + account: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AccountId @@ -100,8 +111,8 @@ class SetTreasuryAccount extends Call { @override Map>> toJson() => { - 'set_treasury_account': {'account': account.toList()}, - }; + 'set_treasury_account': {'account': account.toList()} + }; int _sizeHint() { int size = 1; @@ -110,13 +121,27 @@ class SetTreasuryAccount extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is SetTreasuryAccount && _i5.listsEqual(other.account, account); + identical( + this, + other, + ) || + other is SetTreasuryAccount && + _i5.listsEqual( + other.account, + account, + ); @override int get hashCode => account.hashCode; @@ -135,8 +160,8 @@ class SetTreasuryPortion extends Call { @override Map> toJson() => { - 'set_treasury_portion': {'portion': portion}, - }; + 'set_treasury_portion': {'portion': portion} + }; int _sizeHint() { int size = 1; @@ -145,12 +170,23 @@ class SetTreasuryPortion extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(portion, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + portion, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is SetTreasuryPortion && other.portion == portion; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is SetTreasuryPortion && other.portion == portion; @override int get hashCode => portion.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/error.dart index 51d12415..7b8c34fe 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/error.dart @@ -10,7 +10,10 @@ enum Error { /// Treasury account cannot be zero address (funds would be permanently locked). invalidTreasuryAccount('InvalidTreasuryAccount', 1); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -46,7 +49,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/event.dart index 6c6e0d28..9c984b1a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/event.dart @@ -35,11 +35,18 @@ abstract class Event { class $Event { const $Event(); - TreasuryAccountUpdated treasuryAccountUpdated({required _i3.AccountId32 newAccount}) { - return TreasuryAccountUpdated(newAccount: newAccount); + TreasuryAccountUpdated treasuryAccountUpdated({ + _i3.AccountId32? oldAccount, + required _i3.AccountId32 newAccount, + }) { + return TreasuryAccountUpdated( + oldAccount: oldAccount, + newAccount: newAccount, + ); } - TreasuryPortionUpdated treasuryPortionUpdated({required _i4.Permill newPortion}) { + TreasuryPortionUpdated treasuryPortionUpdated( + {required _i4.Permill newPortion}) { return TreasuryPortionUpdated(newPortion: newPortion); } } @@ -61,7 +68,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case TreasuryAccountUpdated: (value as TreasuryAccountUpdated).encodeTo(output); @@ -70,7 +80,8 @@ class $EventCodec with _i1.Codec { (value as TreasuryPortionUpdated).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -82,45 +93,92 @@ class $EventCodec with _i1.Codec { case TreasuryPortionUpdated: return (value as TreasuryPortionUpdated)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } +/// The treasury account was updated. +/// +/// Note: This only redirects where future mining rewards are sent. Any balance +/// accumulated in the old account remains there and is NOT automatically migrated. +/// Use a separate balance transfer if funds need to be moved. class TreasuryAccountUpdated extends Event { - const TreasuryAccountUpdated({required this.newAccount}); + const TreasuryAccountUpdated({ + this.oldAccount, + required this.newAccount, + }); factory TreasuryAccountUpdated._decode(_i1.Input input) { - return TreasuryAccountUpdated(newAccount: const _i1.U8ArrayCodec(32).decode(input)); + return TreasuryAccountUpdated( + oldAccount: const _i1.OptionCodec<_i3.AccountId32>(_i3.AccountId32Codec()) + .decode(input), + newAccount: const _i1.U8ArrayCodec(32).decode(input), + ); } + /// Option + /// The previous treasury account (None if this is the first time setting it). + final _i3.AccountId32? oldAccount; + /// T::AccountId + /// The new treasury account that will receive future rewards. final _i3.AccountId32 newAccount; @override - Map>> toJson() => { - 'TreasuryAccountUpdated': {'newAccount': newAccount.toList()}, - }; + Map?>> toJson() => { + 'TreasuryAccountUpdated': { + 'oldAccount': oldAccount?.toList(), + 'newAccount': newAccount.toList(), + } + }; int _sizeHint() { int size = 1; + size = size + + const _i1.OptionCodec<_i3.AccountId32>(_i3.AccountId32Codec()) + .sizeHint(oldAccount); size = size + const _i3.AccountId32Codec().sizeHint(newAccount); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(newAccount, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.OptionCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo( + oldAccount, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + newAccount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is TreasuryAccountUpdated && _i5.listsEqual(other.newAccount, newAccount); + identical( + this, + other, + ) || + other is TreasuryAccountUpdated && + other.oldAccount == oldAccount && + _i5.listsEqual( + other.newAccount, + newAccount, + ); @override - int get hashCode => newAccount.hashCode; + int get hashCode => Object.hash( + oldAccount, + newAccount, + ); } +/// The treasury portion (share of mining rewards) was updated. class TreasuryPortionUpdated extends Event { const TreasuryPortionUpdated({required this.newPortion}); @@ -133,8 +191,8 @@ class TreasuryPortionUpdated extends Event { @override Map> toJson() => { - 'TreasuryPortionUpdated': {'newPortion': newPortion}, - }; + 'TreasuryPortionUpdated': {'newPortion': newPortion} + }; int _sizeHint() { int size = 1; @@ -143,13 +201,23 @@ class TreasuryPortionUpdated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(newPortion, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + newPortion, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is TreasuryPortionUpdated && other.newPortion == newPortion; + identical( + this, + other, + ) || + other is TreasuryPortionUpdated && other.newPortion == newPortion; @override int get hashCode => newPortion.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/call.dart index 3788829a..46a79794 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/call.dart @@ -40,32 +40,62 @@ class $Call { return Batch(calls: calls); } - AsDerivative asDerivative({required int index, required _i3.RuntimeCall call}) { - return AsDerivative(index: index, call: call); + AsDerivative asDerivative({ + required int index, + required _i3.RuntimeCall call, + }) { + return AsDerivative( + index: index, + call: call, + ); } BatchAll batchAll({required List<_i3.RuntimeCall> calls}) { return BatchAll(calls: calls); } - DispatchAs dispatchAs({required _i4.OriginCaller asOrigin, required _i3.RuntimeCall call}) { - return DispatchAs(asOrigin: asOrigin, call: call); + DispatchAs dispatchAs({ + required _i4.OriginCaller asOrigin, + required _i3.RuntimeCall call, + }) { + return DispatchAs( + asOrigin: asOrigin, + call: call, + ); } ForceBatch forceBatch({required List<_i3.RuntimeCall> calls}) { return ForceBatch(calls: calls); } - WithWeight withWeight({required _i3.RuntimeCall call, required _i5.Weight weight}) { - return WithWeight(call: call, weight: weight); + WithWeight withWeight({ + required _i3.RuntimeCall call, + required _i5.Weight weight, + }) { + return WithWeight( + call: call, + weight: weight, + ); } - IfElse ifElse({required _i3.RuntimeCall main, required _i3.RuntimeCall fallback}) { - return IfElse(main: main, fallback: fallback); + IfElse ifElse({ + required _i3.RuntimeCall main, + required _i3.RuntimeCall fallback, + }) { + return IfElse( + main: main, + fallback: fallback, + ); } - DispatchAsFallible dispatchAsFallible({required _i4.OriginCaller asOrigin, required _i3.RuntimeCall call}) { - return DispatchAsFallible(asOrigin: asOrigin, call: call); + DispatchAsFallible dispatchAsFallible({ + required _i4.OriginCaller asOrigin, + required _i3.RuntimeCall call, + }) { + return DispatchAsFallible( + asOrigin: asOrigin, + call: call, + ); } } @@ -98,7 +128,10 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case Batch: (value as Batch).encodeTo(output); @@ -125,7 +158,8 @@ class $CallCodec with _i1.Codec { (value as DispatchAsFallible).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -149,7 +183,8 @@ class $CallCodec with _i1.Codec { case DispatchAsFallible: return (value as DispatchAsFallible)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -176,30 +211,50 @@ class Batch extends Call { const Batch({required this.calls}); factory Batch._decode(_i1.Input input) { - return Batch(calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).decode(input)); + return Batch( + calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) + .decode(input)); } /// Vec<::RuntimeCall> final List<_i3.RuntimeCall> calls; @override - Map>>>> toJson() => { - 'batch': {'calls': calls.map((value) => value.toJson()).toList()}, - }; + Map>>>> toJson() => + { + 'batch': {'calls': calls.map((value) => value.toJson()).toList()} + }; int _sizeHint() { int size = 1; - size = size + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).sizeHint(calls); + size = size + + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) + .sizeHint(calls); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo(calls, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo( + calls, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Batch && _i6.listsEqual(other.calls, calls); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Batch && + _i6.listsEqual( + other.calls, + calls, + ); @override int get hashCode => calls.hashCode; @@ -219,10 +274,16 @@ class Batch extends Call { /// /// The dispatch origin for this call must be _Signed_. class AsDerivative extends Call { - const AsDerivative({required this.index, required this.call}); + const AsDerivative({ + required this.index, + required this.call, + }); factory AsDerivative._decode(_i1.Input input) { - return AsDerivative(index: _i1.U16Codec.codec.decode(input), call: _i3.RuntimeCall.codec.decode(input)); + return AsDerivative( + index: _i1.U16Codec.codec.decode(input), + call: _i3.RuntimeCall.codec.decode(input), + ); } /// u16 @@ -233,8 +294,11 @@ class AsDerivative extends Call { @override Map> toJson() => { - 'as_derivative': {'index': index, 'call': call.toJson()}, - }; + 'as_derivative': { + 'index': index, + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -244,17 +308,33 @@ class AsDerivative extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U16Codec.codec.encodeTo(index, output); - _i3.RuntimeCall.codec.encodeTo(call, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U16Codec.codec.encodeTo( + index, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is AsDerivative && other.index == index && other.call == call; + identical( + this, + other, + ) || + other is AsDerivative && other.index == index && other.call == call; @override - int get hashCode => Object.hash(index, call); + int get hashCode => Object.hash( + index, + call, + ); } /// Send a batch of dispatch calls and atomically execute them. @@ -274,7 +354,9 @@ class BatchAll extends Call { const BatchAll({required this.calls}); factory BatchAll._decode(_i1.Input input) { - return BatchAll(calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).decode(input)); + return BatchAll( + calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) + .decode(input)); } /// Vec<::RuntimeCall> @@ -282,22 +364,39 @@ class BatchAll extends Call { @override Map>> toJson() => { - 'batch_all': {'calls': calls.map((value) => value.toJson()).toList()}, - }; + 'batch_all': {'calls': calls.map((value) => value.toJson()).toList()} + }; int _sizeHint() { int size = 1; - size = size + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).sizeHint(calls); + size = size + + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) + .sizeHint(calls); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo(calls, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo( + calls, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is BatchAll && _i6.listsEqual(other.calls, calls); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is BatchAll && + _i6.listsEqual( + other.calls, + calls, + ); @override int get hashCode => calls.hashCode; @@ -310,10 +409,16 @@ class BatchAll extends Call { /// ## Complexity /// - O(1). class DispatchAs extends Call { - const DispatchAs({required this.asOrigin, required this.call}); + const DispatchAs({ + required this.asOrigin, + required this.call, + }); factory DispatchAs._decode(_i1.Input input) { - return DispatchAs(asOrigin: _i4.OriginCaller.codec.decode(input), call: _i3.RuntimeCall.codec.decode(input)); + return DispatchAs( + asOrigin: _i4.OriginCaller.codec.decode(input), + call: _i3.RuntimeCall.codec.decode(input), + ); } /// Box @@ -324,8 +429,11 @@ class DispatchAs extends Call { @override Map>> toJson() => { - 'dispatch_as': {'asOrigin': asOrigin.toJson(), 'call': call.toJson()}, - }; + 'dispatch_as': { + 'asOrigin': asOrigin.toJson(), + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -335,17 +443,33 @@ class DispatchAs extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i4.OriginCaller.codec.encodeTo(asOrigin, output); - _i3.RuntimeCall.codec.encodeTo(call, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i4.OriginCaller.codec.encodeTo( + asOrigin, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is DispatchAs && other.asOrigin == asOrigin && other.call == call; + identical( + this, + other, + ) || + other is DispatchAs && other.asOrigin == asOrigin && other.call == call; @override - int get hashCode => Object.hash(asOrigin, call); + int get hashCode => Object.hash( + asOrigin, + call, + ); } /// Send a batch of dispatch calls. @@ -365,7 +489,9 @@ class ForceBatch extends Call { const ForceBatch({required this.calls}); factory ForceBatch._decode(_i1.Input input) { - return ForceBatch(calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).decode(input)); + return ForceBatch( + calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) + .decode(input)); } /// Vec<::RuntimeCall> @@ -373,22 +499,39 @@ class ForceBatch extends Call { @override Map>> toJson() => { - 'force_batch': {'calls': calls.map((value) => value.toJson()).toList()}, - }; + 'force_batch': {'calls': calls.map((value) => value.toJson()).toList()} + }; int _sizeHint() { int size = 1; - size = size + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).sizeHint(calls); + size = size + + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) + .sizeHint(calls); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo(calls, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo( + calls, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ForceBatch && _i6.listsEqual(other.calls, calls); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ForceBatch && + _i6.listsEqual( + other.calls, + calls, + ); @override int get hashCode => calls.hashCode; @@ -401,10 +544,16 @@ class ForceBatch extends Call { /// /// The dispatch origin for this call must be _Root_. class WithWeight extends Call { - const WithWeight({required this.call, required this.weight}); + const WithWeight({ + required this.call, + required this.weight, + }); factory WithWeight._decode(_i1.Input input) { - return WithWeight(call: _i3.RuntimeCall.codec.decode(input), weight: _i5.Weight.codec.decode(input)); + return WithWeight( + call: _i3.RuntimeCall.codec.decode(input), + weight: _i5.Weight.codec.decode(input), + ); } /// Box<::RuntimeCall> @@ -415,8 +564,11 @@ class WithWeight extends Call { @override Map>> toJson() => { - 'with_weight': {'call': call.toJson(), 'weight': weight.toJson()}, - }; + 'with_weight': { + 'call': call.toJson(), + 'weight': weight.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -426,17 +578,33 @@ class WithWeight extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i3.RuntimeCall.codec.encodeTo(call, output); - _i5.Weight.codec.encodeTo(weight, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + call, + output, + ); + _i5.Weight.codec.encodeTo( + weight, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is WithWeight && other.call == call && other.weight == weight; + identical( + this, + other, + ) || + other is WithWeight && other.call == call && other.weight == weight; @override - int get hashCode => Object.hash(call, weight); + int get hashCode => Object.hash( + call, + weight, + ); } /// Dispatch a fallback call in the event the main call fails to execute. @@ -463,10 +631,16 @@ class WithWeight extends Call { /// - Some use cases might involve submitting a `batch` type call in either main, fallback /// or both. class IfElse extends Call { - const IfElse({required this.main, required this.fallback}); + const IfElse({ + required this.main, + required this.fallback, + }); factory IfElse._decode(_i1.Input input) { - return IfElse(main: _i3.RuntimeCall.codec.decode(input), fallback: _i3.RuntimeCall.codec.decode(input)); + return IfElse( + main: _i3.RuntimeCall.codec.decode(input), + fallback: _i3.RuntimeCall.codec.decode(input), + ); } /// Box<::RuntimeCall> @@ -477,8 +651,11 @@ class IfElse extends Call { @override Map>> toJson() => { - 'if_else': {'main': main.toJson(), 'fallback': fallback.toJson()}, - }; + 'if_else': { + 'main': main.toJson(), + 'fallback': fallback.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -488,17 +665,33 @@ class IfElse extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i3.RuntimeCall.codec.encodeTo(main, output); - _i3.RuntimeCall.codec.encodeTo(fallback, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + main, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + fallback, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is IfElse && other.main == main && other.fallback == fallback; + identical( + this, + other, + ) || + other is IfElse && other.main == main && other.fallback == fallback; @override - int get hashCode => Object.hash(main, fallback); + int get hashCode => Object.hash( + main, + fallback, + ); } /// Dispatches a function call with a provided origin. @@ -507,7 +700,10 @@ class IfElse extends Call { /// /// The dispatch origin for this call must be _Root_. class DispatchAsFallible extends Call { - const DispatchAsFallible({required this.asOrigin, required this.call}); + const DispatchAsFallible({ + required this.asOrigin, + required this.call, + }); factory DispatchAsFallible._decode(_i1.Input input) { return DispatchAsFallible( @@ -524,8 +720,11 @@ class DispatchAsFallible extends Call { @override Map>> toJson() => { - 'dispatch_as_fallible': {'asOrigin': asOrigin.toJson(), 'call': call.toJson()}, - }; + 'dispatch_as_fallible': { + 'asOrigin': asOrigin.toJson(), + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -535,15 +734,33 @@ class DispatchAsFallible extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i4.OriginCaller.codec.encodeTo(asOrigin, output); - _i3.RuntimeCall.codec.encodeTo(call, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i4.OriginCaller.codec.encodeTo( + asOrigin, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is DispatchAsFallible && other.asOrigin == asOrigin && other.call == call; + identical( + this, + other, + ) || + other is DispatchAsFallible && + other.asOrigin == asOrigin && + other.call == call; @override - int get hashCode => Object.hash(asOrigin, call); + int get hashCode => Object.hash( + asOrigin, + call, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/error.dart index 61dd7ad9..8773b636 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/error.dart @@ -8,7 +8,10 @@ enum Error { /// Too many calls batched. tooManyCalls('TooManyCalls', 0); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -42,7 +45,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/event.dart index 4f8e5095..9047d028 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/event.dart @@ -33,8 +33,14 @@ abstract class Event { class $Event { const $Event(); - BatchInterrupted batchInterrupted({required int index, required _i3.DispatchError error}) { - return BatchInterrupted(index: index, error: error); + BatchInterrupted batchInterrupted({ + required int index, + required _i3.DispatchError error, + }) { + return BatchInterrupted( + index: index, + error: error, + ); } BatchCompleted batchCompleted() { @@ -53,7 +59,8 @@ class $Event { return ItemFailed(error: error); } - DispatchedAs dispatchedAs({required _i1.Result result}) { + DispatchedAs dispatchedAs( + {required _i1.Result result}) { return DispatchedAs(result: result); } @@ -61,7 +68,8 @@ class $Event { return IfElseMainSuccess(); } - IfElseFallbackCalled ifElseFallbackCalled({required _i3.DispatchError mainError}) { + IfElseFallbackCalled ifElseFallbackCalled( + {required _i3.DispatchError mainError}) { return IfElseFallbackCalled(mainError: mainError); } } @@ -95,7 +103,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case BatchInterrupted: (value as BatchInterrupted).encodeTo(output); @@ -122,7 +133,8 @@ class $EventCodec with _i1.Codec { (value as IfElseFallbackCalled).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -146,7 +158,8 @@ class $EventCodec with _i1.Codec { case IfElseFallbackCalled: return (value as IfElseFallbackCalled)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -154,10 +167,16 @@ class $EventCodec with _i1.Codec { /// Batch of dispatches did not complete fully. Index of first failing dispatch given, as /// well as the error. class BatchInterrupted extends Event { - const BatchInterrupted({required this.index, required this.error}); + const BatchInterrupted({ + required this.index, + required this.error, + }); factory BatchInterrupted._decode(_i1.Input input) { - return BatchInterrupted(index: _i1.U32Codec.codec.decode(input), error: _i3.DispatchError.codec.decode(input)); + return BatchInterrupted( + index: _i1.U32Codec.codec.decode(input), + error: _i3.DispatchError.codec.decode(input), + ); } /// u32 @@ -168,8 +187,11 @@ class BatchInterrupted extends Event { @override Map> toJson() => { - 'BatchInterrupted': {'index': index, 'error': error.toJson()}, - }; + 'BatchInterrupted': { + 'index': index, + 'error': error.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -179,17 +201,33 @@ class BatchInterrupted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i3.DispatchError.codec.encodeTo(error, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i3.DispatchError.codec.encodeTo( + error, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is BatchInterrupted && other.index == index && other.error == error; + identical( + this, + other, + ) || + other is BatchInterrupted && other.index == index && other.error == error; @override - int get hashCode => Object.hash(index, error); + int get hashCode => Object.hash( + index, + error, + ); } /// Batch of dispatches completed fully with no error. @@ -200,7 +238,10 @@ class BatchCompleted extends Event { Map toJson() => {'BatchCompleted': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); } @override @@ -218,7 +259,10 @@ class BatchCompletedWithErrors extends Event { Map toJson() => {'BatchCompletedWithErrors': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); } @override @@ -236,7 +280,10 @@ class ItemCompleted extends Event { Map toJson() => {'ItemCompleted': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); } @override @@ -259,8 +306,8 @@ class ItemFailed extends Event { @override Map>> toJson() => { - 'ItemFailed': {'error': error.toJson()}, - }; + 'ItemFailed': {'error': error.toJson()} + }; int _sizeHint() { int size = 1; @@ -269,12 +316,23 @@ class ItemFailed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i3.DispatchError.codec.encodeTo(error, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i3.DispatchError.codec.encodeTo( + error, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ItemFailed && other.error == error; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ItemFailed && other.error == error; @override int get hashCode => error.hashCode; @@ -286,11 +344,10 @@ class DispatchedAs extends Event { factory DispatchedAs._decode(_i1.Input input) { return DispatchedAs( - result: const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).decode(input), - ); + result: const _i1.ResultCodec( + _i1.NullCodec.codec, + _i3.DispatchError.codec, + ).decode(input)); } /// DispatchResult @@ -298,13 +355,12 @@ class DispatchedAs extends Event { @override Map>> toJson() => { - 'DispatchedAs': {'result': result.toJson()}, - }; + 'DispatchedAs': {'result': result.toJson()} + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, @@ -313,15 +369,26 @@ class DispatchedAs extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, - ).encodeTo(result, output); + ).encodeTo( + result, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is DispatchedAs && other.result == result; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is DispatchedAs && other.result == result; @override int get hashCode => result.hashCode; @@ -335,7 +402,10 @@ class IfElseMainSuccess extends Event { Map toJson() => {'IfElseMainSuccess': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); } @override @@ -350,7 +420,8 @@ class IfElseFallbackCalled extends Event { const IfElseFallbackCalled({required this.mainError}); factory IfElseFallbackCalled._decode(_i1.Input input) { - return IfElseFallbackCalled(mainError: _i3.DispatchError.codec.decode(input)); + return IfElseFallbackCalled( + mainError: _i3.DispatchError.codec.decode(input)); } /// DispatchError @@ -358,8 +429,8 @@ class IfElseFallbackCalled extends Event { @override Map>> toJson() => { - 'IfElseFallbackCalled': {'mainError': mainError.toJson()}, - }; + 'IfElseFallbackCalled': {'mainError': mainError.toJson()} + }; int _sizeHint() { int size = 1; @@ -368,13 +439,23 @@ class IfElseFallbackCalled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i3.DispatchError.codec.encodeTo(mainError, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i3.DispatchError.codec.encodeTo( + mainError, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is IfElseFallbackCalled && other.mainError == mainError; + identical( + this, + other, + ) || + other is IfElseFallbackCalled && other.mainError == mainError; @override int get hashCode => mainError.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/call.dart index dbf9a87d..836b69e7 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/call.dart @@ -52,13 +52,17 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo(Call value, _i1.Output output) { + void encodeTo( + Call value, + _i1.Output output, + ) { switch (value.runtimeType) { case VerifyAggregatedProof: (value as VerifyAggregatedProof).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -68,7 +72,8 @@ class $CallCodec with _i1.Codec { case VerifyAggregatedProof: return (value as VerifyAggregatedProof)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -82,7 +87,8 @@ class VerifyAggregatedProof extends Call { const VerifyAggregatedProof({required this.proofBytes}); factory VerifyAggregatedProof._decode(_i1.Input input) { - return VerifyAggregatedProof(proofBytes: _i1.U8SequenceCodec.codec.decode(input)); + return VerifyAggregatedProof( + proofBytes: _i1.U8SequenceCodec.codec.decode(input)); } /// Vec @@ -90,8 +96,8 @@ class VerifyAggregatedProof extends Call { @override Map>> toJson() => { - 'verify_aggregated_proof': {'proofBytes': proofBytes}, - }; + 'verify_aggregated_proof': {'proofBytes': proofBytes} + }; int _sizeHint() { int size = 1; @@ -100,13 +106,27 @@ class VerifyAggregatedProof extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U8SequenceCodec.codec.encodeTo(proofBytes, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + proofBytes, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is VerifyAggregatedProof && _i3.listsEqual(other.proofBytes, proofBytes); + identical( + this, + other, + ) || + other is VerifyAggregatedProof && + _i3.listsEqual( + other.proofBytes, + proofBytes, + ); @override int get hashCode => proofBytes.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/error.dart index 9b11c7e9..9a8be941 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/error.dart @@ -9,7 +9,8 @@ enum Error { nullifierAlreadyUsed('NullifierAlreadyUsed', 1), blockNotFound('BlockNotFound', 2), aggregatedVerifierNotAvailable('AggregatedVerifierNotAvailable', 3), - aggregatedProofDeserializationFailed('AggregatedProofDeserializationFailed', 4), + aggregatedProofDeserializationFailed( + 'AggregatedProofDeserializationFailed', 4), aggregatedVerificationFailed('AggregatedVerificationFailed', 5), invalidAggregatedPublicInputs('InvalidAggregatedPublicInputs', 6), @@ -22,7 +23,10 @@ enum Error { /// Only native asset (asset_id = 0) is supported in this version nonNativeAssetNotSupported('NonNativeAssetNotSupported', 9); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -74,7 +78,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/event.dart index 13a16668..4dc633e5 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/event.dart @@ -41,7 +41,13 @@ class $Event { required BigInt transferCount, required BigInt leafIndex, }) { - return NativeTransferred(from: from, to: to, amount: amount, transferCount: transferCount, leafIndex: leafIndex); + return NativeTransferred( + from: from, + to: to, + amount: amount, + transferCount: transferCount, + leafIndex: leafIndex, + ); } AssetTransferred assetTransferred({ @@ -62,8 +68,14 @@ class $Event { ); } - ProofVerified proofVerified({required BigInt exitAmount, required List> nullifiers}) { - return ProofVerified(exitAmount: exitAmount, nullifiers: nullifiers); + ProofVerified proofVerified({ + required BigInt exitAmount, + required List> nullifiers, + }) { + return ProofVerified( + exitAmount: exitAmount, + nullifiers: nullifiers, + ); } } @@ -86,7 +98,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case NativeTransferred: (value as NativeTransferred).encodeTo(output); @@ -98,7 +113,8 @@ class $EventCodec with _i1.Codec { (value as ProofVerified).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -112,7 +128,8 @@ class $EventCodec with _i1.Codec { case ProofVerified: return (value as ProofVerified)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -158,14 +175,14 @@ class NativeTransferred extends Event { @override Map> toJson() => { - 'NativeTransferred': { - 'from': from.toList(), - 'to': to.toList(), - 'amount': amount, - 'transferCount': transferCount, - 'leafIndex': leafIndex, - }, - }; + 'NativeTransferred': { + 'from': from.toList(), + 'to': to.toList(), + 'amount': amount, + 'transferCount': transferCount, + 'leafIndex': leafIndex, + } + }; int _sizeHint() { int size = 1; @@ -178,26 +195,59 @@ class NativeTransferred extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(from, output); - const _i1.U8ArrayCodec(32).encodeTo(to, output); - _i1.U128Codec.codec.encodeTo(amount, output); - _i1.U64Codec.codec.encodeTo(transferCount, output); - _i1.U64Codec.codec.encodeTo(leafIndex, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + from, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + to, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); + _i1.U64Codec.codec.encodeTo( + transferCount, + output, + ); + _i1.U64Codec.codec.encodeTo( + leafIndex, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is NativeTransferred && - _i4.listsEqual(other.from, from) && - _i4.listsEqual(other.to, to) && + _i4.listsEqual( + other.from, + from, + ) && + _i4.listsEqual( + other.to, + to, + ) && other.amount == amount && other.transferCount == transferCount && other.leafIndex == leafIndex; @override - int get hashCode => Object.hash(from, to, amount, transferCount, leafIndex); + int get hashCode => Object.hash( + from, + to, + amount, + transferCount, + leafIndex, + ); } /// A non-native asset transfer was recorded. @@ -246,15 +296,15 @@ class AssetTransferred extends Event { @override Map> toJson() => { - 'AssetTransferred': { - 'assetId': assetId, - 'from': from.toList(), - 'to': to.toList(), - 'amount': amount, - 'transferCount': transferCount, - 'leafIndex': leafIndex, - }, - }; + 'AssetTransferred': { + 'assetId': assetId, + 'from': from.toList(), + 'to': to.toList(), + 'amount': amount, + 'transferCount': transferCount, + 'leafIndex': leafIndex, + } + }; int _sizeHint() { int size = 1; @@ -268,37 +318,78 @@ class AssetTransferred extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(assetId, output); - const _i1.U8ArrayCodec(32).encodeTo(from, output); - const _i1.U8ArrayCodec(32).encodeTo(to, output); - _i1.U128Codec.codec.encodeTo(amount, output); - _i1.U64Codec.codec.encodeTo(transferCount, output); - _i1.U64Codec.codec.encodeTo(leafIndex, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + assetId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + from, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + to, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); + _i1.U64Codec.codec.encodeTo( + transferCount, + output, + ); + _i1.U64Codec.codec.encodeTo( + leafIndex, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is AssetTransferred && other.assetId == assetId && - _i4.listsEqual(other.from, from) && - _i4.listsEqual(other.to, to) && + _i4.listsEqual( + other.from, + from, + ) && + _i4.listsEqual( + other.to, + to, + ) && other.amount == amount && other.transferCount == transferCount && other.leafIndex == leafIndex; @override - int get hashCode => Object.hash(assetId, from, to, amount, transferCount, leafIndex); + int get hashCode => Object.hash( + assetId, + from, + to, + amount, + transferCount, + leafIndex, + ); } class ProofVerified extends Event { - const ProofVerified({required this.exitAmount, required this.nullifiers}); + const ProofVerified({ + required this.exitAmount, + required this.nullifiers, + }); factory ProofVerified._decode(_i1.Input input) { return ProofVerified( exitAmount: _i1.U128Codec.codec.decode(input), - nullifiers: const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).decode(input), + nullifiers: const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)) + .decode(input), ); } @@ -310,27 +401,52 @@ class ProofVerified extends Event { @override Map> toJson() => { - 'ProofVerified': {'exitAmount': exitAmount, 'nullifiers': nullifiers.map((value) => value.toList()).toList()}, - }; + 'ProofVerified': { + 'exitAmount': exitAmount, + 'nullifiers': nullifiers.map((value) => value.toList()).toList(), + } + }; int _sizeHint() { int size = 1; size = size + _i1.U128Codec.codec.sizeHint(exitAmount); - size = size + const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).sizeHint(nullifiers); + size = size + + const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)) + .sizeHint(nullifiers); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U128Codec.codec.encodeTo(exitAmount, output); - const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).encodeTo(nullifiers, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U128Codec.codec.encodeTo( + exitAmount, + output, + ); + const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).encodeTo( + nullifiers, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ProofVerified && other.exitAmount == exitAmount && _i4.listsEqual(other.nullifiers, nullifiers); + identical( + this, + other, + ) || + other is ProofVerified && + other.exitAmount == exitAmount && + _i4.listsEqual( + other.nullifiers, + nullifiers, + ); @override - int get hashCode => Object.hash(exitAmount, nullifiers); + int get hashCode => Object.hash( + exitAmount, + nullifiers, + ); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/error.dart index de8e32a4..0dd79921 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/error.dart @@ -11,7 +11,10 @@ enum Error { /// Leaf not found. leafNotFound('LeafNotFound', 1); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -47,7 +50,13 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Error value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/event.dart index 0f235cac..1a82fc90 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/event.dart @@ -32,8 +32,16 @@ abstract class Event { class $Event { const $Event(); - LeafInserted leafInserted({required BigInt index, required List leafHash, required List newRoot}) { - return LeafInserted(index: index, leafHash: leafHash, newRoot: newRoot); + LeafInserted leafInserted({ + required BigInt index, + required List leafHash, + required List newRoot, + }) { + return LeafInserted( + index: index, + leafHash: leafHash, + newRoot: newRoot, + ); } TreeGrew treeGrew({required int newDepth}) { @@ -58,7 +66,10 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo(Event value, _i1.Output output) { + void encodeTo( + Event value, + _i1.Output output, + ) { switch (value.runtimeType) { case LeafInserted: (value as LeafInserted).encodeTo(output); @@ -67,7 +78,8 @@ class $EventCodec with _i1.Codec { (value as TreeGrew).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -79,14 +91,19 @@ class $EventCodec with _i1.Codec { case TreeGrew: return (value as TreeGrew)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A new leaf was inserted into the tree. class LeafInserted extends Event { - const LeafInserted({required this.index, required this.leafHash, required this.newRoot}); + const LeafInserted({ + required this.index, + required this.leafHash, + required this.newRoot, + }); factory LeafInserted._decode(_i1.Input input) { return LeafInserted( @@ -107,8 +124,12 @@ class LeafInserted extends Event { @override Map> toJson() => { - 'LeafInserted': {'index': index, 'leafHash': leafHash.toList(), 'newRoot': newRoot.toList()}, - }; + 'LeafInserted': { + 'index': index, + 'leafHash': leafHash.toList(), + 'newRoot': newRoot.toList(), + } + }; int _sizeHint() { int size = 1; @@ -119,22 +140,47 @@ class LeafInserted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U64Codec.codec.encodeTo(index, output); - const _i1.U8ArrayCodec(32).encodeTo(leafHash, output); - const _i1.U8ArrayCodec(32).encodeTo(newRoot, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U64Codec.codec.encodeTo( + index, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + leafHash, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + newRoot, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is LeafInserted && other.index == index && - _i3.listsEqual(other.leafHash, leafHash) && - _i3.listsEqual(other.newRoot, newRoot); + _i3.listsEqual( + other.leafHash, + leafHash, + ) && + _i3.listsEqual( + other.newRoot, + newRoot, + ); @override - int get hashCode => Object.hash(index, leafHash, newRoot); + int get hashCode => Object.hash( + index, + leafHash, + newRoot, + ); } /// Tree depth increased. @@ -150,8 +196,8 @@ class TreeGrew extends Event { @override Map> toJson() => { - 'TreeGrew': {'newDepth': newDepth}, - }; + 'TreeGrew': {'newDepth': newDepth} + }; int _sizeHint() { int size = 1; @@ -160,12 +206,23 @@ class TreeGrew extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U8Codec.codec.encodeTo(newDepth, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U8Codec.codec.encodeTo( + newDepth, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is TreeGrew && other.newDepth == newDepth; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TreeGrew && other.newDepth == newDepth; @override int get hashCode => newDepth.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/zk_leaf.dart b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/zk_leaf.dart index fa7c16c9..6608662a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/zk_leaf.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/zk_leaf.dart @@ -7,7 +7,12 @@ import 'package:quiver/collection.dart' as _i4; import '../sp_core/crypto/account_id32.dart' as _i2; class ZkLeaf { - const ZkLeaf({required this.to, required this.transferCount, required this.assetId, required this.amount}); + const ZkLeaf({ + required this.to, + required this.transferCount, + required this.assetId, + required this.amount, + }); factory ZkLeaf.decode(_i1.Input input) { return codec.decode(input); @@ -32,34 +37,60 @@ class ZkLeaf { } Map toJson() => { - 'to': to.toList(), - 'transferCount': transferCount, - 'assetId': assetId, - 'amount': amount, - }; + 'to': to.toList(), + 'transferCount': transferCount, + 'assetId': assetId, + 'amount': amount, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ZkLeaf && - _i4.listsEqual(other.to, to) && + _i4.listsEqual( + other.to, + to, + ) && other.transferCount == transferCount && other.assetId == assetId && other.amount == amount; @override - int get hashCode => Object.hash(to, transferCount, assetId, amount); + int get hashCode => Object.hash( + to, + transferCount, + assetId, + amount, + ); } class $ZkLeafCodec with _i1.Codec { const $ZkLeafCodec(); @override - void encodeTo(ZkLeaf obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.to, output); - _i1.U64Codec.codec.encodeTo(obj.transferCount, output); - _i1.U32Codec.codec.encodeTo(obj.assetId, output); - _i1.U128Codec.codec.encodeTo(obj.amount, output); + void encodeTo( + ZkLeaf obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + obj.to, + output, + ); + _i1.U64Codec.codec.encodeTo( + obj.transferCount, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.assetId, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/primitive_types/h256.dart b/quantus_sdk/lib/generated/planck/types/primitive_types/h256.dart index 3a26f8c3..4eded259 100644 --- a/quantus_sdk/lib/generated/planck/types/primitive_types/h256.dart +++ b/quantus_sdk/lib/generated/planck/types/primitive_types/h256.dart @@ -12,8 +12,14 @@ class H256Codec with _i1.Codec { } @override - void encodeTo(H256 value, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(value, output); + void encodeTo( + H256 value, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/primitive_types/u512.dart b/quantus_sdk/lib/generated/planck/types/primitive_types/u512.dart index 92988381..954a9d71 100644 --- a/quantus_sdk/lib/generated/planck/types/primitive_types/u512.dart +++ b/quantus_sdk/lib/generated/planck/types/primitive_types/u512.dart @@ -12,8 +12,14 @@ class U512Codec with _i1.Codec { } @override - void encodeTo(U512 value, _i1.Output output) { - const _i1.U64ArrayCodec(8).encodeTo(value, output); + void encodeTo( + U512 value, + _i1.Output output, + ) { + const _i1.U64ArrayCodec(8).encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart b/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart index 4b323353..fac8b05c 100644 --- a/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart +++ b/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart @@ -12,7 +12,8 @@ abstract class DilithiumSignatureScheme { return codec.decode(input); } - static const $DilithiumSignatureSchemeCodec codec = $DilithiumSignatureSchemeCodec(); + static const $DilithiumSignatureSchemeCodec codec = + $DilithiumSignatureSchemeCodec(); static const $DilithiumSignatureScheme values = $DilithiumSignatureScheme(); @@ -47,18 +48,23 @@ class $DilithiumSignatureSchemeCodec with _i1.Codec { case 0: return Dilithium._decode(input); default: - throw Exception('DilithiumSignatureScheme: Invalid variant index: "$index"'); + throw Exception( + 'DilithiumSignatureScheme: Invalid variant index: "$index"'); } } @override - void encodeTo(DilithiumSignatureScheme value, _i1.Output output) { + void encodeTo( + DilithiumSignatureScheme value, + _i1.Output output, + ) { switch (value.runtimeType) { case Dilithium: (value as Dilithium).encodeTo(output); break; default: - throw Exception('DilithiumSignatureScheme: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DilithiumSignatureScheme: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -68,7 +74,8 @@ class $DilithiumSignatureSchemeCodec with _i1.Codec { case Dilithium: return (value as Dilithium)._sizeHint(); default: - throw Exception('DilithiumSignatureScheme: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DilithiumSignatureScheme: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -84,7 +91,8 @@ class Dilithium extends DilithiumSignatureScheme { final _i3.DilithiumSignatureWithPublic value0; @override - Map>> toJson() => {'Dilithium': value0.toJson()}; + Map>> toJson() => + {'Dilithium': value0.toJson()}; int _sizeHint() { int size = 1; @@ -93,12 +101,23 @@ class Dilithium extends DilithiumSignatureScheme { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.DilithiumSignatureWithPublic.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.DilithiumSignatureWithPublic.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Dilithium && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Dilithium && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart b/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart index b8b5fa11..7e22489b 100644 --- a/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart +++ b/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart @@ -14,7 +14,8 @@ class DilithiumSignatureWithPublic { /// [u8; DilithiumSignatureWithPublic::TOTAL_LEN] final List bytes; - static const $DilithiumSignatureWithPublicCodec codec = $DilithiumSignatureWithPublicCodec(); + static const $DilithiumSignatureWithPublicCodec codec = + $DilithiumSignatureWithPublicCodec(); _i2.Uint8List encode() { return codec.encode(this); @@ -24,23 +25,39 @@ class DilithiumSignatureWithPublic { @override bool operator ==(Object other) => - identical(this, other) || other is DilithiumSignatureWithPublic && _i3.listsEqual(other.bytes, bytes); + identical( + this, + other, + ) || + other is DilithiumSignatureWithPublic && + _i3.listsEqual( + other.bytes, + bytes, + ); @override int get hashCode => bytes.hashCode; } -class $DilithiumSignatureWithPublicCodec with _i1.Codec { +class $DilithiumSignatureWithPublicCodec + with _i1.Codec { const $DilithiumSignatureWithPublicCodec(); @override - void encodeTo(DilithiumSignatureWithPublic obj, _i1.Output output) { - const _i1.U8ArrayCodec(7219).encodeTo(obj.bytes, output); + void encodeTo( + DilithiumSignatureWithPublic obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(7219).encodeTo( + obj.bytes, + output, + ); } @override DilithiumSignatureWithPublic decode(_i1.Input input) { - return DilithiumSignatureWithPublic(bytes: const _i1.U8ArrayCodec(7219).decode(input)); + return DilithiumSignatureWithPublic( + bytes: const _i1.U8ArrayCodec(7219).decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/qp_scheduler/block_number_or_timestamp.dart b/quantus_sdk/lib/generated/planck/types/qp_scheduler/block_number_or_timestamp.dart index 72570de7..539ae026 100644 --- a/quantus_sdk/lib/generated/planck/types/qp_scheduler/block_number_or_timestamp.dart +++ b/quantus_sdk/lib/generated/planck/types/qp_scheduler/block_number_or_timestamp.dart @@ -10,7 +10,8 @@ abstract class BlockNumberOrTimestamp { return codec.decode(input); } - static const $BlockNumberOrTimestampCodec codec = $BlockNumberOrTimestampCodec(); + static const $BlockNumberOrTimestampCodec codec = + $BlockNumberOrTimestampCodec(); static const $BlockNumberOrTimestamp values = $BlockNumberOrTimestamp(); @@ -51,12 +52,16 @@ class $BlockNumberOrTimestampCodec with _i1.Codec { case 1: return Timestamp._decode(input); default: - throw Exception('BlockNumberOrTimestamp: Invalid variant index: "$index"'); + throw Exception( + 'BlockNumberOrTimestamp: Invalid variant index: "$index"'); } } @override - void encodeTo(BlockNumberOrTimestamp value, _i1.Output output) { + void encodeTo( + BlockNumberOrTimestamp value, + _i1.Output output, + ) { switch (value.runtimeType) { case BlockNumber: (value as BlockNumber).encodeTo(output); @@ -65,7 +70,8 @@ class $BlockNumberOrTimestampCodec with _i1.Codec { (value as Timestamp).encodeTo(output); break; default: - throw Exception('BlockNumberOrTimestamp: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'BlockNumberOrTimestamp: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -77,7 +83,8 @@ class $BlockNumberOrTimestampCodec with _i1.Codec { case Timestamp: return (value as Timestamp)._sizeHint(); default: - throw Exception('BlockNumberOrTimestamp: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'BlockNumberOrTimestamp: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -102,12 +109,23 @@ class BlockNumber extends BlockNumberOrTimestamp { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is BlockNumber && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is BlockNumber && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -133,12 +151,23 @@ class Timestamp extends BlockNumberOrTimestamp { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U64Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U64Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Timestamp && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Timestamp && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/qp_scheduler/dispatch_time.dart b/quantus_sdk/lib/generated/planck/types/qp_scheduler/dispatch_time.dart index ba19d5d2..0e5ee2d9 100644 --- a/quantus_sdk/lib/generated/planck/types/qp_scheduler/dispatch_time.dart +++ b/quantus_sdk/lib/generated/planck/types/qp_scheduler/dispatch_time.dart @@ -58,7 +58,10 @@ class $DispatchTimeCodec with _i1.Codec { } @override - void encodeTo(DispatchTime value, _i1.Output output) { + void encodeTo( + DispatchTime value, + _i1.Output output, + ) { switch (value.runtimeType) { case At: (value as At).encodeTo(output); @@ -67,7 +70,8 @@ class $DispatchTimeCodec with _i1.Codec { (value as After).encodeTo(output); break; default: - throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -79,7 +83,8 @@ class $DispatchTimeCodec with _i1.Codec { case After: return (value as After)._sizeHint(); default: - throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -104,12 +109,23 @@ class At extends DispatchTime { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is At && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is At && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -135,12 +151,23 @@ class After extends DispatchTime { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i3.BlockNumberOrTimestamp.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i3.BlockNumberOrTimestamp.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is After && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is After && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/governance/definitions/preimage_deposit.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/governance/definitions/preimage_deposit.dart index 6bbcc7ef..3b70b47f 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/governance/definitions/preimage_deposit.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/governance/definitions/preimage_deposit.dart @@ -22,7 +22,12 @@ class PreimageDeposit { Map toJson() => {'amount': amount}; @override - bool operator ==(Object other) => identical(this, other) || other is PreimageDeposit && other.amount == amount; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is PreimageDeposit && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -32,8 +37,14 @@ class $PreimageDepositCodec with _i1.Codec { const $PreimageDepositCodec(); @override - void encodeTo(PreimageDeposit obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.amount, output); + void encodeTo( + PreimageDeposit obj, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/origin_caller.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/origin_caller.dart index 44961c9d..f2b9b2f2 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/origin_caller.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/origin_caller.dart @@ -52,13 +52,17 @@ class $OriginCallerCodec with _i1.Codec { } @override - void encodeTo(OriginCaller value, _i1.Output output) { + void encodeTo( + OriginCaller value, + _i1.Output output, + ) { switch (value.runtimeType) { case System: (value as System).encodeTo(output); break; default: - throw Exception('OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -68,7 +72,8 @@ class $OriginCallerCodec with _i1.Codec { case System: return (value as System)._sizeHint(); default: - throw Exception('OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -93,12 +98,23 @@ class System extends OriginCaller { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.RawOrigin.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.RawOrigin.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is System && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is System && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime.dart index f16a6bb0..4c026b0a 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime.dart @@ -12,8 +12,14 @@ class RuntimeCodec with _i1.Codec { } @override - void encodeTo(Runtime value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); + void encodeTo( + Runtime value, + _i1.Output output, + ) { + _i1.NullCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_call.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_call.dart index 1891db50..97a2aeba 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_call.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_call.dart @@ -157,7 +157,10 @@ class $RuntimeCallCodec with _i1.Codec { } @override - void encodeTo(RuntimeCall value, _i1.Output output) { + void encodeTo( + RuntimeCall value, + _i1.Output output, + ) { switch (value.runtimeType) { case System: (value as System).encodeTo(output); @@ -208,7 +211,8 @@ class $RuntimeCallCodec with _i1.Codec { (value as Wormhole).encodeTo(output); break; default: - throw Exception('RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -248,7 +252,8 @@ class $RuntimeCallCodec with _i1.Codec { case Wormhole: return (value as Wormhole)._sizeHint(); default: - throw Exception('RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -265,7 +270,8 @@ class System extends RuntimeCall { final _i3.Call value0; @override - Map>> toJson() => {'System': value0.toJson()}; + Map>> toJson() => + {'System': value0.toJson()}; int _sizeHint() { int size = 1; @@ -274,12 +280,23 @@ class System extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is System && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is System && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -297,7 +314,8 @@ class Timestamp extends RuntimeCall { final _i4.Call value0; @override - Map>> toJson() => {'Timestamp': value0.toJson()}; + Map>> toJson() => + {'Timestamp': value0.toJson()}; int _sizeHint() { int size = 1; @@ -306,12 +324,23 @@ class Timestamp extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i4.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i4.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Timestamp && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Timestamp && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -329,7 +358,8 @@ class Balances extends RuntimeCall { final _i5.Call value0; @override - Map>> toJson() => {'Balances': value0.toJson()}; + Map>> toJson() => + {'Balances': value0.toJson()}; int _sizeHint() { int size = 1; @@ -338,12 +368,23 @@ class Balances extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i5.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i5.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Balances && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Balances && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -361,7 +402,8 @@ class Preimage extends RuntimeCall { final _i6.Call value0; @override - Map>>> toJson() => {'Preimage': value0.toJson()}; + Map>>> toJson() => + {'Preimage': value0.toJson()}; int _sizeHint() { int size = 1; @@ -370,12 +412,23 @@ class Preimage extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i6.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i6.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Preimage && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Preimage && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -393,7 +446,8 @@ class Scheduler extends RuntimeCall { final _i7.Call value0; @override - Map>> toJson() => {'Scheduler': value0.toJson()}; + Map>> toJson() => + {'Scheduler': value0.toJson()}; int _sizeHint() { int size = 1; @@ -402,12 +456,23 @@ class Scheduler extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i7.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i7.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Scheduler && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Scheduler && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -425,7 +490,8 @@ class Utility extends RuntimeCall { final _i8.Call value0; @override - Map>> toJson() => {'Utility': value0.toJson()}; + Map>> toJson() => + {'Utility': value0.toJson()}; int _sizeHint() { int size = 1; @@ -434,12 +500,23 @@ class Utility extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i8.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + _i8.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Utility && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Utility && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -457,7 +534,8 @@ class Referenda extends RuntimeCall { final _i9.Call value0; @override - Map>> toJson() => {'Referenda': value0.toJson()}; + Map>> toJson() => + {'Referenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -466,12 +544,23 @@ class Referenda extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i9.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); + _i9.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Referenda && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Referenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -489,7 +578,8 @@ class ReversibleTransfers extends RuntimeCall { final _i10.Call value0; @override - Map>> toJson() => {'ReversibleTransfers': value0.toJson()}; + Map>> toJson() => + {'ReversibleTransfers': value0.toJson()}; int _sizeHint() { int size = 1; @@ -498,12 +588,23 @@ class ReversibleTransfers extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i10.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); + _i10.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ReversibleTransfers && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ReversibleTransfers && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -521,7 +622,8 @@ class ConvictionVoting extends RuntimeCall { final _i11.Call value0; @override - Map>> toJson() => {'ConvictionVoting': value0.toJson()}; + Map>> toJson() => + {'ConvictionVoting': value0.toJson()}; int _sizeHint() { int size = 1; @@ -530,12 +632,23 @@ class ConvictionVoting extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); - _i11.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 12, + output, + ); + _i11.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ConvictionVoting && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ConvictionVoting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -553,7 +666,8 @@ class TechCollective extends RuntimeCall { final _i12.Call value0; @override - Map>> toJson() => {'TechCollective': value0.toJson()}; + Map>> toJson() => + {'TechCollective': value0.toJson()}; int _sizeHint() { int size = 1; @@ -562,12 +676,23 @@ class TechCollective extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - _i12.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 13, + output, + ); + _i12.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is TechCollective && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TechCollective && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -585,7 +710,8 @@ class TechReferenda extends RuntimeCall { final _i13.Call value0; @override - Map>> toJson() => {'TechReferenda': value0.toJson()}; + Map>> toJson() => + {'TechReferenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -594,12 +720,23 @@ class TechReferenda extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - _i13.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 14, + output, + ); + _i13.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is TechReferenda && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TechReferenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -617,7 +754,8 @@ class TreasuryPallet extends RuntimeCall { final _i14.Call value0; @override - Map>> toJson() => {'TreasuryPallet': value0.toJson()}; + Map>> toJson() => + {'TreasuryPallet': value0.toJson()}; int _sizeHint() { int size = 1; @@ -626,12 +764,23 @@ class TreasuryPallet extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - _i14.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 15, + output, + ); + _i14.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is TreasuryPallet && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TreasuryPallet && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -658,12 +807,23 @@ class Recovery extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(16, output); - _i15.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 16, + output, + ); + _i15.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Recovery && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Recovery && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -681,7 +841,8 @@ class Assets extends RuntimeCall { final _i16.Call value0; @override - Map>> toJson() => {'Assets': value0.toJson()}; + Map>> toJson() => + {'Assets': value0.toJson()}; int _sizeHint() { int size = 1; @@ -690,12 +851,23 @@ class Assets extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(17, output); - _i16.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 17, + output, + ); + _i16.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Assets && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Assets && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -713,7 +885,8 @@ class Multisig extends RuntimeCall { final _i17.Call value0; @override - Map>> toJson() => {'Multisig': value0.toJson()}; + Map>> toJson() => + {'Multisig': value0.toJson()}; int _sizeHint() { int size = 1; @@ -722,12 +895,23 @@ class Multisig extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(19, output); - _i17.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 19, + output, + ); + _i17.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Multisig && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Multisig && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -745,7 +929,8 @@ class Wormhole extends RuntimeCall { final _i18.Call value0; @override - Map>>> toJson() => {'Wormhole': value0.toJson()}; + Map>>> toJson() => + {'Wormhole': value0.toJson()}; int _sizeHint() { int size = 1; @@ -754,12 +939,23 @@ class Wormhole extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(20, output); - _i18.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Wormhole && other.value0 == value0; + _i1.U8Codec.codec.encodeTo( + 20, + output, + ); + _i18.Call.codec.encodeTo( + value0, + output, + ); + } + + @override + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Wormhole && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_event.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_event.dart index 263a1cbe..59e24835 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_event.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_event.dart @@ -185,7 +185,10 @@ class $RuntimeEventCodec with _i1.Codec { } @override - void encodeTo(RuntimeEvent value, _i1.Output output) { + void encodeTo( + RuntimeEvent value, + _i1.Output output, + ) { switch (value.runtimeType) { case System: (value as System).encodeTo(output); @@ -248,7 +251,8 @@ class $RuntimeEventCodec with _i1.Codec { (value as ZkTree).encodeTo(output); break; default: - throw Exception('RuntimeEvent: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RuntimeEvent: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -296,7 +300,8 @@ class $RuntimeEventCodec with _i1.Codec { case ZkTree: return (value as ZkTree)._sizeHint(); default: - throw Exception('RuntimeEvent: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RuntimeEvent: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -321,12 +326,23 @@ class System extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is System && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is System && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -352,12 +368,23 @@ class Balances extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i4.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i4.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Balances && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Balances && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -374,7 +401,8 @@ class TransactionPayment extends RuntimeEvent { final _i5.Event value0; @override - Map>> toJson() => {'TransactionPayment': value0.toJson()}; + Map>> toJson() => + {'TransactionPayment': value0.toJson()}; int _sizeHint() { int size = 1; @@ -383,12 +411,23 @@ class TransactionPayment extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i5.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i5.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is TransactionPayment && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TransactionPayment && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -405,7 +444,8 @@ class QPoW extends RuntimeEvent { final _i6.Event value0; @override - Map>> toJson() => {'QPoW': value0.toJson()}; + Map>> toJson() => + {'QPoW': value0.toJson()}; int _sizeHint() { int size = 1; @@ -414,12 +454,23 @@ class QPoW extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i6.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i6.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is QPoW && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is QPoW && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -436,7 +487,8 @@ class MiningRewards extends RuntimeEvent { final _i7.Event value0; @override - Map>> toJson() => {'MiningRewards': value0.toJson()}; + Map>> toJson() => + {'MiningRewards': value0.toJson()}; int _sizeHint() { int size = 1; @@ -445,12 +497,23 @@ class MiningRewards extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i7.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i7.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is MiningRewards && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is MiningRewards && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -467,7 +530,8 @@ class Preimage extends RuntimeEvent { final _i8.Event value0; @override - Map>>> toJson() => {'Preimage': value0.toJson()}; + Map>>> toJson() => + {'Preimage': value0.toJson()}; int _sizeHint() { int size = 1; @@ -476,12 +540,23 @@ class Preimage extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i8.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i8.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Preimage && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Preimage && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -498,7 +573,8 @@ class Scheduler extends RuntimeEvent { final _i9.Event value0; @override - Map>> toJson() => {'Scheduler': value0.toJson()}; + Map>> toJson() => + {'Scheduler': value0.toJson()}; int _sizeHint() { int size = 1; @@ -507,12 +583,23 @@ class Scheduler extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i9.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i9.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Scheduler && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Scheduler && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -538,12 +625,23 @@ class Utility extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i10.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + _i10.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Utility && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Utility && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -560,7 +658,8 @@ class Referenda extends RuntimeEvent { final _i11.Event value0; @override - Map>> toJson() => {'Referenda': value0.toJson()}; + Map>> toJson() => + {'Referenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -569,12 +668,23 @@ class Referenda extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i11.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); + _i11.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Referenda && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Referenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -591,7 +701,8 @@ class ReversibleTransfers extends RuntimeEvent { final _i12.Event value0; @override - Map>> toJson() => {'ReversibleTransfers': value0.toJson()}; + Map>> toJson() => + {'ReversibleTransfers': value0.toJson()}; int _sizeHint() { int size = 1; @@ -600,12 +711,23 @@ class ReversibleTransfers extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i12.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); + _i12.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ReversibleTransfers && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ReversibleTransfers && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -622,7 +744,8 @@ class ConvictionVoting extends RuntimeEvent { final _i13.Event value0; @override - Map> toJson() => {'ConvictionVoting': value0.toJson()}; + Map> toJson() => + {'ConvictionVoting': value0.toJson()}; int _sizeHint() { int size = 1; @@ -631,12 +754,23 @@ class ConvictionVoting extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); - _i13.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 12, + output, + ); + _i13.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ConvictionVoting && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ConvictionVoting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -653,7 +787,8 @@ class TechCollective extends RuntimeEvent { final _i14.Event value0; @override - Map>> toJson() => {'TechCollective': value0.toJson()}; + Map>> toJson() => + {'TechCollective': value0.toJson()}; int _sizeHint() { int size = 1; @@ -662,12 +797,23 @@ class TechCollective extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - _i14.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 13, + output, + ); + _i14.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is TechCollective && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TechCollective && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -684,7 +830,8 @@ class TechReferenda extends RuntimeEvent { final _i15.Event value0; @override - Map>> toJson() => {'TechReferenda': value0.toJson()}; + Map>> toJson() => + {'TechReferenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -693,12 +840,23 @@ class TechReferenda extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - _i15.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 14, + output, + ); + _i15.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is TechReferenda && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TechReferenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -715,7 +873,8 @@ class TreasuryPallet extends RuntimeEvent { final _i16.Event value0; @override - Map>> toJson() => {'TreasuryPallet': value0.toJson()}; + Map>> toJson() => + {'TreasuryPallet': value0.toJson()}; int _sizeHint() { int size = 1; @@ -724,12 +883,23 @@ class TreasuryPallet extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - _i16.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 15, + output, + ); + _i16.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is TreasuryPallet && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TreasuryPallet && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -746,7 +916,8 @@ class Recovery extends RuntimeEvent { final _i17.Event value0; @override - Map>> toJson() => {'Recovery': value0.toJson()}; + Map>> toJson() => + {'Recovery': value0.toJson()}; int _sizeHint() { int size = 1; @@ -755,12 +926,23 @@ class Recovery extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(16, output); - _i17.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 16, + output, + ); + _i17.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Recovery && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Recovery && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -777,7 +959,8 @@ class Assets extends RuntimeEvent { final _i18.Event value0; @override - Map>> toJson() => {'Assets': value0.toJson()}; + Map>> toJson() => + {'Assets': value0.toJson()}; int _sizeHint() { int size = 1; @@ -786,12 +969,23 @@ class Assets extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(17, output); - _i18.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 17, + output, + ); + _i18.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Assets && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Assets && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -808,7 +1002,8 @@ class AssetsHolder extends RuntimeEvent { final _i19.Event value0; @override - Map>> toJson() => {'AssetsHolder': value0.toJson()}; + Map>> toJson() => + {'AssetsHolder': value0.toJson()}; int _sizeHint() { int size = 1; @@ -817,12 +1012,23 @@ class AssetsHolder extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(18, output); - _i19.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 18, + output, + ); + _i19.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is AssetsHolder && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is AssetsHolder && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -839,7 +1045,8 @@ class Multisig extends RuntimeEvent { final _i20.Event value0; @override - Map>> toJson() => {'Multisig': value0.toJson()}; + Map>> toJson() => + {'Multisig': value0.toJson()}; int _sizeHint() { int size = 1; @@ -848,12 +1055,23 @@ class Multisig extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(19, output); - _i20.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 19, + output, + ); + _i20.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Multisig && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Multisig && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -870,7 +1088,8 @@ class Wormhole extends RuntimeEvent { final _i21.Event value0; @override - Map>> toJson() => {'Wormhole': value0.toJson()}; + Map>> toJson() => + {'Wormhole': value0.toJson()}; int _sizeHint() { int size = 1; @@ -879,12 +1098,23 @@ class Wormhole extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(20, output); - _i21.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 20, + output, + ); + _i21.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Wormhole && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Wormhole && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -901,7 +1131,8 @@ class ZkTree extends RuntimeEvent { final _i22.Event value0; @override - Map>> toJson() => {'ZkTree': value0.toJson()}; + Map>> toJson() => + {'ZkTree': value0.toJson()}; int _sizeHint() { int size = 1; @@ -910,12 +1141,23 @@ class ZkTree extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(21, output); - _i22.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 21, + output, + ); + _i22.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ZkTree && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ZkTree && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_freeze_reason.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_freeze_reason.dart index 5e4c8b0d..98109e19 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_freeze_reason.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_freeze_reason.dart @@ -12,8 +12,14 @@ class RuntimeFreezeReasonCodec with _i1.Codec { } @override - void encodeTo(RuntimeFreezeReason value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); + void encodeTo( + RuntimeFreezeReason value, + _i1.Output output, + ) { + _i1.NullCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_hold_reason.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_hold_reason.dart index b44c860a..f7704715 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_hold_reason.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_hold_reason.dart @@ -59,7 +59,10 @@ class $RuntimeHoldReasonCodec with _i1.Codec { } @override - void encodeTo(RuntimeHoldReason value, _i1.Output output) { + void encodeTo( + RuntimeHoldReason value, + _i1.Output output, + ) { switch (value.runtimeType) { case Preimage: (value as Preimage).encodeTo(output); @@ -68,7 +71,8 @@ class $RuntimeHoldReasonCodec with _i1.Codec { (value as ReversibleTransfers).encodeTo(output); break; default: - throw Exception('RuntimeHoldReason: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RuntimeHoldReason: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -80,7 +84,8 @@ class $RuntimeHoldReasonCodec with _i1.Codec { case ReversibleTransfers: return (value as ReversibleTransfers)._sizeHint(); default: - throw Exception('RuntimeHoldReason: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RuntimeHoldReason: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -105,12 +110,23 @@ class Preimage extends RuntimeHoldReason { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i3.HoldReason.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i3.HoldReason.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Preimage && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Preimage && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -136,12 +152,23 @@ class ReversibleTransfers extends RuntimeHoldReason { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i4.HoldReason.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); + _i4.HoldReason.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is ReversibleTransfers && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ReversibleTransfers && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart index 1f05a1bb..fa9b3554 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart @@ -3,7 +3,8 @@ import 'package:polkadart/scale_codec.dart' as _i1; typedef ReversibleTransactionExtension = dynamic; -class ReversibleTransactionExtensionCodec with _i1.Codec { +class ReversibleTransactionExtensionCodec + with _i1.Codec { const ReversibleTransactionExtensionCodec(); @override @@ -12,8 +13,14 @@ class ReversibleTransactionExtensionCodec with _i1.Codec { +class WormholeProofRecorderExtensionCodec + with _i1.Codec { const WormholeProofRecorderExtensionCodec(); @override @@ -12,8 +13,14 @@ class WormholeProofRecorderExtensionCodec with _i1.Codec { } @override - void encodeTo(ArithmeticError value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + ArithmeticError value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_i64.dart b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_i64.dart index e542ca16..cc36d889 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_i64.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_i64.dart @@ -12,8 +12,14 @@ class FixedI64Codec with _i1.Codec { } @override - void encodeTo(FixedI64 value, _i1.Output output) { - _i1.I64Codec.codec.encodeTo(value, output); + void encodeTo( + FixedI64 value, + _i1.Output output, + ) { + _i1.I64Codec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_u128.dart b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_u128.dart index 87a788a0..771c1755 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_u128.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_u128.dart @@ -12,8 +12,14 @@ class FixedU128Codec with _i1.Codec { } @override - void encodeTo(FixedU128 value, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(value, output); + void encodeTo( + FixedU128 value, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/perbill.dart b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/perbill.dart index 0f88314b..6feb69ff 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/perbill.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/perbill.dart @@ -12,8 +12,14 @@ class PerbillCodec with _i1.Codec { } @override - void encodeTo(Perbill value, _i1.Output output) { - _i1.U32Codec.codec.encodeTo(value, output); + void encodeTo( + Perbill value, + _i1.Output output, + ) { + _i1.U32Codec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/permill.dart b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/permill.dart index 7411f90d..9fd260c7 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/permill.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/permill.dart @@ -12,8 +12,14 @@ class PermillCodec with _i1.Codec { } @override - void encodeTo(Permill value, _i1.Output output) { - _i1.U32Codec.codec.encodeTo(value, output); + void encodeTo( + Permill value, + _i1.Output output, + ) { + _i1.U32Codec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_core/crypto/account_id32.dart b/quantus_sdk/lib/generated/planck/types/sp_core/crypto/account_id32.dart index 93fbda9f..81513d7f 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_core/crypto/account_id32.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_core/crypto/account_id32.dart @@ -12,8 +12,14 @@ class AccountId32Codec with _i1.Codec { } @override - void encodeTo(AccountId32 value, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(value, output); + void encodeTo( + AccountId32 value, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error.dart index 715b1735..a5c2d18c 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error.dart @@ -140,7 +140,10 @@ class $DispatchErrorCodec with _i1.Codec { } @override - void encodeTo(DispatchError value, _i1.Output output) { + void encodeTo( + DispatchError value, + _i1.Output output, + ) { switch (value.runtimeType) { case Other: (value as Other).encodeTo(output); @@ -188,7 +191,8 @@ class $DispatchErrorCodec with _i1.Codec { (value as Trie).encodeTo(output); break; default: - throw Exception('DispatchError: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DispatchError: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -226,7 +230,8 @@ class $DispatchErrorCodec with _i1.Codec { case Trie: return (value as Trie)._sizeHint(); default: - throw Exception('DispatchError: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DispatchError: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -238,7 +243,10 @@ class Other extends DispatchError { Map toJson() => {'Other': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); } @override @@ -255,7 +263,10 @@ class CannotLookup extends DispatchError { Map toJson() => {'CannotLookup': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); } @override @@ -272,7 +283,10 @@ class BadOrigin extends DispatchError { Map toJson() => {'BadOrigin': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); } @override @@ -302,12 +316,23 @@ class Module extends DispatchError { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i3.ModuleError.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i3.ModuleError.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Module && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Module && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -320,7 +345,10 @@ class ConsumerRemaining extends DispatchError { Map toJson() => {'ConsumerRemaining': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); } @override @@ -337,7 +365,10 @@ class NoProviders extends DispatchError { Map toJson() => {'NoProviders': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); } @override @@ -354,7 +385,10 @@ class TooManyConsumers extends DispatchError { Map toJson() => {'TooManyConsumers': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); } @override @@ -384,12 +418,23 @@ class Token extends DispatchError { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i4.TokenError.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i4.TokenError.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Token && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Token && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -415,12 +460,23 @@ class Arithmetic extends DispatchError { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i5.ArithmeticError.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i5.ArithmeticError.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Arithmetic && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Arithmetic && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -446,12 +502,23 @@ class Transactional extends DispatchError { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i6.TransactionalError.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + _i6.TransactionalError.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Transactional && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Transactional && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -464,7 +531,10 @@ class Exhausted extends DispatchError { Map toJson() => {'Exhausted': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); } @override @@ -481,7 +551,10 @@ class Corruption extends DispatchError { Map toJson() => {'Corruption': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); } @override @@ -498,7 +571,10 @@ class Unavailable extends DispatchError { Map toJson() => {'Unavailable': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); + _i1.U8Codec.codec.encodeTo( + 12, + output, + ); } @override @@ -515,7 +591,10 @@ class RootNotAllowed extends DispatchError { Map toJson() => {'RootNotAllowed': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); + _i1.U8Codec.codec.encodeTo( + 13, + output, + ); } @override @@ -545,12 +624,23 @@ class Trie extends DispatchError { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - _i7.TrieError.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Trie && other.value0 == value0; + _i1.U8Codec.codec.encodeTo( + 14, + output, + ); + _i7.TrieError.codec.encodeTo( + value0, + output, + ); + } + + @override + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Trie && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error_with_post_info.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error_with_post_info.dart index cc35e8e0..6cbbf070 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error_with_post_info.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error_with_post_info.dart @@ -7,7 +7,10 @@ import '../frame_support/dispatch/post_dispatch_info.dart' as _i2; import 'dispatch_error.dart' as _i3; class DispatchErrorWithPostInfo { - const DispatchErrorWithPostInfo({required this.postInfo, required this.error}); + const DispatchErrorWithPostInfo({ + required this.postInfo, + required this.error, + }); factory DispatchErrorWithPostInfo.decode(_i1.Input input) { return codec.decode(input); @@ -19,30 +22,52 @@ class DispatchErrorWithPostInfo { /// DispatchError final _i3.DispatchError error; - static const $DispatchErrorWithPostInfoCodec codec = $DispatchErrorWithPostInfoCodec(); + static const $DispatchErrorWithPostInfoCodec codec = + $DispatchErrorWithPostInfoCodec(); _i4.Uint8List encode() { return codec.encode(this); } - Map> toJson() => {'postInfo': postInfo.toJson(), 'error': error.toJson()}; + Map> toJson() => { + 'postInfo': postInfo.toJson(), + 'error': error.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || - other is DispatchErrorWithPostInfo && other.postInfo == postInfo && other.error == error; + identical( + this, + other, + ) || + other is DispatchErrorWithPostInfo && + other.postInfo == postInfo && + other.error == error; @override - int get hashCode => Object.hash(postInfo, error); + int get hashCode => Object.hash( + postInfo, + error, + ); } -class $DispatchErrorWithPostInfoCodec with _i1.Codec { +class $DispatchErrorWithPostInfoCodec + with _i1.Codec { const $DispatchErrorWithPostInfoCodec(); @override - void encodeTo(DispatchErrorWithPostInfo obj, _i1.Output output) { - _i2.PostDispatchInfo.codec.encodeTo(obj.postInfo, output); - _i3.DispatchError.codec.encodeTo(obj.error, output); + void encodeTo( + DispatchErrorWithPostInfo obj, + _i1.Output output, + ) { + _i2.PostDispatchInfo.codec.encodeTo( + obj.postInfo, + output, + ); + _i3.DispatchError.codec.encodeTo( + obj.error, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest.dart index 1aa48457..215d34e5 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest.dart @@ -22,10 +22,20 @@ class Digest { return codec.encode(this); } - Map>> toJson() => {'logs': logs.map((value) => value.toJson()).toList()}; + Map>> toJson() => + {'logs': logs.map((value) => value.toJson()).toList()}; @override - bool operator ==(Object other) => identical(this, other) || other is Digest && _i4.listsEqual(other.logs, logs); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Digest && + _i4.listsEqual( + other.logs, + logs, + ); @override int get hashCode => logs.hashCode; @@ -35,19 +45,29 @@ class $DigestCodec with _i1.Codec { const $DigestCodec(); @override - void encodeTo(Digest obj, _i1.Output output) { - const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec).encodeTo(obj.logs, output); + void encodeTo( + Digest obj, + _i1.Output output, + ) { + const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec).encodeTo( + obj.logs, + output, + ); } @override Digest decode(_i1.Input input) { - return Digest(logs: const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec).decode(input)); + return Digest( + logs: const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec) + .decode(input)); } @override int sizeHint(Digest obj) { int size = 0; - size = size + const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec).sizeHint(obj.logs); + size = size + + const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec) + .sizeHint(obj.logs); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest_item.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest_item.dart index 4ac2501d..4c9b58a7 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest_item.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest_item.dart @@ -31,16 +31,34 @@ abstract class DigestItem { class $DigestItem { const $DigestItem(); - PreRuntime preRuntime(List value0, List value1) { - return PreRuntime(value0, value1); + PreRuntime preRuntime( + List value0, + List value1, + ) { + return PreRuntime( + value0, + value1, + ); } - Consensus consensus(List value0, List value1) { - return Consensus(value0, value1); + Consensus consensus( + List value0, + List value1, + ) { + return Consensus( + value0, + value1, + ); } - Seal seal(List value0, List value1) { - return Seal(value0, value1); + Seal seal( + List value0, + List value1, + ) { + return Seal( + value0, + value1, + ); } Other other(List value0) { @@ -75,7 +93,10 @@ class $DigestItemCodec with _i1.Codec { } @override - void encodeTo(DigestItem value, _i1.Output output) { + void encodeTo( + DigestItem value, + _i1.Output output, + ) { switch (value.runtimeType) { case PreRuntime: (value as PreRuntime).encodeTo(output); @@ -93,7 +114,8 @@ class $DigestItemCodec with _i1.Codec { (value as RuntimeEnvironmentUpdated).encodeTo(output); break; default: - throw Exception('DigestItem: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DigestItem: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -111,16 +133,23 @@ class $DigestItemCodec with _i1.Codec { case RuntimeEnvironmentUpdated: return 1; default: - throw Exception('DigestItem: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'DigestItem: Unsupported "$value" of type "${value.runtimeType}"'); } } } class PreRuntime extends DigestItem { - const PreRuntime(this.value0, this.value1); + const PreRuntime( + this.value0, + this.value1, + ); factory PreRuntime._decode(_i1.Input input) { - return PreRuntime(const _i1.U8ArrayCodec(4).decode(input), _i1.U8SequenceCodec.codec.decode(input)); + return PreRuntime( + const _i1.U8ArrayCodec(4).decode(input), + _i1.U8SequenceCodec.codec.decode(input), + ); } /// ConsensusEngineId @@ -131,8 +160,11 @@ class PreRuntime extends DigestItem { @override Map>> toJson() => { - 'PreRuntime': [value0.toList(), value1], - }; + 'PreRuntime': [ + value0.toList(), + value1, + ] + }; int _sizeHint() { int size = 1; @@ -142,25 +174,54 @@ class PreRuntime extends DigestItem { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - const _i1.U8ArrayCodec(4).encodeTo(value0, output); - _i1.U8SequenceCodec.codec.encodeTo(value1, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + const _i1.U8ArrayCodec(4).encodeTo( + value0, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + value1, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is PreRuntime && _i3.listsEqual(other.value0, value0) && _i3.listsEqual(other.value1, value1); + identical( + this, + other, + ) || + other is PreRuntime && + _i3.listsEqual( + other.value0, + value0, + ) && + _i3.listsEqual( + other.value1, + value1, + ); @override - int get hashCode => Object.hash(value0, value1); + int get hashCode => Object.hash( + value0, + value1, + ); } class Consensus extends DigestItem { - const Consensus(this.value0, this.value1); + const Consensus( + this.value0, + this.value1, + ); factory Consensus._decode(_i1.Input input) { - return Consensus(const _i1.U8ArrayCodec(4).decode(input), _i1.U8SequenceCodec.codec.decode(input)); + return Consensus( + const _i1.U8ArrayCodec(4).decode(input), + _i1.U8SequenceCodec.codec.decode(input), + ); } /// ConsensusEngineId @@ -171,8 +232,11 @@ class Consensus extends DigestItem { @override Map>> toJson() => { - 'Consensus': [value0.toList(), value1], - }; + 'Consensus': [ + value0.toList(), + value1, + ] + }; int _sizeHint() { int size = 1; @@ -182,25 +246,54 @@ class Consensus extends DigestItem { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.U8ArrayCodec(4).encodeTo(value0, output); - _i1.U8SequenceCodec.codec.encodeTo(value1, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.U8ArrayCodec(4).encodeTo( + value0, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + value1, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Consensus && _i3.listsEqual(other.value0, value0) && _i3.listsEqual(other.value1, value1); + identical( + this, + other, + ) || + other is Consensus && + _i3.listsEqual( + other.value0, + value0, + ) && + _i3.listsEqual( + other.value1, + value1, + ); @override - int get hashCode => Object.hash(value0, value1); + int get hashCode => Object.hash( + value0, + value1, + ); } class Seal extends DigestItem { - const Seal(this.value0, this.value1); + const Seal( + this.value0, + this.value1, + ); factory Seal._decode(_i1.Input input) { - return Seal(const _i1.U8ArrayCodec(4).decode(input), _i1.U8SequenceCodec.codec.decode(input)); + return Seal( + const _i1.U8ArrayCodec(4).decode(input), + _i1.U8SequenceCodec.codec.decode(input), + ); } /// ConsensusEngineId @@ -211,8 +304,11 @@ class Seal extends DigestItem { @override Map>> toJson() => { - 'Seal': [value0.toList(), value1], - }; + 'Seal': [ + value0.toList(), + value1, + ] + }; int _sizeHint() { int size = 1; @@ -222,18 +318,41 @@ class Seal extends DigestItem { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - const _i1.U8ArrayCodec(4).encodeTo(value0, output); - _i1.U8SequenceCodec.codec.encodeTo(value1, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + const _i1.U8ArrayCodec(4).encodeTo( + value0, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + value1, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Seal && _i3.listsEqual(other.value0, value0) && _i3.listsEqual(other.value1, value1); + identical( + this, + other, + ) || + other is Seal && + _i3.listsEqual( + other.value0, + value0, + ) && + _i3.listsEqual( + other.value1, + value1, + ); @override - int get hashCode => Object.hash(value0, value1); + int get hashCode => Object.hash( + value0, + value1, + ); } class Other extends DigestItem { @@ -256,12 +375,27 @@ class Other extends DigestItem { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U8SequenceCodec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Other && _i3.listsEqual(other.value0, value0); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Other && + _i3.listsEqual( + other.value0, + value0, + ); @override int get hashCode => value0.hashCode; @@ -274,7 +408,10 @@ class RuntimeEnvironmentUpdated extends DigestItem { Map toJson() => {'RuntimeEnvironmentUpdated': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/era/era.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/era/era.dart index 97172381..5133d6d7 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/era/era.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/era/era.dart @@ -1580,7 +1580,10 @@ class $EraCodec with _i1.Codec { } @override - void encodeTo(Era value, _i1.Output output) { + void encodeTo( + Era value, + _i1.Output output, + ) { switch (value.runtimeType) { case Immortal: (value as Immortal).encodeTo(output); @@ -2351,7 +2354,8 @@ class $EraCodec with _i1.Codec { (value as Mortal255).encodeTo(output); break; default: - throw Exception('Era: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Era: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -2871,7 +2875,8 @@ class $EraCodec with _i1.Codec { case Mortal255: return (value as Mortal255)._sizeHint(); default: - throw Exception('Era: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Era: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -2883,7 +2888,10 @@ class Immortal extends Era { Map toJson() => {'Immortal': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); } @override @@ -2912,12 +2920,23 @@ class Mortal1 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal1 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal1 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -2942,12 +2961,23 @@ class Mortal2 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal2 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal2 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -2972,12 +3002,23 @@ class Mortal3 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal3 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal3 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3002,12 +3043,23 @@ class Mortal4 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal4 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal4 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3032,12 +3084,23 @@ class Mortal5 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal5 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal5 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3062,12 +3125,23 @@ class Mortal6 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal6 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal6 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3092,12 +3166,23 @@ class Mortal7 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal7 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal7 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3122,12 +3207,23 @@ class Mortal8 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal8 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal8 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3152,12 +3248,23 @@ class Mortal9 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal9 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal9 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3182,12 +3289,23 @@ class Mortal10 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal10 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal10 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3212,12 +3330,23 @@ class Mortal11 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal11 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal11 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3242,12 +3371,23 @@ class Mortal12 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 12, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal12 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal12 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3272,12 +3412,23 @@ class Mortal13 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 13, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal13 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal13 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3302,12 +3453,23 @@ class Mortal14 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 14, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal14 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal14 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3332,12 +3494,23 @@ class Mortal15 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 15, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal15 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal15 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3362,12 +3535,23 @@ class Mortal16 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(16, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 16, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal16 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal16 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3392,12 +3576,23 @@ class Mortal17 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(17, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 17, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal17 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal17 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3422,12 +3617,23 @@ class Mortal18 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(18, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 18, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal18 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal18 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3452,12 +3658,23 @@ class Mortal19 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(19, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 19, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal19 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal19 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3482,12 +3699,23 @@ class Mortal20 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(20, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 20, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal20 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal20 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3512,12 +3740,23 @@ class Mortal21 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(21, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 21, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal21 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal21 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3542,12 +3781,23 @@ class Mortal22 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(22, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 22, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal22 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal22 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3572,12 +3822,23 @@ class Mortal23 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(23, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 23, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal23 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal23 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3602,12 +3863,23 @@ class Mortal24 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(24, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 24, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal24 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal24 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3632,12 +3904,23 @@ class Mortal25 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(25, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 25, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal25 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal25 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3662,12 +3945,23 @@ class Mortal26 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(26, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 26, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal26 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal26 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3692,12 +3986,23 @@ class Mortal27 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(27, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 27, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal27 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal27 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3722,12 +4027,23 @@ class Mortal28 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(28, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 28, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal28 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal28 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3752,12 +4068,23 @@ class Mortal29 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(29, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 29, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal29 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal29 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3782,12 +4109,23 @@ class Mortal30 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(30, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 30, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal30 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal30 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3812,12 +4150,23 @@ class Mortal31 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(31, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 31, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal31 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal31 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3842,12 +4191,23 @@ class Mortal32 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(32, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 32, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal32 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal32 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3872,12 +4232,23 @@ class Mortal33 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(33, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 33, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal33 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal33 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3902,12 +4273,23 @@ class Mortal34 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(34, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 34, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal34 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal34 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3932,12 +4314,23 @@ class Mortal35 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(35, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 35, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal35 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal35 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3962,12 +4355,23 @@ class Mortal36 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(36, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 36, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal36 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal36 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3992,12 +4396,23 @@ class Mortal37 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(37, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 37, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal37 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal37 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4022,12 +4437,23 @@ class Mortal38 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(38, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 38, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal38 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal38 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4052,12 +4478,23 @@ class Mortal39 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(39, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 39, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal39 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal39 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4082,12 +4519,23 @@ class Mortal40 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(40, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 40, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal40 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal40 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4112,12 +4560,23 @@ class Mortal41 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(41, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 41, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal41 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal41 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4142,12 +4601,23 @@ class Mortal42 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(42, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 42, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal42 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal42 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4172,12 +4642,23 @@ class Mortal43 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(43, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 43, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal43 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal43 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4202,12 +4683,23 @@ class Mortal44 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(44, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 44, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal44 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal44 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4232,12 +4724,23 @@ class Mortal45 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(45, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 45, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal45 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal45 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4262,12 +4765,23 @@ class Mortal46 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(46, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 46, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal46 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal46 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4292,12 +4806,23 @@ class Mortal47 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(47, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 47, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal47 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal47 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4322,12 +4847,23 @@ class Mortal48 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(48, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 48, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal48 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal48 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4352,12 +4888,23 @@ class Mortal49 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(49, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 49, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal49 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal49 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4382,12 +4929,23 @@ class Mortal50 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(50, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 50, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal50 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal50 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4412,12 +4970,23 @@ class Mortal51 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(51, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 51, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal51 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal51 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4442,12 +5011,23 @@ class Mortal52 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(52, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 52, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal52 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal52 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4472,12 +5052,23 @@ class Mortal53 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(53, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 53, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal53 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal53 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4502,12 +5093,23 @@ class Mortal54 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(54, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 54, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal54 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal54 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4532,12 +5134,23 @@ class Mortal55 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(55, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 55, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal55 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal55 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4562,12 +5175,23 @@ class Mortal56 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(56, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 56, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal56 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal56 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4592,12 +5216,23 @@ class Mortal57 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(57, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 57, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal57 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal57 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4622,12 +5257,23 @@ class Mortal58 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(58, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 58, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal58 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal58 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4652,12 +5298,23 @@ class Mortal59 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(59, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 59, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal59 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal59 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4682,12 +5339,23 @@ class Mortal60 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(60, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 60, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal60 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal60 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4712,12 +5380,23 @@ class Mortal61 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(61, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 61, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal61 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal61 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4742,12 +5421,23 @@ class Mortal62 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(62, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 62, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal62 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal62 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4772,12 +5462,23 @@ class Mortal63 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(63, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 63, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal63 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal63 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4802,12 +5503,23 @@ class Mortal64 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(64, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 64, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal64 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal64 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4832,12 +5544,23 @@ class Mortal65 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(65, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 65, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal65 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal65 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4862,12 +5585,23 @@ class Mortal66 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(66, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 66, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal66 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal66 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4892,12 +5626,23 @@ class Mortal67 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(67, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 67, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal67 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal67 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4922,12 +5667,23 @@ class Mortal68 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(68, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 68, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal68 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal68 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4952,12 +5708,23 @@ class Mortal69 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(69, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 69, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal69 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal69 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4982,12 +5749,23 @@ class Mortal70 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(70, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 70, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal70 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal70 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5012,12 +5790,23 @@ class Mortal71 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(71, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 71, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal71 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal71 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5042,12 +5831,23 @@ class Mortal72 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(72, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 72, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal72 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal72 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5072,12 +5872,23 @@ class Mortal73 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(73, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 73, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal73 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal73 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5102,12 +5913,23 @@ class Mortal74 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(74, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 74, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal74 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal74 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5132,12 +5954,23 @@ class Mortal75 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(75, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 75, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal75 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal75 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5162,12 +5995,23 @@ class Mortal76 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(76, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 76, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal76 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal76 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5192,12 +6036,23 @@ class Mortal77 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(77, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 77, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal77 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal77 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5222,12 +6077,23 @@ class Mortal78 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(78, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 78, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal78 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal78 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5252,12 +6118,23 @@ class Mortal79 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(79, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 79, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal79 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal79 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5282,12 +6159,23 @@ class Mortal80 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(80, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 80, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal80 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal80 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5312,12 +6200,23 @@ class Mortal81 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(81, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 81, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal81 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal81 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5342,12 +6241,23 @@ class Mortal82 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(82, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 82, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal82 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal82 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5372,12 +6282,23 @@ class Mortal83 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(83, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 83, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal83 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal83 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5402,12 +6323,23 @@ class Mortal84 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(84, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 84, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal84 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal84 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5432,12 +6364,23 @@ class Mortal85 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(85, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 85, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal85 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal85 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5462,12 +6405,23 @@ class Mortal86 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(86, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 86, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal86 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal86 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5492,12 +6446,23 @@ class Mortal87 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(87, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 87, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal87 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal87 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5522,12 +6487,23 @@ class Mortal88 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(88, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 88, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal88 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal88 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5552,12 +6528,23 @@ class Mortal89 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(89, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 89, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal89 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal89 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5582,12 +6569,23 @@ class Mortal90 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(90, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 90, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal90 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal90 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5612,12 +6610,23 @@ class Mortal91 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(91, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 91, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal91 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal91 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5642,12 +6651,23 @@ class Mortal92 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(92, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 92, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal92 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal92 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5672,12 +6692,23 @@ class Mortal93 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(93, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 93, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal93 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal93 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5702,12 +6733,23 @@ class Mortal94 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(94, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 94, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal94 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal94 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5732,12 +6774,23 @@ class Mortal95 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(95, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 95, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal95 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal95 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5762,12 +6815,23 @@ class Mortal96 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(96, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 96, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal96 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal96 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5792,12 +6856,23 @@ class Mortal97 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(97, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 97, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal97 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal97 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5822,12 +6897,23 @@ class Mortal98 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(98, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 98, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal98 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal98 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5852,12 +6938,23 @@ class Mortal99 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(99, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 99, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal99 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal99 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5882,12 +6979,23 @@ class Mortal100 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(100, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 100, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal100 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal100 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5912,12 +7020,23 @@ class Mortal101 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(101, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 101, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal101 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal101 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5942,12 +7061,23 @@ class Mortal102 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(102, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 102, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal102 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal102 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5972,12 +7102,23 @@ class Mortal103 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(103, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 103, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal103 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal103 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6002,12 +7143,23 @@ class Mortal104 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(104, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 104, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal104 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal104 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6032,12 +7184,23 @@ class Mortal105 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(105, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 105, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal105 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal105 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6062,12 +7225,23 @@ class Mortal106 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(106, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 106, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal106 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal106 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6092,12 +7266,23 @@ class Mortal107 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(107, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 107, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal107 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal107 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6122,12 +7307,23 @@ class Mortal108 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(108, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 108, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal108 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal108 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6152,12 +7348,23 @@ class Mortal109 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(109, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 109, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal109 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal109 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6182,12 +7389,23 @@ class Mortal110 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(110, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 110, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal110 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal110 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6212,12 +7430,23 @@ class Mortal111 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(111, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 111, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal111 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal111 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6242,12 +7471,23 @@ class Mortal112 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(112, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 112, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal112 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal112 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6272,12 +7512,23 @@ class Mortal113 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(113, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 113, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal113 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal113 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6302,12 +7553,23 @@ class Mortal114 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(114, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 114, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal114 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal114 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6332,12 +7594,23 @@ class Mortal115 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(115, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 115, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal115 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal115 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6362,12 +7635,23 @@ class Mortal116 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(116, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 116, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal116 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal116 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6392,12 +7676,23 @@ class Mortal117 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(117, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 117, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal117 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal117 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6422,12 +7717,23 @@ class Mortal118 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(118, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 118, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal118 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal118 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6452,12 +7758,23 @@ class Mortal119 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(119, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 119, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal119 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal119 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6482,12 +7799,23 @@ class Mortal120 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(120, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 120, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal120 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal120 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6512,12 +7840,23 @@ class Mortal121 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(121, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 121, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal121 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal121 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6542,12 +7881,23 @@ class Mortal122 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(122, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 122, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal122 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal122 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6572,12 +7922,23 @@ class Mortal123 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(123, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 123, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal123 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal123 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6602,12 +7963,23 @@ class Mortal124 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(124, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 124, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal124 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal124 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6632,12 +8004,23 @@ class Mortal125 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(125, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 125, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal125 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal125 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6662,12 +8045,23 @@ class Mortal126 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(126, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 126, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal126 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal126 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6692,12 +8086,23 @@ class Mortal127 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(127, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 127, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal127 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal127 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6722,12 +8127,23 @@ class Mortal128 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(128, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 128, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal128 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal128 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6752,12 +8168,23 @@ class Mortal129 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(129, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 129, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal129 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal129 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6782,12 +8209,23 @@ class Mortal130 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(130, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 130, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal130 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal130 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6812,12 +8250,23 @@ class Mortal131 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(131, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 131, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal131 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal131 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6842,12 +8291,23 @@ class Mortal132 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(132, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 132, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal132 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal132 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6872,12 +8332,23 @@ class Mortal133 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(133, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 133, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal133 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal133 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6902,12 +8373,23 @@ class Mortal134 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(134, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 134, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal134 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal134 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6932,12 +8414,23 @@ class Mortal135 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(135, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 135, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal135 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal135 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6962,12 +8455,23 @@ class Mortal136 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(136, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 136, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal136 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal136 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6992,12 +8496,23 @@ class Mortal137 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(137, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 137, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal137 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal137 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7022,12 +8537,23 @@ class Mortal138 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(138, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 138, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal138 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal138 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7052,12 +8578,23 @@ class Mortal139 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(139, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 139, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal139 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal139 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7082,12 +8619,23 @@ class Mortal140 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(140, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 140, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal140 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal140 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7112,12 +8660,23 @@ class Mortal141 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(141, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 141, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal141 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal141 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7142,12 +8701,23 @@ class Mortal142 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(142, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 142, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal142 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal142 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7172,12 +8742,23 @@ class Mortal143 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(143, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 143, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal143 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal143 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7202,12 +8783,23 @@ class Mortal144 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(144, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 144, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal144 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal144 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7232,12 +8824,23 @@ class Mortal145 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(145, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 145, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal145 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal145 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7262,12 +8865,23 @@ class Mortal146 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(146, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 146, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal146 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal146 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7292,12 +8906,23 @@ class Mortal147 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(147, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 147, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal147 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal147 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7322,12 +8947,23 @@ class Mortal148 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(148, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 148, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal148 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal148 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7352,12 +8988,23 @@ class Mortal149 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(149, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 149, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal149 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal149 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7382,12 +9029,23 @@ class Mortal150 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(150, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 150, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal150 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal150 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7412,12 +9070,23 @@ class Mortal151 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(151, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 151, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal151 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal151 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7442,12 +9111,23 @@ class Mortal152 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(152, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 152, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal152 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal152 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7472,12 +9152,23 @@ class Mortal153 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(153, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 153, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal153 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal153 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7502,12 +9193,23 @@ class Mortal154 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(154, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 154, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal154 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal154 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7532,12 +9234,23 @@ class Mortal155 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(155, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 155, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal155 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal155 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7562,12 +9275,23 @@ class Mortal156 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(156, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 156, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal156 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal156 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7592,12 +9316,23 @@ class Mortal157 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(157, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 157, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal157 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal157 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7622,12 +9357,23 @@ class Mortal158 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(158, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 158, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal158 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal158 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7652,12 +9398,23 @@ class Mortal159 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(159, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 159, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal159 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal159 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7682,12 +9439,23 @@ class Mortal160 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(160, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 160, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal160 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal160 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7712,12 +9480,23 @@ class Mortal161 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(161, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 161, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal161 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal161 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7742,12 +9521,23 @@ class Mortal162 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(162, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 162, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal162 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal162 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7772,12 +9562,23 @@ class Mortal163 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(163, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 163, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal163 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal163 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7802,12 +9603,23 @@ class Mortal164 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(164, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 164, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal164 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal164 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7832,12 +9644,23 @@ class Mortal165 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(165, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 165, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal165 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal165 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7862,12 +9685,23 @@ class Mortal166 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(166, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 166, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal166 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal166 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7892,12 +9726,23 @@ class Mortal167 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(167, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 167, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal167 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal167 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7922,12 +9767,23 @@ class Mortal168 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(168, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 168, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal168 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal168 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7952,12 +9808,23 @@ class Mortal169 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(169, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 169, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal169 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal169 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7982,12 +9849,23 @@ class Mortal170 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(170, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 170, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal170 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal170 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8012,12 +9890,23 @@ class Mortal171 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(171, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 171, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal171 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal171 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8042,12 +9931,23 @@ class Mortal172 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(172, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 172, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal172 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal172 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8072,12 +9972,23 @@ class Mortal173 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(173, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 173, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal173 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal173 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8102,12 +10013,23 @@ class Mortal174 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(174, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 174, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal174 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal174 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8132,12 +10054,23 @@ class Mortal175 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(175, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 175, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal175 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal175 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8162,12 +10095,23 @@ class Mortal176 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(176, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 176, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal176 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal176 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8192,12 +10136,23 @@ class Mortal177 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(177, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 177, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal177 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal177 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8222,12 +10177,23 @@ class Mortal178 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(178, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 178, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal178 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal178 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8252,12 +10218,23 @@ class Mortal179 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(179, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 179, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal179 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal179 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8282,12 +10259,23 @@ class Mortal180 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(180, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 180, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal180 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal180 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8312,12 +10300,23 @@ class Mortal181 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(181, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 181, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal181 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal181 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8342,12 +10341,23 @@ class Mortal182 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(182, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 182, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal182 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal182 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8372,12 +10382,23 @@ class Mortal183 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(183, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 183, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal183 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal183 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8402,12 +10423,23 @@ class Mortal184 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(184, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 184, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal184 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal184 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8432,12 +10464,23 @@ class Mortal185 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(185, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 185, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal185 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal185 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8462,12 +10505,23 @@ class Mortal186 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(186, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 186, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal186 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal186 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8492,12 +10546,23 @@ class Mortal187 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(187, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 187, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal187 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal187 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8522,12 +10587,23 @@ class Mortal188 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(188, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 188, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal188 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal188 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8552,12 +10628,23 @@ class Mortal189 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(189, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 189, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal189 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal189 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8582,12 +10669,23 @@ class Mortal190 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(190, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 190, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal190 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal190 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8612,12 +10710,23 @@ class Mortal191 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(191, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 191, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal191 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal191 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8642,12 +10751,23 @@ class Mortal192 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(192, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 192, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal192 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal192 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8672,12 +10792,23 @@ class Mortal193 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(193, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 193, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal193 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal193 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8702,12 +10833,23 @@ class Mortal194 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(194, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 194, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal194 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal194 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8732,12 +10874,23 @@ class Mortal195 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(195, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 195, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal195 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal195 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8762,12 +10915,23 @@ class Mortal196 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(196, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 196, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal196 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal196 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8792,12 +10956,23 @@ class Mortal197 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(197, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 197, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal197 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal197 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8822,12 +10997,23 @@ class Mortal198 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(198, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 198, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal198 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal198 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8852,12 +11038,23 @@ class Mortal199 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(199, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 199, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal199 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal199 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8882,12 +11079,23 @@ class Mortal200 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(200, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 200, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal200 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal200 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8912,12 +11120,23 @@ class Mortal201 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(201, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 201, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal201 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal201 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8942,12 +11161,23 @@ class Mortal202 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(202, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 202, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal202 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal202 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8972,12 +11202,23 @@ class Mortal203 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(203, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 203, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal203 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal203 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9002,12 +11243,23 @@ class Mortal204 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(204, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 204, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal204 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal204 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9032,12 +11284,23 @@ class Mortal205 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(205, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 205, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal205 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal205 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9062,12 +11325,23 @@ class Mortal206 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(206, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 206, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal206 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal206 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9092,12 +11366,23 @@ class Mortal207 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(207, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 207, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal207 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal207 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9122,12 +11407,23 @@ class Mortal208 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(208, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 208, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal208 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal208 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9152,12 +11448,23 @@ class Mortal209 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(209, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 209, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal209 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal209 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9182,12 +11489,23 @@ class Mortal210 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(210, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 210, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal210 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal210 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9212,12 +11530,23 @@ class Mortal211 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(211, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 211, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal211 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal211 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9242,12 +11571,23 @@ class Mortal212 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(212, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 212, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal212 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal212 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9272,12 +11612,23 @@ class Mortal213 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(213, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 213, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal213 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal213 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9302,12 +11653,23 @@ class Mortal214 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(214, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 214, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal214 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal214 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9332,12 +11694,23 @@ class Mortal215 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(215, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 215, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal215 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal215 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9362,12 +11735,23 @@ class Mortal216 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(216, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 216, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal216 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal216 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9392,12 +11776,23 @@ class Mortal217 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(217, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 217, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal217 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal217 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9422,12 +11817,23 @@ class Mortal218 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(218, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 218, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal218 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal218 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9452,12 +11858,23 @@ class Mortal219 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(219, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 219, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal219 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal219 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9482,12 +11899,23 @@ class Mortal220 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(220, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 220, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal220 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal220 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9512,12 +11940,23 @@ class Mortal221 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(221, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 221, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal221 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal221 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9542,12 +11981,23 @@ class Mortal222 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(222, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 222, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal222 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal222 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9572,12 +12022,23 @@ class Mortal223 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(223, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 223, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal223 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal223 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9602,12 +12063,23 @@ class Mortal224 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(224, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 224, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal224 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal224 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9632,12 +12104,23 @@ class Mortal225 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(225, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 225, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal225 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal225 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9662,12 +12145,23 @@ class Mortal226 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(226, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 226, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal226 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal226 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9692,12 +12186,23 @@ class Mortal227 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(227, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 227, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal227 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal227 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9722,12 +12227,23 @@ class Mortal228 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(228, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 228, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal228 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal228 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9752,12 +12268,23 @@ class Mortal229 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(229, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 229, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal229 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal229 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9782,12 +12309,23 @@ class Mortal230 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(230, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 230, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal230 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal230 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9812,12 +12350,23 @@ class Mortal231 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(231, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 231, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal231 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal231 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9842,12 +12391,23 @@ class Mortal232 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(232, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 232, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal232 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal232 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9872,12 +12432,23 @@ class Mortal233 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(233, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 233, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal233 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal233 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9902,12 +12473,23 @@ class Mortal234 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(234, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 234, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal234 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal234 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9932,12 +12514,23 @@ class Mortal235 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(235, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 235, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal235 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal235 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9962,12 +12555,23 @@ class Mortal236 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(236, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 236, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal236 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal236 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9992,12 +12596,23 @@ class Mortal237 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(237, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 237, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal237 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal237 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10022,12 +12637,23 @@ class Mortal238 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(238, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 238, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal238 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal238 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10052,12 +12678,23 @@ class Mortal239 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(239, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 239, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal239 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal239 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10082,12 +12719,23 @@ class Mortal240 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(240, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 240, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal240 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal240 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10112,12 +12760,23 @@ class Mortal241 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(241, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 241, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal241 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal241 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10142,12 +12801,23 @@ class Mortal242 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(242, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 242, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal242 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal242 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10172,12 +12842,23 @@ class Mortal243 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(243, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 243, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal243 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal243 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10202,12 +12883,23 @@ class Mortal244 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(244, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 244, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal244 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal244 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10232,12 +12924,23 @@ class Mortal245 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(245, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 245, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal245 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal245 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10262,12 +12965,23 @@ class Mortal246 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(246, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 246, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal246 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal246 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10292,12 +13006,23 @@ class Mortal247 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(247, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 247, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal247 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal247 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10322,12 +13047,23 @@ class Mortal248 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(248, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 248, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal248 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal248 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10352,12 +13088,23 @@ class Mortal249 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(249, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 249, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal249 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal249 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10382,12 +13129,23 @@ class Mortal250 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(250, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 250, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal250 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal250 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10412,12 +13170,23 @@ class Mortal251 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(251, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 251, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal251 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal251 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10442,12 +13211,23 @@ class Mortal252 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(252, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 252, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal252 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal252 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10472,12 +13252,23 @@ class Mortal253 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(253, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 253, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal253 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal253 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10502,12 +13293,23 @@ class Mortal254 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(254, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 254, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal254 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal254 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10532,12 +13334,23 @@ class Mortal255 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(255, output); - _i1.U8Codec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 255, + output, + ); + _i1.U8Codec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Mortal255 && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Mortal255 && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart index 23205b0a..09f50caf 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart @@ -12,8 +12,14 @@ class UncheckedExtrinsicCodec with _i1.Codec { } @override - void encodeTo(UncheckedExtrinsic value, _i1.Output output) { - _i1.U8SequenceCodec.codec.encodeTo(value, output); + void encodeTo( + UncheckedExtrinsic value, + _i1.Output output, + ) { + _i1.U8SequenceCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/module_error.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/module_error.dart index d1980872..6ed8f3d0 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/module_error.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/module_error.dart @@ -5,7 +5,10 @@ import 'package:polkadart/scale_codec.dart' as _i1; import 'package:quiver/collection.dart' as _i3; class ModuleError { - const ModuleError({required this.index, required this.error}); + const ModuleError({ + required this.index, + required this.error, + }); factory ModuleError.decode(_i1.Input input) { return codec.decode(input); @@ -23,28 +26,55 @@ class ModuleError { return codec.encode(this); } - Map toJson() => {'index': index, 'error': error.toList()}; + Map toJson() => { + 'index': index, + 'error': error.toList(), + }; @override bool operator ==(Object other) => - identical(this, other) || other is ModuleError && other.index == index && _i3.listsEqual(other.error, error); + identical( + this, + other, + ) || + other is ModuleError && + other.index == index && + _i3.listsEqual( + other.error, + error, + ); @override - int get hashCode => Object.hash(index, error); + int get hashCode => Object.hash( + index, + error, + ); } class $ModuleErrorCodec with _i1.Codec { const $ModuleErrorCodec(); @override - void encodeTo(ModuleError obj, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(obj.index, output); - const _i1.U8ArrayCodec(4).encodeTo(obj.error, output); + void encodeTo( + ModuleError obj, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + obj.index, + output, + ); + const _i1.U8ArrayCodec(4).encodeTo( + obj.error, + output, + ); } @override ModuleError decode(_i1.Input input) { - return ModuleError(index: _i1.U8Codec.codec.decode(input), error: const _i1.U8ArrayCodec(4).decode(input)); + return ModuleError( + index: _i1.U8Codec.codec.decode(input), + error: const _i1.U8ArrayCodec(4).decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/multiaddress/multi_address.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/multiaddress/multi_address.dart index 0466c0f0..03d9629e 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/multiaddress/multi_address.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/multiaddress/multi_address.dart @@ -77,7 +77,10 @@ class $MultiAddressCodec with _i1.Codec { } @override - void encodeTo(MultiAddress value, _i1.Output output) { + void encodeTo( + MultiAddress value, + _i1.Output output, + ) { switch (value.runtimeType) { case Id: (value as Id).encodeTo(output); @@ -95,7 +98,8 @@ class $MultiAddressCodec with _i1.Codec { (value as Address20).encodeTo(output); break; default: - throw Exception('MultiAddress: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'MultiAddress: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -113,7 +117,8 @@ class $MultiAddressCodec with _i1.Codec { case Address20: return (value as Address20)._sizeHint(); default: - throw Exception('MultiAddress: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'MultiAddress: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -138,12 +143,27 @@ class Id extends MultiAddress { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Id && _i4.listsEqual(other.value0, value0); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Id && + _i4.listsEqual( + other.value0, + value0, + ); @override int get hashCode => value0.hashCode; @@ -169,12 +189,23 @@ class Index extends MultiAddress { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.CompactBigIntCodec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Index && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Index && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -200,12 +231,27 @@ class Raw extends MultiAddress { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U8SequenceCodec.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U8SequenceCodec.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Raw && _i4.listsEqual(other.value0, value0); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Raw && + _i4.listsEqual( + other.value0, + value0, + ); @override int get hashCode => value0.hashCode; @@ -231,13 +277,27 @@ class Address32 extends MultiAddress { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + value0, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Address32 && _i4.listsEqual(other.value0, value0); + identical( + this, + other, + ) || + other is Address32 && + _i4.listsEqual( + other.value0, + value0, + ); @override int get hashCode => value0.hashCode; @@ -263,13 +323,27 @@ class Address20 extends MultiAddress { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - const _i1.U8ArrayCodec(20).encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + const _i1.U8ArrayCodec(20).encodeTo( + value0, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Address20 && _i4.listsEqual(other.value0, value0); + identical( + this, + other, + ) || + other is Address20 && + _i4.listsEqual( + other.value0, + value0, + ); @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/proving_trie/trie_error.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/proving_trie/trie_error.dart index f10fe5c0..ca47ce4a 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/proving_trie/trie_error.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/proving_trie/trie_error.dart @@ -19,7 +19,10 @@ enum TrieError { rootMismatch('RootMismatch', 12), decodeError('DecodeError', 13); - const TrieError(this.variantName, this.codecIndex); + const TrieError( + this.variantName, + this.codecIndex, + ); factory TrieError.decode(_i1.Input input) { return codec.decode(input); @@ -79,7 +82,13 @@ class $TrieErrorCodec with _i1.Codec { } @override - void encodeTo(TrieError value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + TrieError value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/token_error.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/token_error.dart index 38bb9f28..ce20c896 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/token_error.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/token_error.dart @@ -15,7 +15,10 @@ enum TokenError { notExpendable('NotExpendable', 8), blocked('Blocked', 9); - const TokenError(this.variantName, this.codecIndex); + const TokenError( + this.variantName, + this.codecIndex, + ); factory TokenError.decode(_i1.Input input) { return codec.decode(input); @@ -67,7 +70,13 @@ class $TokenErrorCodec with _i1.Codec { } @override - void encodeTo(TokenError value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + TokenError value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/traits/blake_two256.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/traits/blake_two256.dart index dfd26532..84c37e18 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/traits/blake_two256.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/traits/blake_two256.dart @@ -12,8 +12,14 @@ class BlakeTwo256Codec with _i1.Codec { } @override - void encodeTo(BlakeTwo256 value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); + void encodeTo( + BlakeTwo256 value, + _i1.Output output, + ) { + _i1.NullCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/transactional_error.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/transactional_error.dart index f556271e..4f46f439 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/transactional_error.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/transactional_error.dart @@ -7,7 +7,10 @@ enum TransactionalError { limitReached('LimitReached', 0), noLayer('NoLayer', 1); - const TransactionalError(this.variantName, this.codecIndex); + const TransactionalError( + this.variantName, + this.codecIndex, + ); factory TransactionalError.decode(_i1.Input input) { return codec.decode(input); @@ -43,7 +46,13 @@ class $TransactionalErrorCodec with _i1.Codec { } @override - void encodeTo(TransactionalError value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + TransactionalError value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/planck/types/sp_version/runtime_version.dart b/quantus_sdk/lib/generated/planck/types/sp_version/runtime_version.dart index 9d10f100..f5a580ba 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_version/runtime_version.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_version/runtime_version.dart @@ -55,57 +55,97 @@ class RuntimeVersion { } Map toJson() => { - 'specName': specName, - 'implName': implName, - 'authoringVersion': authoringVersion, - 'specVersion': specVersion, - 'implVersion': implVersion, - 'apis': apis.map((value) => [value.value0.toList(), value.value1]).toList(), - 'transactionVersion': transactionVersion, - 'systemVersion': systemVersion, - }; + 'specName': specName, + 'implName': implName, + 'authoringVersion': authoringVersion, + 'specVersion': specVersion, + 'implVersion': implVersion, + 'apis': apis + .map((value) => [ + value.value0.toList(), + value.value1, + ]) + .toList(), + 'transactionVersion': transactionVersion, + 'systemVersion': systemVersion, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is RuntimeVersion && other.specName == specName && other.implName == implName && other.authoringVersion == authoringVersion && other.specVersion == specVersion && other.implVersion == implVersion && - _i5.listsEqual(other.apis, apis) && + _i5.listsEqual( + other.apis, + apis, + ) && other.transactionVersion == transactionVersion && other.systemVersion == systemVersion; @override int get hashCode => Object.hash( - specName, - implName, - authoringVersion, - specVersion, - implVersion, - apis, - transactionVersion, - systemVersion, - ); + specName, + implName, + authoringVersion, + specVersion, + implVersion, + apis, + transactionVersion, + systemVersion, + ); } class $RuntimeVersionCodec with _i1.Codec { const $RuntimeVersionCodec(); @override - void encodeTo(RuntimeVersion obj, _i1.Output output) { - _i1.StrCodec.codec.encodeTo(obj.specName, output); - _i1.StrCodec.codec.encodeTo(obj.implName, output); - _i1.U32Codec.codec.encodeTo(obj.authoringVersion, output); - _i1.U32Codec.codec.encodeTo(obj.specVersion, output); - _i1.U32Codec.codec.encodeTo(obj.implVersion, output); + void encodeTo( + RuntimeVersion obj, + _i1.Output output, + ) { + _i1.StrCodec.codec.encodeTo( + obj.specName, + output, + ); + _i1.StrCodec.codec.encodeTo( + obj.implName, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.authoringVersion, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.specVersion, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.implVersion, + output, + ); const _i1.SequenceCodec<_i6.Tuple2, int>>( - _i6.Tuple2Codec, int>(_i1.U8ArrayCodec(8), _i1.U32Codec.codec), - ).encodeTo(obj.apis, output); - _i1.U32Codec.codec.encodeTo(obj.transactionVersion, output); - _i1.U8Codec.codec.encodeTo(obj.systemVersion, output); + _i6.Tuple2Codec, int>( + _i1.U8ArrayCodec(8), + _i1.U32Codec.codec, + )).encodeTo( + obj.apis, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.transactionVersion, + output, + ); + _i1.U8Codec.codec.encodeTo( + obj.systemVersion, + output, + ); } @override @@ -117,8 +157,10 @@ class $RuntimeVersionCodec with _i1.Codec { specVersion: _i1.U32Codec.codec.decode(input), implVersion: _i1.U32Codec.codec.decode(input), apis: const _i1.SequenceCodec<_i6.Tuple2, int>>( - _i6.Tuple2Codec, int>(_i1.U8ArrayCodec(8), _i1.U32Codec.codec), - ).decode(input), + _i6.Tuple2Codec, int>( + _i1.U8ArrayCodec(8), + _i1.U32Codec.codec, + )).decode(input), transactionVersion: _i1.U32Codec.codec.decode(input), systemVersion: _i1.U8Codec.codec.decode(input), ); diff --git a/quantus_sdk/lib/generated/planck/types/sp_weights/runtime_db_weight.dart b/quantus_sdk/lib/generated/planck/types/sp_weights/runtime_db_weight.dart index aac5361b..ad7cd305 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_weights/runtime_db_weight.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_weights/runtime_db_weight.dart @@ -4,7 +4,10 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class RuntimeDbWeight { - const RuntimeDbWeight({required this.read, required this.write}); + const RuntimeDbWeight({ + required this.read, + required this.write, + }); factory RuntimeDbWeight.decode(_i1.Input input) { return codec.decode(input); @@ -22,28 +25,50 @@ class RuntimeDbWeight { return codec.encode(this); } - Map toJson() => {'read': read, 'write': write}; + Map toJson() => { + 'read': read, + 'write': write, + }; @override bool operator ==(Object other) => - identical(this, other) || other is RuntimeDbWeight && other.read == read && other.write == write; + identical( + this, + other, + ) || + other is RuntimeDbWeight && other.read == read && other.write == write; @override - int get hashCode => Object.hash(read, write); + int get hashCode => Object.hash( + read, + write, + ); } class $RuntimeDbWeightCodec with _i1.Codec { const $RuntimeDbWeightCodec(); @override - void encodeTo(RuntimeDbWeight obj, _i1.Output output) { - _i1.U64Codec.codec.encodeTo(obj.read, output); - _i1.U64Codec.codec.encodeTo(obj.write, output); + void encodeTo( + RuntimeDbWeight obj, + _i1.Output output, + ) { + _i1.U64Codec.codec.encodeTo( + obj.read, + output, + ); + _i1.U64Codec.codec.encodeTo( + obj.write, + output, + ); } @override RuntimeDbWeight decode(_i1.Input input) { - return RuntimeDbWeight(read: _i1.U64Codec.codec.decode(input), write: _i1.U64Codec.codec.decode(input)); + return RuntimeDbWeight( + read: _i1.U64Codec.codec.decode(input), + write: _i1.U64Codec.codec.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_weights/weight_v2/weight.dart b/quantus_sdk/lib/generated/planck/types/sp_weights/weight_v2/weight.dart index 8d9a8883..7d7e8599 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_weights/weight_v2/weight.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_weights/weight_v2/weight.dart @@ -4,7 +4,10 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class Weight { - const Weight({required this.refTime, required this.proofSize}); + const Weight({ + required this.refTime, + required this.proofSize, + }); factory Weight.decode(_i1.Input input) { return codec.decode(input); @@ -22,23 +25,44 @@ class Weight { return codec.encode(this); } - Map toJson() => {'refTime': refTime, 'proofSize': proofSize}; + Map toJson() => { + 'refTime': refTime, + 'proofSize': proofSize, + }; @override bool operator ==(Object other) => - identical(this, other) || other is Weight && other.refTime == refTime && other.proofSize == proofSize; + identical( + this, + other, + ) || + other is Weight && + other.refTime == refTime && + other.proofSize == proofSize; @override - int get hashCode => Object.hash(refTime, proofSize); + int get hashCode => Object.hash( + refTime, + proofSize, + ); } class $WeightCodec with _i1.Codec { const $WeightCodec(); @override - void encodeTo(Weight obj, _i1.Output output) { - _i1.CompactBigIntCodec.codec.encodeTo(obj.refTime, output); - _i1.CompactBigIntCodec.codec.encodeTo(obj.proofSize, output); + void encodeTo( + Weight obj, + _i1.Output output, + ) { + _i1.CompactBigIntCodec.codec.encodeTo( + obj.refTime, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + obj.proofSize, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/tuples.dart b/quantus_sdk/lib/generated/planck/types/tuples.dart index 2f309fdb..b42e59e2 100644 --- a/quantus_sdk/lib/generated/planck/types/tuples.dart +++ b/quantus_sdk/lib/generated/planck/types/tuples.dart @@ -2,7 +2,10 @@ import 'package:polkadart/scale_codec.dart' as _i1; class Tuple2 { - const Tuple2(this.value0, this.value1); + const Tuple2( + this.value0, + this.value1, + ); final T0 value0; @@ -10,21 +13,30 @@ class Tuple2 { } class Tuple2Codec with _i1.Codec> { - const Tuple2Codec(this.codec0, this.codec1); + const Tuple2Codec( + this.codec0, + this.codec1, + ); final _i1.Codec codec0; final _i1.Codec codec1; @override - void encodeTo(Tuple2 tuple, _i1.Output output) { + void encodeTo( + Tuple2 tuple, + _i1.Output output, + ) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); } @override Tuple2 decode(_i1.Input input) { - return Tuple2(codec0.decode(input), codec1.decode(input)); + return Tuple2( + codec0.decode(input), + codec1.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/tuples_1.dart b/quantus_sdk/lib/generated/planck/types/tuples_1.dart index 2f309fdb..b42e59e2 100644 --- a/quantus_sdk/lib/generated/planck/types/tuples_1.dart +++ b/quantus_sdk/lib/generated/planck/types/tuples_1.dart @@ -2,7 +2,10 @@ import 'package:polkadart/scale_codec.dart' as _i1; class Tuple2 { - const Tuple2(this.value0, this.value1); + const Tuple2( + this.value0, + this.value1, + ); final T0 value0; @@ -10,21 +13,30 @@ class Tuple2 { } class Tuple2Codec with _i1.Codec> { - const Tuple2Codec(this.codec0, this.codec1); + const Tuple2Codec( + this.codec0, + this.codec1, + ); final _i1.Codec codec0; final _i1.Codec codec1; @override - void encodeTo(Tuple2 tuple, _i1.Output output) { + void encodeTo( + Tuple2 tuple, + _i1.Output output, + ) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); } @override Tuple2 decode(_i1.Input input) { - return Tuple2(codec0.decode(input), codec1.decode(input)); + return Tuple2( + codec0.decode(input), + codec1.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/tuples_2.dart b/quantus_sdk/lib/generated/planck/types/tuples_2.dart index aa48d3ff..e56f1a7f 100644 --- a/quantus_sdk/lib/generated/planck/types/tuples_2.dart +++ b/quantus_sdk/lib/generated/planck/types/tuples_2.dart @@ -2,7 +2,11 @@ import 'package:polkadart/scale_codec.dart' as _i1; class Tuple3 { - const Tuple3(this.value0, this.value1, this.value2); + const Tuple3( + this.value0, + this.value1, + this.value2, + ); final T0 value0; @@ -12,7 +16,11 @@ class Tuple3 { } class Tuple3Codec with _i1.Codec> { - const Tuple3Codec(this.codec0, this.codec1, this.codec2); + const Tuple3Codec( + this.codec0, + this.codec1, + this.codec2, + ); final _i1.Codec codec0; @@ -21,7 +29,10 @@ class Tuple3Codec with _i1.Codec> { final _i1.Codec codec2; @override - void encodeTo(Tuple3 tuple, _i1.Output output) { + void encodeTo( + Tuple3 tuple, + _i1.Output output, + ) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); codec2.encodeTo(tuple.value2, output); @@ -29,7 +40,11 @@ class Tuple3Codec with _i1.Codec> { @override Tuple3 decode(_i1.Input input) { - return Tuple3(codec0.decode(input), codec1.decode(input), codec2.decode(input)); + return Tuple3( + codec0.decode(input), + codec1.decode(input), + codec2.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/planck/types/tuples_3.dart b/quantus_sdk/lib/generated/planck/types/tuples_3.dart index 34780bfb..0e72ed5f 100644 --- a/quantus_sdk/lib/generated/planck/types/tuples_3.dart +++ b/quantus_sdk/lib/generated/planck/types/tuples_3.dart @@ -78,7 +78,10 @@ class Tuple11Codec final _i1.Codec codec10; @override - void encodeTo(Tuple11 tuple, _i1.Output output) { + void encodeTo( + Tuple11 tuple, + _i1.Output output, + ) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); codec2.encodeTo(tuple.value2, output); diff --git a/quantus_sdk/lib/src/models/multisig_create_submission.dart b/quantus_sdk/lib/src/models/multisig_create_submission.dart index df46a7ee..8f3580a4 100644 --- a/quantus_sdk/lib/src/models/multisig_create_submission.dart +++ b/quantus_sdk/lib/src/models/multisig_create_submission.dart @@ -29,7 +29,7 @@ class MultisigAlreadyExistsException implements Exception { String toString() => 'Multisig already exists at $address'; } -/// Thrown when the creator cannot cover pallet fee, network fee, and deposit. +/// Thrown when the creator cannot cover pallet fee and network fee. class MultisigInsufficientBalanceException implements Exception { MultisigInsufficientBalanceException({required this.balance, required this.required}); diff --git a/quantus_sdk/lib/src/models/multisig_created_event.dart b/quantus_sdk/lib/src/models/multisig_created_event.dart index 348c3697..ea48e6f8 100644 --- a/quantus_sdk/lib/src/models/multisig_created_event.dart +++ b/quantus_sdk/lib/src/models/multisig_created_event.dart @@ -13,7 +13,6 @@ class MultisigCreatedEvent extends MultisigCreationEvent { required super.signers, required super.palletFee, required super.networkFee, - required super.deposit, required super.timestamp, required super.blockNumber, required super.blockHash, @@ -40,7 +39,6 @@ class MultisigCreatedEvent extends MultisigCreationEvent { signers: fields.signers, palletFee: fields.palletFee, networkFee: fields.networkFee, - deposit: fields.deposit, blockHash: blockHash, timestamp: timestamp ?? DateTime.now(), blockNumber: 0, @@ -78,7 +76,6 @@ class MultisigCreatedEvent extends MultisigCreationEvent { signers: signers, palletFee: MultisigCreationEvent.palletConstants.multisigFee, networkFee: _networkFeeFromGraphql(multisig), - deposit: MultisigCreationEvent.palletConstants.multisigDeposit, timestamp: accountEventTimestamp ?? dateTimeFromJson(multisig['timestamp']), blockNumber: blockHeightFromJsonMap(block), blockHash: blockHashFromJsonMap(block), @@ -101,6 +98,6 @@ class MultisigCreatedEvent extends MultisigCreationEvent { @override String toString() { return 'MultisigCreated{id: $id, creator: $creatorId, address: $multisigAddress, ' - 'threshold: $threshold, palletFee: $palletFee, networkFee: $networkFee, deposit: $deposit}'; + 'threshold: $threshold, palletFee: $palletFee, networkFee: $networkFee}'; } } diff --git a/quantus_sdk/lib/src/models/multisig_creation_event.dart b/quantus_sdk/lib/src/models/multisig_creation_event.dart index f5ac9e43..6e5bf9c4 100644 --- a/quantus_sdk/lib/src/models/multisig_creation_event.dart +++ b/quantus_sdk/lib/src/models/multisig_creation_event.dart @@ -12,9 +12,8 @@ abstract class MultisigCreationEvent extends TransactionEvent { final List signers; final BigInt palletFee; final BigInt networkFee; - final BigInt deposit; - BigInt get totalCost => palletFee + networkFee + deposit; + BigInt get totalCost => palletFee + networkFee; MultisigCreationEvent({ required super.id, @@ -25,12 +24,11 @@ abstract class MultisigCreationEvent extends TransactionEvent { required this.signers, required this.palletFee, required this.networkFee, - required this.deposit, required super.timestamp, required super.blockNumber, super.blockHash, super.extrinsicHash, - }) : super(from: creatorId, to: multisigAddress, amount: palletFee + networkFee + deposit); + }) : super(from: creatorId, to: multisigAddress, amount: palletFee + networkFee); bool isCreator(String accountId) => creatorId == accountId; } @@ -45,7 +43,6 @@ class MultisigCreationDraftFields { required this.signers, required this.palletFee, required this.networkFee, - required this.deposit, }); final String creatorId; @@ -55,9 +52,8 @@ class MultisigCreationDraftFields { final List signers; final BigInt palletFee; final BigInt networkFee; - final BigInt deposit; - BigInt get totalCost => palletFee + networkFee + deposit; + BigInt get totalCost => palletFee + networkFee; factory MultisigCreationDraftFields.fromDraft(MultisigAccount draft, {required BigInt networkFee}) { return MultisigCreationDraftFields( @@ -68,7 +64,6 @@ class MultisigCreationDraftFields { signers: List.from(draft.signers), palletFee: MultisigCreationEvent.palletConstants.multisigFee, networkFee: networkFee, - deposit: MultisigCreationEvent.palletConstants.multisigDeposit, ); } } diff --git a/quantus_sdk/lib/src/models/pending_multisig_creation_event.dart b/quantus_sdk/lib/src/models/pending_multisig_creation_event.dart index a62713c6..bd2ed4ad 100644 --- a/quantus_sdk/lib/src/models/pending_multisig_creation_event.dart +++ b/quantus_sdk/lib/src/models/pending_multisig_creation_event.dart @@ -11,7 +11,6 @@ class PendingMultisigCreationEvent extends MultisigCreationEvent { required super.signers, required super.palletFee, required super.networkFee, - required super.deposit, required super.timestamp, super.extrinsicHash, }) : super(id: tempId, blockNumber: 0); @@ -28,7 +27,6 @@ class PendingMultisigCreationEvent extends MultisigCreationEvent { signers: fields.signers, palletFee: fields.palletFee, networkFee: fields.networkFee, - deposit: fields.deposit, timestamp: DateTime.now(), ); } diff --git a/quantus_sdk/lib/src/services/high_security_service.dart b/quantus_sdk/lib/src/services/high_security_service.dart index 58b6618d..52043310 100644 --- a/quantus_sdk/lib/src/services/high_security_service.dart +++ b/quantus_sdk/lib/src/services/high_security_service.dart @@ -77,7 +77,7 @@ class HighSecurityService { final hsData = await _reversibleTransfersService.getHighSecurityConfig(address); print('getHighSecurityConfig: $address -> $hsData'); if (hsData != null) { - final accountId = AddressExtension.ss58AddressFromBytes(Uint8List.fromList(hsData.interceptor)); + final accountId = AddressExtension.ss58AddressFromBytes(Uint8List.fromList(hsData.guardian)); if (hsData.delay is! qp.Timestamp) { throw ArgumentError('Expected timestamp delay, got block number'); } diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index b6e0b80f..8247521e 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -215,7 +215,7 @@ class ReversibleTransfersService { // Create the call ReversibleTransfers call = quantusApi.tx.reversibleTransfers.setHighSecurity( delay: delay, - interceptor: guardianAccountId32, + guardian: guardianAccountId32, ); print('Encoded Call: ${call.encode()}'); print('Encoded Call Hex: ${hex.encode(call.encode())}'); @@ -258,7 +258,7 @@ class ReversibleTransfersService { try { final quantusApi = Planck(_substrateService.provider!); final accountId = crypto.ss58ToAccountId(s: guardianAddress); - final interceptedAccounts = await quantusApi.query.reversibleTransfers.interceptorIndex(accountId); + final interceptedAccounts = await quantusApi.query.reversibleTransfers.guardianIndex(accountId); List result = interceptedAccounts.map((id) { final address = AddressExtension.ss58AddressFromBytes(Uint8List.fromList(id)); @@ -285,7 +285,7 @@ class ReversibleTransfersService { final quantusApi = Planck(_substrateService.provider!); final call = quantusApi.tx.reversibleTransfers.setHighSecurity( delay: delay, - interceptor: crypto.ss58ToAccountId(s: guardianAccountId), + guardian: crypto.ss58ToAccountId(s: guardianAccountId), ); return _substrateService.getFeeForCall(account, call); } diff --git a/quantus_sdk/pubspec.yaml b/quantus_sdk/pubspec.yaml index 175722fb..72ba1ef3 100644 --- a/quantus_sdk/pubspec.yaml +++ b/quantus_sdk/pubspec.yaml @@ -55,4 +55,4 @@ dev_dependencies: polkadart: output_dir: lib/generated chains: - planck: wss://a1-planck.quantus.cat + planck: ws://127.0.0.1:9944 diff --git a/quantus_sdk/test/chain_history_service_test.dart b/quantus_sdk/test/chain_history_service_test.dart index 0645c983..1997d3b6 100644 --- a/quantus_sdk/test/chain_history_service_test.dart +++ b/quantus_sdk/test/chain_history_service_test.dart @@ -210,7 +210,6 @@ void main() { expect(event.signers, hasLength(3)); expect(event.palletFee, multisig_pallet.Constants().multisigFee); expect(event.networkFee, BigInt.parse('8120809264')); - expect(event.deposit, multisig_pallet.Constants().multisigDeposit); expect(event.extrinsicHash, '0xea4400ec3247fc75b7187b6f6d83a89905017d1136c894e625a3c43a688606b9'); }); }); @@ -260,7 +259,7 @@ void main() { expect(withFee.palletFee, multisig_pallet.Constants().multisigFee); expect(withFee.networkFee, BigInt.parse('8120809264')); - expect(withFee.totalCost, withFee.palletFee + withFee.networkFee + withFee.deposit); + expect(withFee.totalCost, withFee.palletFee + withFee.networkFee); }); }); } From c685b7cbc9ae52af28e3739e9a84811216bf0d98 Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 19:01:23 +0800 Subject: [PATCH 08/18] fix: live state resolution and update executed proposal UI --- mobile-app/lib/l10n/app_en.arb | 4 +++ mobile-app/lib/l10n/app_id.arb | 1 + mobile-app/lib/l10n/app_localizations.dart | 6 ++++ mobile-app/lib/l10n/app_localizations_en.dart | 3 ++ mobile-app/lib/l10n/app_localizations_id.dart | 3 ++ .../multisig_proposal_detail_sheet.dart | 36 ++++++++++++++++--- 6 files changed, 48 insertions(+), 5 deletions(-) diff --git a/mobile-app/lib/l10n/app_en.arb b/mobile-app/lib/l10n/app_en.arb index fe3519b9..f900d4b9 100644 --- a/mobile-app/lib/l10n/app_en.arb +++ b/mobile-app/lib/l10n/app_en.arb @@ -655,6 +655,10 @@ "@multisigProposalAlreadySignedNote": { "description": "Note shown when the current member already approved" }, + "multisigProposalAlreadyExecutedNote": "This proposal is already executed.", + "@multisigProposalAlreadyExecutedNote": { + "description": "Note shown on proposal detail when the proposal is executed" + }, "multisigProposalProposerLabel": "PROPOSER", "@multisigProposalProposerLabel": { "description": "Proposer row label on proposal detail" diff --git a/mobile-app/lib/l10n/app_id.arb b/mobile-app/lib/l10n/app_id.arb index 3e234e42..dc260440 100644 --- a/mobile-app/lib/l10n/app_id.arb +++ b/mobile-app/lib/l10n/app_id.arb @@ -149,6 +149,7 @@ "activityTxApproving": "Menyetujui…", "multisigApprovalTimeoutToast": "Konfirmasi persetujuan membutuhkan waktu lebih lama. Periksa chain atau coba lagi.", "multisigProposalAlreadySignedNote": "Anda sudah menyetujui proposal ini.", + "multisigProposalAlreadyExecutedNote": "Proposal ini sudah dieksekusi.", "multisigProposalProposerLabel": "PENGAJU", "multisigProposalStatusLabel": "STATUS", "multisigProposalDepositLabel": "DEPOSIT", diff --git a/mobile-app/lib/l10n/app_localizations.dart b/mobile-app/lib/l10n/app_localizations.dart index 1159484f..db354846 100644 --- a/mobile-app/lib/l10n/app_localizations.dart +++ b/mobile-app/lib/l10n/app_localizations.dart @@ -926,6 +926,12 @@ abstract class AppLocalizations { /// **'You\'ve already approved this proposal.'** String get multisigProposalAlreadySignedNote; + /// Note shown on proposal detail when the proposal is executed + /// + /// In en, this message translates to: + /// **'This proposal is already executed.'** + String get multisigProposalAlreadyExecutedNote; + /// Proposer row label on proposal detail /// /// In en, this message translates to: diff --git a/mobile-app/lib/l10n/app_localizations_en.dart b/mobile-app/lib/l10n/app_localizations_en.dart index 5caf2d18..797a0920 100644 --- a/mobile-app/lib/l10n/app_localizations_en.dart +++ b/mobile-app/lib/l10n/app_localizations_en.dart @@ -463,6 +463,9 @@ class AppLocalizationsEn extends AppLocalizations { @override String get multisigProposalAlreadySignedNote => 'You\'ve already approved this proposal.'; + @override + String get multisigProposalAlreadyExecutedNote => 'This proposal is already executed.'; + @override String get multisigProposalProposerLabel => 'PROPOSER'; diff --git a/mobile-app/lib/l10n/app_localizations_id.dart b/mobile-app/lib/l10n/app_localizations_id.dart index 39b45e65..fa0f93e9 100644 --- a/mobile-app/lib/l10n/app_localizations_id.dart +++ b/mobile-app/lib/l10n/app_localizations_id.dart @@ -465,6 +465,9 @@ class AppLocalizationsId extends AppLocalizations { @override String get multisigProposalAlreadySignedNote => 'Anda sudah menyetujui proposal ini.'; + @override + String get multisigProposalAlreadyExecutedNote => 'Proposal ini sudah dieksekusi.'; + @override String get multisigProposalProposerLabel => 'PENGAJU'; diff --git a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart index 5d2d71ef..2af76e32 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart @@ -47,13 +47,27 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { const _MultisigProposalDetailSheet({required this.msig, required this.proposal}); MultisigProposal _resolveLiveProposal(WidgetRef ref) { - final open = ref.watch(multisigOpenProposalsProvider(msig)).value; - if (open == null) return proposal; - for (final p in open) { - if (p.id == proposal.id && p.multisigAddress == proposal.multisigAddress) { - return p; + MultisigProposal? findMatch(Iterable proposals) { + for (final p in proposals) { + if (p.id == proposal.id && p.multisigAddress == proposal.multisigAddress) { + return p; + } } + return null; + } + + final open = ref.watch(multisigOpenProposalsProvider(msig)).value; + if (open != null) { + final match = findMatch(open); + if (match != null) return match; + } + + final past = ref.watch(multisigPastProposalsProvider(msig)).value; + if (past != null) { + final match = findMatch(past); + if (match != null) return match; } + return proposal; } @@ -271,6 +285,10 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { required bool hasLocalSigner, required bool isActionable, }) { + if (liveProposal.status == MultisigProposalStatus.executed) { + return _noteOnlySection(colors, text, l10n.multisigProposalAlreadyExecutedNote); + } + if (liveProposal.isReadyToExecute) { return _executeSection( context, @@ -366,6 +384,14 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { return _actionButtonColumn(l10n, colors, text, label: label, isDisabled: isDisabled, onTap: onTap, note: note); } + Widget _noteOnlySection(AppColorsV2 colors, AppTextTheme text, String note) { + return Text( + note, + textAlign: TextAlign.center, + style: text.detail?.copyWith(color: colors.textTertiary), + ); + } + Widget _actionButtonColumn( AppLocalizations l10n, AppColorsV2 colors, From 5dba26ec564ff499a4523d1eeccac0e9e4bc1c8c Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 19:59:06 +0800 Subject: [PATCH 09/18] feat: improve UX executed proposals --- mobile-app/lib/l10n/app_en.arb | 4 ++ mobile-app/lib/l10n/app_id.arb | 1 + mobile-app/lib/l10n/app_localizations.dart | 6 ++ mobile-app/lib/l10n/app_localizations_en.dart | 3 + mobile-app/lib/l10n/app_localizations_id.dart | 3 + .../multisig/multisig_activity_section.dart | 3 +- .../multisig_proposal_detail_sheet.dart | 21 ++++--- .../lib/src/models/multisig_proposal.dart | 8 ++- .../src/models/multisig_proposal_event.dart | 2 +- .../lib/src/services/multisig_graphql.dart | 5 +- quantus_sdk/test/multisig_service_test.dart | 61 ++++++++++++++++++- 11 files changed, 103 insertions(+), 14 deletions(-) diff --git a/mobile-app/lib/l10n/app_en.arb b/mobile-app/lib/l10n/app_en.arb index f900d4b9..0772253a 100644 --- a/mobile-app/lib/l10n/app_en.arb +++ b/mobile-app/lib/l10n/app_en.arb @@ -719,6 +719,10 @@ "@multisigProposalExpiresLabel": { "description": "Expires row label on proposal detail" }, + "multisigProposalAtLabel": "AT", + "@multisigProposalAtLabel": { + "description": "Timestamp row label on past proposal detail" + }, "multisigProposalThresholdLabel": "THRESHOLD", "@multisigProposalThresholdLabel": { "description": "Threshold row label on proposal detail" diff --git a/mobile-app/lib/l10n/app_id.arb b/mobile-app/lib/l10n/app_id.arb index dc260440..1f5e2a60 100644 --- a/mobile-app/lib/l10n/app_id.arb +++ b/mobile-app/lib/l10n/app_id.arb @@ -165,6 +165,7 @@ "multisigAlreadyApproved": "Sudah Disetujui", "multisigCancelProposalButton": "Batalkan Proposal", "multisigProposalExpiresLabel": "KEDALUWARSA", + "multisigProposalAtLabel": "PADA", "multisigProposalThresholdLabel": "AMBANG", "multisigProposalApprovalsLabel": "PERSETUJUAN", "multisigProposalFeeRowLabel": "BIAYA PROPOSAL", diff --git a/mobile-app/lib/l10n/app_localizations.dart b/mobile-app/lib/l10n/app_localizations.dart index db354846..1d5c94c0 100644 --- a/mobile-app/lib/l10n/app_localizations.dart +++ b/mobile-app/lib/l10n/app_localizations.dart @@ -1022,6 +1022,12 @@ abstract class AppLocalizations { /// **'EXPIRES'** String get multisigProposalExpiresLabel; + /// Timestamp row label on past proposal detail + /// + /// In en, this message translates to: + /// **'AT'** + String get multisigProposalAtLabel; + /// Threshold row label on proposal detail /// /// In en, this message translates to: diff --git a/mobile-app/lib/l10n/app_localizations_en.dart b/mobile-app/lib/l10n/app_localizations_en.dart index 797a0920..641ec054 100644 --- a/mobile-app/lib/l10n/app_localizations_en.dart +++ b/mobile-app/lib/l10n/app_localizations_en.dart @@ -511,6 +511,9 @@ class AppLocalizationsEn extends AppLocalizations { @override String get multisigProposalExpiresLabel => 'EXPIRES'; + @override + String get multisigProposalAtLabel => 'AT'; + @override String get multisigProposalThresholdLabel => 'THRESHOLD'; diff --git a/mobile-app/lib/l10n/app_localizations_id.dart b/mobile-app/lib/l10n/app_localizations_id.dart index fa0f93e9..6cef539f 100644 --- a/mobile-app/lib/l10n/app_localizations_id.dart +++ b/mobile-app/lib/l10n/app_localizations_id.dart @@ -513,6 +513,9 @@ class AppLocalizationsId extends AppLocalizations { @override String get multisigProposalExpiresLabel => 'KEDALUWARSA'; + @override + String get multisigProposalAtLabel => 'PADA'; + @override String get multisigProposalThresholdLabel => 'AMBANG'; diff --git a/mobile-app/lib/v2/screens/multisig/multisig_activity_section.dart b/mobile-app/lib/v2/screens/multisig/multisig_activity_section.dart index 33765d72..5489f0de 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_activity_section.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_activity_section.dart @@ -70,7 +70,8 @@ class MultisigActivitySection extends ConsumerWidget { ); } - final openProposals = openProposalsAsync.value ?? const []; + final openProposals = [...(openProposalsAsync.value ?? const [])] + ..sort((a, b) => b.updatedAt.compareTo(a.updatedAt)); if (pending.isEmpty && openProposals.isEmpty) { return Text(l10n.multisigNoOpenProposals, style: text.smallParagraph?.copyWith(color: colors.textTertiary)); } diff --git a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart index 2af76e32..dd16b56d 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart @@ -173,18 +173,25 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { multisigService: multisigService, currentBlock: currentBlock, ); + final isTerminal = liveProposal.isTerminal; return Column( children: [ DetailSummaryRow(label: l10n.activityDetailTo, value: recipient), - DetailSummaryRow( - label: l10n.multisigProposalExpiresLabel, - valueWidget: MultisigExpiryValue( - parts: expiryParts, - style: text.transactionDetailRowValue?.copyWith(color: Colors.white.withValues(alpha: 0.8)), + if (isTerminal) + DetailSummaryRow( + label: l10n.multisigProposalAtLabel, + value: DatetimeFormattingService.formatTxDateTime(liveProposal.updatedAt), + ) + else + DetailSummaryRow( + label: l10n.multisigProposalExpiresLabel, + valueWidget: MultisigExpiryValue( + parts: expiryParts, + style: text.transactionDetailRowValue?.copyWith(color: Colors.white.withValues(alpha: 0.8)), + ), + valueFlex: 4, ), - valueFlex: 4, - ), DetailSummaryRow( label: l10n.multisigProposalProposerLabel, value: AddressFormattingService.formatActivityDetailAddress(liveProposal.proposer), diff --git a/quantus_sdk/lib/src/models/multisig_proposal.dart b/quantus_sdk/lib/src/models/multisig_proposal.dart index 01b042ac..f582a76b 100644 --- a/quantus_sdk/lib/src/models/multisig_proposal.dart +++ b/quantus_sdk/lib/src/models/multisig_proposal.dart @@ -24,6 +24,9 @@ class MultisigProposal { final String proposer; final DateTime createdAt; + /// Last on-chain update (approval, execution, cancellation, etc.). + final DateTime updatedAt; + /// Decoded pallet name (e.g. `Balances`). Empty when undecodable. final String pallet; @@ -62,6 +65,7 @@ class MultisigProposal { required this.multisigAddress, required this.proposer, required this.createdAt, + required this.updatedAt, required this.pallet, required this.call, required this.callRaw, @@ -95,7 +99,8 @@ class MultisigProposal { id: _intFromJson(record['proposal_id'] ?? record['proposalId']), multisigAddress: msig.accountId, proposer: nestedAccountId(record['proposer']), - createdAt: dateTimeFromJson(record['created_at'] ?? record['createdAt']), + createdAt: dateTimeFromJson(record['created_at']), + updatedAt: dateTimeFromJson(record['updated_at']), pallet: _stringOrEmpty(record['pallet']), call: _stringOrEmpty(record['call']), callRaw: _stringOrEmpty(record['call_raw'] ?? record['callRaw']), @@ -176,6 +181,7 @@ class MultisigProposal { multisigAddress: multisigAddress, proposer: proposer, createdAt: createdAt, + updatedAt: updatedAt, pallet: pallet, call: call, callRaw: callRaw, diff --git a/quantus_sdk/lib/src/models/multisig_proposal_event.dart b/quantus_sdk/lib/src/models/multisig_proposal_event.dart index 2d876c4b..30e1fe2a 100644 --- a/quantus_sdk/lib/src/models/multisig_proposal_event.dart +++ b/quantus_sdk/lib/src/models/multisig_proposal_event.dart @@ -13,7 +13,7 @@ class MultisigProposalEvent extends TransactionEvent { from: proposal.multisigAddress, to: proposal.recipient, amount: proposal.amount, - timestamp: proposal.createdAt, + timestamp: proposal.updatedAt, ); String get multisigAddress => proposal.multisigAddress; diff --git a/quantus_sdk/lib/src/services/multisig_graphql.dart b/quantus_sdk/lib/src/services/multisig_graphql.dart index 0dd5aeb9..a2062e2c 100644 --- a/quantus_sdk/lib/src/services/multisig_graphql.dart +++ b/quantus_sdk/lib/src/services/multisig_graphql.dart @@ -153,6 +153,7 @@ class MultisigProposalGraphql { id proposal_id created_at + updated_at pallet call call_raw @@ -193,7 +194,7 @@ class MultisigProposalGraphql { {multisig_id: {_eq: $multisigId}}, {status: {_in: [ACTIVE, APPROVED]}} ]}, - order_by: {created_at: desc} + order_by: {updated_at: desc} ) { ''' + fields + @@ -215,7 +216,7 @@ class MultisigProposalGraphql { {multisig_id: {_eq: $multisigId}}, {status: {_in: [EXECUTED, CANCELLED, REMOVED]}} ]}, - order_by: {created_at: desc} + order_by: {updated_at: desc} ) { ''' + fields + diff --git a/quantus_sdk/test/multisig_service_test.dart b/quantus_sdk/test/multisig_service_test.dart index 14c2a675..5e694c55 100644 --- a/quantus_sdk/test/multisig_service_test.dart +++ b/quantus_sdk/test/multisig_service_test.dart @@ -2,6 +2,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:quantus_sdk/src/models/multisig_account.dart'; import 'package:quantus_sdk/src/models/multisig_create_submission.dart'; import 'package:quantus_sdk/src/models/multisig_proposal.dart'; +import 'package:quantus_sdk/src/models/multisig_proposal_event.dart'; import 'package:quantus_sdk/src/models/propose_fee_breakdown.dart'; import 'package:quantus_sdk/src/services/multisig_graphql.dart'; import 'package:quantus_sdk/src/services/multisig_service.dart'; @@ -292,7 +293,7 @@ void main() { expect(MultisigProposalGraphql.openProposalsQuery, contains(r'$multisigId: String!')); expect(MultisigProposalGraphql.openProposalsQuery, contains(r'multisig_id: {_eq: $multisigId}')); expect(MultisigProposalGraphql.openProposalsQuery, contains('status: {_in: [ACTIVE, APPROVED]}')); - expect(MultisigProposalGraphql.openProposalsQuery, contains('order_by: {created_at: desc}')); + expect(MultisigProposalGraphql.openProposalsQuery, contains('order_by: {updated_at: desc}')); expect(MultisigProposalGraphql.buildOpenProposalsVariables(multisigAddress), {'multisigId': multisigAddress}); }); @@ -300,7 +301,7 @@ void main() { expect(MultisigProposalGraphql.pastProposalsQuery, contains(r'$multisigId: String!')); expect(MultisigProposalGraphql.pastProposalsQuery, contains(r'multisig_id: {_eq: $multisigId}')); expect(MultisigProposalGraphql.pastProposalsQuery, contains('status: {_in: [EXECUTED, CANCELLED, REMOVED]}')); - expect(MultisigProposalGraphql.pastProposalsQuery, contains('order_by: {created_at: desc}')); + expect(MultisigProposalGraphql.pastProposalsQuery, contains('order_by: {updated_at: desc}')); expect(MultisigProposalGraphql.buildPastProposalsVariables(multisigAddress), {'multisigId': multisigAddress}); }); @@ -416,6 +417,62 @@ void main() { expect(proposal.networkFee, BigInt.parse('25000000000')); }); + + test('maps updated_at from indexer', () { + final proposal = MultisigProposal.fromIndexerJson({ + 'id': '5Multisig-4', + 'proposal_id': 4, + 'created_at': '2026-06-04T10:00:00.000Z', + 'updated_at': '2026-06-05T14:30:00.000Z', + 'pallet': 'Balances', + 'call': 'transfer_allow_death', + 'call_raw': '0x0500', + 'transfer_amount': '1000000000000', + 'status': 'EXECUTED', + 'expiry_block': 12345, + 'deposit': '500000000000', + 'approvals': ['5Proposer', '5Other'], + 'proposer': {'id': '5Proposer'}, + 'transferTo': {'id': '5Recipient'}, + }, msig: msig); + + expect(proposal.updatedAt, DateTime.parse('2026-06-05T14:30:00.000Z')); + expect(proposal.isTerminal, isTrue); + }); + }); + + group('MultisigProposalEvent', () { + test('uses proposal updatedAt for activity sort timestamp', () { + final msig = MultisigAccount( + name: 'Team', + accountId: '5Multisig', + signers: ['5Proposer', '5Other'], + threshold: 2, + nonce: BigInt.zero, + myMemberAccountId: '5Proposer', + ); + final proposal = MultisigProposal.fromIndexerJson({ + 'id': '5Multisig-6', + 'proposal_id': 6, + 'created_at': '2026-06-04T10:00:00.000Z', + 'updated_at': '2026-06-06T08:15:00.000Z', + 'pallet': 'Balances', + 'call': 'transfer_allow_death', + 'call_raw': '0x0500', + 'transfer_amount': '1000000000000', + 'status': 'EXECUTED', + 'expiry_block': 12345, + 'deposit': '500000000000', + 'approvals': ['5Proposer', '5Other'], + 'proposer': {'id': '5Proposer'}, + 'transferTo': {'id': '5Recipient'}, + }, msig: msig); + + final event = MultisigProposalEvent(proposal: proposal); + + expect(event.timestamp, proposal.updatedAt); + expect(event.timestamp, isNot(proposal.createdAt)); + }); }); group('MultisigService.buildApproveCall', () { From 46577df3ea5a8537f0be80c79375c457efb75c41 Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 20:00:11 +0800 Subject: [PATCH 10/18] chore: formatting --- .../pending_multisig_executions_provider.dart | 4 +- .../multisig_execution_polling_service.dart | 3 +- .../multisig_execution_reconciliation.dart | 6 +- .../lib/generated/planck/pallets/assets.dart | 471 +- .../planck/pallets/assets_holder.dart | 76 +- .../generated/planck/pallets/balances.dart | 289 +- .../planck/pallets/conviction_voting.dart | 147 +- .../planck/pallets/mining_rewards.dart | 13 +- .../generated/planck/pallets/multisig.dart | 150 +- .../generated/planck/pallets/preimage.dart | 111 +- .../lib/generated/planck/pallets/q_po_w.dart | 30 +- .../generated/planck/pallets/recovery.dart | 143 +- .../generated/planck/pallets/referenda.dart | 173 +- .../planck/pallets/reversible_transfers.dart | 197 +- .../generated/planck/pallets/scheduler.dart | 212 +- .../lib/generated/planck/pallets/system.dart | 602 +-- .../planck/pallets/tech_collective.dart | 247 +- .../planck/pallets/tech_referenda.dart | 173 +- .../generated/planck/pallets/timestamp.dart | 10 +- .../planck/pallets/transaction_payment.dart | 29 +- .../planck/pallets/treasury_pallet.dart | 16 +- .../lib/generated/planck/pallets/utility.dart | 50 +- .../generated/planck/pallets/wormhole.dart | 90 +- .../lib/generated/planck/pallets/zk_tree.dart | 81 +- quantus_sdk/lib/generated/planck/planck.dart | 82 +- .../generated/planck/types/b_tree_map.dart | 26 +- .../bounded_btree_map/bounded_b_tree_map.dart | 20 +- .../lib/generated/planck/types/cow_1.dart | 10 +- .../lib/generated/planck/types/cow_2.dart | 26 +- .../check_metadata_hash.dart | 17 +- .../frame_metadata_hash_extension/mode.dart | 15 +- .../dispatch/dispatch_class.dart | 15 +- .../types/frame_support/dispatch/pays.dart | 15 +- .../dispatch/per_dispatch_class_1.dart | 45 +- .../dispatch/per_dispatch_class_2.dart | 45 +- .../dispatch/per_dispatch_class_3.dart | 43 +- .../dispatch/post_dispatch_info.dart | 46 +- .../frame_support/dispatch/raw_origin.dart | 47 +- .../planck/types/frame_support/pallet_id.dart | 10 +- .../traits/preimages/bounded.dart | 115 +- .../traits/schedule/dispatch_time.dart | 45 +- .../frame_support/traits/storage/no_drop.dart | 10 +- .../tokens/fungible/imbalance/imbalance.dart | 17 +- .../traits/tokens/misc/balance_status.dart | 15 +- .../traits/tokens/misc/id_amount_1.dart | 41 +- .../traits/tokens/misc/id_amount_2.dart | 41 +- .../types/frame_system/account_info.dart | 55 +- .../code_upgrade_authorization.dart | 43 +- .../frame_system/dispatch_event_info.dart | 48 +- .../types/frame_system/event_record.dart | 56 +- .../check_genesis/check_genesis.dart | 10 +- .../check_mortality/check_mortality.dart | 10 +- .../check_non_zero_sender.dart | 10 +- .../extensions/check_nonce/check_nonce.dart | 10 +- .../check_spec_version.dart | 10 +- .../check_tx_version/check_tx_version.dart | 10 +- .../extensions/check_weight/check_weight.dart | 10 +- .../last_runtime_upgrade_info.dart | 42 +- .../frame_system/limits/block_length.dart | 17 +- .../frame_system/limits/block_weights.dart | 50 +- .../limits/weights_per_class.dart | 75 +- .../types/frame_system/pallet/call.dart | 365 +- .../types/frame_system/pallet/error.dart | 15 +- .../types/frame_system/pallet/event.dart | 301 +- .../planck/types/frame_system/phase.dart | 38 +- .../types/pallet_assets/pallet/call.dart | 1691 ++----- .../types/pallet_assets/pallet/error.dart | 15 +- .../types/pallet_assets/pallet/event.dart | 1503 ++---- .../pallet_assets/types/account_status.dart | 15 +- .../types/pallet_assets/types/approval.dart | 41 +- .../pallet_assets/types/asset_account.dart | 54 +- .../pallet_assets/types/asset_details.dart | 142 +- .../pallet_assets/types/asset_metadata.dart | 65 +- .../pallet_assets/types/asset_status.dart | 15 +- .../pallet_assets/types/existence_reason.dart | 101 +- .../pallet_assets_holder/pallet/error.dart | 15 +- .../pallet_assets_holder/pallet/event.dart | 206 +- .../types/pallet_balances/pallet/call.dart | 450 +- .../types/pallet_balances/pallet/error.dart | 15 +- .../types/pallet_balances/pallet/event.dart | 1603 ++---- .../pallet/unexpected_kind.dart | 15 +- .../pallet_balances/types/account_data.dart | 51 +- .../types/adjustment_direction.dart | 15 +- .../pallet_balances/types/balance_lock.dart | 51 +- .../pallet_balances/types/extra_flags.dart | 10 +- .../types/pallet_balances/types/reasons.dart | 15 +- .../pallet_balances/types/reserve_data.dart | 46 +- .../conviction/conviction.dart | 15 +- .../pallet_conviction_voting/pallet/call.dart | 311 +- .../pallet/error.dart | 15 +- .../pallet/event.dart | 324 +- .../types/delegations.dart | 41 +- .../pallet_conviction_voting/types/tally.dart | 47 +- .../vote/account_vote.dart | 180 +- .../vote/casting.dart | 74 +- .../vote/delegating.dart | 60 +- .../vote/prior_lock.dart | 41 +- .../pallet_conviction_voting/vote/vote.dart | 10 +- .../pallet_conviction_voting/vote/voting.dart | 45 +- .../pallet_mining_rewards/pallet/event.dart | 197 +- .../types/pallet_multisig/multisig_data.dart | 96 +- .../types/pallet_multisig/pallet/call.dart | 386 +- .../types/pallet_multisig/pallet/error.dart | 18 +- .../types/pallet_multisig/pallet/event.dart | 562 +-- .../types/pallet_multisig/proposal_data.dart | 94 +- .../pallet_multisig/proposal_status.dart | 15 +- .../pallet_preimage/old_request_status.dart | 161 +- .../types/pallet_preimage/pallet/call.dart | 140 +- .../types/pallet_preimage/pallet/error.dart | 15 +- .../types/pallet_preimage/pallet/event.dart | 86 +- .../pallet_preimage/pallet/hold_reason.dart | 15 +- .../types/pallet_preimage/request_status.dart | 156 +- .../types/pallet_qpow/pallet/event.dart | 140 +- .../member_record.dart | 17 +- .../pallet_ranked_collective/pallet/call.dart | 299 +- .../pallet/error.dart | 15 +- .../pallet/event.dart | 274 +- .../types/pallet_ranked_collective/tally.dart | 48 +- .../pallet_ranked_collective/vote_record.dart | 45 +- .../pallet_recovery/active_recovery.dart | 57 +- .../types/pallet_recovery/deposit_kind.dart | 36 +- .../types/pallet_recovery/pallet/call.dart | 355 +- .../types/pallet_recovery/pallet/error.dart | 15 +- .../types/pallet_recovery/pallet/event.dart | 368 +- .../pallet_recovery/recovery_config.dart | 59 +- .../types/pallet_referenda/pallet/call_1.dart | 266 +- .../types/pallet_referenda/pallet/call_2.dart | 266 +- .../pallet_referenda/pallet/error_1.dart | 15 +- .../pallet_referenda/pallet/error_2.dart | 15 +- .../pallet_referenda/pallet/event_1.dart | 803 +-- .../pallet_referenda/pallet/event_2.dart | 803 +-- .../types/pallet_referenda/types/curve.dart | 189 +- .../types/deciding_status.dart | 41 +- .../types/pallet_referenda/types/deposit.dart | 46 +- .../types/referendum_info_1.dart | 317 +- .../types/referendum_info_2.dart | 317 +- .../types/referendum_status_1.dart | 172 +- .../types/referendum_status_2.dart | 172 +- .../pallet_referenda/types/track_details.dart | 95 +- .../high_security_account_data.dart | 45 +- .../pallet/call.dart | 361 +- .../pallet/error.dart | 18 +- .../pallet/event.dart | 372 +- .../pallet/hold_reason.dart | 15 +- .../pending_transfer.dart | 73 +- .../types/pallet_scheduler/pallet/call.dart | 538 +- .../types/pallet_scheduler/pallet/error.dart | 15 +- .../types/pallet_scheduler/pallet/event.dart | 503 +- .../types/pallet_scheduler/retry_config.dart | 43 +- .../types/pallet_scheduler/scheduled.dart | 61 +- .../types/pallet_timestamp/pallet/call.dart | 32 +- .../charge_transaction_payment.dart | 10 +- .../pallet/event.dart | 70 +- .../pallet_transaction_payment/releases.dart | 15 +- .../types/pallet_treasury/pallet/call.dart | 59 +- .../types/pallet_treasury/pallet/error.dart | 15 +- .../types/pallet_treasury/pallet/event.dart | 95 +- .../types/pallet_utility/pallet/call.dart | 375 +- .../types/pallet_utility/pallet/error.dart | 15 +- .../types/pallet_utility/pallet/event.dart | 167 +- .../types/pallet_wormhole/pallet/call.dart | 38 +- .../types/pallet_wormhole/pallet/error.dart | 18 +- .../types/pallet_wormhole/pallet/event.dart | 226 +- .../types/pallet_zk_tree/pallet/error.dart | 15 +- .../types/pallet_zk_tree/pallet/event.dart | 99 +- .../planck/types/pallet_zk_tree/zk_leaf.dart | 59 +- .../planck/types/primitive_types/h256.dart | 10 +- .../planck/types/primitive_types/u512.dart | 10 +- .../types/dilithium_signature_scheme.dart | 37 +- .../dilithium_signature_with_public.dart | 29 +- .../block_number_or_timestamp.dart | 51 +- .../types/qp_scheduler/dispatch_time.dart | 45 +- .../definitions/preimage_deposit.dart | 17 +- .../types/quantus_runtime/origin_caller.dart | 28 +- .../planck/types/quantus_runtime/runtime.dart | 10 +- .../types/quantus_runtime/runtime_call.dart | 334 +- .../types/quantus_runtime/runtime_event.dart | 402 +- .../runtime_freeze_reason.dart | 10 +- .../quantus_runtime/runtime_hold_reason.dart | 45 +- .../reversible_transaction_extension.dart | 13 +- .../wormhole_proof_recorder_extension.dart | 13 +- .../types/sp_arithmetic/arithmetic_error.dart | 15 +- .../sp_arithmetic/fixed_point/fixed_i64.dart | 10 +- .../sp_arithmetic/fixed_point/fixed_u128.dart | 10 +- .../sp_arithmetic/per_things/perbill.dart | 10 +- .../sp_arithmetic/per_things/permill.dart | 10 +- .../types/sp_core/crypto/account_id32.dart | 10 +- .../types/sp_runtime/dispatch_error.dart | 152 +- .../dispatch_error_with_post_info.dart | 45 +- .../sp_runtime/generic/digest/digest.dart | 32 +- .../generic/digest/digest_item.dart | 223 +- .../types/sp_runtime/generic/era/era.dart | 4351 +++-------------- .../unchecked_extrinsic.dart | 10 +- .../planck/types/sp_runtime/module_error.dart | 46 +- .../multiaddress/multi_address.dart | 110 +- .../sp_runtime/proving_trie/trie_error.dart | 15 +- .../planck/types/sp_runtime/token_error.dart | 15 +- .../types/sp_runtime/traits/blake_two256.dart | 10 +- .../types/sp_runtime/transactional_error.dart | 15 +- .../types/sp_version/runtime_version.dart | 106 +- .../types/sp_weights/runtime_db_weight.dart | 41 +- .../types/sp_weights/weight_v2/weight.dart | 38 +- .../lib/generated/planck/types/tuples.dart | 20 +- .../lib/generated/planck/types/tuples_1.dart | 20 +- .../lib/generated/planck/types/tuples_2.dart | 23 +- .../lib/generated/planck/types/tuples_3.dart | 5 +- 206 files changed, 6346 insertions(+), 23129 deletions(-) diff --git a/mobile-app/lib/providers/pending_multisig_executions_provider.dart b/mobile-app/lib/providers/pending_multisig_executions_provider.dart index eab55e3a..2397a518 100644 --- a/mobile-app/lib/providers/pending_multisig_executions_provider.dart +++ b/mobile-app/lib/providers/pending_multisig_executions_provider.dart @@ -25,9 +25,7 @@ PendingMultisigExecutionEvent? findPendingExecutionForProposal( String executorId, ) { for (final event in all) { - if (event.multisigAddress == multisigAddress && - event.proposalId == proposalId && - event.executorId == executorId) { + if (event.multisigAddress == multisigAddress && event.proposalId == proposalId && event.executorId == executorId) { return event; } } diff --git a/mobile-app/lib/services/multisig_execution_polling_service.dart b/mobile-app/lib/services/multisig_execution_polling_service.dart index cbf85345..5dd9ebca 100644 --- a/mobile-app/lib/services/multisig_execution_polling_service.dart +++ b/mobile-app/lib/services/multisig_execution_polling_service.dart @@ -6,7 +6,8 @@ import 'package:resonance_network_wallet/providers/pending_multisig_executions_p import 'package:resonance_network_wallet/services/extrinsic_indexer_polling_service.dart'; import 'package:resonance_network_wallet/services/multisig_execution_reconciliation.dart'; -typedef MultisigExecutionPollingService = ExtrinsicIndexerPollingService; +typedef MultisigExecutionPollingService = + ExtrinsicIndexerPollingService; Future _confirmIndexedExecution(Ref ref, MultisigAccount msig, PendingMultisigExecutionEvent pending) async { final multisigService = ref.read(multisigServiceProvider); diff --git a/mobile-app/lib/services/multisig_execution_reconciliation.dart b/mobile-app/lib/services/multisig_execution_reconciliation.dart index e8f597f7..50ec235d 100644 --- a/mobile-app/lib/services/multisig_execution_reconciliation.dart +++ b/mobile-app/lib/services/multisig_execution_reconciliation.dart @@ -4,11 +4,7 @@ import 'package:resonance_network_wallet/providers/multisig_providers.dart'; import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; /// Refreshes proposal state and balances after an execution is indexed. -Future reconcileIndexedExecution( - Ref ref, - MultisigAccount msig, - PendingMultisigExecutionEvent pending, -) async { +Future reconcileIndexedExecution(Ref ref, MultisigAccount msig, PendingMultisigExecutionEvent pending) async { invalidateMultisigProposals(ref, msig); invalidateAccountBalances(ref, {pending.executorId, msig.accountId}); } diff --git a/quantus_sdk/lib/generated/planck/pallets/assets.dart b/quantus_sdk/lib/generated/planck/pallets/assets.dart index 8e535630..544fbc2f 100644 --- a/quantus_sdk/lib/generated/planck/pallets/assets.dart +++ b/quantus_sdk/lib/generated/planck/pallets/assets.dart @@ -19,8 +19,7 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageMap _asset = - const _i1.StorageMap( + final _i1.StorageMap _asset = const _i1.StorageMap( prefix: 'Assets', storage: 'Asset', valueCodec: _i2.AssetDetails.codec, @@ -29,35 +28,31 @@ class Queries { final _i1.StorageDoubleMap _account = const _i1.StorageDoubleMap( - prefix: 'Assets', - storage: 'Account', - valueCodec: _i5.AssetAccount.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), - hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), - ); - - final _i1 - .StorageTripleMap - _approvals = const _i1.StorageTripleMap( - prefix: 'Assets', - storage: 'Approvals', - valueCodec: _i6.Approval.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), - hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), - hasher3: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), - ); - - final _i1.StorageMap _metadata = - const _i1.StorageMap( + prefix: 'Assets', + storage: 'Account', + valueCodec: _i5.AssetAccount.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), + hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), + ); + + final _i1.StorageTripleMap _approvals = + const _i1.StorageTripleMap( + prefix: 'Assets', + storage: 'Approvals', + valueCodec: _i6.Approval.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), + hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), + hasher3: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), + ); + + final _i1.StorageMap _metadata = const _i1.StorageMap( prefix: 'Assets', storage: 'Metadata', valueCodec: _i7.AssetMetadata.codec, hasher: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), ); - final _i1.StorageMap> _reserves = - const _i1.StorageMap>( + final _i1.StorageMap> _reserves = const _i1.StorageMap>( prefix: 'Assets', storage: 'Reserves', valueCodec: _i3.SequenceCodec(_i3.NullCodec.codec), @@ -71,15 +66,9 @@ class Queries { ); /// Details of an asset. - _i8.Future<_i2.AssetDetails?> asset( - int key1, { - _i1.BlockHash? at, - }) async { + _i8.Future<_i2.AssetDetails?> asset(int key1, {_i1.BlockHash? at}) async { final hashedKey = _asset.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _asset.decodeValue(bytes); } @@ -87,19 +76,9 @@ class Queries { } /// The holdings of a specific account for a specific asset. - _i8.Future<_i5.AssetAccount?> account( - int key1, - _i4.AccountId32 key2, { - _i1.BlockHash? at, - }) async { - final hashedKey = _account.hashedKeyFor( - key1, - key2, - ); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + _i8.Future<_i5.AssetAccount?> account(int key1, _i4.AccountId32 key2, {_i1.BlockHash? at}) async { + final hashedKey = _account.hashedKeyFor(key1, key2); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _account.decodeValue(bytes); } @@ -109,21 +88,9 @@ class Queries { /// Approved balance transfers. First balance is the amount approved for transfer. Second /// is the amount of `T::Currency` reserved for storing this. /// First key is the asset ID, second key is the owner and third key is the delegate. - _i8.Future<_i6.Approval?> approvals( - int key1, - _i4.AccountId32 key2, - _i4.AccountId32 key3, { - _i1.BlockHash? at, - }) async { - final hashedKey = _approvals.hashedKeyFor( - key1, - key2, - key3, - ); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + _i8.Future<_i6.Approval?> approvals(int key1, _i4.AccountId32 key2, _i4.AccountId32 key3, {_i1.BlockHash? at}) async { + final hashedKey = _approvals.hashedKeyFor(key1, key2, key3); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _approvals.decodeValue(bytes); } @@ -131,45 +98,25 @@ class Queries { } /// Metadata of an asset. - _i8.Future<_i7.AssetMetadata> metadata( - int key1, { - _i1.BlockHash? at, - }) async { + _i8.Future<_i7.AssetMetadata> metadata(int key1, {_i1.BlockHash? at}) async { final hashedKey = _metadata.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _metadata.decodeValue(bytes); } return _i7.AssetMetadata( deposit: BigInt.zero, - name: List.filled( - 0, - 0, - growable: true, - ), - symbol: List.filled( - 0, - 0, - growable: true, - ), + name: List.filled(0, 0, growable: true), + symbol: List.filled(0, 0, growable: true), decimals: 0, isFrozen: false, ); /* Default */ } /// Maps an asset to a list of its configured reserve information. - _i8.Future> reserves( - int key1, { - _i1.BlockHash? at, - }) async { + _i8.Future> reserves(int key1, {_i1.BlockHash? at}) async { final hashedKey = _reserves.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _reserves.decodeValue(bytes); } @@ -187,10 +134,7 @@ class Queries { /// [SetNextAssetId](`migration::next_asset_id::SetNextAssetId`) migration. _i8.Future nextAssetId({_i1.BlockHash? at}) async { final hashedKey = _nextAssetId.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _nextAssetId.decodeValue(bytes); } @@ -198,15 +142,9 @@ class Queries { } /// Details of an asset. - _i8.Future> multiAsset( - List keys, { - _i1.BlockHash? at, - }) async { + _i8.Future> multiAsset(List keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _asset.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { return bytes.first.changes.map((v) => _asset.decodeValue(v.key)).toList(); } @@ -214,56 +152,34 @@ class Queries { } /// Metadata of an asset. - _i8.Future> multiMetadata( - List keys, { - _i1.BlockHash? at, - }) async { + _i8.Future> multiMetadata(List keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _metadata.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _metadata.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _metadata.decodeValue(v.key)).toList(); } return (keys - .map((key) => _i7.AssetMetadata( - deposit: BigInt.zero, - name: List.filled( - 0, - 0, - growable: true, + .map( + (key) => _i7.AssetMetadata( + deposit: BigInt.zero, + name: List.filled(0, 0, growable: true), + symbol: List.filled(0, 0, growable: true), + decimals: 0, + isFrozen: false, ), - symbol: List.filled( - 0, - 0, - growable: true, - ), - decimals: 0, - isFrozen: false, - )) - .toList() as List<_i7.AssetMetadata>); /* Default */ + ) + .toList() + as List<_i7.AssetMetadata>); /* Default */ } /// Maps an asset to a list of its configured reserve information. - _i8.Future>> multiReserves( - List keys, { - _i1.BlockHash? at, - }) async { + _i8.Future>> multiReserves(List keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _reserves.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _reserves.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _reserves.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>); /* Default */ + return (keys.map((key) => []).toList() as List>); /* Default */ } /// Returns the storage key for `asset`. @@ -273,28 +189,14 @@ class Queries { } /// Returns the storage key for `account`. - _i9.Uint8List accountKey( - int key1, - _i4.AccountId32 key2, - ) { - final hashedKey = _account.hashedKeyFor( - key1, - key2, - ); + _i9.Uint8List accountKey(int key1, _i4.AccountId32 key2) { + final hashedKey = _account.hashedKeyFor(key1, key2); return hashedKey; } /// Returns the storage key for `approvals`. - _i9.Uint8List approvalsKey( - int key1, - _i4.AccountId32 key2, - _i4.AccountId32 key3, - ) { - final hashedKey = _approvals.hashedKeyFor( - key1, - key2, - key3, - ); + _i9.Uint8List approvalsKey(int key1, _i4.AccountId32 key2, _i4.AccountId32 key3) { + final hashedKey = _approvals.hashedKeyFor(key1, key2, key3); return hashedKey; } @@ -363,16 +265,8 @@ class Txs { /// Emits `Created` event when successful. /// /// Weight: `O(1)` - _i10.Assets create({ - required BigInt id, - required _i11.MultiAddress admin, - required BigInt minBalance, - }) { - return _i10.Assets(_i12.Create( - id: id, - admin: admin, - minBalance: minBalance, - )); + _i10.Assets create({required BigInt id, required _i11.MultiAddress admin, required BigInt minBalance}) { + return _i10.Assets(_i12.Create(id: id, admin: admin, minBalance: minBalance)); } /// Issue a new class of fungible assets from a privileged origin. @@ -400,12 +294,7 @@ class Txs { required bool isSufficient, required BigInt minBalance, }) { - return _i10.Assets(_i12.ForceCreate( - id: id, - owner: owner, - isSufficient: isSufficient, - minBalance: minBalance, - )); + return _i10.Assets(_i12.ForceCreate(id: id, owner: owner, isSufficient: isSufficient, minBalance: minBalance)); } /// Start the process of destroying a fungible asset class. @@ -482,16 +371,8 @@ class Txs { /// /// Weight: `O(1)` /// Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. - _i10.Assets mint({ - required BigInt id, - required _i11.MultiAddress beneficiary, - required BigInt amount, - }) { - return _i10.Assets(_i12.Mint( - id: id, - beneficiary: beneficiary, - amount: amount, - )); + _i10.Assets mint({required BigInt id, required _i11.MultiAddress beneficiary, required BigInt amount}) { + return _i10.Assets(_i12.Mint(id: id, beneficiary: beneficiary, amount: amount)); } /// Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. @@ -509,16 +390,8 @@ class Txs { /// /// Weight: `O(1)` /// Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. - _i10.Assets burn({ - required BigInt id, - required _i11.MultiAddress who, - required BigInt amount, - }) { - return _i10.Assets(_i12.Burn( - id: id, - who: who, - amount: amount, - )); + _i10.Assets burn({required BigInt id, required _i11.MultiAddress who, required BigInt amount}) { + return _i10.Assets(_i12.Burn(id: id, who: who, amount: amount)); } /// Move some assets from the sender account to another. @@ -539,16 +412,8 @@ class Txs { /// Weight: `O(1)` /// Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of /// `target`. - _i10.Assets transfer({ - required BigInt id, - required _i11.MultiAddress target, - required BigInt amount, - }) { - return _i10.Assets(_i12.Transfer( - id: id, - target: target, - amount: amount, - )); + _i10.Assets transfer({required BigInt id, required _i11.MultiAddress target, required BigInt amount}) { + return _i10.Assets(_i12.Transfer(id: id, target: target, amount: amount)); } /// Move some assets from the sender account to another, keeping the sender account alive. @@ -569,16 +434,8 @@ class Txs { /// Weight: `O(1)` /// Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of /// `target`. - _i10.Assets transferKeepAlive({ - required BigInt id, - required _i11.MultiAddress target, - required BigInt amount, - }) { - return _i10.Assets(_i12.TransferKeepAlive( - id: id, - target: target, - amount: amount, - )); + _i10.Assets transferKeepAlive({required BigInt id, required _i11.MultiAddress target, required BigInt amount}) { + return _i10.Assets(_i12.TransferKeepAlive(id: id, target: target, amount: amount)); } /// Move some assets from one account to another. @@ -606,12 +463,7 @@ class Txs { required _i11.MultiAddress dest, required BigInt amount, }) { - return _i10.Assets(_i12.ForceTransfer( - id: id, - source: source, - dest: dest, - amount: amount, - )); + return _i10.Assets(_i12.ForceTransfer(id: id, source: source, dest: dest, amount: amount)); } /// Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` @@ -626,14 +478,8 @@ class Txs { /// Emits `Frozen`. /// /// Weight: `O(1)` - _i10.Assets freeze({ - required BigInt id, - required _i11.MultiAddress who, - }) { - return _i10.Assets(_i12.Freeze( - id: id, - who: who, - )); + _i10.Assets freeze({required BigInt id, required _i11.MultiAddress who}) { + return _i10.Assets(_i12.Freeze(id: id, who: who)); } /// Allow unprivileged transfers to and from an account again. @@ -646,14 +492,8 @@ class Txs { /// Emits `Thawed`. /// /// Weight: `O(1)` - _i10.Assets thaw({ - required BigInt id, - required _i11.MultiAddress who, - }) { - return _i10.Assets(_i12.Thaw( - id: id, - who: who, - )); + _i10.Assets thaw({required BigInt id, required _i11.MultiAddress who}) { + return _i10.Assets(_i12.Thaw(id: id, who: who)); } /// Disallow further unprivileged transfers for the asset class. @@ -692,14 +532,8 @@ class Txs { /// Emits `OwnerChanged`. /// /// Weight: `O(1)` - _i10.Assets transferOwnership({ - required BigInt id, - required _i11.MultiAddress owner, - }) { - return _i10.Assets(_i12.TransferOwnership( - id: id, - owner: owner, - )); + _i10.Assets transferOwnership({required BigInt id, required _i11.MultiAddress owner}) { + return _i10.Assets(_i12.TransferOwnership(id: id, owner: owner)); } /// Change the Issuer, Admin and Freezer of an asset. @@ -720,12 +554,7 @@ class Txs { required _i11.MultiAddress admin, required _i11.MultiAddress freezer, }) { - return _i10.Assets(_i12.SetTeam( - id: id, - issuer: issuer, - admin: admin, - freezer: freezer, - )); + return _i10.Assets(_i12.SetTeam(id: id, issuer: issuer, admin: admin, freezer: freezer)); } /// Set the metadata for an asset. @@ -750,12 +579,7 @@ class Txs { required List symbol, required int decimals, }) { - return _i10.Assets(_i12.SetMetadata( - id: id, - name: name, - symbol: symbol, - decimals: decimals, - )); + return _i10.Assets(_i12.SetMetadata(id: id, name: name, symbol: symbol, decimals: decimals)); } /// Clear the metadata for an asset. @@ -794,13 +618,9 @@ class Txs { required int decimals, required bool isFrozen, }) { - return _i10.Assets(_i12.ForceSetMetadata( - id: id, - name: name, - symbol: symbol, - decimals: decimals, - isFrozen: isFrozen, - )); + return _i10.Assets( + _i12.ForceSetMetadata(id: id, name: name, symbol: symbol, decimals: decimals, isFrozen: isFrozen), + ); } /// Clear the metadata for an asset. @@ -850,16 +670,18 @@ class Txs { required bool isSufficient, required bool isFrozen, }) { - return _i10.Assets(_i12.ForceAssetStatus( - id: id, - owner: owner, - issuer: issuer, - admin: admin, - freezer: freezer, - minBalance: minBalance, - isSufficient: isSufficient, - isFrozen: isFrozen, - )); + return _i10.Assets( + _i12.ForceAssetStatus( + id: id, + owner: owner, + issuer: issuer, + admin: admin, + freezer: freezer, + minBalance: minBalance, + isSufficient: isSufficient, + isFrozen: isFrozen, + ), + ); } /// Approve an amount of asset for transfer by a delegated third-party account. @@ -882,16 +704,8 @@ class Txs { /// Emits `ApprovedTransfer` on success. /// /// Weight: `O(1)` - _i10.Assets approveTransfer({ - required BigInt id, - required _i11.MultiAddress delegate, - required BigInt amount, - }) { - return _i10.Assets(_i12.ApproveTransfer( - id: id, - delegate: delegate, - amount: amount, - )); + _i10.Assets approveTransfer({required BigInt id, required _i11.MultiAddress delegate, required BigInt amount}) { + return _i10.Assets(_i12.ApproveTransfer(id: id, delegate: delegate, amount: amount)); } /// Cancel all of some asset approved for delegated transfer by a third-party account. @@ -907,14 +721,8 @@ class Txs { /// Emits `ApprovalCancelled` on success. /// /// Weight: `O(1)` - _i10.Assets cancelApproval({ - required BigInt id, - required _i11.MultiAddress delegate, - }) { - return _i10.Assets(_i12.CancelApproval( - id: id, - delegate: delegate, - )); + _i10.Assets cancelApproval({required BigInt id, required _i11.MultiAddress delegate}) { + return _i10.Assets(_i12.CancelApproval(id: id, delegate: delegate)); } /// Cancel all of some asset approved for delegated transfer by a third-party account. @@ -935,11 +743,7 @@ class Txs { required _i11.MultiAddress owner, required _i11.MultiAddress delegate, }) { - return _i10.Assets(_i12.ForceCancelApproval( - id: id, - owner: owner, - delegate: delegate, - )); + return _i10.Assets(_i12.ForceCancelApproval(id: id, owner: owner, delegate: delegate)); } /// Transfer some asset balance from a previously delegated account to some third-party @@ -966,12 +770,7 @@ class Txs { required _i11.MultiAddress destination, required BigInt amount, }) { - return _i10.Assets(_i12.TransferApproved( - id: id, - owner: owner, - destination: destination, - amount: amount, - )); + return _i10.Assets(_i12.TransferApproved(id: id, owner: owner, destination: destination, amount: amount)); } /// Create an asset account for non-provider assets. @@ -1000,14 +799,8 @@ class Txs { /// the asset account contains holds or freezes in place. /// /// Emits `Refunded` event when successful. - _i10.Assets refund({ - required BigInt id, - required bool allowBurn, - }) { - return _i10.Assets(_i12.Refund( - id: id, - allowBurn: allowBurn, - )); + _i10.Assets refund({required BigInt id, required bool allowBurn}) { + return _i10.Assets(_i12.Refund(id: id, allowBurn: allowBurn)); } /// Sets the minimum balance of an asset. @@ -1022,14 +815,8 @@ class Txs { /// - `min_balance`: The new value of `min_balance`. /// /// Emits `AssetMinBalanceChanged` event when successful. - _i10.Assets setMinBalance({ - required BigInt id, - required BigInt minBalance, - }) { - return _i10.Assets(_i12.SetMinBalance( - id: id, - minBalance: minBalance, - )); + _i10.Assets setMinBalance({required BigInt id, required BigInt minBalance}) { + return _i10.Assets(_i12.SetMinBalance(id: id, minBalance: minBalance)); } /// Create an asset account for `who`. @@ -1043,14 +830,8 @@ class Txs { /// - `who`: The account to be created. /// /// Emits `Touched` event when successful. - _i10.Assets touchOther({ - required BigInt id, - required _i11.MultiAddress who, - }) { - return _i10.Assets(_i12.TouchOther( - id: id, - who: who, - )); + _i10.Assets touchOther({required BigInt id, required _i11.MultiAddress who}) { + return _i10.Assets(_i12.TouchOther(id: id, who: who)); } /// Return the deposit (if any) of a target asset account. Useful if you are the depositor. @@ -1066,14 +847,8 @@ class Txs { /// the asset account contains holds or freezes in place. /// /// Emits `Refunded` event when successful. - _i10.Assets refundOther({ - required BigInt id, - required _i11.MultiAddress who, - }) { - return _i10.Assets(_i12.RefundOther( - id: id, - who: who, - )); + _i10.Assets refundOther({required BigInt id, required _i11.MultiAddress who}) { + return _i10.Assets(_i12.RefundOther(id: id, who: who)); } /// Disallow further unprivileged transfers of an asset `id` to and from an account `who`. @@ -1086,14 +861,8 @@ class Txs { /// Emits `Blocked`. /// /// Weight: `O(1)` - _i10.Assets block({ - required BigInt id, - required _i11.MultiAddress who, - }) { - return _i10.Assets(_i12.Block( - id: id, - who: who, - )); + _i10.Assets block({required BigInt id, required _i11.MultiAddress who}) { + return _i10.Assets(_i12.Block(id: id, who: who)); } /// Transfer the entire transferable balance from the caller asset account. @@ -1112,16 +881,8 @@ class Txs { /// of the funds the asset account has, causing the sender asset account to be killed /// (false), or transfer everything except at least the minimum balance, which will /// guarantee to keep the sender asset account alive (true). - _i10.Assets transferAll({ - required BigInt id, - required _i11.MultiAddress dest, - required bool keepAlive, - }) { - return _i10.Assets(_i12.TransferAll( - id: id, - dest: dest, - keepAlive: keepAlive, - )); + _i10.Assets transferAll({required BigInt id, required _i11.MultiAddress dest, required bool keepAlive}) { + return _i10.Assets(_i12.TransferAll(id: id, dest: dest, keepAlive: keepAlive)); } /// Sets the trusted reserve information of an asset. @@ -1133,14 +894,8 @@ class Txs { /// - `reserves`: The full list of trusted reserves information. /// /// Emits `AssetMinBalanceChanged` event when successful. - _i10.Assets setReserves({ - required BigInt id, - required List reserves, - }) { - return _i10.Assets(_i12.SetReserves( - id: id, - reserves: reserves, - )); + _i10.Assets setReserves({required BigInt id, required List reserves}) { + return _i10.Assets(_i12.SetReserves(id: id, reserves: reserves)); } } diff --git a/quantus_sdk/lib/generated/planck/pallets/assets_holder.dart b/quantus_sdk/lib/generated/planck/pallets/assets_holder.dart index 918dddaa..608ecb2d 100644 --- a/quantus_sdk/lib/generated/planck/pallets/assets_holder.dart +++ b/quantus_sdk/lib/generated/planck/pallets/assets_holder.dart @@ -15,36 +15,26 @@ class Queries { final _i1.StorageDoubleMap> _holds = const _i1.StorageDoubleMap>( - prefix: 'AssetsHolder', - storage: 'Holds', - valueCodec: _i4.SequenceCodec<_i3.IdAmount>(_i3.IdAmount.codec), - hasher1: _i1.StorageHasher.blake2b128Concat(_i4.U32Codec.codec), - hasher2: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'AssetsHolder', + storage: 'Holds', + valueCodec: _i4.SequenceCodec<_i3.IdAmount>(_i3.IdAmount.codec), + hasher1: _i1.StorageHasher.blake2b128Concat(_i4.U32Codec.codec), + hasher2: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); final _i1.StorageDoubleMap _balancesOnHold = const _i1.StorageDoubleMap( - prefix: 'AssetsHolder', - storage: 'BalancesOnHold', - valueCodec: _i4.U128Codec.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i4.U32Codec.codec), - hasher2: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'AssetsHolder', + storage: 'BalancesOnHold', + valueCodec: _i4.U128Codec.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i4.U32Codec.codec), + hasher2: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); /// A map that stores holds applied on an account for a given AssetId. - _i5.Future> holds( - int key1, - _i2.AccountId32 key2, { - _i1.BlockHash? at, - }) async { - final hashedKey = _holds.hashedKeyFor( - key1, - key2, - ); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + _i5.Future> holds(int key1, _i2.AccountId32 key2, {_i1.BlockHash? at}) async { + final hashedKey = _holds.hashedKeyFor(key1, key2); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _holds.decodeValue(bytes); } @@ -52,19 +42,9 @@ class Queries { } /// A map that stores the current total balance on hold for every account on a given AssetId. - _i5.Future balancesOnHold( - int key1, - _i2.AccountId32 key2, { - _i1.BlockHash? at, - }) async { - final hashedKey = _balancesOnHold.hashedKeyFor( - key1, - key2, - ); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + _i5.Future balancesOnHold(int key1, _i2.AccountId32 key2, {_i1.BlockHash? at}) async { + final hashedKey = _balancesOnHold.hashedKeyFor(key1, key2); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _balancesOnHold.decodeValue(bytes); } @@ -72,26 +52,14 @@ class Queries { } /// Returns the storage key for `holds`. - _i6.Uint8List holdsKey( - int key1, - _i2.AccountId32 key2, - ) { - final hashedKey = _holds.hashedKeyFor( - key1, - key2, - ); + _i6.Uint8List holdsKey(int key1, _i2.AccountId32 key2) { + final hashedKey = _holds.hashedKeyFor(key1, key2); return hashedKey; } /// Returns the storage key for `balancesOnHold`. - _i6.Uint8List balancesOnHoldKey( - int key1, - _i2.AccountId32 key2, - ) { - final hashedKey = _balancesOnHold.hashedKeyFor( - key1, - key2, - ); + _i6.Uint8List balancesOnHoldKey(int key1, _i2.AccountId32 key2) { + final hashedKey = _balancesOnHold.hashedKeyFor(key1, key2); return hashedKey; } diff --git a/quantus_sdk/lib/generated/planck/pallets/balances.dart b/quantus_sdk/lib/generated/planck/pallets/balances.dart index 04e93051..be3312a9 100644 --- a/quantus_sdk/lib/generated/planck/pallets/balances.dart +++ b/quantus_sdk/lib/generated/planck/pallets/balances.dart @@ -21,15 +21,13 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue _totalIssuance = - const _i1.StorageValue( + final _i1.StorageValue _totalIssuance = const _i1.StorageValue( prefix: 'Balances', storage: 'TotalIssuance', valueCodec: _i2.U128Codec.codec, ); - final _i1.StorageValue _inactiveIssuance = - const _i1.StorageValue( + final _i1.StorageValue _inactiveIssuance = const _i1.StorageValue( prefix: 'Balances', storage: 'InactiveIssuance', valueCodec: _i2.U128Codec.codec, @@ -37,51 +35,48 @@ class Queries { final _i1.StorageMap<_i3.AccountId32, _i4.AccountData> _account = const _i1.StorageMap<_i3.AccountId32, _i4.AccountData>( - prefix: 'Balances', - storage: 'Account', - valueCodec: _i4.AccountData.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), - ); + prefix: 'Balances', + storage: 'Account', + valueCodec: _i4.AccountData.codec, + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); final _i1.StorageMap<_i3.AccountId32, List<_i5.BalanceLock>> _locks = const _i1.StorageMap<_i3.AccountId32, List<_i5.BalanceLock>>( - prefix: 'Balances', - storage: 'Locks', - valueCodec: _i2.SequenceCodec<_i5.BalanceLock>(_i5.BalanceLock.codec), - hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), - ); + prefix: 'Balances', + storage: 'Locks', + valueCodec: _i2.SequenceCodec<_i5.BalanceLock>(_i5.BalanceLock.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); final _i1.StorageMap<_i3.AccountId32, List<_i6.ReserveData>> _reserves = const _i1.StorageMap<_i3.AccountId32, List<_i6.ReserveData>>( - prefix: 'Balances', - storage: 'Reserves', - valueCodec: _i2.SequenceCodec<_i6.ReserveData>(_i6.ReserveData.codec), - hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), - ); + prefix: 'Balances', + storage: 'Reserves', + valueCodec: _i2.SequenceCodec<_i6.ReserveData>(_i6.ReserveData.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); final _i1.StorageMap<_i3.AccountId32, List<_i7.IdAmount>> _holds = const _i1.StorageMap<_i3.AccountId32, List<_i7.IdAmount>>( - prefix: 'Balances', - storage: 'Holds', - valueCodec: _i2.SequenceCodec<_i7.IdAmount>(_i7.IdAmount.codec), - hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), - ); + prefix: 'Balances', + storage: 'Holds', + valueCodec: _i2.SequenceCodec<_i7.IdAmount>(_i7.IdAmount.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); final _i1.StorageMap<_i3.AccountId32, List<_i8.IdAmount>> _freezes = const _i1.StorageMap<_i3.AccountId32, List<_i8.IdAmount>>( - prefix: 'Balances', - storage: 'Freezes', - valueCodec: _i2.SequenceCodec<_i8.IdAmount>(_i8.IdAmount.codec), - hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), - ); + prefix: 'Balances', + storage: 'Freezes', + valueCodec: _i2.SequenceCodec<_i8.IdAmount>(_i8.IdAmount.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); /// The total units issued in the system. _i9.Future totalIssuance({_i1.BlockHash? at}) async { final hashedKey = _totalIssuance.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _totalIssuance.decodeValue(bytes); } @@ -91,10 +86,7 @@ class Queries { /// The total units of outstanding deactivated balance in the system. _i9.Future inactiveIssuance({_i1.BlockHash? at}) async { final hashedKey = _inactiveIssuance.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _inactiveIssuance.decodeValue(bytes); } @@ -125,15 +117,9 @@ class Queries { /// `frame_system` data alongside the account data contrary to storing account balances in the /// `Balances` pallet, which uses a `StorageMap` to store balances data only. /// NOTE: This is only used in the case that this pallet is used to store balances. - _i9.Future<_i4.AccountData> account( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i9.Future<_i4.AccountData> account(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _account.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _account.decodeValue(bytes); } @@ -141,10 +127,7 @@ class Queries { free: BigInt.zero, reserved: BigInt.zero, frozen: BigInt.zero, - flags: BigInt.parse( - '170141183460469231731687303715884105728', - radix: 10, - ), + flags: BigInt.parse('170141183460469231731687303715884105728', radix: 10), ); /* Default */ } @@ -152,15 +135,9 @@ class Queries { /// NOTE: Should only be accessed when setting, changing and freeing a lock. /// /// Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` - _i9.Future> locks( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i9.Future> locks(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _locks.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _locks.decodeValue(bytes); } @@ -170,15 +147,9 @@ class Queries { /// Named reserves on some account balances. /// /// Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` - _i9.Future> reserves( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i9.Future> reserves(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _reserves.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _reserves.decodeValue(bytes); } @@ -186,15 +157,9 @@ class Queries { } /// Holds on account balances. - _i9.Future> holds( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i9.Future> holds(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _holds.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _holds.decodeValue(bytes); } @@ -202,15 +167,9 @@ class Queries { } /// Freeze locks on account balances. - _i9.Future> freezes( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i9.Future> freezes(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _freezes.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _freezes.decodeValue(bytes); } @@ -241,108 +200,68 @@ class Queries { /// `frame_system` data alongside the account data contrary to storing account balances in the /// `Balances` pallet, which uses a `StorageMap` to store balances data only. /// NOTE: This is only used in the case that this pallet is used to store balances. - _i9.Future> multiAccount( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i9.Future> multiAccount(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _account.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _account.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _account.decodeValue(v.key)).toList(); } return (keys - .map((key) => _i4.AccountData( - free: BigInt.zero, - reserved: BigInt.zero, - frozen: BigInt.zero, - flags: BigInt.parse( - '170141183460469231731687303715884105728', - radix: 10, + .map( + (key) => _i4.AccountData( + free: BigInt.zero, + reserved: BigInt.zero, + frozen: BigInt.zero, + flags: BigInt.parse('170141183460469231731687303715884105728', radix: 10), ), - )) - .toList() as List<_i4.AccountData>); /* Default */ + ) + .toList() + as List<_i4.AccountData>); /* Default */ } /// Any liquidity locks on some account balances. /// NOTE: Should only be accessed when setting, changing and freeing a lock. /// /// Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` - _i9.Future>> multiLocks( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i9.Future>> multiLocks(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _locks.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { return bytes.first.changes.map((v) => _locks.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>); /* Default */ + return (keys.map((key) => []).toList() as List>); /* Default */ } /// Named reserves on some account balances. /// /// Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` - _i9.Future>> multiReserves( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i9.Future>> multiReserves(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _reserves.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _reserves.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _reserves.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>); /* Default */ + return (keys.map((key) => []).toList() as List>); /* Default */ } /// Holds on account balances. - _i9.Future>> multiHolds( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i9.Future>> multiHolds(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _holds.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { return bytes.first.changes.map((v) => _holds.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>); /* Default */ + return (keys.map((key) => []).toList() as List>); /* Default */ } /// Freeze locks on account balances. - _i9.Future>> multiFreezes( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i9.Future>> multiFreezes(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _freezes.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _freezes.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _freezes.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>); /* Default */ + return (keys.map((key) => []).toList() as List>); /* Default */ } /// Returns the storage key for `totalIssuance`. @@ -428,14 +347,8 @@ class Txs { /// of the transfer, the account will be reaped. /// /// The dispatch origin for this call must be `Signed` by the transactor. - _i11.Balances transferAllowDeath({ - required _i12.MultiAddress dest, - required BigInt value, - }) { - return _i11.Balances(_i13.TransferAllowDeath( - dest: dest, - value: value, - )); + _i11.Balances transferAllowDeath({required _i12.MultiAddress dest, required BigInt value}) { + return _i11.Balances(_i13.TransferAllowDeath(dest: dest, value: value)); } /// Exactly as `transfer_allow_death`, except the origin must be root and the source account @@ -445,11 +358,7 @@ class Txs { required _i12.MultiAddress dest, required BigInt value, }) { - return _i11.Balances(_i13.ForceTransfer( - source: source, - dest: dest, - value: value, - )); + return _i11.Balances(_i13.ForceTransfer(source: source, dest: dest, value: value)); } /// Same as the [`transfer_allow_death`] call, but with a check that the transfer will not @@ -458,14 +367,8 @@ class Txs { /// 99% of the time you want [`transfer_allow_death`] instead. /// /// [`transfer_allow_death`]: struct.Pallet.html#method.transfer - _i11.Balances transferKeepAlive({ - required _i12.MultiAddress dest, - required BigInt value, - }) { - return _i11.Balances(_i13.TransferKeepAlive( - dest: dest, - value: value, - )); + _i11.Balances transferKeepAlive({required _i12.MultiAddress dest, required BigInt value}) { + return _i11.Balances(_i13.TransferKeepAlive(dest: dest, value: value)); } /// Transfer the entire transferable balance from the caller account. @@ -483,27 +386,15 @@ class Txs { /// of the funds the account has, causing the sender account to be killed (false), or /// transfer everything except at least the existential deposit, which will guarantee to /// keep the sender account alive (true). - _i11.Balances transferAll({ - required _i12.MultiAddress dest, - required bool keepAlive, - }) { - return _i11.Balances(_i13.TransferAll( - dest: dest, - keepAlive: keepAlive, - )); + _i11.Balances transferAll({required _i12.MultiAddress dest, required bool keepAlive}) { + return _i11.Balances(_i13.TransferAll(dest: dest, keepAlive: keepAlive)); } /// Unreserve some balance from a user by force. /// /// Can only be called by ROOT. - _i11.Balances forceUnreserve({ - required _i12.MultiAddress who, - required BigInt amount, - }) { - return _i11.Balances(_i13.ForceUnreserve( - who: who, - amount: amount, - )); + _i11.Balances forceUnreserve({required _i12.MultiAddress who, required BigInt amount}) { + return _i11.Balances(_i13.ForceUnreserve(who: who, amount: amount)); } /// Upgrade a specified account. @@ -521,14 +412,8 @@ class Txs { /// Set the regular balance of a given account. /// /// The dispatch origin for this call is `root`. - _i11.Balances forceSetBalance({ - required _i12.MultiAddress who, - required BigInt newFree, - }) { - return _i11.Balances(_i13.ForceSetBalance( - who: who, - newFree: newFree, - )); + _i11.Balances forceSetBalance({required _i12.MultiAddress who, required BigInt newFree}) { + return _i11.Balances(_i13.ForceSetBalance(who: who, newFree: newFree)); } /// Adjust the total issuance in a saturating way. @@ -536,14 +421,8 @@ class Txs { /// Can only be called by root and always needs a positive `delta`. /// /// # Example - _i11.Balances forceAdjustTotalIssuance({ - required _i14.AdjustmentDirection direction, - required BigInt delta, - }) { - return _i11.Balances(_i13.ForceAdjustTotalIssuance( - direction: direction, - delta: delta, - )); + _i11.Balances forceAdjustTotalIssuance({required _i14.AdjustmentDirection direction, required BigInt delta}) { + return _i11.Balances(_i13.ForceAdjustTotalIssuance(direction: direction, delta: delta)); } /// Burn the specified liquid free balance from the origin account. @@ -553,14 +432,8 @@ class Txs { /// /// Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, /// this `burn` operation will reduce total issuance by the amount _burned_. - _i11.Balances burn({ - required BigInt value, - required bool keepAlive, - }) { - return _i11.Balances(_i13.Burn( - value: value, - keepAlive: keepAlive, - )); + _i11.Balances burn({required BigInt value, required bool keepAlive}) { + return _i11.Balances(_i13.Burn(value: value, keepAlive: keepAlive)); } } diff --git a/quantus_sdk/lib/generated/planck/pallets/conviction_voting.dart b/quantus_sdk/lib/generated/planck/pallets/conviction_voting.dart index 866e87c4..5b01a8c0 100644 --- a/quantus_sdk/lib/generated/planck/pallets/conviction_voting.dart +++ b/quantus_sdk/lib/generated/planck/pallets/conviction_voting.dart @@ -24,69 +24,46 @@ class Queries { final _i1.StorageDoubleMap<_i2.AccountId32, int, _i3.Voting> _votingFor = const _i1.StorageDoubleMap<_i2.AccountId32, int, _i3.Voting>( - prefix: 'ConvictionVoting', - storage: 'VotingFor', - valueCodec: _i3.Voting.codec, - hasher1: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), - hasher2: _i1.StorageHasher.twoxx64Concat(_i4.U16Codec.codec), - ); + prefix: 'ConvictionVoting', + storage: 'VotingFor', + valueCodec: _i3.Voting.codec, + hasher1: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), + hasher2: _i1.StorageHasher.twoxx64Concat(_i4.U16Codec.codec), + ); - final _i1.StorageMap<_i2.AccountId32, List<_i5.Tuple2>> - _classLocksFor = + final _i1.StorageMap<_i2.AccountId32, List<_i5.Tuple2>> _classLocksFor = const _i1.StorageMap<_i2.AccountId32, List<_i5.Tuple2>>( - prefix: 'ConvictionVoting', - storage: 'ClassLocksFor', - valueCodec: - _i4.SequenceCodec<_i5.Tuple2>(_i5.Tuple2Codec( - _i4.U16Codec.codec, - _i4.U128Codec.codec, - )), - hasher: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), - ); + prefix: 'ConvictionVoting', + storage: 'ClassLocksFor', + valueCodec: _i4.SequenceCodec<_i5.Tuple2>( + _i5.Tuple2Codec(_i4.U16Codec.codec, _i4.U128Codec.codec), + ), + hasher: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), + ); /// All voting for a particular voter in a particular voting class. We store the balance for the /// number of votes that we have recorded. - _i6.Future<_i3.Voting> votingFor( - _i2.AccountId32 key1, - int key2, { - _i1.BlockHash? at, - }) async { - final hashedKey = _votingFor.hashedKeyFor( - key1, - key2, - ); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + _i6.Future<_i3.Voting> votingFor(_i2.AccountId32 key1, int key2, {_i1.BlockHash? at}) async { + final hashedKey = _votingFor.hashedKeyFor(key1, key2); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _votingFor.decodeValue(bytes); } - return _i3.Casting(_i7.Casting( - votes: [], - delegations: _i8.Delegations( - votes: BigInt.zero, - capital: BigInt.zero, - ), - prior: _i9.PriorLock( - 0, - BigInt.zero, + return _i3.Casting( + _i7.Casting( + votes: [], + delegations: _i8.Delegations(votes: BigInt.zero, capital: BigInt.zero), + prior: _i9.PriorLock(0, BigInt.zero), ), - )); /* Default */ + ); /* Default */ } /// The voting classes which have a non-zero lock requirement and the lock amounts which they /// require. The actual amount locked on behalf of this pallet should always be the maximum of /// this list. - _i6.Future>> classLocksFor( - _i2.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i6.Future>> classLocksFor(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _classLocksFor.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _classLocksFor.decodeValue(bytes); } @@ -100,30 +77,17 @@ class Queries { List<_i2.AccountId32> keys, { _i1.BlockHash? at, }) async { - final hashedKeys = - keys.map((key) => _classLocksFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final hashedKeys = keys.map((key) => _classLocksFor.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _classLocksFor.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _classLocksFor.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>>); /* Default */ + return (keys.map((key) => []).toList() as List>>); /* Default */ } /// Returns the storage key for `votingFor`. - _i10.Uint8List votingForKey( - _i2.AccountId32 key1, - int key2, - ) { - final hashedKey = _votingFor.hashedKeyFor( - key1, - key2, - ); + _i10.Uint8List votingForKey(_i2.AccountId32 key1, int key2) { + final hashedKey = _votingFor.hashedKeyFor(key1, key2); return hashedKey; } @@ -158,14 +122,8 @@ class Txs { /// - `vote`: The vote configuration. /// /// Weight: `O(R)` where R is the number of polls the voter has voted on. - _i11.ConvictionVoting vote({ - required BigInt pollIndex, - required _i12.AccountVote vote, - }) { - return _i11.ConvictionVoting(_i13.Vote( - pollIndex: pollIndex, - vote: vote, - )); + _i11.ConvictionVoting vote({required BigInt pollIndex, required _i12.AccountVote vote}) { + return _i11.ConvictionVoting(_i13.Vote(pollIndex: pollIndex, vote: vote)); } /// Delegate the voting power (with some given conviction) of the sending account for a @@ -197,12 +155,7 @@ class Txs { required _i15.Conviction conviction, required BigInt balance, }) { - return _i11.ConvictionVoting(_i13.Delegate( - class_: class_, - to: to, - conviction: conviction, - balance: balance, - )); + return _i11.ConvictionVoting(_i13.Delegate(class_: class_, to: to, conviction: conviction, balance: balance)); } /// Undelegate the voting power of the sending account for a particular class of polls. @@ -232,14 +185,8 @@ class Txs { /// - `target`: The account to remove the lock on. /// /// Weight: `O(R)` with R number of vote of target. - _i11.ConvictionVoting unlock({ - required int class_, - required _i14.MultiAddress target, - }) { - return _i11.ConvictionVoting(_i13.Unlock( - class_: class_, - target: target, - )); + _i11.ConvictionVoting unlock({required int class_, required _i14.MultiAddress target}) { + return _i11.ConvictionVoting(_i13.Unlock(class_: class_, target: target)); } /// Remove a vote for a poll. @@ -271,14 +218,8 @@ class Txs { /// /// Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. /// Weight is calculated for the maximum number of vote. - _i11.ConvictionVoting removeVote({ - int? class_, - required int index, - }) { - return _i11.ConvictionVoting(_i13.RemoveVote( - class_: class_, - index: index, - )); + _i11.ConvictionVoting removeVote({int? class_, required int index}) { + return _i11.ConvictionVoting(_i13.RemoveVote(class_: class_, index: index)); } /// Remove a vote for a poll. @@ -297,16 +238,8 @@ class Txs { /// /// Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. /// Weight is calculated for the maximum number of vote. - _i11.ConvictionVoting removeOtherVote({ - required _i14.MultiAddress target, - required int class_, - required int index, - }) { - return _i11.ConvictionVoting(_i13.RemoveOtherVote( - target: target, - class_: class_, - index: index, - )); + _i11.ConvictionVoting removeOtherVote({required _i14.MultiAddress target, required int class_, required int index}) { + return _i11.ConvictionVoting(_i13.RemoveOtherVote(target: target, class_: class_, index: index)); } } diff --git a/quantus_sdk/lib/generated/planck/pallets/mining_rewards.dart b/quantus_sdk/lib/generated/planck/pallets/mining_rewards.dart index a036087a..ce7825c3 100644 --- a/quantus_sdk/lib/generated/planck/pallets/mining_rewards.dart +++ b/quantus_sdk/lib/generated/planck/pallets/mining_rewards.dart @@ -12,8 +12,7 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue _collectedFees = - const _i1.StorageValue( + final _i1.StorageValue _collectedFees = const _i1.StorageValue( prefix: 'MiningRewards', storage: 'CollectedFees', valueCodec: _i2.U128Codec.codec, @@ -21,10 +20,7 @@ class Queries { _i3.Future collectedFees({_i1.BlockHash? at}) async { final hashedKey = _collectedFees.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _collectedFees.decodeValue(bytes); } @@ -42,10 +38,7 @@ class Constants { Constants(); /// The maximum total supply of tokens - final BigInt maxSupply = BigInt.parse( - '21000000000000000000', - radix: 10, - ); + final BigInt maxSupply = BigInt.parse('21000000000000000000', radix: 10); /// The divisor used to calculate block rewards from remaining supply final BigInt emissionDivisor = BigInt.from(26280000); diff --git a/quantus_sdk/lib/generated/planck/pallets/multisig.dart b/quantus_sdk/lib/generated/planck/pallets/multisig.dart index d0d2d54a..b7e635fe 100644 --- a/quantus_sdk/lib/generated/planck/pallets/multisig.dart +++ b/quantus_sdk/lib/generated/planck/pallets/multisig.dart @@ -21,32 +21,25 @@ class Queries { final _i1.StorageMap<_i2.AccountId32, _i3.MultisigData> _multisigs = const _i1.StorageMap<_i2.AccountId32, _i3.MultisigData>( - prefix: 'Multisig', - storage: 'Multisigs', - valueCodec: _i3.MultisigData.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'Multisig', + storage: 'Multisigs', + valueCodec: _i3.MultisigData.codec, + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); - final _i1.StorageDoubleMap<_i2.AccountId32, int, _i4.ProposalData> - _proposals = + final _i1.StorageDoubleMap<_i2.AccountId32, int, _i4.ProposalData> _proposals = const _i1.StorageDoubleMap<_i2.AccountId32, int, _i4.ProposalData>( - prefix: 'Multisig', - storage: 'Proposals', - valueCodec: _i4.ProposalData.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - hasher2: _i1.StorageHasher.twoxx64Concat(_i5.U32Codec.codec), - ); + prefix: 'Multisig', + storage: 'Proposals', + valueCodec: _i4.ProposalData.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + hasher2: _i1.StorageHasher.twoxx64Concat(_i5.U32Codec.codec), + ); /// Multisigs stored by their deterministic address - _i6.Future<_i3.MultisigData?> multisigs( - _i2.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i6.Future<_i3.MultisigData?> multisigs(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _multisigs.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _multisigs.decodeValue(bytes); } @@ -54,19 +47,9 @@ class Queries { } /// Proposals indexed by (multisig_address, proposal_nonce) - _i6.Future<_i4.ProposalData?> proposals( - _i2.AccountId32 key1, - int key2, { - _i1.BlockHash? at, - }) async { - final hashedKey = _proposals.hashedKeyFor( - key1, - key2, - ); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + _i6.Future<_i4.ProposalData?> proposals(_i2.AccountId32 key1, int key2, {_i1.BlockHash? at}) async { + final hashedKey = _proposals.hashedKeyFor(key1, key2); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _proposals.decodeValue(bytes); } @@ -74,19 +57,11 @@ class Queries { } /// Multisigs stored by their deterministic address - _i6.Future> multiMultisigs( - List<_i2.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i6.Future> multiMultisigs(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _multisigs.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _multisigs.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _multisigs.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -98,14 +73,8 @@ class Queries { } /// Returns the storage key for `proposals`. - _i7.Uint8List proposalsKey( - _i2.AccountId32 key1, - int key2, - ) { - final hashedKey = _proposals.hashedKeyFor( - key1, - key2, - ); + _i7.Uint8List proposalsKey(_i2.AccountId32 key1, int key2) { + final hashedKey = _proposals.hashedKeyFor(key1, key2); return hashedKey; } @@ -139,16 +108,8 @@ class Txs { /// /// Economic costs: /// - MultisigFee: burned immediately (spam prevention) - _i8.Multisig createMultisig({ - required List<_i2.AccountId32> signers, - required int threshold, - required BigInt nonce, - }) { - return _i8.Multisig(_i9.CreateMultisig( - signers: signers, - threshold: threshold, - nonce: nonce, - )); + _i8.Multisig createMultisig({required List<_i2.AccountId32> signers, required int threshold, required BigInt nonce}) { + return _i8.Multisig(_i9.CreateMultisig(signers: signers, threshold: threshold, nonce: nonce)); } /// Propose a transaction to be executed by the multisig @@ -167,16 +128,8 @@ class Txs { /// /// **Weight:** Charged upfront for worst-case (high-security path with decode). /// Refunded to actual cost on success based on whether HS path was taken. - _i8.Multisig propose({ - required _i2.AccountId32 multisigAddress, - required List call, - required int expiry, - }) { - return _i8.Multisig(_i9.Propose( - multisigAddress: multisigAddress, - call: call, - expiry: expiry, - )); + _i8.Multisig propose({required _i2.AccountId32 multisigAddress, required List call, required int expiry}) { + return _i8.Multisig(_i9.Propose(multisigAddress: multisigAddress, call: call, expiry: expiry)); } /// Approve a proposed transaction @@ -189,14 +142,8 @@ class Txs { /// - `proposal_id`: ID (nonce) of the proposal to approve /// /// Weight: Charges for MAX call size, refunds based on actual - _i8.Multisig approve({ - required _i2.AccountId32 multisigAddress, - required int proposalId, - }) { - return _i8.Multisig(_i9.Approve( - multisigAddress: multisigAddress, - proposalId: proposalId, - )); + _i8.Multisig approve({required _i2.AccountId32 multisigAddress, required int proposalId}) { + return _i8.Multisig(_i9.Approve(multisigAddress: multisigAddress, proposalId: proposalId)); } /// Cancel a proposed transaction (only by proposer) @@ -204,14 +151,8 @@ class Txs { /// Parameters: /// - `multisig_address`: The multisig account /// - `proposal_id`: ID (nonce) of the proposal to cancel - _i8.Multisig cancel({ - required _i2.AccountId32 multisigAddress, - required int proposalId, - }) { - return _i8.Multisig(_i9.Cancel( - multisigAddress: multisigAddress, - proposalId: proposalId, - )); + _i8.Multisig cancel({required _i2.AccountId32 multisigAddress, required int proposalId}) { + return _i8.Multisig(_i9.Cancel(multisigAddress: multisigAddress, proposalId: proposalId)); } /// Remove expired proposals and return deposits to proposers @@ -225,14 +166,8 @@ class Txs { /// lockup and enables multisig dissolution. /// /// The deposit is always returned to the original proposer, not the caller. - _i8.Multisig removeExpired({ - required _i2.AccountId32 multisigAddress, - required int proposalId, - }) { - return _i8.Multisig(_i9.RemoveExpired( - multisigAddress: multisigAddress, - proposalId: proposalId, - )); + _i8.Multisig removeExpired({required _i2.AccountId32 multisigAddress, required int proposalId}) { + return _i8.Multisig(_i9.RemoveExpired(multisigAddress: multisigAddress, proposalId: proposalId)); } /// Claim all deposits from expired proposals @@ -266,14 +201,8 @@ class Txs { /// Note: The weight charged includes both multisig bookkeeping and MaxInnerCallWeight. /// Actual weight is refunded based on the inner call's post-dispatch info. /// The inner call's weight is validated against MaxInnerCallWeight at propose time. - _i8.Multisig execute({ - required _i2.AccountId32 multisigAddress, - required int proposalId, - }) { - return _i8.Multisig(_i9.Execute( - multisigAddress: multisigAddress, - proposalId: proposalId, - )); + _i8.Multisig execute({required _i2.AccountId32 multisigAddress, required int proposalId}) { + return _i8.Multisig(_i9.Execute(multisigAddress: multisigAddress, proposalId: proposalId)); } } @@ -308,16 +237,7 @@ class Constants { final _i10.Permill signerStepFactor = 10000; /// Pallet ID for generating multisig addresses - final _i11.PalletId palletId = const [ - 112, - 121, - 47, - 109, - 108, - 116, - 115, - 103, - ]; + final _i11.PalletId palletId = const [112, 121, 47, 109, 108, 116, 115, 103]; /// Maximum duration (in blocks) that a proposal can be set to expire in the future. /// This prevents proposals from being created with extremely far expiry dates diff --git a/quantus_sdk/lib/generated/planck/pallets/preimage.dart b/quantus_sdk/lib/generated/planck/pallets/preimage.dart index 0cffd534..d0a8f646 100644 --- a/quantus_sdk/lib/generated/planck/pallets/preimage.dart +++ b/quantus_sdk/lib/generated/planck/pallets/preimage.dart @@ -19,41 +19,32 @@ class Queries { final _i1.StorageMap<_i2.H256, _i3.OldRequestStatus> _statusFor = const _i1.StorageMap<_i2.H256, _i3.OldRequestStatus>( - prefix: 'Preimage', - storage: 'StatusFor', - valueCodec: _i3.OldRequestStatus.codec, - hasher: _i1.StorageHasher.identity(_i2.H256Codec()), - ); + prefix: 'Preimage', + storage: 'StatusFor', + valueCodec: _i3.OldRequestStatus.codec, + hasher: _i1.StorageHasher.identity(_i2.H256Codec()), + ); final _i1.StorageMap<_i2.H256, _i4.RequestStatus> _requestStatusFor = const _i1.StorageMap<_i2.H256, _i4.RequestStatus>( - prefix: 'Preimage', - storage: 'RequestStatusFor', - valueCodec: _i4.RequestStatus.codec, - hasher: _i1.StorageHasher.identity(_i2.H256Codec()), - ); + prefix: 'Preimage', + storage: 'RequestStatusFor', + valueCodec: _i4.RequestStatus.codec, + hasher: _i1.StorageHasher.identity(_i2.H256Codec()), + ); final _i1.StorageMap<_i5.Tuple2<_i2.H256, int>, List> _preimageFor = const _i1.StorageMap<_i5.Tuple2<_i2.H256, int>, List>( - prefix: 'Preimage', - storage: 'PreimageFor', - valueCodec: _i6.U8SequenceCodec.codec, - hasher: _i1.StorageHasher.identity(_i5.Tuple2Codec<_i2.H256, int>( - _i2.H256Codec(), - _i6.U32Codec.codec, - )), - ); + prefix: 'Preimage', + storage: 'PreimageFor', + valueCodec: _i6.U8SequenceCodec.codec, + hasher: _i1.StorageHasher.identity(_i5.Tuple2Codec<_i2.H256, int>(_i2.H256Codec(), _i6.U32Codec.codec)), + ); /// The request status of a given hash. - _i7.Future<_i3.OldRequestStatus?> statusFor( - _i2.H256 key1, { - _i1.BlockHash? at, - }) async { + _i7.Future<_i3.OldRequestStatus?> statusFor(_i2.H256 key1, {_i1.BlockHash? at}) async { final hashedKey = _statusFor.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _statusFor.decodeValue(bytes); } @@ -61,30 +52,18 @@ class Queries { } /// The request status of a given hash. - _i7.Future<_i4.RequestStatus?> requestStatusFor( - _i2.H256 key1, { - _i1.BlockHash? at, - }) async { + _i7.Future<_i4.RequestStatus?> requestStatusFor(_i2.H256 key1, {_i1.BlockHash? at}) async { final hashedKey = _requestStatusFor.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _requestStatusFor.decodeValue(bytes); } return null; /* Nullable */ } - _i7.Future?> preimageFor( - _i5.Tuple2<_i2.H256, int> key1, { - _i1.BlockHash? at, - }) async { + _i7.Future?> preimageFor(_i5.Tuple2<_i2.H256, int> key1, {_i1.BlockHash? at}) async { final hashedKey = _preimageFor.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _preimageFor.decodeValue(bytes); } @@ -92,56 +71,30 @@ class Queries { } /// The request status of a given hash. - _i7.Future> multiStatusFor( - List<_i2.H256> keys, { - _i1.BlockHash? at, - }) async { + _i7.Future> multiStatusFor(List<_i2.H256> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _statusFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _statusFor.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _statusFor.decodeValue(v.key)).toList(); } return []; /* Nullable */ } /// The request status of a given hash. - _i7.Future> multiRequestStatusFor( - List<_i2.H256> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _requestStatusFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i7.Future> multiRequestStatusFor(List<_i2.H256> keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _requestStatusFor.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _requestStatusFor.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _requestStatusFor.decodeValue(v.key)).toList(); } return []; /* Nullable */ } - _i7.Future?>> multiPreimageFor( - List<_i5.Tuple2<_i2.H256, int>> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _preimageFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i7.Future?>> multiPreimageFor(List<_i5.Tuple2<_i2.H256, int>> keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _preimageFor.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _preimageFor.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _preimageFor.decodeValue(v.key)).toList(); } return []; /* Nullable */ } diff --git a/quantus_sdk/lib/generated/planck/pallets/q_po_w.dart b/quantus_sdk/lib/generated/planck/pallets/q_po_w.dart index 5a8be777..349b5172 100644 --- a/quantus_sdk/lib/generated/planck/pallets/q_po_w.dart +++ b/quantus_sdk/lib/generated/planck/pallets/q_po_w.dart @@ -12,22 +12,19 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue _lastBlockTime = - const _i1.StorageValue( + final _i1.StorageValue _lastBlockTime = const _i1.StorageValue( prefix: 'QPoW', storage: 'LastBlockTime', valueCodec: _i2.U64Codec.codec, ); - final _i1.StorageValue _lastBlockDuration = - const _i1.StorageValue( + final _i1.StorageValue _lastBlockDuration = const _i1.StorageValue( prefix: 'QPoW', storage: 'LastBlockDuration', valueCodec: _i2.U64Codec.codec, ); - final _i1.StorageValue<_i3.U512> _currentDifficulty = - const _i1.StorageValue<_i3.U512>( + final _i1.StorageValue<_i3.U512> _currentDifficulty = const _i1.StorageValue<_i3.U512>( prefix: 'QPoW', storage: 'CurrentDifficulty', valueCodec: _i3.U512Codec(), @@ -35,10 +32,7 @@ class Queries { _i4.Future lastBlockTime({_i1.BlockHash? at}) async { final hashedKey = _lastBlockTime.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _lastBlockTime.decodeValue(bytes); } @@ -47,10 +41,7 @@ class Queries { _i4.Future lastBlockDuration({_i1.BlockHash? at}) async { final hashedKey = _lastBlockDuration.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _lastBlockDuration.decodeValue(bytes); } @@ -59,18 +50,11 @@ class Queries { _i4.Future<_i3.U512> currentDifficulty({_i1.BlockHash? at}) async { final hashedKey = _currentDifficulty.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _currentDifficulty.decodeValue(bytes); } - return List.filled( - 8, - BigInt.zero, - growable: false, - ); /* Default */ + return List.filled(8, BigInt.zero, growable: false); /* Default */ } /// Returns the storage key for `lastBlockTime`. diff --git a/quantus_sdk/lib/generated/planck/pallets/recovery.dart b/quantus_sdk/lib/generated/planck/pallets/recovery.dart index 6400f72c..4e0e8134 100644 --- a/quantus_sdk/lib/generated/planck/pallets/recovery.dart +++ b/quantus_sdk/lib/generated/planck/pallets/recovery.dart @@ -18,41 +18,33 @@ class Queries { final _i1.StorageMap<_i2.AccountId32, _i3.RecoveryConfig> _recoverable = const _i1.StorageMap<_i2.AccountId32, _i3.RecoveryConfig>( - prefix: 'Recovery', - storage: 'Recoverable', - valueCodec: _i3.RecoveryConfig.codec, - hasher: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), - ); - - final _i1 - .StorageDoubleMap<_i2.AccountId32, _i2.AccountId32, _i4.ActiveRecovery> - _activeRecoveries = const _i1.StorageDoubleMap<_i2.AccountId32, - _i2.AccountId32, _i4.ActiveRecovery>( - prefix: 'Recovery', - storage: 'ActiveRecoveries', - valueCodec: _i4.ActiveRecovery.codec, - hasher1: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), - hasher2: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), - ); + prefix: 'Recovery', + storage: 'Recoverable', + valueCodec: _i3.RecoveryConfig.codec, + hasher: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), + ); + + final _i1.StorageDoubleMap<_i2.AccountId32, _i2.AccountId32, _i4.ActiveRecovery> _activeRecoveries = + const _i1.StorageDoubleMap<_i2.AccountId32, _i2.AccountId32, _i4.ActiveRecovery>( + prefix: 'Recovery', + storage: 'ActiveRecoveries', + valueCodec: _i4.ActiveRecovery.codec, + hasher1: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), + hasher2: _i1.StorageHasher.twoxx64Concat(_i2.AccountId32Codec()), + ); final _i1.StorageMap<_i2.AccountId32, _i2.AccountId32> _proxy = const _i1.StorageMap<_i2.AccountId32, _i2.AccountId32>( - prefix: 'Recovery', - storage: 'Proxy', - valueCodec: _i2.AccountId32Codec(), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'Recovery', + storage: 'Proxy', + valueCodec: _i2.AccountId32Codec(), + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); /// The set of recoverable accounts and their recovery configuration. - _i5.Future<_i3.RecoveryConfig?> recoverable( - _i2.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i5.Future<_i3.RecoveryConfig?> recoverable(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _recoverable.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _recoverable.decodeValue(bytes); } @@ -68,14 +60,8 @@ class Queries { _i2.AccountId32 key2, { _i1.BlockHash? at, }) async { - final hashedKey = _activeRecoveries.hashedKeyFor( - key1, - key2, - ); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final hashedKey = _activeRecoveries.hashedKeyFor(key1, key2); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _activeRecoveries.decodeValue(bytes); } @@ -85,15 +71,9 @@ class Queries { /// The list of allowed proxy accounts. /// /// Map from the user who can access it to the recovered account. - _i5.Future<_i2.AccountId32?> proxy( - _i2.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i5.Future<_i2.AccountId32?> proxy(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _proxy.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _proxy.decodeValue(bytes); } @@ -101,20 +81,11 @@ class Queries { } /// The set of recoverable accounts and their recovery configuration. - _i5.Future> multiRecoverable( - List<_i2.AccountId32> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _recoverable.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i5.Future> multiRecoverable(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _recoverable.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _recoverable.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _recoverable.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -122,15 +93,9 @@ class Queries { /// The list of allowed proxy accounts. /// /// Map from the user who can access it to the recovered account. - _i5.Future> multiProxy( - List<_i2.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i5.Future> multiProxy(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _proxy.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { return bytes.first.changes.map((v) => _proxy.decodeValue(v.key)).toList(); } @@ -144,14 +109,8 @@ class Queries { } /// Returns the storage key for `activeRecoveries`. - _i6.Uint8List activeRecoveriesKey( - _i2.AccountId32 key1, - _i2.AccountId32 key2, - ) { - final hashedKey = _activeRecoveries.hashedKeyFor( - key1, - key2, - ); + _i6.Uint8List activeRecoveriesKey(_i2.AccountId32 key1, _i2.AccountId32 key2) { + final hashedKey = _activeRecoveries.hashedKeyFor(key1, key2); return hashedKey; } @@ -191,14 +150,8 @@ class Txs { /// Parameters: /// - `account`: The recovered account you want to make a call on-behalf-of. /// - `call`: The call you want to make with the recovered account. - _i7.Recovery asRecovered({ - required _i8.MultiAddress account, - required _i7.RuntimeCall call, - }) { - return _i7.Recovery(_i9.AsRecovered( - account: account, - call: call, - )); + _i7.Recovery asRecovered({required _i8.MultiAddress account, required _i7.RuntimeCall call}) { + return _i7.Recovery(_i9.AsRecovered(account: account, call: call)); } /// Allow ROOT to bypass the recovery process and set a rescuer account @@ -209,14 +162,8 @@ class Txs { /// Parameters: /// - `lost`: The "lost account" to be recovered. /// - `rescuer`: The "rescuer account" which can call as the lost account. - _i7.Recovery setRecovered({ - required _i8.MultiAddress lost, - required _i8.MultiAddress rescuer, - }) { - return _i7.Recovery(_i9.SetRecovered( - lost: lost, - rescuer: rescuer, - )); + _i7.Recovery setRecovered({required _i8.MultiAddress lost, required _i8.MultiAddress rescuer}) { + return _i7.Recovery(_i9.SetRecovered(lost: lost, rescuer: rescuer)); } /// Create a recovery configuration for your account. This makes your account recoverable. @@ -240,11 +187,7 @@ class Txs { required int threshold, required int delayPeriod, }) { - return _i7.Recovery(_i9.CreateRecovery( - friends: friends, - threshold: threshold, - delayPeriod: delayPeriod, - )); + return _i7.Recovery(_i9.CreateRecovery(friends: friends, threshold: threshold, delayPeriod: delayPeriod)); } /// Initiate the process for recovering a recoverable account. @@ -274,14 +217,8 @@ class Txs { /// /// The combination of these two parameters must point to an active recovery /// process. - _i7.Recovery vouchRecovery({ - required _i8.MultiAddress lost, - required _i8.MultiAddress rescuer, - }) { - return _i7.Recovery(_i9.VouchRecovery( - lost: lost, - rescuer: rescuer, - )); + _i7.Recovery vouchRecovery({required _i8.MultiAddress lost, required _i8.MultiAddress rescuer}) { + return _i7.Recovery(_i9.VouchRecovery(lost: lost, rescuer: rescuer)); } /// Allow a successful rescuer to claim their recovered account. diff --git a/quantus_sdk/lib/generated/planck/pallets/referenda.dart b/quantus_sdk/lib/generated/planck/pallets/referenda.dart index b16924a5..869b1bb2 100644 --- a/quantus_sdk/lib/generated/planck/pallets/referenda.dart +++ b/quantus_sdk/lib/generated/planck/pallets/referenda.dart @@ -27,8 +27,7 @@ class Queries { valueCodec: _i2.U32Codec.codec, ); - final _i1.StorageMap _referendumInfoFor = - const _i1.StorageMap( + final _i1.StorageMap _referendumInfoFor = const _i1.StorageMap( prefix: 'Referenda', storage: 'ReferendumInfoFor', valueCodec: _i3.ReferendumInfo.codec, @@ -37,26 +36,22 @@ class Queries { final _i1.StorageMap>> _trackQueue = const _i1.StorageMap>>( - prefix: 'Referenda', - storage: 'TrackQueue', - valueCodec: - _i2.SequenceCodec<_i4.Tuple2>(_i4.Tuple2Codec( - _i2.U32Codec.codec, - _i2.U128Codec.codec, - )), - hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), - ); + prefix: 'Referenda', + storage: 'TrackQueue', + valueCodec: _i2.SequenceCodec<_i4.Tuple2>( + _i4.Tuple2Codec(_i2.U32Codec.codec, _i2.U128Codec.codec), + ), + hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), + ); - final _i1.StorageMap _decidingCount = - const _i1.StorageMap( + final _i1.StorageMap _decidingCount = const _i1.StorageMap( prefix: 'Referenda', storage: 'DecidingCount', valueCodec: _i2.U32Codec.codec, hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), ); - final _i1.StorageMap _metadataOf = - const _i1.StorageMap( + final _i1.StorageMap _metadataOf = const _i1.StorageMap( prefix: 'Referenda', storage: 'MetadataOf', valueCodec: _i5.H256Codec(), @@ -66,10 +61,7 @@ class Queries { /// The next free referendum index, aka the number of referenda started so far. _i6.Future referendumCount({_i1.BlockHash? at}) async { final hashedKey = _referendumCount.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _referendumCount.decodeValue(bytes); } @@ -77,15 +69,9 @@ class Queries { } /// Information concerning any given referendum. - _i6.Future<_i3.ReferendumInfo?> referendumInfoFor( - int key1, { - _i1.BlockHash? at, - }) async { + _i6.Future<_i3.ReferendumInfo?> referendumInfoFor(int key1, {_i1.BlockHash? at}) async { final hashedKey = _referendumInfoFor.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _referendumInfoFor.decodeValue(bytes); } @@ -96,15 +82,9 @@ class Queries { /// conviction-weighted approvals. /// /// This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. - _i6.Future>> trackQueue( - int key1, { - _i1.BlockHash? at, - }) async { + _i6.Future>> trackQueue(int key1, {_i1.BlockHash? at}) async { final hashedKey = _trackQueue.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _trackQueue.decodeValue(bytes); } @@ -112,15 +92,9 @@ class Queries { } /// The number of referenda being decided currently. - _i6.Future decidingCount( - int key1, { - _i1.BlockHash? at, - }) async { + _i6.Future decidingCount(int key1, {_i1.BlockHash? at}) async { final hashedKey = _decidingCount.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _decidingCount.decodeValue(bytes); } @@ -133,15 +107,9 @@ class Queries { /// /// Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove) /// large preimages. - _i6.Future<_i5.H256?> metadataOf( - int key1, { - _i1.BlockHash? at, - }) async { + _i6.Future<_i5.H256?> metadataOf(int key1, {_i1.BlockHash? at}) async { final hashedKey = _metadataOf.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _metadataOf.decodeValue(bytes); } @@ -149,20 +117,11 @@ class Queries { } /// Information concerning any given referendum. - _i6.Future> multiReferendumInfoFor( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _referendumInfoFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i6.Future> multiReferendumInfoFor(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _referendumInfoFor.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _referendumInfoFor.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _referendumInfoFor.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -171,40 +130,21 @@ class Queries { /// conviction-weighted approvals. /// /// This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. - _i6.Future>>> multiTrackQueue( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _trackQueue.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i6.Future>>> multiTrackQueue(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _trackQueue.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _trackQueue.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _trackQueue.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>>); /* Default */ + return (keys.map((key) => []).toList() as List>>); /* Default */ } /// The number of referenda being decided currently. - _i6.Future> multiDecidingCount( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _decidingCount.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i6.Future> multiDecidingCount(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _decidingCount.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _decidingCount.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _decidingCount.decodeValue(v.key)).toList(); } return (keys.map((key) => 0).toList() as List); /* Default */ } @@ -215,20 +155,11 @@ class Queries { /// /// Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove) /// large preimages. - _i6.Future> multiMetadataOf( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _metadataOf.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i6.Future> multiMetadataOf(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _metadataOf.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _metadataOf.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _metadataOf.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -305,11 +236,9 @@ class Txs { required _i10.Bounded proposal, required _i11.DispatchTime enactmentMoment, }) { - return _i8.Referenda(_i12.Submit( - proposalOrigin: proposalOrigin, - proposal: proposal, - enactmentMoment: enactmentMoment, - )); + return _i8.Referenda( + _i12.Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment), + ); } /// Post the Decision Deposit for a referendum. @@ -394,14 +323,8 @@ class Txs { /// metadata of a finished referendum. /// - `index`: The index of a referendum to set or clear metadata for. /// - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. - _i8.Referenda setMetadata({ - required int index, - _i5.H256? maybeHash, - }) { - return _i8.Referenda(_i12.SetMetadata( - index: index, - maybeHash: maybeHash, - )); + _i8.Referenda setMetadata({required int index, _i5.H256? maybeHash}) { + return _i8.Referenda(_i12.SetMetadata(index: index, maybeHash: maybeHash)); } } @@ -437,17 +360,9 @@ class Constants { decisionPeriod: 50400, confirmPeriod: 3600, minEnactmentPeriod: 7200, - minApproval: const _i14.LinearDecreasing( - length: 1000000000, - floor: 550000000, - ceil: 700000000, - ), - minSupport: const _i14.LinearDecreasing( - length: 1000000000, - floor: 50000000, - ceil: 250000000, - ), + minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 550000000, ceil: 700000000), + minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 50000000, ceil: 250000000), ), - ) + ), ]; } diff --git a/quantus_sdk/lib/generated/planck/pallets/reversible_transfers.dart b/quantus_sdk/lib/generated/planck/pallets/reversible_transfers.dart index f0e5ed9b..9acfbc74 100644 --- a/quantus_sdk/lib/generated/planck/pallets/reversible_transfers.dart +++ b/quantus_sdk/lib/generated/planck/pallets/reversible_transfers.dart @@ -5,8 +5,7 @@ import 'dart:typed_data' as _i8; import 'package:polkadart/polkadart.dart' as _i1; import 'package:polkadart/scale_codec.dart' as _i6; -import '../types/pallet_reversible_transfers/high_security_account_data.dart' - as _i3; +import '../types/pallet_reversible_transfers/high_security_account_data.dart' as _i3; import '../types/pallet_reversible_transfers/pallet/call.dart' as _i11; import '../types/pallet_reversible_transfers/pending_transfer.dart' as _i5; import '../types/primitive_types/h256.dart' as _i4; @@ -21,42 +20,39 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageMap<_i2.AccountId32, _i3.HighSecurityAccountData> - _highSecurityAccounts = + final _i1.StorageMap<_i2.AccountId32, _i3.HighSecurityAccountData> _highSecurityAccounts = const _i1.StorageMap<_i2.AccountId32, _i3.HighSecurityAccountData>( - prefix: 'ReversibleTransfers', - storage: 'HighSecurityAccounts', - valueCodec: _i3.HighSecurityAccountData.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'ReversibleTransfers', + storage: 'HighSecurityAccounts', + valueCodec: _i3.HighSecurityAccountData.codec, + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); final _i1.StorageMap<_i4.H256, _i5.PendingTransfer> _pendingTransfers = const _i1.StorageMap<_i4.H256, _i5.PendingTransfer>( - prefix: 'ReversibleTransfers', - storage: 'PendingTransfers', - valueCodec: _i5.PendingTransfer.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i4.H256Codec()), - ); + prefix: 'ReversibleTransfers', + storage: 'PendingTransfers', + valueCodec: _i5.PendingTransfer.codec, + hasher: _i1.StorageHasher.blake2b128Concat(_i4.H256Codec()), + ); - final _i1.StorageMap<_i2.AccountId32, List<_i4.H256>> - _pendingTransfersBySender = + final _i1.StorageMap<_i2.AccountId32, List<_i4.H256>> _pendingTransfersBySender = const _i1.StorageMap<_i2.AccountId32, List<_i4.H256>>( - prefix: 'ReversibleTransfers', - storage: 'PendingTransfersBySender', - valueCodec: _i6.SequenceCodec<_i4.H256>(_i4.H256Codec()), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'ReversibleTransfers', + storage: 'PendingTransfersBySender', + valueCodec: _i6.SequenceCodec<_i4.H256>(_i4.H256Codec()), + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); final _i1.StorageMap<_i2.AccountId32, List<_i2.AccountId32>> _guardianIndex = const _i1.StorageMap<_i2.AccountId32, List<_i2.AccountId32>>( - prefix: 'ReversibleTransfers', - storage: 'GuardianIndex', - valueCodec: _i6.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'ReversibleTransfers', + storage: 'GuardianIndex', + valueCodec: _i6.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()), + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); - final _i1.StorageValue _nextTransactionId = - const _i1.StorageValue( + final _i1.StorageValue _nextTransactionId = const _i1.StorageValue( prefix: 'ReversibleTransfers', storage: 'NextTransactionId', valueCodec: _i6.U64Codec.codec, @@ -64,15 +60,9 @@ class Queries { /// Maps accounts to their chosen reversibility delay period (in milliseconds). /// Accounts present in this map have reversibility enabled. - _i7.Future<_i3.HighSecurityAccountData?> highSecurityAccounts( - _i2.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i7.Future<_i3.HighSecurityAccountData?> highSecurityAccounts(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _highSecurityAccounts.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _highSecurityAccounts.decodeValue(bytes); } @@ -81,15 +71,9 @@ class Queries { /// Stores the details of pending transactions scheduled for delayed execution. /// Keyed by the unique transaction ID. - _i7.Future<_i5.PendingTransfer?> pendingTransfers( - _i4.H256 key1, { - _i1.BlockHash? at, - }) async { + _i7.Future<_i5.PendingTransfer?> pendingTransfers(_i4.H256 key1, {_i1.BlockHash? at}) async { final hashedKey = _pendingTransfers.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _pendingTransfers.decodeValue(bytes); } @@ -97,15 +81,9 @@ class Queries { } /// Maps sender accounts to their list of pending transaction IDs. - _i7.Future> pendingTransfersBySender( - _i2.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i7.Future> pendingTransfersBySender(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _pendingTransfersBySender.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _pendingTransfersBySender.decodeValue(bytes); } @@ -115,15 +93,9 @@ class Queries { /// Maps guardian accounts to the list of accounts they protect. /// This allows the UI to efficiently query all accounts for which a given account is a /// guardian. - _i7.Future> guardianIndex( - _i2.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i7.Future> guardianIndex(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _guardianIndex.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _guardianIndex.decodeValue(bytes); } @@ -135,10 +107,7 @@ class Queries { /// produce the same `tx_id`, even if they have identical parameters. _i7.Future nextTransactionId({_i1.BlockHash? at}) async { final hashedKey = _nextTransactionId.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _nextTransactionId.decodeValue(bytes); } @@ -151,36 +120,21 @@ class Queries { List<_i2.AccountId32> keys, { _i1.BlockHash? at, }) async { - final hashedKeys = - keys.map((key) => _highSecurityAccounts.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final hashedKeys = keys.map((key) => _highSecurityAccounts.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _highSecurityAccounts.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _highSecurityAccounts.decodeValue(v.key)).toList(); } return []; /* Nullable */ } /// Stores the details of pending transactions scheduled for delayed execution. /// Keyed by the unique transaction ID. - _i7.Future> multiPendingTransfers( - List<_i4.H256> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _pendingTransfers.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i7.Future> multiPendingTransfers(List<_i4.H256> keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _pendingTransfers.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _pendingTransfers.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _pendingTransfers.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -190,41 +144,24 @@ class Queries { List<_i2.AccountId32> keys, { _i1.BlockHash? at, }) async { - final hashedKeys = - keys.map((key) => _pendingTransfersBySender.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final hashedKeys = keys.map((key) => _pendingTransfersBySender.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _pendingTransfersBySender.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _pendingTransfersBySender.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>); /* Default */ + return (keys.map((key) => []).toList() as List>); /* Default */ } /// Maps guardian accounts to the list of accounts they protect. /// This allows the UI to efficiently query all accounts for which a given account is a /// guardian. - _i7.Future>> multiGuardianIndex( - List<_i2.AccountId32> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _guardianIndex.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i7.Future>> multiGuardianIndex(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _guardianIndex.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _guardianIndex.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _guardianIndex.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>); /* Default */ + return (keys.map((key) => []).toList() as List>); /* Default */ } /// Returns the storage key for `highSecurityAccounts`. @@ -321,10 +258,7 @@ class Txs { required _i10.BlockNumberOrTimestamp delay, required _i2.AccountId32 guardian, }) { - return _i9.ReversibleTransfers(_i11.SetHighSecurity( - delay: delay, - guardian: guardian, - )); + return _i9.ReversibleTransfers(_i11.SetHighSecurity(delay: delay, guardian: guardian)); } /// Cancel a pending reversible transaction scheduled by the caller. @@ -355,14 +289,8 @@ class Txs { } /// Schedule a transaction for delayed execution. - _i9.ReversibleTransfers scheduleTransfer({ - required _i12.MultiAddress dest, - required BigInt amount, - }) { - return _i9.ReversibleTransfers(_i11.ScheduleTransfer( - dest: dest, - amount: amount, - )); + _i9.ReversibleTransfers scheduleTransfer({required _i12.MultiAddress dest, required BigInt amount}) { + return _i9.ReversibleTransfers(_i11.ScheduleTransfer(dest: dest, amount: amount)); } /// Schedule a transaction for delayed execution with a custom, one-time delay. @@ -376,11 +304,7 @@ class Txs { required BigInt amount, required _i10.BlockNumberOrTimestamp delay, }) { - return _i9.ReversibleTransfers(_i11.ScheduleTransferWithDelay( - dest: dest, - amount: amount, - delay: delay, - )); + return _i9.ReversibleTransfers(_i11.ScheduleTransferWithDelay(dest: dest, amount: amount, delay: delay)); } /// Schedule an asset transfer (pallet-assets) for delayed execution using the configured @@ -390,11 +314,7 @@ class Txs { required _i12.MultiAddress dest, required BigInt amount, }) { - return _i9.ReversibleTransfers(_i11.ScheduleAssetTransfer( - assetId: assetId, - dest: dest, - amount: amount, - )); + return _i9.ReversibleTransfers(_i11.ScheduleAssetTransfer(assetId: assetId, dest: dest, amount: amount)); } /// Schedule an asset transfer (pallet-assets) with a custom one-time delay. @@ -404,12 +324,9 @@ class Txs { required BigInt amount, required _i10.BlockNumberOrTimestamp delay, }) { - return _i9.ReversibleTransfers(_i11.ScheduleAssetTransferWithDelay( - assetId: assetId, - dest: dest, - amount: amount, - delay: delay, - )); + return _i9.ReversibleTransfers( + _i11.ScheduleAssetTransferWithDelay(assetId: assetId, dest: dest, amount: amount, delay: delay), + ); } /// Allows the guardian to recover all funds from a high-security account diff --git a/quantus_sdk/lib/generated/planck/pallets/scheduler.dart b/quantus_sdk/lib/generated/planck/pallets/scheduler.dart index 21d34fc4..c7525719 100644 --- a/quantus_sdk/lib/generated/planck/pallets/scheduler.dart +++ b/quantus_sdk/lib/generated/planck/pallets/scheduler.dart @@ -18,70 +18,57 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue _incompleteBlockSince = - const _i1.StorageValue( + final _i1.StorageValue _incompleteBlockSince = const _i1.StorageValue( prefix: 'Scheduler', storage: 'IncompleteBlockSince', valueCodec: _i2.U32Codec.codec, ); - final _i1.StorageValue _incompleteTimestampSince = - const _i1.StorageValue( + final _i1.StorageValue _incompleteTimestampSince = const _i1.StorageValue( prefix: 'Scheduler', storage: 'IncompleteTimestampSince', valueCodec: _i2.U64Codec.codec, ); - final _i1.StorageValue _lastProcessedTimestamp = - const _i1.StorageValue( + final _i1.StorageValue _lastProcessedTimestamp = const _i1.StorageValue( prefix: 'Scheduler', storage: 'LastProcessedTimestamp', valueCodec: _i2.U64Codec.codec, ); - final _i1.StorageMap<_i3.BlockNumberOrTimestamp, List<_i4.Scheduled?>> - _agenda = + final _i1.StorageMap<_i3.BlockNumberOrTimestamp, List<_i4.Scheduled?>> _agenda = const _i1.StorageMap<_i3.BlockNumberOrTimestamp, List<_i4.Scheduled?>>( - prefix: 'Scheduler', - storage: 'Agenda', - valueCodec: _i2.SequenceCodec<_i4.Scheduled?>( - _i2.OptionCodec<_i4.Scheduled>(_i4.Scheduled.codec)), - hasher: _i1.StorageHasher.twoxx64Concat(_i3.BlockNumberOrTimestamp.codec), - ); - - final _i1 - .StorageMap<_i5.Tuple2<_i3.BlockNumberOrTimestamp, int>, _i6.RetryConfig> - _retries = const _i1.StorageMap< - _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>, _i6.RetryConfig>( - prefix: 'Scheduler', - storage: 'Retries', - valueCodec: _i6.RetryConfig.codec, - hasher: _i1.StorageHasher.blake2b128Concat( - _i5.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( - _i3.BlockNumberOrTimestamp.codec, - _i2.U32Codec.codec, - )), - ); - - final _i1.StorageMap, _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>> - _lookup = const _i1 - .StorageMap, _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>>( - prefix: 'Scheduler', - storage: 'Lookup', - valueCodec: _i5.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( - _i3.BlockNumberOrTimestamp.codec, - _i2.U32Codec.codec, - ), - hasher: _i1.StorageHasher.twoxx64Concat(_i2.U8ArrayCodec(32)), - ); + prefix: 'Scheduler', + storage: 'Agenda', + valueCodec: _i2.SequenceCodec<_i4.Scheduled?>(_i2.OptionCodec<_i4.Scheduled>(_i4.Scheduled.codec)), + hasher: _i1.StorageHasher.twoxx64Concat(_i3.BlockNumberOrTimestamp.codec), + ); + + final _i1.StorageMap<_i5.Tuple2<_i3.BlockNumberOrTimestamp, int>, _i6.RetryConfig> _retries = + const _i1.StorageMap<_i5.Tuple2<_i3.BlockNumberOrTimestamp, int>, _i6.RetryConfig>( + prefix: 'Scheduler', + storage: 'Retries', + valueCodec: _i6.RetryConfig.codec, + hasher: _i1.StorageHasher.blake2b128Concat( + _i5.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>(_i3.BlockNumberOrTimestamp.codec, _i2.U32Codec.codec), + ), + ); + + final _i1.StorageMap, _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>> _lookup = + const _i1.StorageMap, _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>>( + prefix: 'Scheduler', + storage: 'Lookup', + valueCodec: _i5.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( + _i3.BlockNumberOrTimestamp.codec, + _i2.U32Codec.codec, + ), + hasher: _i1.StorageHasher.twoxx64Concat(_i2.U8ArrayCodec(32)), + ); /// Tracks incomplete block-based agendas that need to be processed in a later block. _i7.Future incompleteBlockSince({_i1.BlockHash? at}) async { final hashedKey = _incompleteBlockSince.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _incompleteBlockSince.decodeValue(bytes); } @@ -91,10 +78,7 @@ class Queries { /// Tracks incomplete timestamp-based agendas that need to be processed in a later block. _i7.Future incompleteTimestampSince({_i1.BlockHash? at}) async { final hashedKey = _incompleteTimestampSince.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _incompleteTimestampSince.decodeValue(bytes); } @@ -105,10 +89,7 @@ class Queries { /// Used to avoid reprocessing all buckets from 0 on every run. _i7.Future lastProcessedTimestamp({_i1.BlockHash? at}) async { final hashedKey = _lastProcessedTimestamp.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _lastProcessedTimestamp.decodeValue(bytes); } @@ -116,15 +97,9 @@ class Queries { } /// Items to be executed, indexed by the block number that they should be executed on. - _i7.Future> agenda( - _i3.BlockNumberOrTimestamp key1, { - _i1.BlockHash? at, - }) async { + _i7.Future> agenda(_i3.BlockNumberOrTimestamp key1, {_i1.BlockHash? at}) async { final hashedKey = _agenda.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _agenda.decodeValue(bytes); } @@ -132,15 +107,9 @@ class Queries { } /// Retry configurations for items to be executed, indexed by task address. - _i7.Future<_i6.RetryConfig?> retries( - _i5.Tuple2<_i3.BlockNumberOrTimestamp, int> key1, { - _i1.BlockHash? at, - }) async { + _i7.Future<_i6.RetryConfig?> retries(_i5.Tuple2<_i3.BlockNumberOrTimestamp, int> key1, {_i1.BlockHash? at}) async { final hashedKey = _retries.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _retries.decodeValue(bytes); } @@ -148,15 +117,9 @@ class Queries { } /// Lookup from a name to the block number and index of the task. - _i7.Future<_i5.Tuple2<_i3.BlockNumberOrTimestamp, int>?> lookup( - List key1, { - _i1.BlockHash? at, - }) async { + _i7.Future<_i5.Tuple2<_i3.BlockNumberOrTimestamp, int>?> lookup(List key1, {_i1.BlockHash? at}) async { final hashedKey = _lookup.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _lookup.decodeValue(bytes); } @@ -164,22 +127,13 @@ class Queries { } /// Items to be executed, indexed by the block number that they should be executed on. - _i7.Future>> multiAgenda( - List<_i3.BlockNumberOrTimestamp> keys, { - _i1.BlockHash? at, - }) async { + _i7.Future>> multiAgenda(List<_i3.BlockNumberOrTimestamp> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _agenda.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _agenda.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _agenda.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>); /* Default */ + return (keys.map((key) => []).toList() as List>); /* Default */ } /// Retry configurations for items to be executed, indexed by task address. @@ -188,14 +142,9 @@ class Queries { _i1.BlockHash? at, }) async { final hashedKeys = keys.map((key) => _retries.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _retries.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _retries.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -206,14 +155,9 @@ class Queries { _i1.BlockHash? at, }) async { final hashedKeys = keys.map((key) => _lookup.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _lookup.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _lookup.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -276,27 +220,13 @@ class Queries { class Txs { const Txs(); - _i9.Scheduler schedule({ - required int when, - required int priority, - required _i9.RuntimeCall call, - }) { - return _i9.Scheduler(_i10.Schedule( - when: when, - priority: priority, - call: call, - )); + _i9.Scheduler schedule({required int when, required int priority, required _i9.RuntimeCall call}) { + return _i9.Scheduler(_i10.Schedule(when: when, priority: priority, call: call)); } /// Cancel an anonymously scheduled task. - _i9.Scheduler cancel({ - required _i3.BlockNumberOrTimestamp when, - required int index, - }) { - return _i9.Scheduler(_i10.Cancel( - when: when, - index: index, - )); + _i9.Scheduler cancel({required _i3.BlockNumberOrTimestamp when, required int index}) { + return _i9.Scheduler(_i10.Cancel(when: when, index: index)); } _i9.Scheduler scheduleNamed({ @@ -305,12 +235,7 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler(_i10.ScheduleNamed( - id: id, - when: when, - priority: priority, - call: call, - )); + return _i9.Scheduler(_i10.ScheduleNamed(id: id, when: when, priority: priority, call: call)); } /// Cancel a named scheduled task. @@ -323,11 +248,7 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler(_i10.ScheduleAfter( - after: after, - priority: priority, - call: call, - )); + return _i9.Scheduler(_i10.ScheduleAfter(after: after, priority: priority, call: call)); } _i9.Scheduler scheduleNamedAfter({ @@ -336,12 +257,7 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler(_i10.ScheduleNamedAfter( - id: id, - after: after, - priority: priority, - call: call, - )); + return _i9.Scheduler(_i10.ScheduleNamedAfter(id: id, after: after, priority: priority, call: call)); } /// Set a retry configuration for a task so that, in case its scheduled run fails, it will @@ -364,11 +280,7 @@ class Txs { required int retries, required _i3.BlockNumberOrTimestamp period, }) { - return _i9.Scheduler(_i10.SetRetry( - task: task, - retries: retries, - period: period, - )); + return _i9.Scheduler(_i10.SetRetry(task: task, retries: retries, period: period)); } /// Set a retry configuration for a named task so that, in case its scheduled run fails, it @@ -391,16 +303,11 @@ class Txs { required int retries, required _i3.BlockNumberOrTimestamp period, }) { - return _i9.Scheduler(_i10.SetRetryNamed( - id: id, - retries: retries, - period: period, - )); + return _i9.Scheduler(_i10.SetRetryNamed(id: id, retries: retries, period: period)); } /// Removes the retry configuration of a task. - _i9.Scheduler cancelRetry( - {required _i5.Tuple2<_i3.BlockNumberOrTimestamp, int> task}) { + _i9.Scheduler cancelRetry({required _i5.Tuple2<_i3.BlockNumberOrTimestamp, int> task}) { return _i9.Scheduler(_i10.CancelRetry(task: task)); } @@ -416,10 +323,7 @@ class Constants { /// The maximum weight that may be scheduled per block for any dispatchables. final _i11.Weight maximumWeight = _i11.Weight( refTime: BigInt.from(4800000000000), - proofSize: BigInt.parse( - '14757395258967641292', - radix: 10, - ), + proofSize: BigInt.parse('14757395258967641292', radix: 10), ); /// The maximum number of scheduled calls in the queue for a single block. diff --git a/quantus_sdk/lib/generated/planck/pallets/system.dart b/quantus_sdk/lib/generated/planck/pallets/system.dart index a0a73a6a..3e9a7a5c 100644 --- a/quantus_sdk/lib/generated/planck/pallets/system.dart +++ b/quantus_sdk/lib/generated/planck/pallets/system.dart @@ -34,11 +34,11 @@ class Queries { final _i1.StorageMap<_i2.AccountId32, _i3.AccountInfo> _account = const _i1.StorageMap<_i2.AccountId32, _i3.AccountInfo>( - prefix: 'System', - storage: 'Account', - valueCodec: _i3.AccountInfo.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'System', + storage: 'Account', + valueCodec: _i3.AccountInfo.codec, + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); final _i1.StorageValue _extrinsicCount = const _i1.StorageValue( prefix: 'System', @@ -52,8 +52,7 @@ class Queries { valueCodec: _i4.BoolCodec.codec, ); - final _i1.StorageValue<_i5.PerDispatchClass> _blockWeight = - const _i1.StorageValue<_i5.PerDispatchClass>( + final _i1.StorageValue<_i5.PerDispatchClass> _blockWeight = const _i1.StorageValue<_i5.PerDispatchClass>( prefix: 'System', storage: 'BlockWeight', valueCodec: _i5.PerDispatchClass.codec, @@ -65,16 +64,14 @@ class Queries { valueCodec: _i4.U32Codec.codec, ); - final _i1.StorageMap _blockHash = - const _i1.StorageMap( + final _i1.StorageMap _blockHash = const _i1.StorageMap( prefix: 'System', storage: 'BlockHash', valueCodec: _i6.H256Codec(), hasher: _i1.StorageHasher.twoxx64Concat(_i4.U32Codec.codec), ); - final _i1.StorageMap> _extrinsicData = - const _i1.StorageMap>( + final _i1.StorageMap> _extrinsicData = const _i1.StorageMap>( prefix: 'System', storage: 'ExtrinsicData', valueCodec: _i4.U8SequenceCodec.codec, @@ -87,29 +84,25 @@ class Queries { valueCodec: _i4.U32Codec.codec, ); - final _i1.StorageValue<_i6.H256> _parentHash = - const _i1.StorageValue<_i6.H256>( + final _i1.StorageValue<_i6.H256> _parentHash = const _i1.StorageValue<_i6.H256>( prefix: 'System', storage: 'ParentHash', valueCodec: _i6.H256Codec(), ); - final _i1.StorageValue<_i7.Digest> _digest = - const _i1.StorageValue<_i7.Digest>( + final _i1.StorageValue<_i7.Digest> _digest = const _i1.StorageValue<_i7.Digest>( prefix: 'System', storage: 'Digest', valueCodec: _i7.Digest.codec, ); - final _i1.StorageValue<_i6.H256> _zkTreeRoot = - const _i1.StorageValue<_i6.H256>( + final _i1.StorageValue<_i6.H256> _zkTreeRoot = const _i1.StorageValue<_i6.H256>( prefix: 'System', storage: 'ZkTreeRoot', valueCodec: _i6.H256Codec(), ); - final _i1.StorageValue> _events = - const _i1.StorageValue>( + final _i1.StorageValue> _events = const _i1.StorageValue>( prefix: 'System', storage: 'Events', valueCodec: _i4.SequenceCodec<_i8.EventRecord>(_i8.EventRecord.codec), @@ -123,39 +116,34 @@ class Queries { final _i1.StorageMap<_i6.H256, List<_i9.Tuple2>> _eventTopics = const _i1.StorageMap<_i6.H256, List<_i9.Tuple2>>( - prefix: 'System', - storage: 'EventTopics', - valueCodec: - _i4.SequenceCodec<_i9.Tuple2>(_i9.Tuple2Codec( - _i4.U32Codec.codec, - _i4.U32Codec.codec, - )), - hasher: _i1.StorageHasher.blake2b128Concat(_i6.H256Codec()), - ); + prefix: 'System', + storage: 'EventTopics', + valueCodec: _i4.SequenceCodec<_i9.Tuple2>( + _i9.Tuple2Codec(_i4.U32Codec.codec, _i4.U32Codec.codec), + ), + hasher: _i1.StorageHasher.blake2b128Concat(_i6.H256Codec()), + ); final _i1.StorageValue<_i10.LastRuntimeUpgradeInfo> _lastRuntimeUpgrade = const _i1.StorageValue<_i10.LastRuntimeUpgradeInfo>( - prefix: 'System', - storage: 'LastRuntimeUpgrade', - valueCodec: _i10.LastRuntimeUpgradeInfo.codec, - ); + prefix: 'System', + storage: 'LastRuntimeUpgrade', + valueCodec: _i10.LastRuntimeUpgradeInfo.codec, + ); - final _i1.StorageValue _upgradedToU32RefCount = - const _i1.StorageValue( + final _i1.StorageValue _upgradedToU32RefCount = const _i1.StorageValue( prefix: 'System', storage: 'UpgradedToU32RefCount', valueCodec: _i4.BoolCodec.codec, ); - final _i1.StorageValue _upgradedToTripleRefCount = - const _i1.StorageValue( + final _i1.StorageValue _upgradedToTripleRefCount = const _i1.StorageValue( prefix: 'System', storage: 'UpgradedToTripleRefCount', valueCodec: _i4.BoolCodec.codec, ); - final _i1.StorageValue<_i11.Phase> _executionPhase = - const _i1.StorageValue<_i11.Phase>( + final _i1.StorageValue<_i11.Phase> _executionPhase = const _i1.StorageValue<_i11.Phase>( prefix: 'System', storage: 'ExecutionPhase', valueCodec: _i11.Phase.codec, @@ -163,28 +151,21 @@ class Queries { final _i1.StorageValue<_i12.CodeUpgradeAuthorization> _authorizedUpgrade = const _i1.StorageValue<_i12.CodeUpgradeAuthorization>( - prefix: 'System', - storage: 'AuthorizedUpgrade', - valueCodec: _i12.CodeUpgradeAuthorization.codec, - ); + prefix: 'System', + storage: 'AuthorizedUpgrade', + valueCodec: _i12.CodeUpgradeAuthorization.codec, + ); - final _i1.StorageValue<_i13.Weight> _extrinsicWeightReclaimed = - const _i1.StorageValue<_i13.Weight>( + final _i1.StorageValue<_i13.Weight> _extrinsicWeightReclaimed = const _i1.StorageValue<_i13.Weight>( prefix: 'System', storage: 'ExtrinsicWeightReclaimed', valueCodec: _i13.Weight.codec, ); /// The full account information for a particular account ID. - _i14.Future<_i3.AccountInfo> account( - _i2.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i14.Future<_i3.AccountInfo> account(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _account.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _account.decodeValue(bytes); } @@ -197,10 +178,7 @@ class Queries { free: BigInt.zero, reserved: BigInt.zero, frozen: BigInt.zero, - flags: BigInt.parse( - '170141183460469231731687303715884105728', - radix: 10, - ), + flags: BigInt.parse('170141183460469231731687303715884105728', radix: 10), ), ); /* Default */ } @@ -208,10 +186,7 @@ class Queries { /// Total extrinsics count for the current block. _i14.Future extrinsicCount({_i1.BlockHash? at}) async { final hashedKey = _extrinsicCount.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _extrinsicCount.decodeValue(bytes); } @@ -221,10 +196,7 @@ class Queries { /// Whether all inherents have been applied. _i14.Future inherentsApplied({_i1.BlockHash? at}) async { final hashedKey = _inherentsApplied.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _inherentsApplied.decodeValue(bytes); } @@ -234,36 +206,21 @@ class Queries { /// The current weight for the block. _i14.Future<_i5.PerDispatchClass> blockWeight({_i1.BlockHash? at}) async { final hashedKey = _blockWeight.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _blockWeight.decodeValue(bytes); } return _i5.PerDispatchClass( - normal: _i13.Weight( - refTime: BigInt.zero, - proofSize: BigInt.zero, - ), - operational: _i13.Weight( - refTime: BigInt.zero, - proofSize: BigInt.zero, - ), - mandatory: _i13.Weight( - refTime: BigInt.zero, - proofSize: BigInt.zero, - ), + normal: _i13.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), + operational: _i13.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), + mandatory: _i13.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), ); /* Default */ } /// Total length (in bytes) for all extrinsics put together, for the current block. _i14.Future allExtrinsicsLen({_i1.BlockHash? at}) async { final hashedKey = _allExtrinsicsLen.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _allExtrinsicsLen.decodeValue(bytes); } @@ -271,52 +228,29 @@ class Queries { } /// Map of block numbers to block hashes. - _i14.Future<_i6.H256> blockHash( - int key1, { - _i1.BlockHash? at, - }) async { + _i14.Future<_i6.H256> blockHash(int key1, {_i1.BlockHash? at}) async { final hashedKey = _blockHash.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _blockHash.decodeValue(bytes); } - return List.filled( - 32, - 0, - growable: false, - ); /* Default */ + return List.filled(32, 0, growable: false); /* Default */ } /// Extrinsics data for the current block (maps an extrinsic's index to its data). - _i14.Future> extrinsicData( - int key1, { - _i1.BlockHash? at, - }) async { + _i14.Future> extrinsicData(int key1, {_i1.BlockHash? at}) async { final hashedKey = _extrinsicData.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _extrinsicData.decodeValue(bytes); } - return List.filled( - 0, - 0, - growable: true, - ); /* Default */ + return List.filled(0, 0, growable: true); /* Default */ } /// The current block number being processed. Set by `execute_block`. _i14.Future number({_i1.BlockHash? at}) async { final hashedKey = _number.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _number.decodeValue(bytes); } @@ -326,27 +260,17 @@ class Queries { /// Hash of the previous block. _i14.Future<_i6.H256> parentHash({_i1.BlockHash? at}) async { final hashedKey = _parentHash.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _parentHash.decodeValue(bytes); } - return List.filled( - 32, - 0, - growable: false, - ); /* Default */ + return List.filled(32, 0, growable: false); /* Default */ } /// Digest of the current block, also part of the block header. _i14.Future<_i7.Digest> digest({_i1.BlockHash? at}) async { final hashedKey = _digest.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _digest.decodeValue(bytes); } @@ -360,18 +284,11 @@ class Queries { /// for ZK circuit verification. _i14.Future<_i6.H256> zkTreeRoot({_i1.BlockHash? at}) async { final hashedKey = _zkTreeRoot.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _zkTreeRoot.decodeValue(bytes); } - return List.filled( - 32, - 0, - growable: false, - ); /* Default */ + return List.filled(32, 0, growable: false); /* Default */ } /// Events deposited for the current block. @@ -383,10 +300,7 @@ class Queries { /// just in case someone still reads them from within the runtime. _i14.Future> events({_i1.BlockHash? at}) async { final hashedKey = _events.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _events.decodeValue(bytes); } @@ -396,10 +310,7 @@ class Queries { /// The number of events in the `Events` list. _i14.Future eventCount({_i1.BlockHash? at}) async { final hashedKey = _eventCount.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _eventCount.decodeValue(bytes); } @@ -416,15 +327,9 @@ class Queries { /// The value has the type `(BlockNumberFor, EventIndex)` because if we used only just /// the `EventIndex` then in case if the topic has the same contents on the next block /// no notification will be triggered thus the event might be lost. - _i14.Future>> eventTopics( - _i6.H256 key1, { - _i1.BlockHash? at, - }) async { + _i14.Future>> eventTopics(_i6.H256 key1, {_i1.BlockHash? at}) async { final hashedKey = _eventTopics.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _eventTopics.decodeValue(bytes); } @@ -432,13 +337,9 @@ class Queries { } /// Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened. - _i14.Future<_i10.LastRuntimeUpgradeInfo?> lastRuntimeUpgrade( - {_i1.BlockHash? at}) async { + _i14.Future<_i10.LastRuntimeUpgradeInfo?> lastRuntimeUpgrade({_i1.BlockHash? at}) async { final hashedKey = _lastRuntimeUpgrade.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _lastRuntimeUpgrade.decodeValue(bytes); } @@ -448,10 +349,7 @@ class Queries { /// True if we have upgraded so that `type RefCount` is `u32`. False (default) if not. _i14.Future upgradedToU32RefCount({_i1.BlockHash? at}) async { final hashedKey = _upgradedToU32RefCount.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _upgradedToU32RefCount.decodeValue(bytes); } @@ -462,10 +360,7 @@ class Queries { /// (default) if not. _i14.Future upgradedToTripleRefCount({_i1.BlockHash? at}) async { final hashedKey = _upgradedToTripleRefCount.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _upgradedToTripleRefCount.decodeValue(bytes); } @@ -475,10 +370,7 @@ class Queries { /// The execution phase of the block. _i14.Future<_i11.Phase?> executionPhase({_i1.BlockHash? at}) async { final hashedKey = _executionPhase.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _executionPhase.decodeValue(bytes); } @@ -486,13 +378,9 @@ class Queries { } /// `Some` if a code upgrade has been authorized. - _i14.Future<_i12.CodeUpgradeAuthorization?> authorizedUpgrade( - {_i1.BlockHash? at}) async { + _i14.Future<_i12.CodeUpgradeAuthorization?> authorizedUpgrade({_i1.BlockHash? at}) async { final hashedKey = _authorizedUpgrade.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _authorizedUpgrade.decodeValue(bytes); } @@ -508,100 +396,57 @@ class Queries { /// reduction. _i14.Future<_i13.Weight> extrinsicWeightReclaimed({_i1.BlockHash? at}) async { final hashedKey = _extrinsicWeightReclaimed.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _extrinsicWeightReclaimed.decodeValue(bytes); } - return _i13.Weight( - refTime: BigInt.zero, - proofSize: BigInt.zero, - ); /* Default */ + return _i13.Weight(refTime: BigInt.zero, proofSize: BigInt.zero); /* Default */ } /// The full account information for a particular account ID. - _i14.Future> multiAccount( - List<_i2.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i14.Future> multiAccount(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _account.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _account.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _account.decodeValue(v.key)).toList(); } return (keys - .map((key) => _i3.AccountInfo( - nonce: 0, - consumers: 0, - providers: 0, - sufficients: 0, - data: _i15.AccountData( - free: BigInt.zero, - reserved: BigInt.zero, - frozen: BigInt.zero, - flags: BigInt.parse( - '170141183460469231731687303715884105728', - radix: 10, + .map( + (key) => _i3.AccountInfo( + nonce: 0, + consumers: 0, + providers: 0, + sufficients: 0, + data: _i15.AccountData( + free: BigInt.zero, + reserved: BigInt.zero, + frozen: BigInt.zero, + flags: BigInt.parse('170141183460469231731687303715884105728', radix: 10), ), ), - )) - .toList() as List<_i3.AccountInfo>); /* Default */ + ) + .toList() + as List<_i3.AccountInfo>); /* Default */ } /// Map of block numbers to block hashes. - _i14.Future> multiBlockHash( - List keys, { - _i1.BlockHash? at, - }) async { + _i14.Future> multiBlockHash(List keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _blockHash.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _blockHash.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _blockHash.decodeValue(v.key)).toList(); } - return (keys - .map((key) => List.filled( - 32, - 0, - growable: false, - )) - .toList() as List<_i6.H256>); /* Default */ + return (keys.map((key) => List.filled(32, 0, growable: false)).toList() as List<_i6.H256>); /* Default */ } /// Extrinsics data for the current block (maps an extrinsic's index to its data). - _i14.Future>> multiExtrinsicData( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _extrinsicData.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i14.Future>> multiExtrinsicData(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _extrinsicData.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _extrinsicData.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _extrinsicData.decodeValue(v.key)).toList(); } - return (keys - .map((key) => List.filled( - 0, - 0, - growable: true, - )) - .toList() as List>); /* Default */ + return (keys.map((key) => List.filled(0, 0, growable: true)).toList() as List>); /* Default */ } /// Mapping between a topic (represented by T::Hash) and a vector of indexes @@ -614,23 +459,13 @@ class Queries { /// The value has the type `(BlockNumberFor, EventIndex)` because if we used only just /// the `EventIndex` then in case if the topic has the same contents on the next block /// no notification will be triggered thus the event might be lost. - _i14.Future>>> multiEventTopics( - List<_i6.H256> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _eventTopics.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i14.Future>>> multiEventTopics(List<_i6.H256> keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _eventTopics.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _eventTopics.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _eventTopics.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>>); /* Default */ + return (keys.map((key) => []).toList() as List>>); /* Default */ } /// Returns the storage key for `account`. @@ -807,8 +642,7 @@ class Txs { } /// Set some items of storage. - _i17.System setStorage( - {required List<_i9.Tuple2, List>> items}) { + _i17.System setStorage({required List<_i9.Tuple2, List>> items}) { return _i17.System(_i18.SetStorage(items: items)); } @@ -821,14 +655,8 @@ class Txs { /// /// **NOTE:** We rely on the Root origin to provide us the number of subkeys under /// the prefix we are removing to accurately calculate the weight of this function. - _i17.System killPrefix({ - required List prefix, - required int subkeys, - }) { - return _i17.System(_i18.KillPrefix( - prefix: prefix, - subkeys: subkeys, - )); + _i17.System killPrefix({required List prefix, required int subkeys}) { + return _i17.System(_i18.KillPrefix(prefix: prefix, subkeys: subkeys)); } /// Make some on-chain remark and emit event. @@ -875,74 +703,41 @@ class Constants { /// Block & extrinsics weights: base values and limits. final _i19.BlockWeights blockWeights = _i19.BlockWeights( - baseBlock: _i13.Weight( - refTime: BigInt.from(431614000), - proofSize: BigInt.zero, - ), + baseBlock: _i13.Weight(refTime: BigInt.from(431614000), proofSize: BigInt.zero), maxBlock: _i13.Weight( refTime: BigInt.from(6000000000000), - proofSize: BigInt.parse( - '18446744073709551615', - radix: 10, - ), + proofSize: BigInt.parse('18446744073709551615', radix: 10), ), perClass: _i20.PerDispatchClass( normal: _i21.WeightsPerClass( - baseExtrinsic: _i13.Weight( - refTime: BigInt.from(108157000), - proofSize: BigInt.zero, - ), + baseExtrinsic: _i13.Weight(refTime: BigInt.from(108157000), proofSize: BigInt.zero), maxExtrinsic: _i13.Weight( refTime: BigInt.from(3899891843000), - proofSize: BigInt.parse( - '11990383647911208550', - radix: 10, - ), + proofSize: BigInt.parse('11990383647911208550', radix: 10), ), maxTotal: _i13.Weight( refTime: BigInt.from(4500000000000), - proofSize: BigInt.parse( - '13835058055282163711', - radix: 10, - ), - ), - reserved: _i13.Weight( - refTime: BigInt.zero, - proofSize: BigInt.zero, + proofSize: BigInt.parse('13835058055282163711', radix: 10), ), + reserved: _i13.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), ), operational: _i21.WeightsPerClass( - baseExtrinsic: _i13.Weight( - refTime: BigInt.from(108157000), - proofSize: BigInt.zero, - ), + baseExtrinsic: _i13.Weight(refTime: BigInt.from(108157000), proofSize: BigInt.zero), maxExtrinsic: _i13.Weight( refTime: BigInt.from(5399891843000), - proofSize: BigInt.parse( - '16602069666338596454', - radix: 10, - ), + proofSize: BigInt.parse('16602069666338596454', radix: 10), ), maxTotal: _i13.Weight( refTime: BigInt.from(6000000000000), - proofSize: BigInt.parse( - '18446744073709551615', - radix: 10, - ), + proofSize: BigInt.parse('18446744073709551615', radix: 10), ), reserved: _i13.Weight( refTime: BigInt.from(1500000000000), - proofSize: BigInt.parse( - '4611686018427387904', - radix: 10, - ), + proofSize: BigInt.parse('4611686018427387904', radix: 10), ), ), mandatory: _i21.WeightsPerClass( - baseExtrinsic: _i13.Weight( - refTime: BigInt.from(108157000), - proofSize: BigInt.zero, - ), + baseExtrinsic: _i13.Weight(refTime: BigInt.from(108157000), proofSize: BigInt.zero), maxExtrinsic: null, maxTotal: null, reserved: null, @@ -952,11 +747,8 @@ class Constants { /// The maximum length of a block (in bytes). final _i22.BlockLength blockLength = const _i22.BlockLength( - max: _i23.PerDispatchClass( - normal: 3932160, - operational: 5242880, - mandatory: 5242880, - )); + max: _i23.PerDispatchClass(normal: 3932160, operational: 5242880, mandatory: 5242880), + ); /// Maximum number of block number to block hash mappings to keep (oldest pruned first). final int blockHashCount = 4096; @@ -975,162 +767,18 @@ class Constants { specVersion: 129, implVersion: 1, apis: [ - _i9.Tuple2, int>( - [ - 223, - 106, - 203, - 104, - 153, - 7, - 96, - 155, - ], - 5, - ), - _i9.Tuple2, int>( - [ - 55, - 227, - 151, - 252, - 124, - 145, - 245, - 228, - ], - 2, - ), - _i9.Tuple2, int>( - [ - 64, - 254, - 58, - 212, - 1, - 248, - 149, - 154, - ], - 6, - ), - _i9.Tuple2, int>( - [ - 210, - 188, - 152, - 151, - 238, - 208, - 143, - 21, - ], - 3, - ), - _i9.Tuple2, int>( - [ - 247, - 139, - 39, - 139, - 229, - 63, - 69, - 76, - ], - 2, - ), - _i9.Tuple2, int>( - [ - 171, - 60, - 5, - 114, - 41, - 31, - 235, - 139, - ], - 1, - ), - _i9.Tuple2, int>( - [ - 19, - 40, - 169, - 252, - 46, - 48, - 6, - 19, - ], - 1, - ), - _i9.Tuple2, int>( - [ - 36, - 88, - 89, - 217, - 231, - 139, - 198, - 105, - ], - 1, - ), - _i9.Tuple2, int>( - [ - 188, - 157, - 137, - 144, - 79, - 91, - 146, - 63, - ], - 1, - ), - _i9.Tuple2, int>( - [ - 55, - 200, - 187, - 19, - 80, - 169, - 162, - 168, - ], - 4, - ), - _i9.Tuple2, int>( - [ - 243, - 255, - 20, - 213, - 171, - 82, - 112, - 89, - ], - 3, - ), - _i9.Tuple2, int>( - [ - 251, - 197, - 119, - 185, - 215, - 71, - 239, - 214, - ], - 1, - ), + _i9.Tuple2, int>([223, 106, 203, 104, 153, 7, 96, 155], 5), + _i9.Tuple2, int>([55, 227, 151, 252, 124, 145, 245, 228], 2), + _i9.Tuple2, int>([64, 254, 58, 212, 1, 248, 149, 154], 6), + _i9.Tuple2, int>([210, 188, 152, 151, 238, 208, 143, 21], 3), + _i9.Tuple2, int>([247, 139, 39, 139, 229, 63, 69, 76], 2), + _i9.Tuple2, int>([171, 60, 5, 114, 41, 31, 235, 139], 1), + _i9.Tuple2, int>([19, 40, 169, 252, 46, 48, 6, 19], 1), + _i9.Tuple2, int>([36, 88, 89, 217, 231, 139, 198, 105], 1), + _i9.Tuple2, int>([188, 157, 137, 144, 79, 91, 146, 63], 1), + _i9.Tuple2, int>([55, 200, 187, 19, 80, 169, 162, 168], 4), + _i9.Tuple2, int>([243, 255, 20, 213, 171, 82, 112, 89], 3), + _i9.Tuple2, int>([251, 197, 119, 185, 215, 71, 239, 214], 1), ], transactionVersion: 2, systemVersion: 1, diff --git a/quantus_sdk/lib/generated/planck/pallets/tech_collective.dart b/quantus_sdk/lib/generated/planck/pallets/tech_collective.dart index 62d1fcf7..61efa344 100644 --- a/quantus_sdk/lib/generated/planck/pallets/tech_collective.dart +++ b/quantus_sdk/lib/generated/planck/pallets/tech_collective.dart @@ -26,41 +26,40 @@ class Queries { final _i1.StorageMap<_i3.AccountId32, _i4.MemberRecord> _members = const _i1.StorageMap<_i3.AccountId32, _i4.MemberRecord>( - prefix: 'TechCollective', - storage: 'Members', - valueCodec: _i4.MemberRecord.codec, - hasher: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), - ); + prefix: 'TechCollective', + storage: 'Members', + valueCodec: _i4.MemberRecord.codec, + hasher: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), + ); final _i1.StorageDoubleMap _idToIndex = const _i1.StorageDoubleMap( - prefix: 'TechCollective', - storage: 'IdToIndex', - valueCodec: _i2.U32Codec.codec, - hasher1: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), - hasher2: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), - ); + prefix: 'TechCollective', + storage: 'IdToIndex', + valueCodec: _i2.U32Codec.codec, + hasher1: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), + hasher2: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), + ); final _i1.StorageDoubleMap _indexToId = const _i1.StorageDoubleMap( - prefix: 'TechCollective', - storage: 'IndexToId', - valueCodec: _i3.AccountId32Codec(), - hasher1: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), - hasher2: _i1.StorageHasher.twoxx64Concat(_i2.U32Codec.codec), - ); + prefix: 'TechCollective', + storage: 'IndexToId', + valueCodec: _i3.AccountId32Codec(), + hasher1: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), + hasher2: _i1.StorageHasher.twoxx64Concat(_i2.U32Codec.codec), + ); final _i1.StorageDoubleMap _voting = const _i1.StorageDoubleMap( - prefix: 'TechCollective', - storage: 'Voting', - valueCodec: _i5.VoteRecord.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i2.U32Codec.codec), - hasher2: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), - ); - - final _i1.StorageMap> _votingCleanup = - const _i1.StorageMap>( + prefix: 'TechCollective', + storage: 'Voting', + valueCodec: _i5.VoteRecord.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i2.U32Codec.codec), + hasher2: _i1.StorageHasher.twoxx64Concat(_i3.AccountId32Codec()), + ); + + final _i1.StorageMap> _votingCleanup = const _i1.StorageMap>( prefix: 'TechCollective', storage: 'VotingCleanup', valueCodec: _i2.U8SequenceCodec.codec, @@ -69,15 +68,9 @@ class Queries { /// The number of members in the collective who have at least the rank according to the index /// of the vec. - _i6.Future memberCount( - int key1, { - _i1.BlockHash? at, - }) async { + _i6.Future memberCount(int key1, {_i1.BlockHash? at}) async { final hashedKey = _memberCount.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _memberCount.decodeValue(bytes); } @@ -85,15 +78,9 @@ class Queries { } /// The current members of the collective. - _i6.Future<_i4.MemberRecord?> members( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i6.Future<_i4.MemberRecord?> members(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _members.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _members.decodeValue(bytes); } @@ -101,19 +88,9 @@ class Queries { } /// The index of each ranks's member into the group of members who have at least that rank. - _i6.Future idToIndex( - int key1, - _i3.AccountId32 key2, { - _i1.BlockHash? at, - }) async { - final hashedKey = _idToIndex.hashedKeyFor( - key1, - key2, - ); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + _i6.Future idToIndex(int key1, _i3.AccountId32 key2, {_i1.BlockHash? at}) async { + final hashedKey = _idToIndex.hashedKeyFor(key1, key2); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _idToIndex.decodeValue(bytes); } @@ -122,19 +99,9 @@ class Queries { /// The members in the collective by index. All indices in the range `0..MemberCount` will /// return `Some`, however a member's index is not guaranteed to remain unchanged over time. - _i6.Future<_i3.AccountId32?> indexToId( - int key1, - int key2, { - _i1.BlockHash? at, - }) async { - final hashedKey = _indexToId.hashedKeyFor( - key1, - key2, - ); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + _i6.Future<_i3.AccountId32?> indexToId(int key1, int key2, {_i1.BlockHash? at}) async { + final hashedKey = _indexToId.hashedKeyFor(key1, key2); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _indexToId.decodeValue(bytes); } @@ -142,34 +109,18 @@ class Queries { } /// Votes on a given proposal, if it is ongoing. - _i6.Future<_i5.VoteRecord?> voting( - int key1, - _i3.AccountId32 key2, { - _i1.BlockHash? at, - }) async { - final hashedKey = _voting.hashedKeyFor( - key1, - key2, - ); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + _i6.Future<_i5.VoteRecord?> voting(int key1, _i3.AccountId32 key2, {_i1.BlockHash? at}) async { + final hashedKey = _voting.hashedKeyFor(key1, key2); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _voting.decodeValue(bytes); } return null; /* Nullable */ } - _i6.Future?> votingCleanup( - int key1, { - _i1.BlockHash? at, - }) async { + _i6.Future?> votingCleanup(int key1, {_i1.BlockHash? at}) async { final hashedKey = _votingCleanup.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _votingCleanup.decodeValue(bytes); } @@ -178,56 +129,30 @@ class Queries { /// The number of members in the collective who have at least the rank according to the index /// of the vec. - _i6.Future> multiMemberCount( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _memberCount.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i6.Future> multiMemberCount(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _memberCount.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _memberCount.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _memberCount.decodeValue(v.key)).toList(); } return (keys.map((key) => 0).toList() as List); /* Default */ } /// The current members of the collective. - _i6.Future> multiMembers( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i6.Future> multiMembers(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _members.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _members.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _members.decodeValue(v.key)).toList(); } return []; /* Nullable */ } - _i6.Future?>> multiVotingCleanup( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _votingCleanup.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i6.Future?>> multiVotingCleanup(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _votingCleanup.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _votingCleanup.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _votingCleanup.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -245,38 +170,20 @@ class Queries { } /// Returns the storage key for `idToIndex`. - _i7.Uint8List idToIndexKey( - int key1, - _i3.AccountId32 key2, - ) { - final hashedKey = _idToIndex.hashedKeyFor( - key1, - key2, - ); + _i7.Uint8List idToIndexKey(int key1, _i3.AccountId32 key2) { + final hashedKey = _idToIndex.hashedKeyFor(key1, key2); return hashedKey; } /// Returns the storage key for `indexToId`. - _i7.Uint8List indexToIdKey( - int key1, - int key2, - ) { - final hashedKey = _indexToId.hashedKeyFor( - key1, - key2, - ); + _i7.Uint8List indexToIdKey(int key1, int key2) { + final hashedKey = _indexToId.hashedKeyFor(key1, key2); return hashedKey; } /// Returns the storage key for `voting`. - _i7.Uint8List votingKey( - int key1, - _i3.AccountId32 key2, - ) { - final hashedKey = _voting.hashedKeyFor( - key1, - key2, - ); + _i7.Uint8List votingKey(int key1, _i3.AccountId32 key2) { + final hashedKey = _voting.hashedKeyFor(key1, key2); return hashedKey; } @@ -364,14 +271,8 @@ class Txs { /// - `min_rank`: The rank of the member or greater. /// /// Weight: `O(min_rank)`. - _i8.TechCollective removeMember({ - required _i9.MultiAddress who, - required int minRank, - }) { - return _i8.TechCollective(_i10.RemoveMember( - who: who, - minRank: minRank, - )); + _i8.TechCollective removeMember({required _i9.MultiAddress who, required int minRank}) { + return _i8.TechCollective(_i10.RemoveMember(who: who, minRank: minRank)); } /// Add an aye or nay vote for the sender to the given proposal. @@ -385,14 +286,8 @@ class Txs { /// fee. /// /// Weight: `O(1)`, less if there was no previous vote on the poll by the member. - _i8.TechCollective vote({ - required int poll, - required bool aye, - }) { - return _i8.TechCollective(_i10.Vote( - poll: poll, - aye: aye, - )); + _i8.TechCollective vote({required int poll, required bool aye}) { + return _i8.TechCollective(_i10.Vote(poll: poll, aye: aye)); } /// Remove votes from the given poll. It must have ended. @@ -405,14 +300,8 @@ class Txs { /// Transaction fees are waived if the operation is successful. /// /// Weight `O(max)` (less if there are fewer items to remove than `max`). - _i8.TechCollective cleanupPoll({ - required int pollIndex, - required int max, - }) { - return _i8.TechCollective(_i10.CleanupPoll( - pollIndex: pollIndex, - max: max, - )); + _i8.TechCollective cleanupPoll({required int pollIndex, required int max}) { + return _i8.TechCollective(_i10.CleanupPoll(pollIndex: pollIndex, max: max)); } /// Exchanges a member with a new account and the same existing rank. @@ -420,13 +309,7 @@ class Txs { /// - `origin`: Must be the `ExchangeOrigin`. /// - `who`: Account of existing member of rank greater than zero to be exchanged. /// - `new_who`: New Account of existing member of rank greater than zero to exchanged to. - _i8.TechCollective exchangeMember({ - required _i9.MultiAddress who, - required _i9.MultiAddress newWho, - }) { - return _i8.TechCollective(_i10.ExchangeMember( - who: who, - newWho: newWho, - )); + _i8.TechCollective exchangeMember({required _i9.MultiAddress who, required _i9.MultiAddress newWho}) { + return _i8.TechCollective(_i10.ExchangeMember(who: who, newWho: newWho)); } } diff --git a/quantus_sdk/lib/generated/planck/pallets/tech_referenda.dart b/quantus_sdk/lib/generated/planck/pallets/tech_referenda.dart index 1b3db42e..f3c0a162 100644 --- a/quantus_sdk/lib/generated/planck/pallets/tech_referenda.dart +++ b/quantus_sdk/lib/generated/planck/pallets/tech_referenda.dart @@ -27,8 +27,7 @@ class Queries { valueCodec: _i2.U32Codec.codec, ); - final _i1.StorageMap _referendumInfoFor = - const _i1.StorageMap( + final _i1.StorageMap _referendumInfoFor = const _i1.StorageMap( prefix: 'TechReferenda', storage: 'ReferendumInfoFor', valueCodec: _i3.ReferendumInfo.codec, @@ -37,26 +36,22 @@ class Queries { final _i1.StorageMap>> _trackQueue = const _i1.StorageMap>>( - prefix: 'TechReferenda', - storage: 'TrackQueue', - valueCodec: - _i2.SequenceCodec<_i4.Tuple2>(_i4.Tuple2Codec( - _i2.U32Codec.codec, - _i2.U32Codec.codec, - )), - hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), - ); + prefix: 'TechReferenda', + storage: 'TrackQueue', + valueCodec: _i2.SequenceCodec<_i4.Tuple2>( + _i4.Tuple2Codec(_i2.U32Codec.codec, _i2.U32Codec.codec), + ), + hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), + ); - final _i1.StorageMap _decidingCount = - const _i1.StorageMap( + final _i1.StorageMap _decidingCount = const _i1.StorageMap( prefix: 'TechReferenda', storage: 'DecidingCount', valueCodec: _i2.U32Codec.codec, hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), ); - final _i1.StorageMap _metadataOf = - const _i1.StorageMap( + final _i1.StorageMap _metadataOf = const _i1.StorageMap( prefix: 'TechReferenda', storage: 'MetadataOf', valueCodec: _i5.H256Codec(), @@ -66,10 +61,7 @@ class Queries { /// The next free referendum index, aka the number of referenda started so far. _i6.Future referendumCount({_i1.BlockHash? at}) async { final hashedKey = _referendumCount.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _referendumCount.decodeValue(bytes); } @@ -77,15 +69,9 @@ class Queries { } /// Information concerning any given referendum. - _i6.Future<_i3.ReferendumInfo?> referendumInfoFor( - int key1, { - _i1.BlockHash? at, - }) async { + _i6.Future<_i3.ReferendumInfo?> referendumInfoFor(int key1, {_i1.BlockHash? at}) async { final hashedKey = _referendumInfoFor.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _referendumInfoFor.decodeValue(bytes); } @@ -96,15 +82,9 @@ class Queries { /// conviction-weighted approvals. /// /// This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. - _i6.Future>> trackQueue( - int key1, { - _i1.BlockHash? at, - }) async { + _i6.Future>> trackQueue(int key1, {_i1.BlockHash? at}) async { final hashedKey = _trackQueue.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _trackQueue.decodeValue(bytes); } @@ -112,15 +92,9 @@ class Queries { } /// The number of referenda being decided currently. - _i6.Future decidingCount( - int key1, { - _i1.BlockHash? at, - }) async { + _i6.Future decidingCount(int key1, {_i1.BlockHash? at}) async { final hashedKey = _decidingCount.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _decidingCount.decodeValue(bytes); } @@ -133,15 +107,9 @@ class Queries { /// /// Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove) /// large preimages. - _i6.Future<_i5.H256?> metadataOf( - int key1, { - _i1.BlockHash? at, - }) async { + _i6.Future<_i5.H256?> metadataOf(int key1, {_i1.BlockHash? at}) async { final hashedKey = _metadataOf.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _metadataOf.decodeValue(bytes); } @@ -149,20 +117,11 @@ class Queries { } /// Information concerning any given referendum. - _i6.Future> multiReferendumInfoFor( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _referendumInfoFor.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i6.Future> multiReferendumInfoFor(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _referendumInfoFor.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _referendumInfoFor.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _referendumInfoFor.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -171,40 +130,21 @@ class Queries { /// conviction-weighted approvals. /// /// This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. - _i6.Future>>> multiTrackQueue( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _trackQueue.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i6.Future>>> multiTrackQueue(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _trackQueue.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _trackQueue.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _trackQueue.decodeValue(v.key)).toList(); } - return (keys.map((key) => []).toList() - as List>>); /* Default */ + return (keys.map((key) => []).toList() as List>>); /* Default */ } /// The number of referenda being decided currently. - _i6.Future> multiDecidingCount( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _decidingCount.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i6.Future> multiDecidingCount(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _decidingCount.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _decidingCount.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _decidingCount.decodeValue(v.key)).toList(); } return (keys.map((key) => 0).toList() as List); /* Default */ } @@ -215,20 +155,11 @@ class Queries { /// /// Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove) /// large preimages. - _i6.Future> multiMetadataOf( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _metadataOf.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i6.Future> multiMetadataOf(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _metadataOf.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _metadataOf.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _metadataOf.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -305,11 +236,9 @@ class Txs { required _i10.Bounded proposal, required _i11.DispatchTime enactmentMoment, }) { - return _i8.TechReferenda(_i12.Submit( - proposalOrigin: proposalOrigin, - proposal: proposal, - enactmentMoment: enactmentMoment, - )); + return _i8.TechReferenda( + _i12.Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment), + ); } /// Post the Decision Deposit for a referendum. @@ -394,14 +323,8 @@ class Txs { /// metadata of a finished referendum. /// - `index`: The index of a referendum to set or clear metadata for. /// - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. - _i8.TechReferenda setMetadata({ - required int index, - _i5.H256? maybeHash, - }) { - return _i8.TechReferenda(_i12.SetMetadata( - index: index, - maybeHash: maybeHash, - )); + _i8.TechReferenda setMetadata({required int index, _i5.H256? maybeHash}) { + return _i8.TechReferenda(_i12.SetMetadata(index: index, maybeHash: maybeHash)); } } @@ -437,17 +360,9 @@ class Constants { decisionPeriod: 7200, confirmPeriod: 20, minEnactmentPeriod: 20, - minApproval: const _i14.LinearDecreasing( - length: 1000000000, - floor: 500000000, - ceil: 1000000000, - ), - minSupport: const _i14.LinearDecreasing( - length: 1000000000, - floor: 0, - ceil: 0, - ), + minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 500000000, ceil: 1000000000), + minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 0, ceil: 0), ), - ) + ), ]; } diff --git a/quantus_sdk/lib/generated/planck/pallets/timestamp.dart b/quantus_sdk/lib/generated/planck/pallets/timestamp.dart index d68a6568..5f716696 100644 --- a/quantus_sdk/lib/generated/planck/pallets/timestamp.dart +++ b/quantus_sdk/lib/generated/planck/pallets/timestamp.dart @@ -28,10 +28,7 @@ class Queries { /// The current time for the current block. _i3.Future now({_i1.BlockHash? at}) async { final hashedKey = _now.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _now.decodeValue(bytes); } @@ -44,10 +41,7 @@ class Queries { /// It is then checked at the end of each block execution in the `on_finalize` hook. _i3.Future didUpdate({_i1.BlockHash? at}) async { final hashedKey = _didUpdate.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _didUpdate.decodeValue(bytes); } diff --git a/quantus_sdk/lib/generated/planck/pallets/transaction_payment.dart b/quantus_sdk/lib/generated/planck/pallets/transaction_payment.dart index b74b49b4..2d15bce2 100644 --- a/quantus_sdk/lib/generated/planck/pallets/transaction_payment.dart +++ b/quantus_sdk/lib/generated/planck/pallets/transaction_payment.dart @@ -13,22 +13,19 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue<_i2.FixedU128> _nextFeeMultiplier = - const _i1.StorageValue<_i2.FixedU128>( + final _i1.StorageValue<_i2.FixedU128> _nextFeeMultiplier = const _i1.StorageValue<_i2.FixedU128>( prefix: 'TransactionPayment', storage: 'NextFeeMultiplier', valueCodec: _i2.FixedU128Codec(), ); - final _i1.StorageValue<_i3.Releases> _storageVersion = - const _i1.StorageValue<_i3.Releases>( + final _i1.StorageValue<_i3.Releases> _storageVersion = const _i1.StorageValue<_i3.Releases>( prefix: 'TransactionPayment', storage: 'StorageVersion', valueCodec: _i3.Releases.codec, ); - final _i1.StorageValue<_i4.NoDrop> _txPaymentCredit = - const _i1.StorageValue<_i4.NoDrop>( + final _i1.StorageValue<_i4.NoDrop> _txPaymentCredit = const _i1.StorageValue<_i4.NoDrop>( prefix: 'TransactionPayment', storage: 'TxPaymentCredit', valueCodec: _i4.NoDropCodec(), @@ -36,25 +33,16 @@ class Queries { _i5.Future<_i2.FixedU128> nextFeeMultiplier({_i1.BlockHash? at}) async { final hashedKey = _nextFeeMultiplier.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _nextFeeMultiplier.decodeValue(bytes); } - return BigInt.parse( - '1000000000000000000', - radix: 10, - ); /* Default */ + return BigInt.parse('1000000000000000000', radix: 10); /* Default */ } _i5.Future<_i3.Releases> storageVersion({_i1.BlockHash? at}) async { final hashedKey = _storageVersion.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _storageVersion.decodeValue(bytes); } @@ -66,10 +54,7 @@ class Queries { /// Use `withdraw_txfee` and `remaining_txfee` to access from outside the crate. _i5.Future<_i4.NoDrop?> txPaymentCredit({_i1.BlockHash? at}) async { final hashedKey = _txPaymentCredit.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _txPaymentCredit.decodeValue(bytes); } diff --git a/quantus_sdk/lib/generated/planck/pallets/treasury_pallet.dart b/quantus_sdk/lib/generated/planck/pallets/treasury_pallet.dart index 69ecc343..80680410 100644 --- a/quantus_sdk/lib/generated/planck/pallets/treasury_pallet.dart +++ b/quantus_sdk/lib/generated/planck/pallets/treasury_pallet.dart @@ -14,15 +14,13 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue<_i2.AccountId32> _treasuryAccount = - const _i1.StorageValue<_i2.AccountId32>( + final _i1.StorageValue<_i2.AccountId32> _treasuryAccount = const _i1.StorageValue<_i2.AccountId32>( prefix: 'TreasuryPallet', storage: 'TreasuryAccount', valueCodec: _i2.AccountId32Codec(), ); - final _i1.StorageValue<_i3.Permill> _treasuryPortion = - const _i1.StorageValue<_i3.Permill>( + final _i1.StorageValue<_i3.Permill> _treasuryPortion = const _i1.StorageValue<_i3.Permill>( prefix: 'TreasuryPallet', storage: 'TreasuryPortion', valueCodec: _i3.PermillCodec(), @@ -31,10 +29,7 @@ class Queries { /// The treasury account that receives mining rewards. _i4.Future<_i2.AccountId32?> treasuryAccount({_i1.BlockHash? at}) async { final hashedKey = _treasuryAccount.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _treasuryAccount.decodeValue(bytes); } @@ -45,10 +40,7 @@ class Queries { /// Uses OptionQuery so genesis is required. Permill allows fine granularity (e.g. 33.3%). _i4.Future<_i3.Permill?> treasuryPortion({_i1.BlockHash? at}) async { final hashedKey = _treasuryPortion.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _treasuryPortion.decodeValue(bytes); } diff --git a/quantus_sdk/lib/generated/planck/pallets/utility.dart b/quantus_sdk/lib/generated/planck/pallets/utility.dart index 5f1507a7..52251630 100644 --- a/quantus_sdk/lib/generated/planck/pallets/utility.dart +++ b/quantus_sdk/lib/generated/planck/pallets/utility.dart @@ -42,14 +42,8 @@ class Txs { /// NOTE: Prior to version *12, this was called `as_limited_sub`. /// /// The dispatch origin for this call must be _Signed_. - _i1.Utility asDerivative({ - required int index, - required _i1.RuntimeCall call, - }) { - return _i1.Utility(_i2.AsDerivative( - index: index, - call: call, - )); + _i1.Utility asDerivative({required int index, required _i1.RuntimeCall call}) { + return _i1.Utility(_i2.AsDerivative(index: index, call: call)); } /// Send a batch of dispatch calls and atomically execute them. @@ -75,14 +69,8 @@ class Txs { /// /// ## Complexity /// - O(1). - _i1.Utility dispatchAs({ - required _i3.OriginCaller asOrigin, - required _i1.RuntimeCall call, - }) { - return _i1.Utility(_i2.DispatchAs( - asOrigin: asOrigin, - call: call, - )); + _i1.Utility dispatchAs({required _i3.OriginCaller asOrigin, required _i1.RuntimeCall call}) { + return _i1.Utility(_i2.DispatchAs(asOrigin: asOrigin, call: call)); } /// Send a batch of dispatch calls. @@ -108,14 +96,8 @@ class Txs { /// Root origin to specify the weight of the call. /// /// The dispatch origin for this call must be _Root_. - _i1.Utility withWeight({ - required _i1.RuntimeCall call, - required _i4.Weight weight, - }) { - return _i1.Utility(_i2.WithWeight( - call: call, - weight: weight, - )); + _i1.Utility withWeight({required _i1.RuntimeCall call, required _i4.Weight weight}) { + return _i1.Utility(_i2.WithWeight(call: call, weight: weight)); } /// Dispatch a fallback call in the event the main call fails to execute. @@ -141,14 +123,8 @@ class Txs { /// ## Use Case /// - Some use cases might involve submitting a `batch` type call in either main, fallback /// or both. - _i1.Utility ifElse({ - required _i1.RuntimeCall main, - required _i1.RuntimeCall fallback, - }) { - return _i1.Utility(_i2.IfElse( - main: main, - fallback: fallback, - )); + _i1.Utility ifElse({required _i1.RuntimeCall main, required _i1.RuntimeCall fallback}) { + return _i1.Utility(_i2.IfElse(main: main, fallback: fallback)); } /// Dispatches a function call with a provided origin. @@ -156,14 +132,8 @@ class Txs { /// Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call. /// /// The dispatch origin for this call must be _Root_. - _i1.Utility dispatchAsFallible({ - required _i3.OriginCaller asOrigin, - required _i1.RuntimeCall call, - }) { - return _i1.Utility(_i2.DispatchAsFallible( - asOrigin: asOrigin, - call: call, - )); + _i1.Utility dispatchAsFallible({required _i3.OriginCaller asOrigin, required _i1.RuntimeCall call}) { + return _i1.Utility(_i2.DispatchAsFallible(asOrigin: asOrigin, call: call)); } } diff --git a/quantus_sdk/lib/generated/planck/pallets/wormhole.dart b/quantus_sdk/lib/generated/planck/pallets/wormhole.dart index 131fd829..c2e6c75d 100644 --- a/quantus_sdk/lib/generated/planck/pallets/wormhole.dart +++ b/quantus_sdk/lib/generated/planck/pallets/wormhole.dart @@ -16,43 +16,32 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageMap, bool> _usedNullifiers = - const _i1.StorageMap, bool>( + final _i1.StorageMap, bool> _usedNullifiers = const _i1.StorageMap, bool>( prefix: 'Wormhole', storage: 'UsedNullifiers', valueCodec: _i2.BoolCodec.codec, hasher: _i1.StorageHasher.blake2b128Concat(_i2.U8ArrayCodec(32)), ); - final _i1.StorageMap<_i3.AccountId32, BigInt> _transferCount = - const _i1.StorageMap<_i3.AccountId32, BigInt>( + final _i1.StorageMap<_i3.AccountId32, BigInt> _transferCount = const _i1.StorageMap<_i3.AccountId32, BigInt>( prefix: 'Wormhole', storage: 'TransferCount', valueCodec: _i2.U64Codec.codec, hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), ); - final _i1.StorageValue>> - _genesisEndowmentsPending = + final _i1.StorageValue>> _genesisEndowmentsPending = const _i1.StorageValue>>( - prefix: 'Wormhole', - storage: 'GenesisEndowmentsPending', - valueCodec: _i2.SequenceCodec<_i4.Tuple2<_i3.AccountId32, BigInt>>( - _i4.Tuple2Codec<_i3.AccountId32, BigInt>( - _i3.AccountId32Codec(), - _i2.U128Codec.codec, - )), - ); - - _i5.Future usedNullifiers( - List key1, { - _i1.BlockHash? at, - }) async { + prefix: 'Wormhole', + storage: 'GenesisEndowmentsPending', + valueCodec: _i2.SequenceCodec<_i4.Tuple2<_i3.AccountId32, BigInt>>( + _i4.Tuple2Codec<_i3.AccountId32, BigInt>(_i3.AccountId32Codec(), _i2.U128Codec.codec), + ), + ); + + _i5.Future usedNullifiers(List key1, {_i1.BlockHash? at}) async { final hashedKey = _usedNullifiers.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _usedNullifiers.decodeValue(bytes); } @@ -60,15 +49,9 @@ class Queries { } /// Transfer count per recipient - used to generate unique leaf indices in the ZK trie. - _i5.Future transferCount( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i5.Future transferCount(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _transferCount.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _transferCount.decodeValue(bytes); } @@ -81,55 +64,32 @@ class Queries { /// then cleared. This ensures indexers like Subsquid can track genesis transfers. /// /// Unbounded because it's only populated at genesis and cleared on block 1. - _i5.Future>> - genesisEndowmentsPending({_i1.BlockHash? at}) async { + _i5.Future>> genesisEndowmentsPending({_i1.BlockHash? at}) async { final hashedKey = _genesisEndowmentsPending.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _genesisEndowmentsPending.decodeValue(bytes); } return []; /* Default */ } - _i5.Future> multiUsedNullifiers( - List> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _usedNullifiers.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i5.Future> multiUsedNullifiers(List> keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _usedNullifiers.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _usedNullifiers.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _usedNullifiers.decodeValue(v.key)).toList(); } return (keys.map((key) => false).toList() as List); /* Default */ } /// Transfer count per recipient - used to generate unique leaf indices in the ZK trie. - _i5.Future> multiTransferCount( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _transferCount.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i5.Future> multiTransferCount(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _transferCount.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _transferCount.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _transferCount.decodeValue(v.key)).toList(); } - return (keys.map((key) => BigInt.zero).toList() - as List); /* Default */ + return (keys.map((key) => BigInt.zero).toList() as List); /* Default */ } /// Returns the storage key for `usedNullifiers`. diff --git a/quantus_sdk/lib/generated/planck/pallets/zk_tree.dart b/quantus_sdk/lib/generated/planck/pallets/zk_tree.dart index 343185d0..518803dd 100644 --- a/quantus_sdk/lib/generated/planck/pallets/zk_tree.dart +++ b/quantus_sdk/lib/generated/planck/pallets/zk_tree.dart @@ -13,8 +13,7 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageMap _leaves = - const _i1.StorageMap( + final _i1.StorageMap _leaves = const _i1.StorageMap( prefix: 'ZkTree', storage: 'Leaves', valueCodec: _i2.ZkLeaf.codec, @@ -23,14 +22,11 @@ class Queries { final _i1.StorageMap<_i4.Tuple2, List> _nodes = const _i1.StorageMap<_i4.Tuple2, List>( - prefix: 'ZkTree', - storage: 'Nodes', - valueCodec: _i3.U8ArrayCodec(32), - hasher: _i1.StorageHasher.identity(_i4.Tuple2Codec( - _i3.U8Codec.codec, - _i3.U64Codec.codec, - )), - ); + prefix: 'ZkTree', + storage: 'Nodes', + valueCodec: _i3.U8ArrayCodec(32), + hasher: _i1.StorageHasher.identity(_i4.Tuple2Codec(_i3.U8Codec.codec, _i3.U64Codec.codec)), + ); final _i1.StorageValue _leafCount = const _i1.StorageValue( prefix: 'ZkTree', @@ -51,15 +47,9 @@ class Queries { ); /// Leaf data stored by index. - _i5.Future<_i2.ZkLeaf?> leaves( - BigInt key1, { - _i1.BlockHash? at, - }) async { + _i5.Future<_i2.ZkLeaf?> leaves(BigInt key1, {_i1.BlockHash? at}) async { final hashedKey = _leaves.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _leaves.decodeValue(bytes); } @@ -69,15 +59,9 @@ class Queries { /// Internal tree nodes: (level, index) -> hash. /// Level 0 is unused (leaves are hashed on-demand). /// Level 1+ contains internal node hashes. - _i5.Future?> nodes( - _i4.Tuple2 key1, { - _i1.BlockHash? at, - }) async { + _i5.Future?> nodes(_i4.Tuple2 key1, {_i1.BlockHash? at}) async { final hashedKey = _nodes.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _nodes.decodeValue(bytes); } @@ -87,10 +71,7 @@ class Queries { /// Number of leaves in the tree. _i5.Future leafCount({_i1.BlockHash? at}) async { final hashedKey = _leafCount.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _leafCount.decodeValue(bytes); } @@ -100,10 +81,7 @@ class Queries { /// Current depth of the tree (0 = empty, 1 = up to 4 leaves, etc.). _i5.Future depth({_i1.BlockHash? at}) async { final hashedKey = _depth.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _depth.decodeValue(bytes); } @@ -113,34 +91,19 @@ class Queries { /// Current root hash of the tree. _i5.Future> root({_i1.BlockHash? at}) async { final hashedKey = _root.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _root.decodeValue(bytes); } - return List.filled( - 32, - 0, - growable: false, - ); /* Default */ + return List.filled(32, 0, growable: false); /* Default */ } /// Leaf data stored by index. - _i5.Future> multiLeaves( - List keys, { - _i1.BlockHash? at, - }) async { + _i5.Future> multiLeaves(List keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _leaves.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _leaves.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _leaves.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -148,15 +111,9 @@ class Queries { /// Internal tree nodes: (level, index) -> hash. /// Level 0 is unused (leaves are hashed on-demand). /// Level 1+ contains internal node hashes. - _i5.Future?>> multiNodes( - List<_i4.Tuple2> keys, { - _i1.BlockHash? at, - }) async { + _i5.Future?>> multiNodes(List<_i4.Tuple2> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _nodes.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { return bytes.first.changes.map((v) => _nodes.decodeValue(v.key)).toList(); } diff --git a/quantus_sdk/lib/generated/planck/planck.dart b/quantus_sdk/lib/generated/planck/planck.dart index 1ce5fc17..58ad3bda 100644 --- a/quantus_sdk/lib/generated/planck/planck.dart +++ b/quantus_sdk/lib/generated/planck/planck.dart @@ -27,26 +27,26 @@ import 'pallets/zk_tree.dart' as _i21; class Queries { Queries(_i1.StateApi api) - : system = _i2.Queries(api), - timestamp = _i3.Queries(api), - balances = _i4.Queries(api), - transactionPayment = _i5.Queries(api), - qPoW = _i6.Queries(api), - miningRewards = _i7.Queries(api), - preimage = _i8.Queries(api), - scheduler = _i9.Queries(api), - referenda = _i10.Queries(api), - reversibleTransfers = _i11.Queries(api), - convictionVoting = _i12.Queries(api), - techCollective = _i13.Queries(api), - techReferenda = _i14.Queries(api), - treasuryPallet = _i15.Queries(api), - recovery = _i16.Queries(api), - assets = _i17.Queries(api), - assetsHolder = _i18.Queries(api), - multisig = _i19.Queries(api), - wormhole = _i20.Queries(api), - zkTree = _i21.Queries(api); + : system = _i2.Queries(api), + timestamp = _i3.Queries(api), + balances = _i4.Queries(api), + transactionPayment = _i5.Queries(api), + qPoW = _i6.Queries(api), + miningRewards = _i7.Queries(api), + preimage = _i8.Queries(api), + scheduler = _i9.Queries(api), + referenda = _i10.Queries(api), + reversibleTransfers = _i11.Queries(api), + convictionVoting = _i12.Queries(api), + techCollective = _i13.Queries(api), + techReferenda = _i14.Queries(api), + treasuryPallet = _i15.Queries(api), + recovery = _i16.Queries(api), + assets = _i17.Queries(api), + assetsHolder = _i18.Queries(api), + multisig = _i19.Queries(api), + wormhole = _i20.Queries(api), + zkTree = _i21.Queries(api); final _i2.Queries system; @@ -162,10 +162,7 @@ class Constants { } class Rpc { - const Rpc({ - required this.state, - required this.system, - }); + const Rpc({required this.state, required this.system}); final _i1.StateApi state; @@ -178,43 +175,24 @@ class Registry { final int extrinsicVersion = 4; List getSignedExtensionTypes() { - return [ - 'CheckMortality', - 'CheckNonce', - 'ChargeTransactionPayment', - 'CheckMetadataHash' - ]; + return ['CheckMortality', 'CheckNonce', 'ChargeTransactionPayment', 'CheckMetadataHash']; } List getSignedExtensionExtra() { - return [ - 'CheckSpecVersion', - 'CheckTxVersion', - 'CheckGenesis', - 'CheckMortality', - 'CheckMetadataHash' - ]; + return ['CheckSpecVersion', 'CheckTxVersion', 'CheckGenesis', 'CheckMortality', 'CheckMetadataHash']; } } class Planck { - Planck._( - this._provider, - this.rpc, - ) : query = Queries(rpc.state), - constant = Constants(), - tx = Extrinsics(), - registry = Registry(); + Planck._(this._provider, this.rpc) + : query = Queries(rpc.state), + constant = Constants(), + tx = Extrinsics(), + registry = Registry(); factory Planck(_i1.Provider provider) { - final rpc = Rpc( - state: _i1.StateApi(provider), - system: _i1.SystemApi(provider), - ); - return Planck._( - provider, - rpc, - ); + final rpc = Rpc(state: _i1.StateApi(provider), system: _i1.SystemApi(provider)); + return Planck._(provider, rpc); } factory Planck.url(Uri url) { diff --git a/quantus_sdk/lib/generated/planck/types/b_tree_map.dart b/quantus_sdk/lib/generated/planck/types/b_tree_map.dart index 499cc158..25b6b30c 100644 --- a/quantus_sdk/lib/generated/planck/types/b_tree_map.dart +++ b/quantus_sdk/lib/generated/planck/types/b_tree_map.dart @@ -12,33 +12,21 @@ class BTreeMapCodec with _i3.Codec { @override BTreeMap decode(_i3.Input input) { return const _i3.SequenceCodec<_i1.Tuple2<_i2.AccountId32, int>>( - _i1.Tuple2Codec<_i2.AccountId32, int>( - _i2.AccountId32Codec(), - _i3.U32Codec.codec, - )).decode(input); + _i1.Tuple2Codec<_i2.AccountId32, int>(_i2.AccountId32Codec(), _i3.U32Codec.codec), + ).decode(input); } @override - void encodeTo( - BTreeMap value, - _i3.Output output, - ) { + void encodeTo(BTreeMap value, _i3.Output output) { const _i3.SequenceCodec<_i1.Tuple2<_i2.AccountId32, int>>( - _i1.Tuple2Codec<_i2.AccountId32, int>( - _i2.AccountId32Codec(), - _i3.U32Codec.codec, - )).encodeTo( - value, - output, - ); + _i1.Tuple2Codec<_i2.AccountId32, int>(_i2.AccountId32Codec(), _i3.U32Codec.codec), + ).encodeTo(value, output); } @override int sizeHint(BTreeMap value) { return const _i3.SequenceCodec<_i1.Tuple2<_i2.AccountId32, int>>( - _i1.Tuple2Codec<_i2.AccountId32, int>( - _i2.AccountId32Codec(), - _i3.U32Codec.codec, - )).sizeHint(value); + _i1.Tuple2Codec<_i2.AccountId32, int>(_i2.AccountId32Codec(), _i3.U32Codec.codec), + ).sizeHint(value); } } diff --git a/quantus_sdk/lib/generated/planck/types/bounded_collections/bounded_btree_map/bounded_b_tree_map.dart b/quantus_sdk/lib/generated/planck/types/bounded_collections/bounded_btree_map/bounded_b_tree_map.dart index d364098a..7b21a5cb 100644 --- a/quantus_sdk/lib/generated/planck/types/bounded_collections/bounded_btree_map/bounded_b_tree_map.dart +++ b/quantus_sdk/lib/generated/planck/types/bounded_collections/bounded_btree_map/bounded_b_tree_map.dart @@ -13,25 +13,15 @@ class BoundedBTreeMapCodec with _i2.Codec { @override BoundedBTreeMap decode(_i2.Input input) { return const _i2.SequenceCodec<_i3.Tuple2<_i4.AccountId32, int>>( - _i3.Tuple2Codec<_i4.AccountId32, int>( - _i4.AccountId32Codec(), - _i2.U32Codec.codec, - )).decode(input); + _i3.Tuple2Codec<_i4.AccountId32, int>(_i4.AccountId32Codec(), _i2.U32Codec.codec), + ).decode(input); } @override - void encodeTo( - BoundedBTreeMap value, - _i2.Output output, - ) { + void encodeTo(BoundedBTreeMap value, _i2.Output output) { const _i2.SequenceCodec<_i3.Tuple2<_i4.AccountId32, int>>( - _i3.Tuple2Codec<_i4.AccountId32, int>( - _i4.AccountId32Codec(), - _i2.U32Codec.codec, - )).encodeTo( - value, - output, - ); + _i3.Tuple2Codec<_i4.AccountId32, int>(_i4.AccountId32Codec(), _i2.U32Codec.codec), + ).encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/cow_1.dart b/quantus_sdk/lib/generated/planck/types/cow_1.dart index 9f85ccde..deb05241 100644 --- a/quantus_sdk/lib/generated/planck/types/cow_1.dart +++ b/quantus_sdk/lib/generated/planck/types/cow_1.dart @@ -12,14 +12,8 @@ class CowCodec with _i1.Codec { } @override - void encodeTo( - Cow value, - _i1.Output output, - ) { - _i1.StrCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(Cow value, _i1.Output output) { + _i1.StrCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/cow_2.dart b/quantus_sdk/lib/generated/planck/types/cow_2.dart index c1e00c6b..5077d888 100644 --- a/quantus_sdk/lib/generated/planck/types/cow_2.dart +++ b/quantus_sdk/lib/generated/planck/types/cow_2.dart @@ -11,33 +11,21 @@ class CowCodec with _i2.Codec { @override Cow decode(_i2.Input input) { return const _i2.SequenceCodec<_i1.Tuple2, int>>( - _i1.Tuple2Codec, int>( - _i2.U8ArrayCodec(8), - _i2.U32Codec.codec, - )).decode(input); + _i1.Tuple2Codec, int>(_i2.U8ArrayCodec(8), _i2.U32Codec.codec), + ).decode(input); } @override - void encodeTo( - Cow value, - _i2.Output output, - ) { + void encodeTo(Cow value, _i2.Output output) { const _i2.SequenceCodec<_i1.Tuple2, int>>( - _i1.Tuple2Codec, int>( - _i2.U8ArrayCodec(8), - _i2.U32Codec.codec, - )).encodeTo( - value, - output, - ); + _i1.Tuple2Codec, int>(_i2.U8ArrayCodec(8), _i2.U32Codec.codec), + ).encodeTo(value, output); } @override int sizeHint(Cow value) { return const _i2.SequenceCodec<_i1.Tuple2, int>>( - _i1.Tuple2Codec, int>( - _i2.U8ArrayCodec(8), - _i2.U32Codec.codec, - )).sizeHint(value); + _i1.Tuple2Codec, int>(_i2.U8ArrayCodec(8), _i2.U32Codec.codec), + ).sizeHint(value); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/check_metadata_hash.dart b/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/check_metadata_hash.dart index 59209324..58d56ebe 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/check_metadata_hash.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/check_metadata_hash.dart @@ -24,12 +24,7 @@ class CheckMetadataHash { Map toJson() => {'mode': mode.toJson()}; @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is CheckMetadataHash && other.mode == mode; + bool operator ==(Object other) => identical(this, other) || other is CheckMetadataHash && other.mode == mode; @override int get hashCode => mode.hashCode; @@ -39,14 +34,8 @@ class $CheckMetadataHashCodec with _i1.Codec { const $CheckMetadataHashCodec(); @override - void encodeTo( - CheckMetadataHash obj, - _i1.Output output, - ) { - _i2.Mode.codec.encodeTo( - obj.mode, - output, - ); + void encodeTo(CheckMetadataHash obj, _i1.Output output) { + _i2.Mode.codec.encodeTo(obj.mode, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/mode.dart b/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/mode.dart index a7816bd2..5ec6e0eb 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/mode.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_metadata_hash_extension/mode.dart @@ -7,10 +7,7 @@ enum Mode { disabled('Disabled', 0), enabled('Enabled', 1); - const Mode( - this.variantName, - this.codecIndex, - ); + const Mode(this.variantName, this.codecIndex); factory Mode.decode(_i1.Input input) { return codec.decode(input); @@ -46,13 +43,7 @@ class $ModeCodec with _i1.Codec { } @override - void encodeTo( - Mode value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Mode value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/dispatch_class.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/dispatch_class.dart index 5b770447..e4f8be5b 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/dispatch_class.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/dispatch_class.dart @@ -8,10 +8,7 @@ enum DispatchClass { operational('Operational', 1), mandatory('Mandatory', 2); - const DispatchClass( - this.variantName, - this.codecIndex, - ); + const DispatchClass(this.variantName, this.codecIndex); factory DispatchClass.decode(_i1.Input input) { return codec.decode(input); @@ -49,13 +46,7 @@ class $DispatchClassCodec with _i1.Codec { } @override - void encodeTo( - DispatchClass value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(DispatchClass value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/pays.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/pays.dart index 4667ef73..05394649 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/pays.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/pays.dart @@ -7,10 +7,7 @@ enum Pays { yes('Yes', 0), no('No', 1); - const Pays( - this.variantName, - this.codecIndex, - ); + const Pays(this.variantName, this.codecIndex); factory Pays.decode(_i1.Input input) { return codec.decode(input); @@ -46,13 +43,7 @@ class $PaysCodec with _i1.Codec { } @override - void encodeTo( - Pays value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Pays value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_1.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_1.dart index 5a6fe514..7f410127 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_1.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_1.dart @@ -6,11 +6,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../../sp_weights/weight_v2/weight.dart' as _i2; class PerDispatchClass { - const PerDispatchClass({ - required this.normal, - required this.operational, - required this.mandatory, - }); + const PerDispatchClass({required this.normal, required this.operational, required this.mandatory}); factory PerDispatchClass.decode(_i1.Input input) { return codec.decode(input); @@ -32,50 +28,31 @@ class PerDispatchClass { } Map> toJson() => { - 'normal': normal.toJson(), - 'operational': operational.toJson(), - 'mandatory': mandatory.toJson(), - }; + 'normal': normal.toJson(), + 'operational': operational.toJson(), + 'mandatory': mandatory.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is PerDispatchClass && other.normal == normal && other.operational == operational && other.mandatory == mandatory; @override - int get hashCode => Object.hash( - normal, - operational, - mandatory, - ); + int get hashCode => Object.hash(normal, operational, mandatory); } class $PerDispatchClassCodec with _i1.Codec { const $PerDispatchClassCodec(); @override - void encodeTo( - PerDispatchClass obj, - _i1.Output output, - ) { - _i2.Weight.codec.encodeTo( - obj.normal, - output, - ); - _i2.Weight.codec.encodeTo( - obj.operational, - output, - ); - _i2.Weight.codec.encodeTo( - obj.mandatory, - output, - ); + void encodeTo(PerDispatchClass obj, _i1.Output output) { + _i2.Weight.codec.encodeTo(obj.normal, output); + _i2.Weight.codec.encodeTo(obj.operational, output); + _i2.Weight.codec.encodeTo(obj.mandatory, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_2.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_2.dart index 7b98dfe9..4055b7ae 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_2.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_2.dart @@ -6,11 +6,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../../frame_system/limits/weights_per_class.dart' as _i2; class PerDispatchClass { - const PerDispatchClass({ - required this.normal, - required this.operational, - required this.mandatory, - }); + const PerDispatchClass({required this.normal, required this.operational, required this.mandatory}); factory PerDispatchClass.decode(_i1.Input input) { return codec.decode(input); @@ -32,50 +28,31 @@ class PerDispatchClass { } Map?>> toJson() => { - 'normal': normal.toJson(), - 'operational': operational.toJson(), - 'mandatory': mandatory.toJson(), - }; + 'normal': normal.toJson(), + 'operational': operational.toJson(), + 'mandatory': mandatory.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is PerDispatchClass && other.normal == normal && other.operational == operational && other.mandatory == mandatory; @override - int get hashCode => Object.hash( - normal, - operational, - mandatory, - ); + int get hashCode => Object.hash(normal, operational, mandatory); } class $PerDispatchClassCodec with _i1.Codec { const $PerDispatchClassCodec(); @override - void encodeTo( - PerDispatchClass obj, - _i1.Output output, - ) { - _i2.WeightsPerClass.codec.encodeTo( - obj.normal, - output, - ); - _i2.WeightsPerClass.codec.encodeTo( - obj.operational, - output, - ); - _i2.WeightsPerClass.codec.encodeTo( - obj.mandatory, - output, - ); + void encodeTo(PerDispatchClass obj, _i1.Output output) { + _i2.WeightsPerClass.codec.encodeTo(obj.normal, output); + _i2.WeightsPerClass.codec.encodeTo(obj.operational, output); + _i2.WeightsPerClass.codec.encodeTo(obj.mandatory, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_3.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_3.dart index f442b028..a45897bd 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_3.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/per_dispatch_class_3.dart @@ -4,11 +4,7 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class PerDispatchClass { - const PerDispatchClass({ - required this.normal, - required this.operational, - required this.mandatory, - }); + const PerDispatchClass({required this.normal, required this.operational, required this.mandatory}); factory PerDispatchClass.decode(_i1.Input input) { return codec.decode(input); @@ -29,51 +25,28 @@ class PerDispatchClass { return codec.encode(this); } - Map toJson() => { - 'normal': normal, - 'operational': operational, - 'mandatory': mandatory, - }; + Map toJson() => {'normal': normal, 'operational': operational, 'mandatory': mandatory}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is PerDispatchClass && other.normal == normal && other.operational == operational && other.mandatory == mandatory; @override - int get hashCode => Object.hash( - normal, - operational, - mandatory, - ); + int get hashCode => Object.hash(normal, operational, mandatory); } class $PerDispatchClassCodec with _i1.Codec { const $PerDispatchClassCodec(); @override - void encodeTo( - PerDispatchClass obj, - _i1.Output output, - ) { - _i1.U32Codec.codec.encodeTo( - obj.normal, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.operational, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.mandatory, - output, - ); + void encodeTo(PerDispatchClass obj, _i1.Output output) { + _i1.U32Codec.codec.encodeTo(obj.normal, output); + _i1.U32Codec.codec.encodeTo(obj.operational, output); + _i1.U32Codec.codec.encodeTo(obj.mandatory, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/post_dispatch_info.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/post_dispatch_info.dart index ca10c804..05dbdaed 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/post_dispatch_info.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/post_dispatch_info.dart @@ -7,10 +7,7 @@ import '../../sp_weights/weight_v2/weight.dart' as _i2; import 'pays.dart' as _i3; class PostDispatchInfo { - const PostDispatchInfo({ - this.actualWeight, - required this.paysFee, - }); + const PostDispatchInfo({this.actualWeight, required this.paysFee}); factory PostDispatchInfo.decode(_i1.Input input) { return codec.decode(input); @@ -28,51 +25,30 @@ class PostDispatchInfo { return codec.encode(this); } - Map toJson() => { - 'actualWeight': actualWeight?.toJson(), - 'paysFee': paysFee.toJson(), - }; + Map toJson() => {'actualWeight': actualWeight?.toJson(), 'paysFee': paysFee.toJson()}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is PostDispatchInfo && - other.actualWeight == actualWeight && - other.paysFee == paysFee; + identical(this, other) || + other is PostDispatchInfo && other.actualWeight == actualWeight && other.paysFee == paysFee; @override - int get hashCode => Object.hash( - actualWeight, - paysFee, - ); + int get hashCode => Object.hash(actualWeight, paysFee); } class $PostDispatchInfoCodec with _i1.Codec { const $PostDispatchInfoCodec(); @override - void encodeTo( - PostDispatchInfo obj, - _i1.Output output, - ) { - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo( - obj.actualWeight, - output, - ); - _i3.Pays.codec.encodeTo( - obj.paysFee, - output, - ); + void encodeTo(PostDispatchInfo obj, _i1.Output output) { + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo(obj.actualWeight, output); + _i3.Pays.codec.encodeTo(obj.paysFee, output); } @override PostDispatchInfo decode(_i1.Input input) { return PostDispatchInfo( - actualWeight: - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), + actualWeight: const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), paysFee: _i3.Pays.codec.decode(input), ); } @@ -80,9 +56,7 @@ class $PostDispatchInfoCodec with _i1.Codec { @override int sizeHint(PostDispatchInfo obj) { int size = 0; - size = size + - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec) - .sizeHint(obj.actualWeight); + size = size + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).sizeHint(obj.actualWeight); size = size + _i3.Pays.codec.sizeHint(obj.paysFee); return size; } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/raw_origin.dart b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/raw_origin.dart index c2e51449..c329c2b4 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/raw_origin.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/dispatch/raw_origin.dart @@ -71,10 +71,7 @@ class $RawOriginCodec with _i1.Codec { } @override - void encodeTo( - RawOrigin value, - _i1.Output output, - ) { + void encodeTo(RawOrigin value, _i1.Output output) { switch (value.runtimeType) { case Root: (value as Root).encodeTo(output); @@ -89,8 +86,7 @@ class $RawOriginCodec with _i1.Codec { (value as Authorized).encodeTo(output); break; default: - throw Exception( - 'RawOrigin: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RawOrigin: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -106,8 +102,7 @@ class $RawOriginCodec with _i1.Codec { case Authorized: return 1; default: - throw Exception( - 'RawOrigin: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RawOrigin: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -119,10 +114,7 @@ class Root extends RawOrigin { Map toJson() => {'Root': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); } @override @@ -152,27 +144,12 @@ class Signed extends RawOrigin { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Signed && - _i4.listsEqual( - other.value0, - value0, - ); + bool operator ==(Object other) => identical(this, other) || other is Signed && _i4.listsEqual(other.value0, value0); @override int get hashCode => value0.hashCode; @@ -185,10 +162,7 @@ class None extends RawOrigin { Map toJson() => {'None': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); } @override @@ -205,10 +179,7 @@ class Authorized extends RawOrigin { Map toJson() => {'Authorized': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/pallet_id.dart b/quantus_sdk/lib/generated/planck/types/frame_support/pallet_id.dart index 9c862f63..ae6812ea 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/pallet_id.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/pallet_id.dart @@ -12,14 +12,8 @@ class PalletIdCodec with _i1.Codec { } @override - void encodeTo( - PalletId value, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(8).encodeTo( - value, - output, - ); + void encodeTo(PalletId value, _i1.Output output) { + const _i1.U8ArrayCodec(8).encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/preimages/bounded.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/preimages/bounded.dart index 3588d651..289a499b 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/preimages/bounded.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/preimages/bounded.dart @@ -41,14 +41,8 @@ class $Bounded { return Inline(value0); } - Lookup lookup({ - required _i3.H256 hash, - required int len, - }) { - return Lookup( - hash: hash, - len: len, - ); + Lookup lookup({required _i3.H256 hash, required int len}) { + return Lookup(hash: hash, len: len); } } @@ -71,10 +65,7 @@ class $BoundedCodec with _i1.Codec { } @override - void encodeTo( - Bounded value, - _i1.Output output, - ) { + void encodeTo(Bounded value, _i1.Output output) { switch (value.runtimeType) { case Legacy: (value as Legacy).encodeTo(output); @@ -86,8 +77,7 @@ class $BoundedCodec with _i1.Codec { (value as Lookup).encodeTo(output); break; default: - throw Exception( - 'Bounded: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Bounded: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -101,8 +91,7 @@ class $BoundedCodec with _i1.Codec { case Lookup: return (value as Lookup)._sizeHint(); default: - throw Exception( - 'Bounded: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Bounded: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -119,8 +108,8 @@ class Legacy extends Bounded { @override Map>> toJson() => { - 'Legacy': {'hash': hash.toList()} - }; + 'Legacy': {'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -129,27 +118,12 @@ class Legacy extends Bounded { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Legacy && - _i4.listsEqual( - other.hash, - hash, - ); + bool operator ==(Object other) => identical(this, other) || other is Legacy && _i4.listsEqual(other.hash, hash); @override int get hashCode => hash.hashCode; @@ -175,43 +149,22 @@ class Inline extends Bounded { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U8SequenceCodec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Inline && - _i4.listsEqual( - other.value0, - value0, - ); + bool operator ==(Object other) => identical(this, other) || other is Inline && _i4.listsEqual(other.value0, value0); @override int get hashCode => value0.hashCode; } class Lookup extends Bounded { - const Lookup({ - required this.hash, - required this.len, - }); + const Lookup({required this.hash, required this.len}); factory Lookup._decode(_i1.Input input) { - return Lookup( - hash: const _i1.U8ArrayCodec(32).decode(input), - len: _i1.U32Codec.codec.decode(input), - ); + return Lookup(hash: const _i1.U8ArrayCodec(32).decode(input), len: _i1.U32Codec.codec.decode(input)); } /// H::Output @@ -222,11 +175,8 @@ class Lookup extends Bounded { @override Map> toJson() => { - 'Lookup': { - 'hash': hash.toList(), - 'len': len, - } - }; + 'Lookup': {'hash': hash.toList(), 'len': len}, + }; int _sizeHint() { int size = 1; @@ -236,36 +186,15 @@ class Lookup extends Bounded { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); - _i1.U32Codec.codec.encodeTo( - len, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); + _i1.U32Codec.codec.encodeTo(len, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Lookup && - _i4.listsEqual( - other.hash, - hash, - ) && - other.len == len; + identical(this, other) || other is Lookup && _i4.listsEqual(other.hash, hash) && other.len == len; @override - int get hashCode => Object.hash( - hash, - len, - ); + int get hashCode => Object.hash(hash, len); } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/schedule/dispatch_time.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/schedule/dispatch_time.dart index 9b5953f2..5a14fb3f 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/schedule/dispatch_time.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/schedule/dispatch_time.dart @@ -56,10 +56,7 @@ class $DispatchTimeCodec with _i1.Codec { } @override - void encodeTo( - DispatchTime value, - _i1.Output output, - ) { + void encodeTo(DispatchTime value, _i1.Output output) { switch (value.runtimeType) { case At: (value as At).encodeTo(output); @@ -68,8 +65,7 @@ class $DispatchTimeCodec with _i1.Codec { (value as After).encodeTo(output); break; default: - throw Exception( - 'DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -81,8 +77,7 @@ class $DispatchTimeCodec with _i1.Codec { case After: return (value as After)._sizeHint(); default: - throw Exception( - 'DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -107,23 +102,12 @@ class At extends DispatchTime { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is At && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is At && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -149,23 +133,12 @@ class After extends DispatchTime { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is After && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is After && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/storage/no_drop.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/storage/no_drop.dart index 0e4b40c7..c0f043e5 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/storage/no_drop.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/storage/no_drop.dart @@ -14,14 +14,8 @@ class NoDropCodec with _i2.Codec { } @override - void encodeTo( - NoDrop value, - _i2.Output output, - ) { - _i1.Imbalance.codec.encodeTo( - value, - output, - ); + void encodeTo(NoDrop value, _i2.Output output) { + _i1.Imbalance.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/fungible/imbalance/imbalance.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/fungible/imbalance/imbalance.dart index 1c0f4b91..7f69836d 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/fungible/imbalance/imbalance.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/fungible/imbalance/imbalance.dart @@ -22,12 +22,7 @@ class Imbalance { Map toJson() => {'amount': amount}; @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Imbalance && other.amount == amount; + bool operator ==(Object other) => identical(this, other) || other is Imbalance && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -37,14 +32,8 @@ class $ImbalanceCodec with _i1.Codec { const $ImbalanceCodec(); @override - void encodeTo( - Imbalance obj, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - obj.amount, - output, - ); + void encodeTo(Imbalance obj, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(obj.amount, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/balance_status.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/balance_status.dart index c0012bda..5f830490 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/balance_status.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/balance_status.dart @@ -7,10 +7,7 @@ enum BalanceStatus { free('Free', 0), reserved('Reserved', 1); - const BalanceStatus( - this.variantName, - this.codecIndex, - ); + const BalanceStatus(this.variantName, this.codecIndex); factory BalanceStatus.decode(_i1.Input input) { return codec.decode(input); @@ -46,13 +43,7 @@ class $BalanceStatusCodec with _i1.Codec { } @override - void encodeTo( - BalanceStatus value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(BalanceStatus value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_1.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_1.dart index a390eaa2..852db11b 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_1.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_1.dart @@ -6,10 +6,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../../../../quantus_runtime/runtime_hold_reason.dart' as _i2; class IdAmount { - const IdAmount({ - required this.id, - required this.amount, - }); + const IdAmount({required this.id, required this.amount}); factory IdAmount.decode(_i1.Input input) { return codec.decode(input); @@ -27,50 +24,28 @@ class IdAmount { return codec.encode(this); } - Map toJson() => { - 'id': id.toJson(), - 'amount': amount, - }; + Map toJson() => {'id': id.toJson(), 'amount': amount}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is IdAmount && other.id == id && other.amount == amount; + identical(this, other) || other is IdAmount && other.id == id && other.amount == amount; @override - int get hashCode => Object.hash( - id, - amount, - ); + int get hashCode => Object.hash(id, amount); } class $IdAmountCodec with _i1.Codec { const $IdAmountCodec(); @override - void encodeTo( - IdAmount obj, - _i1.Output output, - ) { - _i2.RuntimeHoldReason.codec.encodeTo( - obj.id, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.amount, - output, - ); + void encodeTo(IdAmount obj, _i1.Output output) { + _i2.RuntimeHoldReason.codec.encodeTo(obj.id, output); + _i1.U128Codec.codec.encodeTo(obj.amount, output); } @override IdAmount decode(_i1.Input input) { - return IdAmount( - id: _i2.RuntimeHoldReason.codec.decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return IdAmount(id: _i2.RuntimeHoldReason.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_2.dart b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_2.dart index 4707596a..6ec0b06d 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_2.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_support/traits/tokens/misc/id_amount_2.dart @@ -6,10 +6,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../../../../quantus_runtime/runtime_freeze_reason.dart' as _i2; class IdAmount { - const IdAmount({ - required this.id, - required this.amount, - }); + const IdAmount({required this.id, required this.amount}); factory IdAmount.decode(_i1.Input input) { return codec.decode(input); @@ -27,50 +24,28 @@ class IdAmount { return codec.encode(this); } - Map toJson() => { - 'id': null, - 'amount': amount, - }; + Map toJson() => {'id': null, 'amount': amount}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is IdAmount && other.id == id && other.amount == amount; + identical(this, other) || other is IdAmount && other.id == id && other.amount == amount; @override - int get hashCode => Object.hash( - id, - amount, - ); + int get hashCode => Object.hash(id, amount); } class $IdAmountCodec with _i1.Codec { const $IdAmountCodec(); @override - void encodeTo( - IdAmount obj, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - obj.id, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.amount, - output, - ); + void encodeTo(IdAmount obj, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(obj.id, output); + _i1.U128Codec.codec.encodeTo(obj.amount, output); } @override IdAmount decode(_i1.Input input) { - return IdAmount( - id: _i1.NullCodec.codec.decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return IdAmount(id: _i1.NullCodec.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/account_info.dart b/quantus_sdk/lib/generated/planck/types/frame_system/account_info.dart index 3faadbb0..d35ddcf1 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/account_info.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/account_info.dart @@ -40,19 +40,16 @@ class AccountInfo { } Map toJson() => { - 'nonce': nonce, - 'consumers': consumers, - 'providers': providers, - 'sufficients': sufficients, - 'data': data.toJson(), - }; + 'nonce': nonce, + 'consumers': consumers, + 'providers': providers, + 'sufficients': sufficients, + 'data': data.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is AccountInfo && other.nonce == nonce && other.consumers == consumers && @@ -61,43 +58,19 @@ class AccountInfo { other.data == data; @override - int get hashCode => Object.hash( - nonce, - consumers, - providers, - sufficients, - data, - ); + int get hashCode => Object.hash(nonce, consumers, providers, sufficients, data); } class $AccountInfoCodec with _i1.Codec { const $AccountInfoCodec(); @override - void encodeTo( - AccountInfo obj, - _i1.Output output, - ) { - _i1.U32Codec.codec.encodeTo( - obj.nonce, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.consumers, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.providers, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.sufficients, - output, - ); - _i2.AccountData.codec.encodeTo( - obj.data, - output, - ); + void encodeTo(AccountInfo obj, _i1.Output output) { + _i1.U32Codec.codec.encodeTo(obj.nonce, output); + _i1.U32Codec.codec.encodeTo(obj.consumers, output); + _i1.U32Codec.codec.encodeTo(obj.providers, output); + _i1.U32Codec.codec.encodeTo(obj.sufficients, output); + _i2.AccountData.codec.encodeTo(obj.data, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/code_upgrade_authorization.dart b/quantus_sdk/lib/generated/planck/types/frame_system/code_upgrade_authorization.dart index cc29ab5d..d89fc207 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/code_upgrade_authorization.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/code_upgrade_authorization.dart @@ -7,10 +7,7 @@ import 'package:quiver/collection.dart' as _i4; import '../primitive_types/h256.dart' as _i2; class CodeUpgradeAuthorization { - const CodeUpgradeAuthorization({ - required this.codeHash, - required this.checkVersion, - }); + const CodeUpgradeAuthorization({required this.codeHash, required this.checkVersion}); factory CodeUpgradeAuthorization.decode(_i1.Input input) { return codec.decode(input); @@ -22,54 +19,32 @@ class CodeUpgradeAuthorization { /// bool final bool checkVersion; - static const $CodeUpgradeAuthorizationCodec codec = - $CodeUpgradeAuthorizationCodec(); + static const $CodeUpgradeAuthorizationCodec codec = $CodeUpgradeAuthorizationCodec(); _i3.Uint8List encode() { return codec.encode(this); } - Map toJson() => { - 'codeHash': codeHash.toList(), - 'checkVersion': checkVersion, - }; + Map toJson() => {'codeHash': codeHash.toList(), 'checkVersion': checkVersion}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is CodeUpgradeAuthorization && - _i4.listsEqual( - other.codeHash, - codeHash, - ) && + _i4.listsEqual(other.codeHash, codeHash) && other.checkVersion == checkVersion; @override - int get hashCode => Object.hash( - codeHash, - checkVersion, - ); + int get hashCode => Object.hash(codeHash, checkVersion); } class $CodeUpgradeAuthorizationCodec with _i1.Codec { const $CodeUpgradeAuthorizationCodec(); @override - void encodeTo( - CodeUpgradeAuthorization obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - obj.codeHash, - output, - ); - _i1.BoolCodec.codec.encodeTo( - obj.checkVersion, - output, - ); + void encodeTo(CodeUpgradeAuthorization obj, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(obj.codeHash, output); + _i1.BoolCodec.codec.encodeTo(obj.checkVersion, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/dispatch_event_info.dart b/quantus_sdk/lib/generated/planck/types/frame_system/dispatch_event_info.dart index 728e8f63..764759fb 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/dispatch_event_info.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/dispatch_event_info.dart @@ -8,11 +8,7 @@ import '../frame_support/dispatch/pays.dart' as _i4; import '../sp_weights/weight_v2/weight.dart' as _i2; class DispatchEventInfo { - const DispatchEventInfo({ - required this.weight, - required this.class_, - required this.paysFee, - }); + const DispatchEventInfo({required this.weight, required this.class_, required this.paysFee}); factory DispatchEventInfo.decode(_i1.Input input) { return codec.decode(input); @@ -33,51 +29,25 @@ class DispatchEventInfo { return codec.encode(this); } - Map toJson() => { - 'weight': weight.toJson(), - 'class': class_.toJson(), - 'paysFee': paysFee.toJson(), - }; + Map toJson() => {'weight': weight.toJson(), 'class': class_.toJson(), 'paysFee': paysFee.toJson()}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DispatchEventInfo && - other.weight == weight && - other.class_ == class_ && - other.paysFee == paysFee; + identical(this, other) || + other is DispatchEventInfo && other.weight == weight && other.class_ == class_ && other.paysFee == paysFee; @override - int get hashCode => Object.hash( - weight, - class_, - paysFee, - ); + int get hashCode => Object.hash(weight, class_, paysFee); } class $DispatchEventInfoCodec with _i1.Codec { const $DispatchEventInfoCodec(); @override - void encodeTo( - DispatchEventInfo obj, - _i1.Output output, - ) { - _i2.Weight.codec.encodeTo( - obj.weight, - output, - ); - _i3.DispatchClass.codec.encodeTo( - obj.class_, - output, - ); - _i4.Pays.codec.encodeTo( - obj.paysFee, - output, - ); + void encodeTo(DispatchEventInfo obj, _i1.Output output) { + _i2.Weight.codec.encodeTo(obj.weight, output); + _i3.DispatchClass.codec.encodeTo(obj.class_, output); + _i4.Pays.codec.encodeTo(obj.paysFee, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/event_record.dart b/quantus_sdk/lib/generated/planck/types/frame_system/event_record.dart index 640ec813..5987bf9b 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/event_record.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/event_record.dart @@ -9,11 +9,7 @@ import '../quantus_runtime/runtime_event.dart' as _i3; import 'phase.dart' as _i2; class EventRecord { - const EventRecord({ - required this.phase, - required this.event, - required this.topics, - }); + const EventRecord({required this.phase, required this.event, required this.topics}); factory EventRecord.decode(_i1.Input input) { return codec.decode(input); @@ -35,53 +31,28 @@ class EventRecord { } Map toJson() => { - 'phase': phase.toJson(), - 'event': event.toJson(), - 'topics': topics.map((value) => value.toList()).toList(), - }; + 'phase': phase.toJson(), + 'event': event.toJson(), + 'topics': topics.map((value) => value.toList()).toList(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is EventRecord && - other.phase == phase && - other.event == event && - _i6.listsEqual( - other.topics, - topics, - ); + identical(this, other) || + other is EventRecord && other.phase == phase && other.event == event && _i6.listsEqual(other.topics, topics); @override - int get hashCode => Object.hash( - phase, - event, - topics, - ); + int get hashCode => Object.hash(phase, event, topics); } class $EventRecordCodec with _i1.Codec { const $EventRecordCodec(); @override - void encodeTo( - EventRecord obj, - _i1.Output output, - ) { - _i2.Phase.codec.encodeTo( - obj.phase, - output, - ); - _i3.RuntimeEvent.codec.encodeTo( - obj.event, - output, - ); - const _i1.SequenceCodec<_i4.H256>(_i4.H256Codec()).encodeTo( - obj.topics, - output, - ); + void encodeTo(EventRecord obj, _i1.Output output) { + _i2.Phase.codec.encodeTo(obj.phase, output); + _i3.RuntimeEvent.codec.encodeTo(obj.event, output); + const _i1.SequenceCodec<_i4.H256>(_i4.H256Codec()).encodeTo(obj.topics, output); } @override @@ -98,8 +69,7 @@ class $EventRecordCodec with _i1.Codec { int size = 0; size = size + _i2.Phase.codec.sizeHint(obj.phase); size = size + _i3.RuntimeEvent.codec.sizeHint(obj.event); - size = size + - const _i1.SequenceCodec<_i4.H256>(_i4.H256Codec()).sizeHint(obj.topics); + size = size + const _i1.SequenceCodec<_i4.H256>(_i4.H256Codec()).sizeHint(obj.topics); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_genesis/check_genesis.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_genesis/check_genesis.dart index dfb8d9aa..8868c238 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_genesis/check_genesis.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_genesis/check_genesis.dart @@ -12,14 +12,8 @@ class CheckGenesisCodec with _i1.Codec { } @override - void encodeTo( - CheckGenesis value, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(CheckGenesis value, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_mortality/check_mortality.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_mortality/check_mortality.dart index 74bb6a2b..06298fe3 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_mortality/check_mortality.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_mortality/check_mortality.dart @@ -14,14 +14,8 @@ class CheckMortalityCodec with _i2.Codec { } @override - void encodeTo( - CheckMortality value, - _i2.Output output, - ) { - _i1.Era.codec.encodeTo( - value, - output, - ); + void encodeTo(CheckMortality value, _i2.Output output) { + _i1.Era.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart index e6bd60e1..f2cf2cad 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart @@ -12,14 +12,8 @@ class CheckNonZeroSenderCodec with _i1.Codec { } @override - void encodeTo( - CheckNonZeroSender value, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(CheckNonZeroSender value, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_nonce/check_nonce.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_nonce/check_nonce.dart index 2b7e417d..5e91c23f 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_nonce/check_nonce.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_nonce/check_nonce.dart @@ -12,14 +12,8 @@ class CheckNonceCodec with _i1.Codec { } @override - void encodeTo( - CheckNonce value, - _i1.Output output, - ) { - _i1.CompactBigIntCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(CheckNonce value, _i1.Output output) { + _i1.CompactBigIntCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_spec_version/check_spec_version.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_spec_version/check_spec_version.dart index 54164051..8366f520 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_spec_version/check_spec_version.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_spec_version/check_spec_version.dart @@ -12,14 +12,8 @@ class CheckSpecVersionCodec with _i1.Codec { } @override - void encodeTo( - CheckSpecVersion value, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(CheckSpecVersion value, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_tx_version/check_tx_version.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_tx_version/check_tx_version.dart index 8c1617d2..68153e17 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_tx_version/check_tx_version.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_tx_version/check_tx_version.dart @@ -12,14 +12,8 @@ class CheckTxVersionCodec with _i1.Codec { } @override - void encodeTo( - CheckTxVersion value, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(CheckTxVersion value, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_weight/check_weight.dart b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_weight/check_weight.dart index 5fc6a462..8fec0eef 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_weight/check_weight.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/extensions/check_weight/check_weight.dart @@ -12,14 +12,8 @@ class CheckWeightCodec with _i1.Codec { } @override - void encodeTo( - CheckWeight value, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(CheckWeight value, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/last_runtime_upgrade_info.dart b/quantus_sdk/lib/generated/planck/types/frame_system/last_runtime_upgrade_info.dart index 77fd6ae7..f36c690b 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/last_runtime_upgrade_info.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/last_runtime_upgrade_info.dart @@ -6,10 +6,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../cow_1.dart' as _i2; class LastRuntimeUpgradeInfo { - const LastRuntimeUpgradeInfo({ - required this.specVersion, - required this.specName, - }); + const LastRuntimeUpgradeInfo({required this.specVersion, required this.specName}); factory LastRuntimeUpgradeInfo.decode(_i1.Input input) { return codec.decode(input); @@ -21,51 +18,30 @@ class LastRuntimeUpgradeInfo { /// Cow<'static, str> final _i2.Cow specName; - static const $LastRuntimeUpgradeInfoCodec codec = - $LastRuntimeUpgradeInfoCodec(); + static const $LastRuntimeUpgradeInfoCodec codec = $LastRuntimeUpgradeInfoCodec(); _i3.Uint8List encode() { return codec.encode(this); } - Map toJson() => { - 'specVersion': specVersion, - 'specName': specName, - }; + Map toJson() => {'specVersion': specVersion, 'specName': specName}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is LastRuntimeUpgradeInfo && - other.specVersion == specVersion && - other.specName == specName; + identical(this, other) || + other is LastRuntimeUpgradeInfo && other.specVersion == specVersion && other.specName == specName; @override - int get hashCode => Object.hash( - specVersion, - specName, - ); + int get hashCode => Object.hash(specVersion, specName); } class $LastRuntimeUpgradeInfoCodec with _i1.Codec { const $LastRuntimeUpgradeInfoCodec(); @override - void encodeTo( - LastRuntimeUpgradeInfo obj, - _i1.Output output, - ) { - _i1.CompactBigIntCodec.codec.encodeTo( - obj.specVersion, - output, - ); - _i1.StrCodec.codec.encodeTo( - obj.specName, - output, - ); + void encodeTo(LastRuntimeUpgradeInfo obj, _i1.Output output) { + _i1.CompactBigIntCodec.codec.encodeTo(obj.specVersion, output); + _i1.StrCodec.codec.encodeTo(obj.specName, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_length.dart b/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_length.dart index b5a0a476..8d610bb0 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_length.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_length.dart @@ -24,12 +24,7 @@ class BlockLength { Map> toJson() => {'max': max.toJson()}; @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is BlockLength && other.max == max; + bool operator ==(Object other) => identical(this, other) || other is BlockLength && other.max == max; @override int get hashCode => max.hashCode; @@ -39,14 +34,8 @@ class $BlockLengthCodec with _i1.Codec { const $BlockLengthCodec(); @override - void encodeTo( - BlockLength obj, - _i1.Output output, - ) { - _i2.PerDispatchClass.codec.encodeTo( - obj.max, - output, - ); + void encodeTo(BlockLength obj, _i1.Output output) { + _i2.PerDispatchClass.codec.encodeTo(obj.max, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_weights.dart b/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_weights.dart index e0ff79bb..45160d0b 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_weights.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/limits/block_weights.dart @@ -7,11 +7,7 @@ import '../../frame_support/dispatch/per_dispatch_class_2.dart' as _i3; import '../../sp_weights/weight_v2/weight.dart' as _i2; class BlockWeights { - const BlockWeights({ - required this.baseBlock, - required this.maxBlock, - required this.perClass, - }); + const BlockWeights({required this.baseBlock, required this.maxBlock, required this.perClass}); factory BlockWeights.decode(_i1.Input input) { return codec.decode(input); @@ -33,50 +29,28 @@ class BlockWeights { } Map> toJson() => { - 'baseBlock': baseBlock.toJson(), - 'maxBlock': maxBlock.toJson(), - 'perClass': perClass.toJson(), - }; + 'baseBlock': baseBlock.toJson(), + 'maxBlock': maxBlock.toJson(), + 'perClass': perClass.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is BlockWeights && - other.baseBlock == baseBlock && - other.maxBlock == maxBlock && - other.perClass == perClass; + identical(this, other) || + other is BlockWeights && other.baseBlock == baseBlock && other.maxBlock == maxBlock && other.perClass == perClass; @override - int get hashCode => Object.hash( - baseBlock, - maxBlock, - perClass, - ); + int get hashCode => Object.hash(baseBlock, maxBlock, perClass); } class $BlockWeightsCodec with _i1.Codec { const $BlockWeightsCodec(); @override - void encodeTo( - BlockWeights obj, - _i1.Output output, - ) { - _i2.Weight.codec.encodeTo( - obj.baseBlock, - output, - ); - _i2.Weight.codec.encodeTo( - obj.maxBlock, - output, - ); - _i3.PerDispatchClass.codec.encodeTo( - obj.perClass, - output, - ); + void encodeTo(BlockWeights obj, _i1.Output output) { + _i2.Weight.codec.encodeTo(obj.baseBlock, output); + _i2.Weight.codec.encodeTo(obj.maxBlock, output); + _i3.PerDispatchClass.codec.encodeTo(obj.perClass, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/limits/weights_per_class.dart b/quantus_sdk/lib/generated/planck/types/frame_system/limits/weights_per_class.dart index 0a830e75..d3728830 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/limits/weights_per_class.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/limits/weights_per_class.dart @@ -6,12 +6,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../../sp_weights/weight_v2/weight.dart' as _i2; class WeightsPerClass { - const WeightsPerClass({ - required this.baseExtrinsic, - this.maxExtrinsic, - this.maxTotal, - this.reserved, - }); + const WeightsPerClass({required this.baseExtrinsic, this.maxExtrinsic, this.maxTotal, this.reserved}); factory WeightsPerClass.decode(_i1.Input input) { return codec.decode(input); @@ -36,18 +31,15 @@ class WeightsPerClass { } Map?> toJson() => { - 'baseExtrinsic': baseExtrinsic.toJson(), - 'maxExtrinsic': maxExtrinsic?.toJson(), - 'maxTotal': maxTotal?.toJson(), - 'reserved': reserved?.toJson(), - }; + 'baseExtrinsic': baseExtrinsic.toJson(), + 'maxExtrinsic': maxExtrinsic?.toJson(), + 'maxTotal': maxTotal?.toJson(), + 'reserved': reserved?.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is WeightsPerClass && other.baseExtrinsic == baseExtrinsic && other.maxExtrinsic == maxExtrinsic && @@ -55,50 +47,27 @@ class WeightsPerClass { other.reserved == reserved; @override - int get hashCode => Object.hash( - baseExtrinsic, - maxExtrinsic, - maxTotal, - reserved, - ); + int get hashCode => Object.hash(baseExtrinsic, maxExtrinsic, maxTotal, reserved); } class $WeightsPerClassCodec with _i1.Codec { const $WeightsPerClassCodec(); @override - void encodeTo( - WeightsPerClass obj, - _i1.Output output, - ) { - _i2.Weight.codec.encodeTo( - obj.baseExtrinsic, - output, - ); - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo( - obj.maxExtrinsic, - output, - ); - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo( - obj.maxTotal, - output, - ); - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo( - obj.reserved, - output, - ); + void encodeTo(WeightsPerClass obj, _i1.Output output) { + _i2.Weight.codec.encodeTo(obj.baseExtrinsic, output); + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo(obj.maxExtrinsic, output); + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo(obj.maxTotal, output); + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).encodeTo(obj.reserved, output); } @override WeightsPerClass decode(_i1.Input input) { return WeightsPerClass( baseExtrinsic: _i2.Weight.codec.decode(input), - maxExtrinsic: - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), - maxTotal: - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), - reserved: - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), + maxExtrinsic: const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), + maxTotal: const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), + reserved: const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), ); } @@ -106,15 +75,9 @@ class $WeightsPerClassCodec with _i1.Codec { int sizeHint(WeightsPerClass obj) { int size = 0; size = size + _i2.Weight.codec.sizeHint(obj.baseExtrinsic); - size = size + - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec) - .sizeHint(obj.maxExtrinsic); - size = size + - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec) - .sizeHint(obj.maxTotal); - size = size + - const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec) - .sizeHint(obj.reserved); + size = size + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).sizeHint(obj.maxExtrinsic); + size = size + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).sizeHint(obj.maxTotal); + size = size + const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).sizeHint(obj.reserved); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/call.dart index 13af67c8..d63a4a81 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/call.dart @@ -51,8 +51,7 @@ class $Call { return SetCodeWithoutChecks(code: code); } - SetStorage setStorage( - {required List<_i3.Tuple2, List>> items}) { + SetStorage setStorage({required List<_i3.Tuple2, List>> items}) { return SetStorage(items: items); } @@ -60,14 +59,8 @@ class $Call { return KillStorage(keys: keys); } - KillPrefix killPrefix({ - required List prefix, - required int subkeys, - }) { - return KillPrefix( - prefix: prefix, - subkeys: subkeys, - ); + KillPrefix killPrefix({required List prefix, required int subkeys}) { + return KillPrefix(prefix: prefix, subkeys: subkeys); } RemarkWithEvent remarkWithEvent({required List remark}) { @@ -78,8 +71,7 @@ class $Call { return AuthorizeUpgrade(codeHash: codeHash); } - AuthorizeUpgradeWithoutChecks authorizeUpgradeWithoutChecks( - {required _i4.H256 codeHash}) { + AuthorizeUpgradeWithoutChecks authorizeUpgradeWithoutChecks({required _i4.H256 codeHash}) { return AuthorizeUpgradeWithoutChecks(codeHash: codeHash); } @@ -123,10 +115,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case Remark: (value as Remark).encodeTo(output); @@ -162,8 +151,7 @@ class $CallCodec with _i1.Codec { (value as ApplyAuthorizedUpgrade).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -193,8 +181,7 @@ class $CallCodec with _i1.Codec { case ApplyAuthorizedUpgrade: return (value as ApplyAuthorizedUpgrade)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -214,8 +201,8 @@ class Remark extends Call { @override Map>> toJson() => { - 'remark': {'remark': remark} - }; + 'remark': {'remark': remark}, + }; int _sizeHint() { int size = 1; @@ -224,27 +211,12 @@ class Remark extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - remark, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8SequenceCodec.codec.encodeTo(remark, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Remark && - _i5.listsEqual( - other.remark, - remark, - ); + bool operator ==(Object other) => identical(this, other) || other is Remark && _i5.listsEqual(other.remark, remark); @override int get hashCode => remark.hashCode; @@ -263,8 +235,8 @@ class SetHeapPages extends Call { @override Map> toJson() => { - 'set_heap_pages': {'pages': pages} - }; + 'set_heap_pages': {'pages': pages}, + }; int _sizeHint() { int size = 1; @@ -273,23 +245,12 @@ class SetHeapPages extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U64Codec.codec.encodeTo( - pages, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U64Codec.codec.encodeTo(pages, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetHeapPages && other.pages == pages; + bool operator ==(Object other) => identical(this, other) || other is SetHeapPages && other.pages == pages; @override int get hashCode => pages.hashCode; @@ -308,8 +269,8 @@ class SetCode extends Call { @override Map>> toJson() => { - 'set_code': {'code': code} - }; + 'set_code': {'code': code}, + }; int _sizeHint() { int size = 1; @@ -318,27 +279,12 @@ class SetCode extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - code, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U8SequenceCodec.codec.encodeTo(code, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetCode && - _i5.listsEqual( - other.code, - code, - ); + bool operator ==(Object other) => identical(this, other) || other is SetCode && _i5.listsEqual(other.code, code); @override int get hashCode => code.hashCode; @@ -360,8 +306,8 @@ class SetCodeWithoutChecks extends Call { @override Map>> toJson() => { - 'set_code_without_checks': {'code': code} - }; + 'set_code_without_checks': {'code': code}, + }; int _sizeHint() { int size = 1; @@ -370,27 +316,13 @@ class SetCodeWithoutChecks extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - code, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.U8SequenceCodec.codec.encodeTo(code, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetCodeWithoutChecks && - _i5.listsEqual( - other.code, - code, - ); + identical(this, other) || other is SetCodeWithoutChecks && _i5.listsEqual(other.code, code); @override int get hashCode => code.hashCode; @@ -402,11 +334,10 @@ class SetStorage extends Call { factory SetStorage._decode(_i1.Input input) { return SetStorage( - items: const _i1.SequenceCodec<_i3.Tuple2, List>>( - _i3.Tuple2Codec, List>( - _i1.U8SequenceCodec.codec, - _i1.U8SequenceCodec.codec, - )).decode(input)); + items: const _i1.SequenceCodec<_i3.Tuple2, List>>( + _i3.Tuple2Codec, List>(_i1.U8SequenceCodec.codec, _i1.U8SequenceCodec.codec), + ).decode(input), + ); } /// Vec @@ -414,53 +345,30 @@ class SetStorage extends Call { @override Map>>>> toJson() => { - 'set_storage': { - 'items': items - .map((value) => [ - value.value0, - value.value1, - ]) - .toList() - } - }; + 'set_storage': { + 'items': items.map((value) => [value.value0, value.value1]).toList(), + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i1.SequenceCodec<_i3.Tuple2, List>>( - _i3.Tuple2Codec, List>( - _i1.U8SequenceCodec.codec, - _i1.U8SequenceCodec.codec, - )).sizeHint(items); + _i3.Tuple2Codec, List>(_i1.U8SequenceCodec.codec, _i1.U8SequenceCodec.codec), + ).sizeHint(items); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); const _i1.SequenceCodec<_i3.Tuple2, List>>( - _i3.Tuple2Codec, List>( - _i1.U8SequenceCodec.codec, - _i1.U8SequenceCodec.codec, - )).encodeTo( - items, - output, - ); + _i3.Tuple2Codec, List>(_i1.U8SequenceCodec.codec, _i1.U8SequenceCodec.codec), + ).encodeTo(items, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetStorage && - _i5.listsEqual( - other.items, - items, - ); + bool operator ==(Object other) => identical(this, other) || other is SetStorage && _i5.listsEqual(other.items, items); @override int get hashCode => items.hashCode; @@ -471,9 +379,7 @@ class KillStorage extends Call { const KillStorage({required this.keys}); factory KillStorage._decode(_i1.Input input) { - return KillStorage( - keys: const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec) - .decode(input)); + return KillStorage(keys: const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec).decode(input)); } /// Vec @@ -481,39 +387,22 @@ class KillStorage extends Call { @override Map>>> toJson() => { - 'kill_storage': {'keys': keys.map((value) => value).toList()} - }; + 'kill_storage': {'keys': keys.map((value) => value).toList()}, + }; int _sizeHint() { int size = 1; - size = size + - const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec) - .sizeHint(keys); + size = size + const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec).sizeHint(keys); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec).encodeTo( - keys, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + const _i1.SequenceCodec>(_i1.U8SequenceCodec.codec).encodeTo(keys, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is KillStorage && - _i5.listsEqual( - other.keys, - keys, - ); + bool operator ==(Object other) => identical(this, other) || other is KillStorage && _i5.listsEqual(other.keys, keys); @override int get hashCode => keys.hashCode; @@ -524,16 +413,10 @@ class KillStorage extends Call { /// **NOTE:** We rely on the Root origin to provide us the number of subkeys under /// the prefix we are removing to accurately calculate the weight of this function. class KillPrefix extends Call { - const KillPrefix({ - required this.prefix, - required this.subkeys, - }); + const KillPrefix({required this.prefix, required this.subkeys}); factory KillPrefix._decode(_i1.Input input) { - return KillPrefix( - prefix: _i1.U8SequenceCodec.codec.decode(input), - subkeys: _i1.U32Codec.codec.decode(input), - ); + return KillPrefix(prefix: _i1.U8SequenceCodec.codec.decode(input), subkeys: _i1.U32Codec.codec.decode(input)); } /// Key @@ -544,11 +427,8 @@ class KillPrefix extends Call { @override Map> toJson() => { - 'kill_prefix': { - 'prefix': prefix, - 'subkeys': subkeys, - } - }; + 'kill_prefix': {'prefix': prefix, 'subkeys': subkeys}, + }; int _sizeHint() { int size = 1; @@ -558,38 +438,17 @@ class KillPrefix extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - prefix, - output, - ); - _i1.U32Codec.codec.encodeTo( - subkeys, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i1.U8SequenceCodec.codec.encodeTo(prefix, output); + _i1.U32Codec.codec.encodeTo(subkeys, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is KillPrefix && - _i5.listsEqual( - other.prefix, - prefix, - ) && - other.subkeys == subkeys; - - @override - int get hashCode => Object.hash( - prefix, - subkeys, - ); + identical(this, other) || other is KillPrefix && _i5.listsEqual(other.prefix, prefix) && other.subkeys == subkeys; + + @override + int get hashCode => Object.hash(prefix, subkeys); } /// Make some on-chain remark and emit event. @@ -605,8 +464,8 @@ class RemarkWithEvent extends Call { @override Map>> toJson() => { - 'remark_with_event': {'remark': remark} - }; + 'remark_with_event': {'remark': remark}, + }; int _sizeHint() { int size = 1; @@ -615,27 +474,13 @@ class RemarkWithEvent extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - remark, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i1.U8SequenceCodec.codec.encodeTo(remark, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RemarkWithEvent && - _i5.listsEqual( - other.remark, - remark, - ); + identical(this, other) || other is RemarkWithEvent && _i5.listsEqual(other.remark, remark); @override int get hashCode => remark.hashCode; @@ -657,8 +502,8 @@ class AuthorizeUpgrade extends Call { @override Map>> toJson() => { - 'authorize_upgrade': {'codeHash': codeHash.toList()} - }; + 'authorize_upgrade': {'codeHash': codeHash.toList()}, + }; int _sizeHint() { int size = 1; @@ -667,27 +512,13 @@ class AuthorizeUpgrade extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - codeHash, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + const _i1.U8ArrayCodec(32).encodeTo(codeHash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AuthorizeUpgrade && - _i5.listsEqual( - other.codeHash, - codeHash, - ); + identical(this, other) || other is AuthorizeUpgrade && _i5.listsEqual(other.codeHash, codeHash); @override int get hashCode => codeHash.hashCode; @@ -705,8 +536,7 @@ class AuthorizeUpgradeWithoutChecks extends Call { const AuthorizeUpgradeWithoutChecks({required this.codeHash}); factory AuthorizeUpgradeWithoutChecks._decode(_i1.Input input) { - return AuthorizeUpgradeWithoutChecks( - codeHash: const _i1.U8ArrayCodec(32).decode(input)); + return AuthorizeUpgradeWithoutChecks(codeHash: const _i1.U8ArrayCodec(32).decode(input)); } /// T::Hash @@ -714,8 +544,8 @@ class AuthorizeUpgradeWithoutChecks extends Call { @override Map>> toJson() => { - 'authorize_upgrade_without_checks': {'codeHash': codeHash.toList()} - }; + 'authorize_upgrade_without_checks': {'codeHash': codeHash.toList()}, + }; int _sizeHint() { int size = 1; @@ -724,27 +554,13 @@ class AuthorizeUpgradeWithoutChecks extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - codeHash, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); + const _i1.U8ArrayCodec(32).encodeTo(codeHash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AuthorizeUpgradeWithoutChecks && - _i5.listsEqual( - other.codeHash, - codeHash, - ); + identical(this, other) || other is AuthorizeUpgradeWithoutChecks && _i5.listsEqual(other.codeHash, codeHash); @override int get hashCode => codeHash.hashCode; @@ -763,8 +579,7 @@ class ApplyAuthorizedUpgrade extends Call { const ApplyAuthorizedUpgrade({required this.code}); factory ApplyAuthorizedUpgrade._decode(_i1.Input input) { - return ApplyAuthorizedUpgrade( - code: _i1.U8SequenceCodec.codec.decode(input)); + return ApplyAuthorizedUpgrade(code: _i1.U8SequenceCodec.codec.decode(input)); } /// Vec @@ -772,8 +587,8 @@ class ApplyAuthorizedUpgrade extends Call { @override Map>> toJson() => { - 'apply_authorized_upgrade': {'code': code} - }; + 'apply_authorized_upgrade': {'code': code}, + }; int _sizeHint() { int size = 1; @@ -782,27 +597,13 @@ class ApplyAuthorizedUpgrade extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - code, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); + _i1.U8SequenceCodec.codec.encodeTo(code, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ApplyAuthorizedUpgrade && - _i5.listsEqual( - other.code, - code, - ); + identical(this, other) || other is ApplyAuthorizedUpgrade && _i5.listsEqual(other.code, code); @override int get hashCode => code.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/error.dart index b93eeb41..09fee32c 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/error.dart @@ -36,10 +36,7 @@ enum Error { /// The submitted code is not authorized. unauthorized('Unauthorized', 8); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -89,13 +86,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/event.dart index f54d2af9..fd6f224c 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/pallet/event.dart @@ -37,8 +37,7 @@ abstract class Event { class $Event { const $Event(); - ExtrinsicSuccess extrinsicSuccess( - {required _i3.DispatchEventInfo dispatchInfo}) { + ExtrinsicSuccess extrinsicSuccess({required _i3.DispatchEventInfo dispatchInfo}) { return ExtrinsicSuccess(dispatchInfo: dispatchInfo); } @@ -46,10 +45,7 @@ class $Event { required _i4.DispatchError dispatchError, required _i3.DispatchEventInfo dispatchInfo, }) { - return ExtrinsicFailed( - dispatchError: dispatchError, - dispatchInfo: dispatchInfo, - ); + return ExtrinsicFailed(dispatchError: dispatchError, dispatchInfo: dispatchInfo); } CodeUpdated codeUpdated() { @@ -64,34 +60,19 @@ class $Event { return KilledAccount(account: account); } - Remarked remarked({ - required _i5.AccountId32 sender, - required _i6.H256 hash, - }) { - return Remarked( - sender: sender, - hash: hash, - ); + Remarked remarked({required _i5.AccountId32 sender, required _i6.H256 hash}) { + return Remarked(sender: sender, hash: hash); } - UpgradeAuthorized upgradeAuthorized({ - required _i6.H256 codeHash, - required bool checkVersion, - }) { - return UpgradeAuthorized( - codeHash: codeHash, - checkVersion: checkVersion, - ); + UpgradeAuthorized upgradeAuthorized({required _i6.H256 codeHash, required bool checkVersion}) { + return UpgradeAuthorized(codeHash: codeHash, checkVersion: checkVersion); } RejectedInvalidAuthorizedUpgrade rejectedInvalidAuthorizedUpgrade({ required _i6.H256 codeHash, required _i4.DispatchError error, }) { - return RejectedInvalidAuthorizedUpgrade( - codeHash: codeHash, - error: error, - ); + return RejectedInvalidAuthorizedUpgrade(codeHash: codeHash, error: error); } } @@ -124,10 +105,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case ExtrinsicSuccess: (value as ExtrinsicSuccess).encodeTo(output); @@ -154,8 +132,7 @@ class $EventCodec with _i1.Codec { (value as RejectedInvalidAuthorizedUpgrade).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -179,8 +156,7 @@ class $EventCodec with _i1.Codec { case RejectedInvalidAuthorizedUpgrade: return (value as RejectedInvalidAuthorizedUpgrade)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -190,8 +166,7 @@ class ExtrinsicSuccess extends Event { const ExtrinsicSuccess({required this.dispatchInfo}); factory ExtrinsicSuccess._decode(_i1.Input input) { - return ExtrinsicSuccess( - dispatchInfo: _i3.DispatchEventInfo.codec.decode(input)); + return ExtrinsicSuccess(dispatchInfo: _i3.DispatchEventInfo.codec.decode(input)); } /// DispatchEventInfo @@ -199,8 +174,8 @@ class ExtrinsicSuccess extends Event { @override Map>> toJson() => { - 'ExtrinsicSuccess': {'dispatchInfo': dispatchInfo.toJson()} - }; + 'ExtrinsicSuccess': {'dispatchInfo': dispatchInfo.toJson()}, + }; int _sizeHint() { int size = 1; @@ -209,23 +184,13 @@ class ExtrinsicSuccess extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.DispatchEventInfo.codec.encodeTo( - dispatchInfo, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.DispatchEventInfo.codec.encodeTo(dispatchInfo, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ExtrinsicSuccess && other.dispatchInfo == dispatchInfo; + identical(this, other) || other is ExtrinsicSuccess && other.dispatchInfo == dispatchInfo; @override int get hashCode => dispatchInfo.hashCode; @@ -233,10 +198,7 @@ class ExtrinsicSuccess extends Event { /// An extrinsic failed. class ExtrinsicFailed extends Event { - const ExtrinsicFailed({ - required this.dispatchError, - required this.dispatchInfo, - }); + const ExtrinsicFailed({required this.dispatchError, required this.dispatchInfo}); factory ExtrinsicFailed._decode(_i1.Input input) { return ExtrinsicFailed( @@ -253,11 +215,8 @@ class ExtrinsicFailed extends Event { @override Map>> toJson() => { - 'ExtrinsicFailed': { - 'dispatchError': dispatchError.toJson(), - 'dispatchInfo': dispatchInfo.toJson(), - } - }; + 'ExtrinsicFailed': {'dispatchError': dispatchError.toJson(), 'dispatchInfo': dispatchInfo.toJson()}, + }; int _sizeHint() { int size = 1; @@ -267,35 +226,18 @@ class ExtrinsicFailed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i4.DispatchError.codec.encodeTo( - dispatchError, - output, - ); - _i3.DispatchEventInfo.codec.encodeTo( - dispatchInfo, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i4.DispatchError.codec.encodeTo(dispatchError, output); + _i3.DispatchEventInfo.codec.encodeTo(dispatchInfo, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ExtrinsicFailed && - other.dispatchError == dispatchError && - other.dispatchInfo == dispatchInfo; + identical(this, other) || + other is ExtrinsicFailed && other.dispatchError == dispatchError && other.dispatchInfo == dispatchInfo; @override - int get hashCode => Object.hash( - dispatchError, - dispatchInfo, - ); + int get hashCode => Object.hash(dispatchError, dispatchInfo); } /// `:code` was updated. @@ -306,10 +248,7 @@ class CodeUpdated extends Event { Map toJson() => {'CodeUpdated': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); } @override @@ -332,8 +271,8 @@ class NewAccount extends Event { @override Map>> toJson() => { - 'NewAccount': {'account': account.toList()} - }; + 'NewAccount': {'account': account.toList()}, + }; int _sizeHint() { int size = 1; @@ -342,27 +281,13 @@ class NewAccount extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is NewAccount && - _i7.listsEqual( - other.account, - account, - ); + identical(this, other) || other is NewAccount && _i7.listsEqual(other.account, account); @override int get hashCode => account.hashCode; @@ -381,8 +306,8 @@ class KilledAccount extends Event { @override Map>> toJson() => { - 'KilledAccount': {'account': account.toList()} - }; + 'KilledAccount': {'account': account.toList()}, + }; int _sizeHint() { int size = 1; @@ -391,27 +316,13 @@ class KilledAccount extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is KilledAccount && - _i7.listsEqual( - other.account, - account, - ); + identical(this, other) || other is KilledAccount && _i7.listsEqual(other.account, account); @override int get hashCode => account.hashCode; @@ -419,16 +330,10 @@ class KilledAccount extends Event { /// On on-chain remark happened. class Remarked extends Event { - const Remarked({ - required this.sender, - required this.hash, - }); + const Remarked({required this.sender, required this.hash}); factory Remarked._decode(_i1.Input input) { - return Remarked( - sender: const _i1.U8ArrayCodec(32).decode(input), - hash: const _i1.U8ArrayCodec(32).decode(input), - ); + return Remarked(sender: const _i1.U8ArrayCodec(32).decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AccountId @@ -439,11 +344,8 @@ class Remarked extends Event { @override Map>> toJson() => { - 'Remarked': { - 'sender': sender.toList(), - 'hash': hash.toList(), - } - }; + 'Remarked': {'sender': sender.toList(), 'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -453,49 +355,23 @@ class Remarked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - sender, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + const _i1.U8ArrayCodec(32).encodeTo(sender, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Remarked && - _i7.listsEqual( - other.sender, - sender, - ) && - _i7.listsEqual( - other.hash, - hash, - ); + identical(this, other) || + other is Remarked && _i7.listsEqual(other.sender, sender) && _i7.listsEqual(other.hash, hash); @override - int get hashCode => Object.hash( - sender, - hash, - ); + int get hashCode => Object.hash(sender, hash); } /// An upgrade was authorized. class UpgradeAuthorized extends Event { - const UpgradeAuthorized({ - required this.codeHash, - required this.checkVersion, - }); + const UpgradeAuthorized({required this.codeHash, required this.checkVersion}); factory UpgradeAuthorized._decode(_i1.Input input) { return UpgradeAuthorized( @@ -512,11 +388,8 @@ class UpgradeAuthorized extends Event { @override Map> toJson() => { - 'UpgradeAuthorized': { - 'codeHash': codeHash.toList(), - 'checkVersion': checkVersion, - } - }; + 'UpgradeAuthorized': {'codeHash': codeHash.toList(), 'checkVersion': checkVersion}, + }; int _sizeHint() { int size = 1; @@ -526,46 +399,23 @@ class UpgradeAuthorized extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - codeHash, - output, - ); - _i1.BoolCodec.codec.encodeTo( - checkVersion, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + const _i1.U8ArrayCodec(32).encodeTo(codeHash, output); + _i1.BoolCodec.codec.encodeTo(checkVersion, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is UpgradeAuthorized && - _i7.listsEqual( - other.codeHash, - codeHash, - ) && - other.checkVersion == checkVersion; + identical(this, other) || + other is UpgradeAuthorized && _i7.listsEqual(other.codeHash, codeHash) && other.checkVersion == checkVersion; @override - int get hashCode => Object.hash( - codeHash, - checkVersion, - ); + int get hashCode => Object.hash(codeHash, checkVersion); } /// An invalid authorized upgrade was rejected while trying to apply it. class RejectedInvalidAuthorizedUpgrade extends Event { - const RejectedInvalidAuthorizedUpgrade({ - required this.codeHash, - required this.error, - }); + const RejectedInvalidAuthorizedUpgrade({required this.codeHash, required this.error}); factory RejectedInvalidAuthorizedUpgrade._decode(_i1.Input input) { return RejectedInvalidAuthorizedUpgrade( @@ -582,11 +432,8 @@ class RejectedInvalidAuthorizedUpgrade extends Event { @override Map> toJson() => { - 'RejectedInvalidAuthorizedUpgrade': { - 'codeHash': codeHash.toList(), - 'error': error.toJson(), - } - }; + 'RejectedInvalidAuthorizedUpgrade': {'codeHash': codeHash.toList(), 'error': error.toJson()}, + }; int _sizeHint() { int size = 1; @@ -596,36 +443,16 @@ class RejectedInvalidAuthorizedUpgrade extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - codeHash, - output, - ); - _i4.DispatchError.codec.encodeTo( - error, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + const _i1.U8ArrayCodec(32).encodeTo(codeHash, output); + _i4.DispatchError.codec.encodeTo(error, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RejectedInvalidAuthorizedUpgrade && - _i7.listsEqual( - other.codeHash, - codeHash, - ) && - other.error == error; + identical(this, other) || + other is RejectedInvalidAuthorizedUpgrade && _i7.listsEqual(other.codeHash, codeHash) && other.error == error; @override - int get hashCode => Object.hash( - codeHash, - error, - ); + int get hashCode => Object.hash(codeHash, error); } diff --git a/quantus_sdk/lib/generated/planck/types/frame_system/phase.dart b/quantus_sdk/lib/generated/planck/types/frame_system/phase.dart index e5dbc292..a888c990 100644 --- a/quantus_sdk/lib/generated/planck/types/frame_system/phase.dart +++ b/quantus_sdk/lib/generated/planck/types/frame_system/phase.dart @@ -62,10 +62,7 @@ class $PhaseCodec with _i1.Codec { } @override - void encodeTo( - Phase value, - _i1.Output output, - ) { + void encodeTo(Phase value, _i1.Output output) { switch (value.runtimeType) { case ApplyExtrinsic: (value as ApplyExtrinsic).encodeTo(output); @@ -77,8 +74,7 @@ class $PhaseCodec with _i1.Codec { (value as Initialization).encodeTo(output); break; default: - throw Exception( - 'Phase: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Phase: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -92,8 +88,7 @@ class $PhaseCodec with _i1.Codec { case Initialization: return 1; default: - throw Exception( - 'Phase: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Phase: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -118,23 +113,12 @@ class ApplyExtrinsic extends Phase { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ApplyExtrinsic && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is ApplyExtrinsic && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -147,10 +131,7 @@ class Finalization extends Phase { Map toJson() => {'Finalization': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); } @override @@ -167,10 +148,7 @@ class Initialization extends Phase { Map toJson() => {'Initialization': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/call.dart index ca1d7494..85a0d97e 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/call.dart @@ -34,16 +34,8 @@ abstract class Call { class $Call { const $Call(); - Create create({ - required BigInt id, - required _i3.MultiAddress admin, - required BigInt minBalance, - }) { - return Create( - id: id, - admin: admin, - minBalance: minBalance, - ); + Create create({required BigInt id, required _i3.MultiAddress admin, required BigInt minBalance}) { + return Create(id: id, admin: admin, minBalance: minBalance); } ForceCreate forceCreate({ @@ -52,12 +44,7 @@ class $Call { required bool isSufficient, required BigInt minBalance, }) { - return ForceCreate( - id: id, - owner: owner, - isSufficient: isSufficient, - minBalance: minBalance, - ); + return ForceCreate(id: id, owner: owner, isSufficient: isSufficient, minBalance: minBalance); } StartDestroy startDestroy({required BigInt id}) { @@ -76,52 +63,20 @@ class $Call { return FinishDestroy(id: id); } - Mint mint({ - required BigInt id, - required _i3.MultiAddress beneficiary, - required BigInt amount, - }) { - return Mint( - id: id, - beneficiary: beneficiary, - amount: amount, - ); + Mint mint({required BigInt id, required _i3.MultiAddress beneficiary, required BigInt amount}) { + return Mint(id: id, beneficiary: beneficiary, amount: amount); } - Burn burn({ - required BigInt id, - required _i3.MultiAddress who, - required BigInt amount, - }) { - return Burn( - id: id, - who: who, - amount: amount, - ); + Burn burn({required BigInt id, required _i3.MultiAddress who, required BigInt amount}) { + return Burn(id: id, who: who, amount: amount); } - Transfer transfer({ - required BigInt id, - required _i3.MultiAddress target, - required BigInt amount, - }) { - return Transfer( - id: id, - target: target, - amount: amount, - ); + Transfer transfer({required BigInt id, required _i3.MultiAddress target, required BigInt amount}) { + return Transfer(id: id, target: target, amount: amount); } - TransferKeepAlive transferKeepAlive({ - required BigInt id, - required _i3.MultiAddress target, - required BigInt amount, - }) { - return TransferKeepAlive( - id: id, - target: target, - amount: amount, - ); + TransferKeepAlive transferKeepAlive({required BigInt id, required _i3.MultiAddress target, required BigInt amount}) { + return TransferKeepAlive(id: id, target: target, amount: amount); } ForceTransfer forceTransfer({ @@ -130,32 +85,15 @@ class $Call { required _i3.MultiAddress dest, required BigInt amount, }) { - return ForceTransfer( - id: id, - source: source, - dest: dest, - amount: amount, - ); + return ForceTransfer(id: id, source: source, dest: dest, amount: amount); } - Freeze freeze({ - required BigInt id, - required _i3.MultiAddress who, - }) { - return Freeze( - id: id, - who: who, - ); + Freeze freeze({required BigInt id, required _i3.MultiAddress who}) { + return Freeze(id: id, who: who); } - Thaw thaw({ - required BigInt id, - required _i3.MultiAddress who, - }) { - return Thaw( - id: id, - who: who, - ); + Thaw thaw({required BigInt id, required _i3.MultiAddress who}) { + return Thaw(id: id, who: who); } FreezeAsset freezeAsset({required BigInt id}) { @@ -166,14 +104,8 @@ class $Call { return ThawAsset(id: id); } - TransferOwnership transferOwnership({ - required BigInt id, - required _i3.MultiAddress owner, - }) { - return TransferOwnership( - id: id, - owner: owner, - ); + TransferOwnership transferOwnership({required BigInt id, required _i3.MultiAddress owner}) { + return TransferOwnership(id: id, owner: owner); } SetTeam setTeam({ @@ -182,12 +114,7 @@ class $Call { required _i3.MultiAddress admin, required _i3.MultiAddress freezer, }) { - return SetTeam( - id: id, - issuer: issuer, - admin: admin, - freezer: freezer, - ); + return SetTeam(id: id, issuer: issuer, admin: admin, freezer: freezer); } SetMetadata setMetadata({ @@ -196,12 +123,7 @@ class $Call { required List symbol, required int decimals, }) { - return SetMetadata( - id: id, - name: name, - symbol: symbol, - decimals: decimals, - ); + return SetMetadata(id: id, name: name, symbol: symbol, decimals: decimals); } ClearMetadata clearMetadata({required BigInt id}) { @@ -215,13 +137,7 @@ class $Call { required int decimals, required bool isFrozen, }) { - return ForceSetMetadata( - id: id, - name: name, - symbol: symbol, - decimals: decimals, - isFrozen: isFrozen, - ); + return ForceSetMetadata(id: id, name: name, symbol: symbol, decimals: decimals, isFrozen: isFrozen); } ForceClearMetadata forceClearMetadata({required BigInt id}) { @@ -250,26 +166,12 @@ class $Call { ); } - ApproveTransfer approveTransfer({ - required BigInt id, - required _i3.MultiAddress delegate, - required BigInt amount, - }) { - return ApproveTransfer( - id: id, - delegate: delegate, - amount: amount, - ); + ApproveTransfer approveTransfer({required BigInt id, required _i3.MultiAddress delegate, required BigInt amount}) { + return ApproveTransfer(id: id, delegate: delegate, amount: amount); } - CancelApproval cancelApproval({ - required BigInt id, - required _i3.MultiAddress delegate, - }) { - return CancelApproval( - id: id, - delegate: delegate, - ); + CancelApproval cancelApproval({required BigInt id, required _i3.MultiAddress delegate}) { + return CancelApproval(id: id, delegate: delegate); } ForceCancelApproval forceCancelApproval({ @@ -277,11 +179,7 @@ class $Call { required _i3.MultiAddress owner, required _i3.MultiAddress delegate, }) { - return ForceCancelApproval( - id: id, - owner: owner, - delegate: delegate, - ); + return ForceCancelApproval(id: id, owner: owner, delegate: delegate); } TransferApproved transferApproved({ @@ -290,88 +188,39 @@ class $Call { required _i3.MultiAddress destination, required BigInt amount, }) { - return TransferApproved( - id: id, - owner: owner, - destination: destination, - amount: amount, - ); + return TransferApproved(id: id, owner: owner, destination: destination, amount: amount); } Touch touch({required BigInt id}) { return Touch(id: id); } - Refund refund({ - required BigInt id, - required bool allowBurn, - }) { - return Refund( - id: id, - allowBurn: allowBurn, - ); + Refund refund({required BigInt id, required bool allowBurn}) { + return Refund(id: id, allowBurn: allowBurn); } - SetMinBalance setMinBalance({ - required BigInt id, - required BigInt minBalance, - }) { - return SetMinBalance( - id: id, - minBalance: minBalance, - ); + SetMinBalance setMinBalance({required BigInt id, required BigInt minBalance}) { + return SetMinBalance(id: id, minBalance: minBalance); } - TouchOther touchOther({ - required BigInt id, - required _i3.MultiAddress who, - }) { - return TouchOther( - id: id, - who: who, - ); + TouchOther touchOther({required BigInt id, required _i3.MultiAddress who}) { + return TouchOther(id: id, who: who); } - RefundOther refundOther({ - required BigInt id, - required _i3.MultiAddress who, - }) { - return RefundOther( - id: id, - who: who, - ); + RefundOther refundOther({required BigInt id, required _i3.MultiAddress who}) { + return RefundOther(id: id, who: who); } - Block block({ - required BigInt id, - required _i3.MultiAddress who, - }) { - return Block( - id: id, - who: who, - ); + Block block({required BigInt id, required _i3.MultiAddress who}) { + return Block(id: id, who: who); } - TransferAll transferAll({ - required BigInt id, - required _i3.MultiAddress dest, - required bool keepAlive, - }) { - return TransferAll( - id: id, - dest: dest, - keepAlive: keepAlive, - ); + TransferAll transferAll({required BigInt id, required _i3.MultiAddress dest, required bool keepAlive}) { + return TransferAll(id: id, dest: dest, keepAlive: keepAlive); } - SetReserves setReserves({ - required BigInt id, - required List reserves, - }) { - return SetReserves( - id: id, - reserves: reserves, - ); + SetReserves setReserves({required BigInt id, required List reserves}) { + return SetReserves(id: id, reserves: reserves); } } @@ -456,10 +305,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case Create: (value as Create).encodeTo(output); @@ -564,8 +410,7 @@ class $CallCodec with _i1.Codec { (value as SetReserves).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -641,8 +486,7 @@ class $CallCodec with _i1.Codec { case SetReserves: return (value as SetReserves)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -667,11 +511,7 @@ class $CallCodec with _i1.Codec { /// /// Weight: `O(1)` class Create extends Call { - const Create({ - required this.id, - required this.admin, - required this.minBalance, - }); + const Create({required this.id, required this.admin, required this.minBalance}); factory Create._decode(_i1.Input input) { return Create( @@ -692,12 +532,8 @@ class Create extends Call { @override Map> toJson() => { - 'create': { - 'id': id, - 'admin': admin.toJson(), - 'minBalance': minBalance, - } - }; + 'create': {'id': id, 'admin': admin.toJson(), 'minBalance': minBalance}, + }; int _sizeHint() { int size = 1; @@ -708,41 +544,19 @@ class Create extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - admin, - output, - ); - _i1.U128Codec.codec.encodeTo( - minBalance, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(admin, output); + _i1.U128Codec.codec.encodeTo(minBalance, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Create && - other.id == id && - other.admin == admin && - other.minBalance == minBalance; + identical(this, other) || + other is Create && other.id == id && other.admin == admin && other.minBalance == minBalance; @override - int get hashCode => Object.hash( - id, - admin, - minBalance, - ); + int get hashCode => Object.hash(id, admin, minBalance); } /// Issue a new class of fungible assets from a privileged origin. @@ -765,12 +579,7 @@ class Create extends Call { /// /// Weight: `O(1)` class ForceCreate extends Call { - const ForceCreate({ - required this.id, - required this.owner, - required this.isSufficient, - required this.minBalance, - }); + const ForceCreate({required this.id, required this.owner, required this.isSufficient, required this.minBalance}); factory ForceCreate._decode(_i1.Input input) { return ForceCreate( @@ -795,13 +604,8 @@ class ForceCreate extends Call { @override Map> toJson() => { - 'force_create': { - 'id': id, - 'owner': owner.toJson(), - 'isSufficient': isSufficient, - 'minBalance': minBalance, - } - }; + 'force_create': {'id': id, 'owner': owner.toJson(), 'isSufficient': isSufficient, 'minBalance': minBalance}, + }; int _sizeHint() { int size = 1; @@ -813,34 +617,16 @@ class ForceCreate extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - owner, - output, - ); - _i1.BoolCodec.codec.encodeTo( - isSufficient, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - minBalance, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(owner, output); + _i1.BoolCodec.codec.encodeTo(isSufficient, output); + _i1.CompactBigIntCodec.codec.encodeTo(minBalance, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ForceCreate && other.id == id && other.owner == owner && @@ -848,12 +634,7 @@ class ForceCreate extends Call { other.minBalance == minBalance; @override - int get hashCode => Object.hash( - id, - owner, - isSufficient, - minBalance, - ); + int get hashCode => Object.hash(id, owner, isSufficient, minBalance); } /// Start the process of destroying a fungible asset class. @@ -880,8 +661,8 @@ class StartDestroy extends Call { @override Map> toJson() => { - 'start_destroy': {'id': id} - }; + 'start_destroy': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -890,23 +671,12 @@ class StartDestroy extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is StartDestroy && other.id == id; + bool operator ==(Object other) => identical(this, other) || other is StartDestroy && other.id == id; @override int get hashCode => id.hashCode; @@ -936,8 +706,8 @@ class DestroyAccounts extends Call { @override Map> toJson() => { - 'destroy_accounts': {'id': id} - }; + 'destroy_accounts': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -946,23 +716,12 @@ class DestroyAccounts extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DestroyAccounts && other.id == id; + bool operator ==(Object other) => identical(this, other) || other is DestroyAccounts && other.id == id; @override int get hashCode => id.hashCode; @@ -992,8 +751,8 @@ class DestroyApprovals extends Call { @override Map> toJson() => { - 'destroy_approvals': {'id': id} - }; + 'destroy_approvals': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -1002,23 +761,12 @@ class DestroyApprovals extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DestroyApprovals && other.id == id; + bool operator ==(Object other) => identical(this, other) || other is DestroyApprovals && other.id == id; @override int get hashCode => id.hashCode; @@ -1046,8 +794,8 @@ class FinishDestroy extends Call { @override Map> toJson() => { - 'finish_destroy': {'id': id} - }; + 'finish_destroy': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -1056,23 +804,12 @@ class FinishDestroy extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is FinishDestroy && other.id == id; + bool operator ==(Object other) => identical(this, other) || other is FinishDestroy && other.id == id; @override int get hashCode => id.hashCode; @@ -1091,11 +828,7 @@ class FinishDestroy extends Call { /// Weight: `O(1)` /// Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. class Mint extends Call { - const Mint({ - required this.id, - required this.beneficiary, - required this.amount, - }); + const Mint({required this.id, required this.beneficiary, required this.amount}); factory Mint._decode(_i1.Input input) { return Mint( @@ -1116,12 +849,8 @@ class Mint extends Call { @override Map> toJson() => { - 'mint': { - 'id': id, - 'beneficiary': beneficiary.toJson(), - 'amount': amount, - } - }; + 'mint': {'id': id, 'beneficiary': beneficiary.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1132,41 +861,19 @@ class Mint extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - beneficiary, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(beneficiary, output); + _i1.CompactBigIntCodec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mint && - other.id == id && - other.beneficiary == beneficiary && - other.amount == amount; + identical(this, other) || + other is Mint && other.id == id && other.beneficiary == beneficiary && other.amount == amount; @override - int get hashCode => Object.hash( - id, - beneficiary, - amount, - ); + int get hashCode => Object.hash(id, beneficiary, amount); } /// Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. @@ -1185,11 +892,7 @@ class Mint extends Call { /// Weight: `O(1)` /// Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. class Burn extends Call { - const Burn({ - required this.id, - required this.who, - required this.amount, - }); + const Burn({required this.id, required this.who, required this.amount}); factory Burn._decode(_i1.Input input) { return Burn( @@ -1210,12 +913,8 @@ class Burn extends Call { @override Map> toJson() => { - 'burn': { - 'id': id, - 'who': who.toJson(), - 'amount': amount, - } - }; + 'burn': {'id': id, 'who': who.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1226,41 +925,18 @@ class Burn extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(who, output); + _i1.CompactBigIntCodec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Burn && - other.id == id && - other.who == who && - other.amount == amount; + identical(this, other) || other is Burn && other.id == id && other.who == who && other.amount == amount; @override - int get hashCode => Object.hash( - id, - who, - amount, - ); + int get hashCode => Object.hash(id, who, amount); } /// Move some assets from the sender account to another. @@ -1282,11 +958,7 @@ class Burn extends Call { /// Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of /// `target`. class Transfer extends Call { - const Transfer({ - required this.id, - required this.target, - required this.amount, - }); + const Transfer({required this.id, required this.target, required this.amount}); factory Transfer._decode(_i1.Input input) { return Transfer( @@ -1307,12 +979,8 @@ class Transfer extends Call { @override Map> toJson() => { - 'transfer': { - 'id': id, - 'target': target.toJson(), - 'amount': amount, - } - }; + 'transfer': {'id': id, 'target': target.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1323,41 +991,18 @@ class Transfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - target, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(target, output); + _i1.CompactBigIntCodec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Transfer && - other.id == id && - other.target == target && - other.amount == amount; + identical(this, other) || other is Transfer && other.id == id && other.target == target && other.amount == amount; @override - int get hashCode => Object.hash( - id, - target, - amount, - ); + int get hashCode => Object.hash(id, target, amount); } /// Move some assets from the sender account to another, keeping the sender account alive. @@ -1379,11 +1024,7 @@ class Transfer extends Call { /// Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of /// `target`. class TransferKeepAlive extends Call { - const TransferKeepAlive({ - required this.id, - required this.target, - required this.amount, - }); + const TransferKeepAlive({required this.id, required this.target, required this.amount}); factory TransferKeepAlive._decode(_i1.Input input) { return TransferKeepAlive( @@ -1404,12 +1045,8 @@ class TransferKeepAlive extends Call { @override Map> toJson() => { - 'transfer_keep_alive': { - 'id': id, - 'target': target.toJson(), - 'amount': amount, - } - }; + 'transfer_keep_alive': {'id': id, 'target': target.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1420,41 +1057,19 @@ class TransferKeepAlive extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - target, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(target, output); + _i1.CompactBigIntCodec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TransferKeepAlive && - other.id == id && - other.target == target && - other.amount == amount; + identical(this, other) || + other is TransferKeepAlive && other.id == id && other.target == target && other.amount == amount; @override - int get hashCode => Object.hash( - id, - target, - amount, - ); + int get hashCode => Object.hash(id, target, amount); } /// Move some assets from one account to another. @@ -1477,12 +1092,7 @@ class TransferKeepAlive extends Call { /// Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of /// `dest`. class ForceTransfer extends Call { - const ForceTransfer({ - required this.id, - required this.source, - required this.dest, - required this.amount, - }); + const ForceTransfer({required this.id, required this.source, required this.dest, required this.amount}); factory ForceTransfer._decode(_i1.Input input) { return ForceTransfer( @@ -1507,13 +1117,8 @@ class ForceTransfer extends Call { @override Map> toJson() => { - 'force_transfer': { - 'id': id, - 'source': source.toJson(), - 'dest': dest.toJson(), - 'amount': amount, - } - }; + 'force_transfer': {'id': id, 'source': source.toJson(), 'dest': dest.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1525,34 +1130,16 @@ class ForceTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - source, - output, - ); - _i3.MultiAddress.codec.encodeTo( - dest, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(source, output); + _i3.MultiAddress.codec.encodeTo(dest, output); + _i1.CompactBigIntCodec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ForceTransfer && other.id == id && other.source == source && @@ -1560,12 +1147,7 @@ class ForceTransfer extends Call { other.amount == amount; @override - int get hashCode => Object.hash( - id, - source, - dest, - amount, - ); + int get hashCode => Object.hash(id, source, dest, amount); } /// Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` @@ -1581,16 +1163,10 @@ class ForceTransfer extends Call { /// /// Weight: `O(1)` class Freeze extends Call { - const Freeze({ - required this.id, - required this.who, - }); + const Freeze({required this.id, required this.who}); factory Freeze._decode(_i1.Input input) { - return Freeze( - id: _i1.CompactBigIntCodec.codec.decode(input), - who: _i3.MultiAddress.codec.decode(input), - ); + return Freeze(id: _i1.CompactBigIntCodec.codec.decode(input), who: _i3.MultiAddress.codec.decode(input)); } /// T::AssetIdParameter @@ -1601,11 +1177,8 @@ class Freeze extends Call { @override Map> toJson() => { - 'freeze': { - 'id': id, - 'who': who.toJson(), - } - }; + 'freeze': {'id': id, 'who': who.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1615,33 +1188,16 @@ class Freeze extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(who, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Freeze && other.id == id && other.who == who; + bool operator ==(Object other) => identical(this, other) || other is Freeze && other.id == id && other.who == who; @override - int get hashCode => Object.hash( - id, - who, - ); + int get hashCode => Object.hash(id, who); } /// Allow unprivileged transfers to and from an account again. @@ -1655,16 +1211,10 @@ class Freeze extends Call { /// /// Weight: `O(1)` class Thaw extends Call { - const Thaw({ - required this.id, - required this.who, - }); + const Thaw({required this.id, required this.who}); factory Thaw._decode(_i1.Input input) { - return Thaw( - id: _i1.CompactBigIntCodec.codec.decode(input), - who: _i3.MultiAddress.codec.decode(input), - ); + return Thaw(id: _i1.CompactBigIntCodec.codec.decode(input), who: _i3.MultiAddress.codec.decode(input)); } /// T::AssetIdParameter @@ -1675,11 +1225,8 @@ class Thaw extends Call { @override Map> toJson() => { - 'thaw': { - 'id': id, - 'who': who.toJson(), - } - }; + 'thaw': {'id': id, 'who': who.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1689,33 +1236,16 @@ class Thaw extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 12, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(12, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(who, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Thaw && other.id == id && other.who == who; + bool operator ==(Object other) => identical(this, other) || other is Thaw && other.id == id && other.who == who; @override - int get hashCode => Object.hash( - id, - who, - ); + int get hashCode => Object.hash(id, who); } /// Disallow further unprivileged transfers for the asset class. @@ -1739,8 +1269,8 @@ class FreezeAsset extends Call { @override Map> toJson() => { - 'freeze_asset': {'id': id} - }; + 'freeze_asset': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -1749,23 +1279,12 @@ class FreezeAsset extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 13, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(13, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is FreezeAsset && other.id == id; + bool operator ==(Object other) => identical(this, other) || other is FreezeAsset && other.id == id; @override int get hashCode => id.hashCode; @@ -1792,8 +1311,8 @@ class ThawAsset extends Call { @override Map> toJson() => { - 'thaw_asset': {'id': id} - }; + 'thaw_asset': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -1802,23 +1321,12 @@ class ThawAsset extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 14, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(14, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ThawAsset && other.id == id; + bool operator ==(Object other) => identical(this, other) || other is ThawAsset && other.id == id; @override int get hashCode => id.hashCode; @@ -1835,10 +1343,7 @@ class ThawAsset extends Call { /// /// Weight: `O(1)` class TransferOwnership extends Call { - const TransferOwnership({ - required this.id, - required this.owner, - }); + const TransferOwnership({required this.id, required this.owner}); factory TransferOwnership._decode(_i1.Input input) { return TransferOwnership( @@ -1855,11 +1360,8 @@ class TransferOwnership extends Call { @override Map> toJson() => { - 'transfer_ownership': { - 'id': id, - 'owner': owner.toJson(), - } - }; + 'transfer_ownership': {'id': id, 'owner': owner.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1869,33 +1371,17 @@ class TransferOwnership extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 15, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - owner, - output, - ); + _i1.U8Codec.codec.encodeTo(15, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(owner, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TransferOwnership && other.id == id && other.owner == owner; + identical(this, other) || other is TransferOwnership && other.id == id && other.owner == owner; @override - int get hashCode => Object.hash( - id, - owner, - ); + int get hashCode => Object.hash(id, owner); } /// Change the Issuer, Admin and Freezer of an asset. @@ -1911,12 +1397,7 @@ class TransferOwnership extends Call { /// /// Weight: `O(1)` class SetTeam extends Call { - const SetTeam({ - required this.id, - required this.issuer, - required this.admin, - required this.freezer, - }); + const SetTeam({required this.id, required this.issuer, required this.admin, required this.freezer}); factory SetTeam._decode(_i1.Input input) { return SetTeam( @@ -1941,13 +1422,8 @@ class SetTeam extends Call { @override Map> toJson() => { - 'set_team': { - 'id': id, - 'issuer': issuer.toJson(), - 'admin': admin.toJson(), - 'freezer': freezer.toJson(), - } - }; + 'set_team': {'id': id, 'issuer': issuer.toJson(), 'admin': admin.toJson(), 'freezer': freezer.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1959,47 +1435,20 @@ class SetTeam extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 16, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - issuer, - output, - ); - _i3.MultiAddress.codec.encodeTo( - admin, - output, - ); - _i3.MultiAddress.codec.encodeTo( - freezer, - output, - ); + _i1.U8Codec.codec.encodeTo(16, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(issuer, output); + _i3.MultiAddress.codec.encodeTo(admin, output); + _i3.MultiAddress.codec.encodeTo(freezer, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetTeam && - other.id == id && - other.issuer == issuer && - other.admin == admin && - other.freezer == freezer; + identical(this, other) || + other is SetTeam && other.id == id && other.issuer == issuer && other.admin == admin && other.freezer == freezer; @override - int get hashCode => Object.hash( - id, - issuer, - admin, - freezer, - ); + int get hashCode => Object.hash(id, issuer, admin, freezer); } /// Set the metadata for an asset. @@ -2019,12 +1468,7 @@ class SetTeam extends Call { /// /// Weight: `O(1)` class SetMetadata extends Call { - const SetMetadata({ - required this.id, - required this.name, - required this.symbol, - required this.decimals, - }); + const SetMetadata({required this.id, required this.name, required this.symbol, required this.decimals}); factory SetMetadata._decode(_i1.Input input) { return SetMetadata( @@ -2049,13 +1493,8 @@ class SetMetadata extends Call { @override Map> toJson() => { - 'set_metadata': { - 'id': id, - 'name': name, - 'symbol': symbol, - 'decimals': decimals, - } - }; + 'set_metadata': {'id': id, 'name': name, 'symbol': symbol, 'decimals': decimals}, + }; int _sizeHint() { int size = 1; @@ -2067,53 +1506,24 @@ class SetMetadata extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 17, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - name, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - symbol, - output, - ); - _i1.U8Codec.codec.encodeTo( - decimals, - output, - ); + _i1.U8Codec.codec.encodeTo(17, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U8SequenceCodec.codec.encodeTo(name, output); + _i1.U8SequenceCodec.codec.encodeTo(symbol, output); + _i1.U8Codec.codec.encodeTo(decimals, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is SetMetadata && other.id == id && - _i4.listsEqual( - other.name, - name, - ) && - _i4.listsEqual( - other.symbol, - symbol, - ) && + _i4.listsEqual(other.name, name) && + _i4.listsEqual(other.symbol, symbol) && other.decimals == decimals; @override - int get hashCode => Object.hash( - id, - name, - symbol, - decimals, - ); + int get hashCode => Object.hash(id, name, symbol, decimals); } /// Clear the metadata for an asset. @@ -2139,8 +1549,8 @@ class ClearMetadata extends Call { @override Map> toJson() => { - 'clear_metadata': {'id': id} - }; + 'clear_metadata': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -2149,23 +1559,12 @@ class ClearMetadata extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 18, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(18, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ClearMetadata && other.id == id; + bool operator ==(Object other) => identical(this, other) || other is ClearMetadata && other.id == id; @override int get hashCode => id.hashCode; @@ -2221,14 +1620,8 @@ class ForceSetMetadata extends Call { @override Map> toJson() => { - 'force_set_metadata': { - 'id': id, - 'name': name, - 'symbol': symbol, - 'decimals': decimals, - 'isFrozen': isFrozen, - } - }; + 'force_set_metadata': {'id': id, 'name': name, 'symbol': symbol, 'decimals': decimals, 'isFrozen': isFrozen}, + }; int _sizeHint() { int size = 1; @@ -2241,59 +1634,26 @@ class ForceSetMetadata extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 19, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - name, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - symbol, - output, - ); - _i1.U8Codec.codec.encodeTo( - decimals, - output, - ); - _i1.BoolCodec.codec.encodeTo( - isFrozen, - output, - ); + _i1.U8Codec.codec.encodeTo(19, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U8SequenceCodec.codec.encodeTo(name, output); + _i1.U8SequenceCodec.codec.encodeTo(symbol, output); + _i1.U8Codec.codec.encodeTo(decimals, output); + _i1.BoolCodec.codec.encodeTo(isFrozen, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ForceSetMetadata && other.id == id && - _i4.listsEqual( - other.name, - name, - ) && - _i4.listsEqual( - other.symbol, - symbol, - ) && + _i4.listsEqual(other.name, name) && + _i4.listsEqual(other.symbol, symbol) && other.decimals == decimals && other.isFrozen == isFrozen; @override - int get hashCode => Object.hash( - id, - name, - symbol, - decimals, - isFrozen, - ); + int get hashCode => Object.hash(id, name, symbol, decimals, isFrozen); } /// Clear the metadata for an asset. @@ -2319,8 +1679,8 @@ class ForceClearMetadata extends Call { @override Map> toJson() => { - 'force_clear_metadata': {'id': id} - }; + 'force_clear_metadata': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -2329,23 +1689,12 @@ class ForceClearMetadata extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 20, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(20, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ForceClearMetadata && other.id == id; + bool operator ==(Object other) => identical(this, other) || other is ForceClearMetadata && other.id == id; @override int get hashCode => id.hashCode; @@ -2424,17 +1773,17 @@ class ForceAssetStatus extends Call { @override Map> toJson() => { - 'force_asset_status': { - 'id': id, - 'owner': owner.toJson(), - 'issuer': issuer.toJson(), - 'admin': admin.toJson(), - 'freezer': freezer.toJson(), - 'minBalance': minBalance, - 'isSufficient': isSufficient, - 'isFrozen': isFrozen, - } - }; + 'force_asset_status': { + 'id': id, + 'owner': owner.toJson(), + 'issuer': issuer.toJson(), + 'admin': admin.toJson(), + 'freezer': freezer.toJson(), + 'minBalance': minBalance, + 'isSufficient': isSufficient, + 'isFrozen': isFrozen, + }, + }; int _sizeHint() { int size = 1; @@ -2450,50 +1799,20 @@ class ForceAssetStatus extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 21, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - owner, - output, - ); - _i3.MultiAddress.codec.encodeTo( - issuer, - output, - ); - _i3.MultiAddress.codec.encodeTo( - admin, - output, - ); - _i3.MultiAddress.codec.encodeTo( - freezer, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - minBalance, - output, - ); - _i1.BoolCodec.codec.encodeTo( - isSufficient, - output, - ); - _i1.BoolCodec.codec.encodeTo( - isFrozen, - output, - ); + _i1.U8Codec.codec.encodeTo(21, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(owner, output); + _i3.MultiAddress.codec.encodeTo(issuer, output); + _i3.MultiAddress.codec.encodeTo(admin, output); + _i3.MultiAddress.codec.encodeTo(freezer, output); + _i1.CompactBigIntCodec.codec.encodeTo(minBalance, output); + _i1.BoolCodec.codec.encodeTo(isSufficient, output); + _i1.BoolCodec.codec.encodeTo(isFrozen, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ForceAssetStatus && other.id == id && other.owner == owner && @@ -2505,16 +1824,7 @@ class ForceAssetStatus extends Call { other.isFrozen == isFrozen; @override - int get hashCode => Object.hash( - id, - owner, - issuer, - admin, - freezer, - minBalance, - isSufficient, - isFrozen, - ); + int get hashCode => Object.hash(id, owner, issuer, admin, freezer, minBalance, isSufficient, isFrozen); } /// Approve an amount of asset for transfer by a delegated third-party account. @@ -2538,11 +1848,7 @@ class ForceAssetStatus extends Call { /// /// Weight: `O(1)` class ApproveTransfer extends Call { - const ApproveTransfer({ - required this.id, - required this.delegate, - required this.amount, - }); + const ApproveTransfer({required this.id, required this.delegate, required this.amount}); factory ApproveTransfer._decode(_i1.Input input) { return ApproveTransfer( @@ -2563,12 +1869,8 @@ class ApproveTransfer extends Call { @override Map> toJson() => { - 'approve_transfer': { - 'id': id, - 'delegate': delegate.toJson(), - 'amount': amount, - } - }; + 'approve_transfer': {'id': id, 'delegate': delegate.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -2579,41 +1881,19 @@ class ApproveTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 22, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - delegate, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(22, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(delegate, output); + _i1.CompactBigIntCodec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ApproveTransfer && - other.id == id && - other.delegate == delegate && - other.amount == amount; + identical(this, other) || + other is ApproveTransfer && other.id == id && other.delegate == delegate && other.amount == amount; @override - int get hashCode => Object.hash( - id, - delegate, - amount, - ); + int get hashCode => Object.hash(id, delegate, amount); } /// Cancel all of some asset approved for delegated transfer by a third-party account. @@ -2630,10 +1910,7 @@ class ApproveTransfer extends Call { /// /// Weight: `O(1)` class CancelApproval extends Call { - const CancelApproval({ - required this.id, - required this.delegate, - }); + const CancelApproval({required this.id, required this.delegate}); factory CancelApproval._decode(_i1.Input input) { return CancelApproval( @@ -2650,11 +1927,8 @@ class CancelApproval extends Call { @override Map> toJson() => { - 'cancel_approval': { - 'id': id, - 'delegate': delegate.toJson(), - } - }; + 'cancel_approval': {'id': id, 'delegate': delegate.toJson()}, + }; int _sizeHint() { int size = 1; @@ -2664,33 +1938,17 @@ class CancelApproval extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 23, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - delegate, - output, - ); + _i1.U8Codec.codec.encodeTo(23, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(delegate, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is CancelApproval && other.id == id && other.delegate == delegate; + identical(this, other) || other is CancelApproval && other.id == id && other.delegate == delegate; @override - int get hashCode => Object.hash( - id, - delegate, - ); + int get hashCode => Object.hash(id, delegate); } /// Cancel all of some asset approved for delegated transfer by a third-party account. @@ -2707,11 +1965,7 @@ class CancelApproval extends Call { /// /// Weight: `O(1)` class ForceCancelApproval extends Call { - const ForceCancelApproval({ - required this.id, - required this.owner, - required this.delegate, - }); + const ForceCancelApproval({required this.id, required this.owner, required this.delegate}); factory ForceCancelApproval._decode(_i1.Input input) { return ForceCancelApproval( @@ -2732,12 +1986,8 @@ class ForceCancelApproval extends Call { @override Map> toJson() => { - 'force_cancel_approval': { - 'id': id, - 'owner': owner.toJson(), - 'delegate': delegate.toJson(), - } - }; + 'force_cancel_approval': {'id': id, 'owner': owner.toJson(), 'delegate': delegate.toJson()}, + }; int _sizeHint() { int size = 1; @@ -2748,41 +1998,19 @@ class ForceCancelApproval extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 24, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - owner, - output, - ); - _i3.MultiAddress.codec.encodeTo( - delegate, - output, - ); + _i1.U8Codec.codec.encodeTo(24, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(owner, output); + _i3.MultiAddress.codec.encodeTo(delegate, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ForceCancelApproval && - other.id == id && - other.owner == owner && - other.delegate == delegate; + identical(this, other) || + other is ForceCancelApproval && other.id == id && other.owner == owner && other.delegate == delegate; @override - int get hashCode => Object.hash( - id, - owner, - delegate, - ); + int get hashCode => Object.hash(id, owner, delegate); } /// Transfer some asset balance from a previously delegated account to some third-party @@ -2804,12 +2032,7 @@ class ForceCancelApproval extends Call { /// /// Weight: `O(1)` class TransferApproved extends Call { - const TransferApproved({ - required this.id, - required this.owner, - required this.destination, - required this.amount, - }); + const TransferApproved({required this.id, required this.owner, required this.destination, required this.amount}); factory TransferApproved._decode(_i1.Input input) { return TransferApproved( @@ -2834,13 +2057,8 @@ class TransferApproved extends Call { @override Map> toJson() => { - 'transfer_approved': { - 'id': id, - 'owner': owner.toJson(), - 'destination': destination.toJson(), - 'amount': amount, - } - }; + 'transfer_approved': {'id': id, 'owner': owner.toJson(), 'destination': destination.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -2852,34 +2070,16 @@ class TransferApproved extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 25, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - owner, - output, - ); - _i3.MultiAddress.codec.encodeTo( - destination, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(25, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(owner, output); + _i3.MultiAddress.codec.encodeTo(destination, output); + _i1.CompactBigIntCodec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is TransferApproved && other.id == id && other.owner == owner && @@ -2887,12 +2087,7 @@ class TransferApproved extends Call { other.amount == amount; @override - int get hashCode => Object.hash( - id, - owner, - destination, - amount, - ); + int get hashCode => Object.hash(id, owner, destination, amount); } /// Create an asset account for non-provider assets. @@ -2916,8 +2111,8 @@ class Touch extends Call { @override Map> toJson() => { - 'touch': {'id': id} - }; + 'touch': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -2926,23 +2121,12 @@ class Touch extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 26, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(26, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Touch && other.id == id; + bool operator ==(Object other) => identical(this, other) || other is Touch && other.id == id; @override int get hashCode => id.hashCode; @@ -2962,16 +2146,10 @@ class Touch extends Call { /// /// Emits `Refunded` event when successful. class Refund extends Call { - const Refund({ - required this.id, - required this.allowBurn, - }); + const Refund({required this.id, required this.allowBurn}); factory Refund._decode(_i1.Input input) { - return Refund( - id: _i1.CompactBigIntCodec.codec.decode(input), - allowBurn: _i1.BoolCodec.codec.decode(input), - ); + return Refund(id: _i1.CompactBigIntCodec.codec.decode(input), allowBurn: _i1.BoolCodec.codec.decode(input)); } /// T::AssetIdParameter @@ -2982,11 +2160,8 @@ class Refund extends Call { @override Map> toJson() => { - 'refund': { - 'id': id, - 'allowBurn': allowBurn, - } - }; + 'refund': {'id': id, 'allowBurn': allowBurn}, + }; int _sizeHint() { int size = 1; @@ -2996,33 +2171,17 @@ class Refund extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 27, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i1.BoolCodec.codec.encodeTo( - allowBurn, - output, - ); + _i1.U8Codec.codec.encodeTo(27, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.BoolCodec.codec.encodeTo(allowBurn, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Refund && other.id == id && other.allowBurn == allowBurn; + identical(this, other) || other is Refund && other.id == id && other.allowBurn == allowBurn; @override - int get hashCode => Object.hash( - id, - allowBurn, - ); + int get hashCode => Object.hash(id, allowBurn); } /// Sets the minimum balance of an asset. @@ -3038,16 +2197,10 @@ class Refund extends Call { /// /// Emits `AssetMinBalanceChanged` event when successful. class SetMinBalance extends Call { - const SetMinBalance({ - required this.id, - required this.minBalance, - }); + const SetMinBalance({required this.id, required this.minBalance}); factory SetMinBalance._decode(_i1.Input input) { - return SetMinBalance( - id: _i1.CompactBigIntCodec.codec.decode(input), - minBalance: _i1.U128Codec.codec.decode(input), - ); + return SetMinBalance(id: _i1.CompactBigIntCodec.codec.decode(input), minBalance: _i1.U128Codec.codec.decode(input)); } /// T::AssetIdParameter @@ -3058,11 +2211,8 @@ class SetMinBalance extends Call { @override Map> toJson() => { - 'set_min_balance': { - 'id': id, - 'minBalance': minBalance, - } - }; + 'set_min_balance': {'id': id, 'minBalance': minBalance}, + }; int _sizeHint() { int size = 1; @@ -3072,35 +2222,17 @@ class SetMinBalance extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 28, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i1.U128Codec.codec.encodeTo( - minBalance, - output, - ); + _i1.U8Codec.codec.encodeTo(28, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i1.U128Codec.codec.encodeTo(minBalance, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetMinBalance && - other.id == id && - other.minBalance == minBalance; + identical(this, other) || other is SetMinBalance && other.id == id && other.minBalance == minBalance; @override - int get hashCode => Object.hash( - id, - minBalance, - ); + int get hashCode => Object.hash(id, minBalance); } /// Create an asset account for `who`. @@ -3115,16 +2247,10 @@ class SetMinBalance extends Call { /// /// Emits `Touched` event when successful. class TouchOther extends Call { - const TouchOther({ - required this.id, - required this.who, - }); + const TouchOther({required this.id, required this.who}); factory TouchOther._decode(_i1.Input input) { - return TouchOther( - id: _i1.CompactBigIntCodec.codec.decode(input), - who: _i3.MultiAddress.codec.decode(input), - ); + return TouchOther(id: _i1.CompactBigIntCodec.codec.decode(input), who: _i3.MultiAddress.codec.decode(input)); } /// T::AssetIdParameter @@ -3135,11 +2261,8 @@ class TouchOther extends Call { @override Map> toJson() => { - 'touch_other': { - 'id': id, - 'who': who.toJson(), - } - }; + 'touch_other': {'id': id, 'who': who.toJson()}, + }; int _sizeHint() { int size = 1; @@ -3149,33 +2272,16 @@ class TouchOther extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 29, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(29, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(who, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TouchOther && other.id == id && other.who == who; + bool operator ==(Object other) => identical(this, other) || other is TouchOther && other.id == id && other.who == who; @override - int get hashCode => Object.hash( - id, - who, - ); + int get hashCode => Object.hash(id, who); } /// Return the deposit (if any) of a target asset account. Useful if you are the depositor. @@ -3192,16 +2298,10 @@ class TouchOther extends Call { /// /// Emits `Refunded` event when successful. class RefundOther extends Call { - const RefundOther({ - required this.id, - required this.who, - }); + const RefundOther({required this.id, required this.who}); factory RefundOther._decode(_i1.Input input) { - return RefundOther( - id: _i1.CompactBigIntCodec.codec.decode(input), - who: _i3.MultiAddress.codec.decode(input), - ); + return RefundOther(id: _i1.CompactBigIntCodec.codec.decode(input), who: _i3.MultiAddress.codec.decode(input)); } /// T::AssetIdParameter @@ -3212,11 +2312,8 @@ class RefundOther extends Call { @override Map> toJson() => { - 'refund_other': { - 'id': id, - 'who': who.toJson(), - } - }; + 'refund_other': {'id': id, 'who': who.toJson()}, + }; int _sizeHint() { int size = 1; @@ -3226,33 +2323,17 @@ class RefundOther extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 30, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(30, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(who, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RefundOther && other.id == id && other.who == who; + identical(this, other) || other is RefundOther && other.id == id && other.who == who; @override - int get hashCode => Object.hash( - id, - who, - ); + int get hashCode => Object.hash(id, who); } /// Disallow further unprivileged transfers of an asset `id` to and from an account `who`. @@ -3266,16 +2347,10 @@ class RefundOther extends Call { /// /// Weight: `O(1)` class Block extends Call { - const Block({ - required this.id, - required this.who, - }); + const Block({required this.id, required this.who}); factory Block._decode(_i1.Input input) { - return Block( - id: _i1.CompactBigIntCodec.codec.decode(input), - who: _i3.MultiAddress.codec.decode(input), - ); + return Block(id: _i1.CompactBigIntCodec.codec.decode(input), who: _i3.MultiAddress.codec.decode(input)); } /// T::AssetIdParameter @@ -3286,11 +2361,8 @@ class Block extends Call { @override Map> toJson() => { - 'block': { - 'id': id, - 'who': who.toJson(), - } - }; + 'block': {'id': id, 'who': who.toJson()}, + }; int _sizeHint() { int size = 1; @@ -3300,33 +2372,16 @@ class Block extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 31, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(31, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(who, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Block && other.id == id && other.who == who; + bool operator ==(Object other) => identical(this, other) || other is Block && other.id == id && other.who == who; @override - int get hashCode => Object.hash( - id, - who, - ); + int get hashCode => Object.hash(id, who); } /// Transfer the entire transferable balance from the caller asset account. @@ -3346,11 +2401,7 @@ class Block extends Call { /// (false), or transfer everything except at least the minimum balance, which will /// guarantee to keep the sender asset account alive (true). class TransferAll extends Call { - const TransferAll({ - required this.id, - required this.dest, - required this.keepAlive, - }); + const TransferAll({required this.id, required this.dest, required this.keepAlive}); factory TransferAll._decode(_i1.Input input) { return TransferAll( @@ -3371,12 +2422,8 @@ class TransferAll extends Call { @override Map> toJson() => { - 'transfer_all': { - 'id': id, - 'dest': dest.toJson(), - 'keepAlive': keepAlive, - } - }; + 'transfer_all': {'id': id, 'dest': dest.toJson(), 'keepAlive': keepAlive}, + }; int _sizeHint() { int size = 1; @@ -3387,41 +2434,19 @@ class TransferAll extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 32, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - _i3.MultiAddress.codec.encodeTo( - dest, - output, - ); - _i1.BoolCodec.codec.encodeTo( - keepAlive, - output, - ); + _i1.U8Codec.codec.encodeTo(32, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + _i3.MultiAddress.codec.encodeTo(dest, output); + _i1.BoolCodec.codec.encodeTo(keepAlive, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TransferAll && - other.id == id && - other.dest == dest && - other.keepAlive == keepAlive; + identical(this, other) || + other is TransferAll && other.id == id && other.dest == dest && other.keepAlive == keepAlive; @override - int get hashCode => Object.hash( - id, - dest, - keepAlive, - ); + int get hashCode => Object.hash(id, dest, keepAlive); } /// Sets the trusted reserve information of an asset. @@ -3434,16 +2459,12 @@ class TransferAll extends Call { /// /// Emits `AssetMinBalanceChanged` event when successful. class SetReserves extends Call { - const SetReserves({ - required this.id, - required this.reserves, - }); + const SetReserves({required this.id, required this.reserves}); factory SetReserves._decode(_i1.Input input) { return SetReserves( id: _i1.CompactBigIntCodec.codec.decode(input), - reserves: - const _i1.SequenceCodec(_i1.NullCodec.codec).decode(input), + reserves: const _i1.SequenceCodec(_i1.NullCodec.codec).decode(input), ); } @@ -3455,52 +2476,26 @@ class SetReserves extends Call { @override Map> toJson() => { - 'set_reserves': { - 'id': id, - 'reserves': reserves.map((value) => null).toList(), - } - }; + 'set_reserves': {'id': id, 'reserves': reserves.map((value) => null).toList()}, + }; int _sizeHint() { int size = 1; size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + - const _i1.SequenceCodec(_i1.NullCodec.codec) - .sizeHint(reserves); + size = size + const _i1.SequenceCodec(_i1.NullCodec.codec).sizeHint(reserves); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 33, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - id, - output, - ); - const _i1.SequenceCodec(_i1.NullCodec.codec).encodeTo( - reserves, - output, - ); + _i1.U8Codec.codec.encodeTo(33, output); + _i1.CompactBigIntCodec.codec.encodeTo(id, output); + const _i1.SequenceCodec(_i1.NullCodec.codec).encodeTo(reserves, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetReserves && - other.id == id && - _i4.listsEqual( - other.reserves, - reserves, - ); + identical(this, other) || other is SetReserves && other.id == id && _i4.listsEqual(other.reserves, reserves); @override - int get hashCode => Object.hash( - id, - reserves, - ); + int get hashCode => Object.hash(id, reserves); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/error.dart index a214f174..e9112c5f 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/error.dart @@ -80,10 +80,7 @@ enum Error { /// Tried setting too many reserves. tooManyReserves('TooManyReserves', 23); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -163,13 +160,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/event.dart index 7fb97d3a..644a3787 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/pallet/event.dart @@ -34,28 +34,12 @@ abstract class Event { class $Event { const $Event(); - Created created({ - required int assetId, - required _i3.AccountId32 creator, - required _i3.AccountId32 owner, - }) { - return Created( - assetId: assetId, - creator: creator, - owner: owner, - ); + Created created({required int assetId, required _i3.AccountId32 creator, required _i3.AccountId32 owner}) { + return Created(assetId: assetId, creator: creator, owner: owner); } - Issued issued({ - required int assetId, - required _i3.AccountId32 owner, - required BigInt amount, - }) { - return Issued( - assetId: assetId, - owner: owner, - amount: amount, - ); + Issued issued({required int assetId, required _i3.AccountId32 owner, required BigInt amount}) { + return Issued(assetId: assetId, owner: owner, amount: amount); } Transferred transferred({ @@ -64,24 +48,11 @@ class $Event { required _i3.AccountId32 to, required BigInt amount, }) { - return Transferred( - assetId: assetId, - from: from, - to: to, - amount: amount, - ); + return Transferred(assetId: assetId, from: from, to: to, amount: amount); } - Burned burned({ - required int assetId, - required _i3.AccountId32 owner, - required BigInt balance, - }) { - return Burned( - assetId: assetId, - owner: owner, - balance: balance, - ); + Burned burned({required int assetId, required _i3.AccountId32 owner, required BigInt balance}) { + return Burned(assetId: assetId, owner: owner, balance: balance); } TeamChanged teamChanged({ @@ -90,42 +61,19 @@ class $Event { required _i3.AccountId32 admin, required _i3.AccountId32 freezer, }) { - return TeamChanged( - assetId: assetId, - issuer: issuer, - admin: admin, - freezer: freezer, - ); + return TeamChanged(assetId: assetId, issuer: issuer, admin: admin, freezer: freezer); } - OwnerChanged ownerChanged({ - required int assetId, - required _i3.AccountId32 owner, - }) { - return OwnerChanged( - assetId: assetId, - owner: owner, - ); + OwnerChanged ownerChanged({required int assetId, required _i3.AccountId32 owner}) { + return OwnerChanged(assetId: assetId, owner: owner); } - Frozen frozen({ - required int assetId, - required _i3.AccountId32 who, - }) { - return Frozen( - assetId: assetId, - who: who, - ); + Frozen frozen({required int assetId, required _i3.AccountId32 who}) { + return Frozen(assetId: assetId, who: who); } - Thawed thawed({ - required int assetId, - required _i3.AccountId32 who, - }) { - return Thawed( - assetId: assetId, - who: who, - ); + Thawed thawed({required int assetId, required _i3.AccountId32 who}) { + return Thawed(assetId: assetId, who: who); } AssetFrozen assetFrozen({required int assetId}) { @@ -168,14 +116,8 @@ class $Event { return Destroyed(assetId: assetId); } - ForceCreated forceCreated({ - required int assetId, - required _i3.AccountId32 owner, - }) { - return ForceCreated( - assetId: assetId, - owner: owner, - ); + ForceCreated forceCreated({required int assetId, required _i3.AccountId32 owner}) { + return ForceCreated(assetId: assetId, owner: owner); } MetadataSet metadataSet({ @@ -185,13 +127,7 @@ class $Event { required int decimals, required bool isFrozen, }) { - return MetadataSet( - assetId: assetId, - name: name, - symbol: symbol, - decimals: decimals, - isFrozen: isFrozen, - ); + return MetadataSet(assetId: assetId, name: name, symbol: symbol, decimals: decimals, isFrozen: isFrozen); } MetadataCleared metadataCleared({required int assetId}) { @@ -204,12 +140,7 @@ class $Event { required _i3.AccountId32 delegate, required BigInt amount, }) { - return ApprovedTransfer( - assetId: assetId, - source: source, - delegate: delegate, - amount: amount, - ); + return ApprovedTransfer(assetId: assetId, source: source, delegate: delegate, amount: amount); } ApprovalCancelled approvalCancelled({ @@ -217,11 +148,7 @@ class $Event { required _i3.AccountId32 owner, required _i3.AccountId32 delegate, }) { - return ApprovalCancelled( - assetId: assetId, - owner: owner, - delegate: delegate, - ); + return ApprovalCancelled(assetId: assetId, owner: owner, delegate: delegate); } TransferredApproved transferredApproved({ @@ -244,70 +171,28 @@ class $Event { return AssetStatusChanged(assetId: assetId); } - AssetMinBalanceChanged assetMinBalanceChanged({ - required int assetId, - required BigInt newMinBalance, - }) { - return AssetMinBalanceChanged( - assetId: assetId, - newMinBalance: newMinBalance, - ); + AssetMinBalanceChanged assetMinBalanceChanged({required int assetId, required BigInt newMinBalance}) { + return AssetMinBalanceChanged(assetId: assetId, newMinBalance: newMinBalance); } - Touched touched({ - required int assetId, - required _i3.AccountId32 who, - required _i3.AccountId32 depositor, - }) { - return Touched( - assetId: assetId, - who: who, - depositor: depositor, - ); + Touched touched({required int assetId, required _i3.AccountId32 who, required _i3.AccountId32 depositor}) { + return Touched(assetId: assetId, who: who, depositor: depositor); } - Blocked blocked({ - required int assetId, - required _i3.AccountId32 who, - }) { - return Blocked( - assetId: assetId, - who: who, - ); + Blocked blocked({required int assetId, required _i3.AccountId32 who}) { + return Blocked(assetId: assetId, who: who); } - Deposited deposited({ - required int assetId, - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Deposited( - assetId: assetId, - who: who, - amount: amount, - ); + Deposited deposited({required int assetId, required _i3.AccountId32 who, required BigInt amount}) { + return Deposited(assetId: assetId, who: who, amount: amount); } - Withdrawn withdrawn({ - required int assetId, - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Withdrawn( - assetId: assetId, - who: who, - amount: amount, - ); + Withdrawn withdrawn({required int assetId, required _i3.AccountId32 who, required BigInt amount}) { + return Withdrawn(assetId: assetId, who: who, amount: amount); } - ReservesUpdated reservesUpdated({ - required int assetId, - required List reserves, - }) { - return ReservesUpdated( - assetId: assetId, - reserves: reserves, - ); + ReservesUpdated reservesUpdated({required int assetId, required List reserves}) { + return ReservesUpdated(assetId: assetId, reserves: reserves); } ReservesRemoved reservesRemoved({required int assetId}) { @@ -384,10 +269,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case Created: (value as Created).encodeTo(output); @@ -474,8 +356,7 @@ class $EventCodec with _i1.Codec { (value as ReservesRemoved).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -539,19 +420,14 @@ class $EventCodec with _i1.Codec { case ReservesRemoved: return (value as ReservesRemoved)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// Some asset class was created. class Created extends Event { - const Created({ - required this.assetId, - required this.creator, - required this.owner, - }); + const Created({required this.assetId, required this.creator, required this.owner}); factory Created._decode(_i1.Input input) { return Created( @@ -572,12 +448,8 @@ class Created extends Event { @override Map> toJson() => { - 'Created': { - 'assetId': assetId, - 'creator': creator.toList(), - 'owner': owner.toList(), - } - }; + 'Created': {'assetId': assetId, 'creator': creator.toList(), 'owner': owner.toList()}, + }; int _sizeHint() { int size = 1; @@ -588,56 +460,27 @@ class Created extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - creator, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - owner, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(creator, output); + const _i1.U8ArrayCodec(32).encodeTo(owner, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Created && other.assetId == assetId && - _i4.listsEqual( - other.creator, - creator, - ) && - _i4.listsEqual( - other.owner, - owner, - ); - - @override - int get hashCode => Object.hash( - assetId, - creator, - owner, - ); + _i4.listsEqual(other.creator, creator) && + _i4.listsEqual(other.owner, owner); + + @override + int get hashCode => Object.hash(assetId, creator, owner); } /// Some assets were issued. class Issued extends Event { - const Issued({ - required this.assetId, - required this.owner, - required this.amount, - }); + const Issued({required this.assetId, required this.owner, required this.amount}); factory Issued._decode(_i1.Input input) { return Issued( @@ -658,12 +501,8 @@ class Issued extends Event { @override Map> toJson() => { - 'Issued': { - 'assetId': assetId, - 'owner': owner.toList(), - 'amount': amount, - } - }; + 'Issued': {'assetId': assetId, 'owner': owner.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -674,54 +513,24 @@ class Issued extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - owner, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(owner, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Issued && - other.assetId == assetId && - _i4.listsEqual( - other.owner, - owner, - ) && - other.amount == amount; + identical(this, other) || + other is Issued && other.assetId == assetId && _i4.listsEqual(other.owner, owner) && other.amount == amount; @override - int get hashCode => Object.hash( - assetId, - owner, - amount, - ); + int get hashCode => Object.hash(assetId, owner, amount); } /// Some assets were transferred. class Transferred extends Event { - const Transferred({ - required this.assetId, - required this.from, - required this.to, - required this.amount, - }); + const Transferred({required this.assetId, required this.from, required this.to, required this.amount}); factory Transferred._decode(_i1.Input input) { return Transferred( @@ -746,13 +555,8 @@ class Transferred extends Event { @override Map> toJson() => { - 'Transferred': { - 'assetId': assetId, - 'from': from.toList(), - 'to': to.toList(), - 'amount': amount, - } - }; + 'Transferred': {'assetId': assetId, 'from': from.toList(), 'to': to.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -764,62 +568,29 @@ class Transferred extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - from, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - to, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(from, output); + const _i1.U8ArrayCodec(32).encodeTo(to, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Transferred && other.assetId == assetId && - _i4.listsEqual( - other.from, - from, - ) && - _i4.listsEqual( - other.to, - to, - ) && + _i4.listsEqual(other.from, from) && + _i4.listsEqual(other.to, to) && other.amount == amount; @override - int get hashCode => Object.hash( - assetId, - from, - to, - amount, - ); + int get hashCode => Object.hash(assetId, from, to, amount); } /// Some assets were destroyed. class Burned extends Event { - const Burned({ - required this.assetId, - required this.owner, - required this.balance, - }); + const Burned({required this.assetId, required this.owner, required this.balance}); factory Burned._decode(_i1.Input input) { return Burned( @@ -840,12 +611,8 @@ class Burned extends Event { @override Map> toJson() => { - 'Burned': { - 'assetId': assetId, - 'owner': owner.toList(), - 'balance': balance, - } - }; + 'Burned': {'assetId': assetId, 'owner': owner.toList(), 'balance': balance}, + }; int _sizeHint() { int size = 1; @@ -856,54 +623,24 @@ class Burned extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - owner, - output, - ); - _i1.U128Codec.codec.encodeTo( - balance, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(owner, output); + _i1.U128Codec.codec.encodeTo(balance, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Burned && - other.assetId == assetId && - _i4.listsEqual( - other.owner, - owner, - ) && - other.balance == balance; - - @override - int get hashCode => Object.hash( - assetId, - owner, - balance, - ); + identical(this, other) || + other is Burned && other.assetId == assetId && _i4.listsEqual(other.owner, owner) && other.balance == balance; + + @override + int get hashCode => Object.hash(assetId, owner, balance); } /// The management team changed. class TeamChanged extends Event { - const TeamChanged({ - required this.assetId, - required this.issuer, - required this.admin, - required this.freezer, - }); + const TeamChanged({required this.assetId, required this.issuer, required this.admin, required this.freezer}); factory TeamChanged._decode(_i1.Input input) { return TeamChanged( @@ -928,13 +665,13 @@ class TeamChanged extends Event { @override Map> toJson() => { - 'TeamChanged': { - 'assetId': assetId, - 'issuer': issuer.toList(), - 'admin': admin.toList(), - 'freezer': freezer.toList(), - } - }; + 'TeamChanged': { + 'assetId': assetId, + 'issuer': issuer.toList(), + 'admin': admin.toList(), + 'freezer': freezer.toList(), + }, + }; int _sizeHint() { int size = 1; @@ -946,70 +683,32 @@ class TeamChanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - issuer, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - admin, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - freezer, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(issuer, output); + const _i1.U8ArrayCodec(32).encodeTo(admin, output); + const _i1.U8ArrayCodec(32).encodeTo(freezer, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is TeamChanged && other.assetId == assetId && - _i4.listsEqual( - other.issuer, - issuer, - ) && - _i4.listsEqual( - other.admin, - admin, - ) && - _i4.listsEqual( - other.freezer, - freezer, - ); - - @override - int get hashCode => Object.hash( - assetId, - issuer, - admin, - freezer, - ); + _i4.listsEqual(other.issuer, issuer) && + _i4.listsEqual(other.admin, admin) && + _i4.listsEqual(other.freezer, freezer); + + @override + int get hashCode => Object.hash(assetId, issuer, admin, freezer); } /// The owner changed. class OwnerChanged extends Event { - const OwnerChanged({ - required this.assetId, - required this.owner, - }); + const OwnerChanged({required this.assetId, required this.owner}); factory OwnerChanged._decode(_i1.Input input) { - return OwnerChanged( - assetId: _i1.U32Codec.codec.decode(input), - owner: const _i1.U8ArrayCodec(32).decode(input), - ); + return OwnerChanged(assetId: _i1.U32Codec.codec.decode(input), owner: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AssetId @@ -1020,11 +719,8 @@ class OwnerChanged extends Event { @override Map> toJson() => { - 'OwnerChanged': { - 'assetId': assetId, - 'owner': owner.toList(), - } - }; + 'OwnerChanged': {'assetId': assetId, 'owner': owner.toList()}, + }; int _sizeHint() { int size = 1; @@ -1034,52 +730,25 @@ class OwnerChanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - owner, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(owner, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is OwnerChanged && - other.assetId == assetId && - _i4.listsEqual( - other.owner, - owner, - ); + identical(this, other) || other is OwnerChanged && other.assetId == assetId && _i4.listsEqual(other.owner, owner); @override - int get hashCode => Object.hash( - assetId, - owner, - ); + int get hashCode => Object.hash(assetId, owner); } /// Some account `who` was frozen. class Frozen extends Event { - const Frozen({ - required this.assetId, - required this.who, - }); + const Frozen({required this.assetId, required this.who}); factory Frozen._decode(_i1.Input input) { - return Frozen( - assetId: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - ); + return Frozen(assetId: _i1.U32Codec.codec.decode(input), who: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AssetId @@ -1090,11 +759,8 @@ class Frozen extends Event { @override Map> toJson() => { - 'Frozen': { - 'assetId': assetId, - 'who': who.toList(), - } - }; + 'Frozen': {'assetId': assetId, 'who': who.toList()}, + }; int _sizeHint() { int size = 1; @@ -1104,52 +770,25 @@ class Frozen extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Frozen && - other.assetId == assetId && - _i4.listsEqual( - other.who, - who, - ); + identical(this, other) || other is Frozen && other.assetId == assetId && _i4.listsEqual(other.who, who); @override - int get hashCode => Object.hash( - assetId, - who, - ); + int get hashCode => Object.hash(assetId, who); } /// Some account `who` was thawed. class Thawed extends Event { - const Thawed({ - required this.assetId, - required this.who, - }); + const Thawed({required this.assetId, required this.who}); factory Thawed._decode(_i1.Input input) { - return Thawed( - assetId: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - ); + return Thawed(assetId: _i1.U32Codec.codec.decode(input), who: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AssetId @@ -1160,11 +799,8 @@ class Thawed extends Event { @override Map> toJson() => { - 'Thawed': { - 'assetId': assetId, - 'who': who.toList(), - } - }; + 'Thawed': {'assetId': assetId, 'who': who.toList()}, + }; int _sizeHint() { int size = 1; @@ -1174,38 +810,17 @@ class Thawed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Thawed && - other.assetId == assetId && - _i4.listsEqual( - other.who, - who, - ); + identical(this, other) || other is Thawed && other.assetId == assetId && _i4.listsEqual(other.who, who); @override - int get hashCode => Object.hash( - assetId, - who, - ); + int get hashCode => Object.hash(assetId, who); } /// Some asset `asset_id` was frozen. @@ -1221,8 +836,8 @@ class AssetFrozen extends Event { @override Map> toJson() => { - 'AssetFrozen': {'assetId': assetId} - }; + 'AssetFrozen': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -1231,23 +846,12 @@ class AssetFrozen extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i1.U32Codec.codec.encodeTo(assetId, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AssetFrozen && other.assetId == assetId; + bool operator ==(Object other) => identical(this, other) || other is AssetFrozen && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -1266,8 +870,8 @@ class AssetThawed extends Event { @override Map> toJson() => { - 'AssetThawed': {'assetId': assetId} - }; + 'AssetThawed': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -1276,23 +880,12 @@ class AssetThawed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + _i1.U32Codec.codec.encodeTo(assetId, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AssetThawed && other.assetId == assetId; + bool operator ==(Object other) => identical(this, other) || other is AssetThawed && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -1300,11 +893,7 @@ class AssetThawed extends Event { /// Accounts were destroyed for given asset. class AccountsDestroyed extends Event { - const AccountsDestroyed({ - required this.assetId, - required this.accountsDestroyed, - required this.accountsRemaining, - }); + const AccountsDestroyed({required this.assetId, required this.accountsDestroyed, required this.accountsRemaining}); factory AccountsDestroyed._decode(_i1.Input input) { return AccountsDestroyed( @@ -1325,12 +914,12 @@ class AccountsDestroyed extends Event { @override Map> toJson() => { - 'AccountsDestroyed': { - 'assetId': assetId, - 'accountsDestroyed': accountsDestroyed, - 'accountsRemaining': accountsRemaining, - } - }; + 'AccountsDestroyed': { + 'assetId': assetId, + 'accountsDestroyed': accountsDestroyed, + 'accountsRemaining': accountsRemaining, + }, + }; int _sizeHint() { int size = 1; @@ -1341,50 +930,27 @@ class AccountsDestroyed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - _i1.U32Codec.codec.encodeTo( - accountsDestroyed, - output, - ); - _i1.U32Codec.codec.encodeTo( - accountsRemaining, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + _i1.U32Codec.codec.encodeTo(accountsDestroyed, output); + _i1.U32Codec.codec.encodeTo(accountsRemaining, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is AccountsDestroyed && other.assetId == assetId && other.accountsDestroyed == accountsDestroyed && other.accountsRemaining == accountsRemaining; @override - int get hashCode => Object.hash( - assetId, - accountsDestroyed, - accountsRemaining, - ); + int get hashCode => Object.hash(assetId, accountsDestroyed, accountsRemaining); } /// Approvals were destroyed for given asset. class ApprovalsDestroyed extends Event { - const ApprovalsDestroyed({ - required this.assetId, - required this.approvalsDestroyed, - required this.approvalsRemaining, - }); + const ApprovalsDestroyed({required this.assetId, required this.approvalsDestroyed, required this.approvalsRemaining}); factory ApprovalsDestroyed._decode(_i1.Input input) { return ApprovalsDestroyed( @@ -1405,12 +971,12 @@ class ApprovalsDestroyed extends Event { @override Map> toJson() => { - 'ApprovalsDestroyed': { - 'assetId': assetId, - 'approvalsDestroyed': approvalsDestroyed, - 'approvalsRemaining': approvalsRemaining, - } - }; + 'ApprovalsDestroyed': { + 'assetId': assetId, + 'approvalsDestroyed': approvalsDestroyed, + 'approvalsRemaining': approvalsRemaining, + }, + }; int _sizeHint() { int size = 1; @@ -1421,41 +987,22 @@ class ApprovalsDestroyed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - _i1.U32Codec.codec.encodeTo( - approvalsDestroyed, - output, - ); - _i1.U32Codec.codec.encodeTo( - approvalsRemaining, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + _i1.U32Codec.codec.encodeTo(approvalsDestroyed, output); + _i1.U32Codec.codec.encodeTo(approvalsRemaining, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ApprovalsDestroyed && other.assetId == assetId && other.approvalsDestroyed == approvalsDestroyed && other.approvalsRemaining == approvalsRemaining; @override - int get hashCode => Object.hash( - assetId, - approvalsDestroyed, - approvalsRemaining, - ); + int get hashCode => Object.hash(assetId, approvalsDestroyed, approvalsRemaining); } /// An asset class is in the process of being destroyed. @@ -1471,8 +1018,8 @@ class DestructionStarted extends Event { @override Map> toJson() => { - 'DestructionStarted': {'assetId': assetId} - }; + 'DestructionStarted': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -1481,23 +1028,12 @@ class DestructionStarted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 12, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); + _i1.U8Codec.codec.encodeTo(12, output); + _i1.U32Codec.codec.encodeTo(assetId, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DestructionStarted && other.assetId == assetId; + bool operator ==(Object other) => identical(this, other) || other is DestructionStarted && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -1516,8 +1052,8 @@ class Destroyed extends Event { @override Map> toJson() => { - 'Destroyed': {'assetId': assetId} - }; + 'Destroyed': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -1526,23 +1062,12 @@ class Destroyed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 13, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); + _i1.U8Codec.codec.encodeTo(13, output); + _i1.U32Codec.codec.encodeTo(assetId, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Destroyed && other.assetId == assetId; + bool operator ==(Object other) => identical(this, other) || other is Destroyed && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -1550,16 +1075,10 @@ class Destroyed extends Event { /// Some asset class was force-created. class ForceCreated extends Event { - const ForceCreated({ - required this.assetId, - required this.owner, - }); + const ForceCreated({required this.assetId, required this.owner}); factory ForceCreated._decode(_i1.Input input) { - return ForceCreated( - assetId: _i1.U32Codec.codec.decode(input), - owner: const _i1.U8ArrayCodec(32).decode(input), - ); + return ForceCreated(assetId: _i1.U32Codec.codec.decode(input), owner: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AssetId @@ -1570,11 +1089,8 @@ class ForceCreated extends Event { @override Map> toJson() => { - 'ForceCreated': { - 'assetId': assetId, - 'owner': owner.toList(), - } - }; + 'ForceCreated': {'assetId': assetId, 'owner': owner.toList()}, + }; int _sizeHint() { int size = 1; @@ -1584,38 +1100,17 @@ class ForceCreated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 14, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - owner, - output, - ); + _i1.U8Codec.codec.encodeTo(14, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(owner, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ForceCreated && - other.assetId == assetId && - _i4.listsEqual( - other.owner, - owner, - ); + identical(this, other) || other is ForceCreated && other.assetId == assetId && _i4.listsEqual(other.owner, owner); @override - int get hashCode => Object.hash( - assetId, - owner, - ); + int get hashCode => Object.hash(assetId, owner); } /// New metadata has been set for an asset. @@ -1655,14 +1150,8 @@ class MetadataSet extends Event { @override Map> toJson() => { - 'MetadataSet': { - 'assetId': assetId, - 'name': name, - 'symbol': symbol, - 'decimals': decimals, - 'isFrozen': isFrozen, - } - }; + 'MetadataSet': {'assetId': assetId, 'name': name, 'symbol': symbol, 'decimals': decimals, 'isFrozen': isFrozen}, + }; int _sizeHint() { int size = 1; @@ -1675,59 +1164,26 @@ class MetadataSet extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 15, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - name, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - symbol, - output, - ); - _i1.U8Codec.codec.encodeTo( - decimals, - output, - ); - _i1.BoolCodec.codec.encodeTo( - isFrozen, - output, - ); + _i1.U8Codec.codec.encodeTo(15, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + _i1.U8SequenceCodec.codec.encodeTo(name, output); + _i1.U8SequenceCodec.codec.encodeTo(symbol, output); + _i1.U8Codec.codec.encodeTo(decimals, output); + _i1.BoolCodec.codec.encodeTo(isFrozen, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is MetadataSet && other.assetId == assetId && - _i4.listsEqual( - other.name, - name, - ) && - _i4.listsEqual( - other.symbol, - symbol, - ) && + _i4.listsEqual(other.name, name) && + _i4.listsEqual(other.symbol, symbol) && other.decimals == decimals && other.isFrozen == isFrozen; @override - int get hashCode => Object.hash( - assetId, - name, - symbol, - decimals, - isFrozen, - ); + int get hashCode => Object.hash(assetId, name, symbol, decimals, isFrozen); } /// Metadata has been cleared for an asset. @@ -1743,8 +1199,8 @@ class MetadataCleared extends Event { @override Map> toJson() => { - 'MetadataCleared': {'assetId': assetId} - }; + 'MetadataCleared': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -1753,23 +1209,12 @@ class MetadataCleared extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 16, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); + _i1.U8Codec.codec.encodeTo(16, output); + _i1.U32Codec.codec.encodeTo(assetId, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MetadataCleared && other.assetId == assetId; + bool operator ==(Object other) => identical(this, other) || other is MetadataCleared && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -1777,12 +1222,7 @@ class MetadataCleared extends Event { /// (Additional) funds have been approved for transfer to a destination account. class ApprovedTransfer extends Event { - const ApprovedTransfer({ - required this.assetId, - required this.source, - required this.delegate, - required this.amount, - }); + const ApprovedTransfer({required this.assetId, required this.source, required this.delegate, required this.amount}); factory ApprovedTransfer._decode(_i1.Input input) { return ApprovedTransfer( @@ -1807,13 +1247,13 @@ class ApprovedTransfer extends Event { @override Map> toJson() => { - 'ApprovedTransfer': { - 'assetId': assetId, - 'source': source.toList(), - 'delegate': delegate.toList(), - 'amount': amount, - } - }; + 'ApprovedTransfer': { + 'assetId': assetId, + 'source': source.toList(), + 'delegate': delegate.toList(), + 'amount': amount, + }, + }; int _sizeHint() { int size = 1; @@ -1825,62 +1265,29 @@ class ApprovedTransfer extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 17, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - source, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - delegate, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(17, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(source, output); + const _i1.U8ArrayCodec(32).encodeTo(delegate, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ApprovedTransfer && other.assetId == assetId && - _i4.listsEqual( - other.source, - source, - ) && - _i4.listsEqual( - other.delegate, - delegate, - ) && + _i4.listsEqual(other.source, source) && + _i4.listsEqual(other.delegate, delegate) && other.amount == amount; @override - int get hashCode => Object.hash( - assetId, - source, - delegate, - amount, - ); + int get hashCode => Object.hash(assetId, source, delegate, amount); } /// An approval for account `delegate` was cancelled by `owner`. class ApprovalCancelled extends Event { - const ApprovalCancelled({ - required this.assetId, - required this.owner, - required this.delegate, - }); + const ApprovalCancelled({required this.assetId, required this.owner, required this.delegate}); factory ApprovalCancelled._decode(_i1.Input input) { return ApprovalCancelled( @@ -1901,12 +1308,8 @@ class ApprovalCancelled extends Event { @override Map> toJson() => { - 'ApprovalCancelled': { - 'assetId': assetId, - 'owner': owner.toList(), - 'delegate': delegate.toList(), - } - }; + 'ApprovalCancelled': {'assetId': assetId, 'owner': owner.toList(), 'delegate': delegate.toList()}, + }; int _sizeHint() { int size = 1; @@ -1917,47 +1320,22 @@ class ApprovalCancelled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 18, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - owner, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - delegate, - output, - ); + _i1.U8Codec.codec.encodeTo(18, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(owner, output); + const _i1.U8ArrayCodec(32).encodeTo(delegate, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ApprovalCancelled && other.assetId == assetId && - _i4.listsEqual( - other.owner, - owner, - ) && - _i4.listsEqual( - other.delegate, - delegate, - ); - - @override - int get hashCode => Object.hash( - assetId, - owner, - delegate, - ); + _i4.listsEqual(other.owner, owner) && + _i4.listsEqual(other.delegate, delegate); + + @override + int get hashCode => Object.hash(assetId, owner, delegate); } /// An `amount` was transferred in its entirety from `owner` to `destination` by @@ -1998,14 +1376,14 @@ class TransferredApproved extends Event { @override Map> toJson() => { - 'TransferredApproved': { - 'assetId': assetId, - 'owner': owner.toList(), - 'delegate': delegate.toList(), - 'destination': destination.toList(), - 'amount': amount, - } - }; + 'TransferredApproved': { + 'assetId': assetId, + 'owner': owner.toList(), + 'delegate': delegate.toList(), + 'destination': destination.toList(), + 'amount': amount, + }, + }; int _sizeHint() { int size = 1; @@ -2018,62 +1396,26 @@ class TransferredApproved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 19, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - owner, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - delegate, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - destination, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(19, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(owner, output); + const _i1.U8ArrayCodec(32).encodeTo(delegate, output); + const _i1.U8ArrayCodec(32).encodeTo(destination, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is TransferredApproved && other.assetId == assetId && - _i4.listsEqual( - other.owner, - owner, - ) && - _i4.listsEqual( - other.delegate, - delegate, - ) && - _i4.listsEqual( - other.destination, - destination, - ) && + _i4.listsEqual(other.owner, owner) && + _i4.listsEqual(other.delegate, delegate) && + _i4.listsEqual(other.destination, destination) && other.amount == amount; @override - int get hashCode => Object.hash( - assetId, - owner, - delegate, - destination, - amount, - ); + int get hashCode => Object.hash(assetId, owner, delegate, destination, amount); } /// An asset has had its attributes changed by the `Force` origin. @@ -2089,8 +1431,8 @@ class AssetStatusChanged extends Event { @override Map> toJson() => { - 'AssetStatusChanged': {'assetId': assetId} - }; + 'AssetStatusChanged': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -2099,23 +1441,12 @@ class AssetStatusChanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 20, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); + _i1.U8Codec.codec.encodeTo(20, output); + _i1.U32Codec.codec.encodeTo(assetId, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AssetStatusChanged && other.assetId == assetId; + bool operator ==(Object other) => identical(this, other) || other is AssetStatusChanged && other.assetId == assetId; @override int get hashCode => assetId.hashCode; @@ -2123,10 +1454,7 @@ class AssetStatusChanged extends Event { /// The min_balance of an asset has been updated by the asset owner. class AssetMinBalanceChanged extends Event { - const AssetMinBalanceChanged({ - required this.assetId, - required this.newMinBalance, - }); + const AssetMinBalanceChanged({required this.assetId, required this.newMinBalance}); factory AssetMinBalanceChanged._decode(_i1.Input input) { return AssetMinBalanceChanged( @@ -2143,11 +1471,8 @@ class AssetMinBalanceChanged extends Event { @override Map> toJson() => { - 'AssetMinBalanceChanged': { - 'assetId': assetId, - 'newMinBalance': newMinBalance, - } - }; + 'AssetMinBalanceChanged': {'assetId': assetId, 'newMinBalance': newMinBalance}, + }; int _sizeHint() { int size = 1; @@ -2157,44 +1482,23 @@ class AssetMinBalanceChanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 21, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - _i1.U128Codec.codec.encodeTo( - newMinBalance, - output, - ); + _i1.U8Codec.codec.encodeTo(21, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + _i1.U128Codec.codec.encodeTo(newMinBalance, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AssetMinBalanceChanged && - other.assetId == assetId && - other.newMinBalance == newMinBalance; + identical(this, other) || + other is AssetMinBalanceChanged && other.assetId == assetId && other.newMinBalance == newMinBalance; @override - int get hashCode => Object.hash( - assetId, - newMinBalance, - ); + int get hashCode => Object.hash(assetId, newMinBalance); } /// Some account `who` was created with a deposit from `depositor`. class Touched extends Event { - const Touched({ - required this.assetId, - required this.who, - required this.depositor, - }); + const Touched({required this.assetId, required this.who, required this.depositor}); factory Touched._decode(_i1.Input input) { return Touched( @@ -2215,12 +1519,8 @@ class Touched extends Event { @override Map> toJson() => { - 'Touched': { - 'assetId': assetId, - 'who': who.toList(), - 'depositor': depositor.toList(), - } - }; + 'Touched': {'assetId': assetId, 'who': who.toList(), 'depositor': depositor.toList()}, + }; int _sizeHint() { int size = 1; @@ -2231,61 +1531,30 @@ class Touched extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 22, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - depositor, - output, - ); + _i1.U8Codec.codec.encodeTo(22, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + const _i1.U8ArrayCodec(32).encodeTo(depositor, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Touched && other.assetId == assetId && - _i4.listsEqual( - other.who, - who, - ) && - _i4.listsEqual( - other.depositor, - depositor, - ); - - @override - int get hashCode => Object.hash( - assetId, - who, - depositor, - ); + _i4.listsEqual(other.who, who) && + _i4.listsEqual(other.depositor, depositor); + + @override + int get hashCode => Object.hash(assetId, who, depositor); } /// Some account `who` was blocked. class Blocked extends Event { - const Blocked({ - required this.assetId, - required this.who, - }); + const Blocked({required this.assetId, required this.who}); factory Blocked._decode(_i1.Input input) { - return Blocked( - assetId: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - ); + return Blocked(assetId: _i1.U32Codec.codec.decode(input), who: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AssetId @@ -2296,11 +1565,8 @@ class Blocked extends Event { @override Map> toJson() => { - 'Blocked': { - 'assetId': assetId, - 'who': who.toList(), - } - }; + 'Blocked': {'assetId': assetId, 'who': who.toList()}, + }; int _sizeHint() { int size = 1; @@ -2310,47 +1576,22 @@ class Blocked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 23, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(23, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Blocked && - other.assetId == assetId && - _i4.listsEqual( - other.who, - who, - ); + identical(this, other) || other is Blocked && other.assetId == assetId && _i4.listsEqual(other.who, who); @override - int get hashCode => Object.hash( - assetId, - who, - ); + int get hashCode => Object.hash(assetId, who); } /// Some assets were deposited (e.g. for transaction fees). class Deposited extends Event { - const Deposited({ - required this.assetId, - required this.who, - required this.amount, - }); + const Deposited({required this.assetId, required this.who, required this.amount}); factory Deposited._decode(_i1.Input input) { return Deposited( @@ -2371,12 +1612,8 @@ class Deposited extends Event { @override Map> toJson() => { - 'Deposited': { - 'assetId': assetId, - 'who': who.toList(), - 'amount': amount, - } - }; + 'Deposited': {'assetId': assetId, 'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -2387,53 +1624,24 @@ class Deposited extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 24, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(24, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Deposited && - other.assetId == assetId && - _i4.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || + other is Deposited && other.assetId == assetId && _i4.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - assetId, - who, - amount, - ); + int get hashCode => Object.hash(assetId, who, amount); } /// Some assets were withdrawn from the account (e.g. for transaction fees). class Withdrawn extends Event { - const Withdrawn({ - required this.assetId, - required this.who, - required this.amount, - }); + const Withdrawn({required this.assetId, required this.who, required this.amount}); factory Withdrawn._decode(_i1.Input input) { return Withdrawn( @@ -2454,12 +1662,8 @@ class Withdrawn extends Event { @override Map> toJson() => { - 'Withdrawn': { - 'assetId': assetId, - 'who': who.toList(), - 'amount': amount, - } - }; + 'Withdrawn': {'assetId': assetId, 'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -2470,58 +1674,29 @@ class Withdrawn extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 25, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(25, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Withdrawn && - other.assetId == assetId && - _i4.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || + other is Withdrawn && other.assetId == assetId && _i4.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - assetId, - who, - amount, - ); + int get hashCode => Object.hash(assetId, who, amount); } /// Reserve information was set or updated for `asset_id`. class ReservesUpdated extends Event { - const ReservesUpdated({ - required this.assetId, - required this.reserves, - }); + const ReservesUpdated({required this.assetId, required this.reserves}); factory ReservesUpdated._decode(_i1.Input input) { return ReservesUpdated( assetId: _i1.U32Codec.codec.decode(input), - reserves: - const _i1.SequenceCodec(_i1.NullCodec.codec).decode(input), + reserves: const _i1.SequenceCodec(_i1.NullCodec.codec).decode(input), ); } @@ -2533,54 +1708,29 @@ class ReservesUpdated extends Event { @override Map> toJson() => { - 'ReservesUpdated': { - 'assetId': assetId, - 'reserves': reserves.map((value) => null).toList(), - } - }; + 'ReservesUpdated': {'assetId': assetId, 'reserves': reserves.map((value) => null).toList()}, + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + - const _i1.SequenceCodec(_i1.NullCodec.codec) - .sizeHint(reserves); + size = size + const _i1.SequenceCodec(_i1.NullCodec.codec).sizeHint(reserves); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 26, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.SequenceCodec(_i1.NullCodec.codec).encodeTo( - reserves, - output, - ); + _i1.U8Codec.codec.encodeTo(26, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.SequenceCodec(_i1.NullCodec.codec).encodeTo(reserves, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ReservesUpdated && - other.assetId == assetId && - _i4.listsEqual( - other.reserves, - reserves, - ); + identical(this, other) || + other is ReservesUpdated && other.assetId == assetId && _i4.listsEqual(other.reserves, reserves); @override - int get hashCode => Object.hash( - assetId, - reserves, - ); + int get hashCode => Object.hash(assetId, reserves); } /// Reserve information was removed for `asset_id`. @@ -2596,8 +1746,8 @@ class ReservesRemoved extends Event { @override Map> toJson() => { - 'ReservesRemoved': {'assetId': assetId} - }; + 'ReservesRemoved': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -2606,23 +1756,12 @@ class ReservesRemoved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 27, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); + _i1.U8Codec.codec.encodeTo(27, output); + _i1.U32Codec.codec.encodeTo(assetId, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ReservesRemoved && other.assetId == assetId; + bool operator ==(Object other) => identical(this, other) || other is ReservesRemoved && other.assetId == assetId; @override int get hashCode => assetId.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/account_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/account_status.dart index 6b3c2a16..6ad2a4a4 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/account_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/account_status.dart @@ -8,10 +8,7 @@ enum AccountStatus { frozen('Frozen', 1), blocked('Blocked', 2); - const AccountStatus( - this.variantName, - this.codecIndex, - ); + const AccountStatus(this.variantName, this.codecIndex); factory AccountStatus.decode(_i1.Input input) { return codec.decode(input); @@ -49,13 +46,7 @@ class $AccountStatusCodec with _i1.Codec { } @override - void encodeTo( - AccountStatus value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(AccountStatus value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/approval.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/approval.dart index 0a616302..ef7cbb93 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/approval.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/approval.dart @@ -4,10 +4,7 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class Approval { - const Approval({ - required this.amount, - required this.deposit, - }); + const Approval({required this.amount, required this.deposit}); factory Approval.decode(_i1.Input input) { return codec.decode(input); @@ -25,50 +22,28 @@ class Approval { return codec.encode(this); } - Map toJson() => { - 'amount': amount, - 'deposit': deposit, - }; + Map toJson() => {'amount': amount, 'deposit': deposit}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Approval && other.amount == amount && other.deposit == deposit; + identical(this, other) || other is Approval && other.amount == amount && other.deposit == deposit; @override - int get hashCode => Object.hash( - amount, - deposit, - ); + int get hashCode => Object.hash(amount, deposit); } class $ApprovalCodec with _i1.Codec { const $ApprovalCodec(); @override - void encodeTo( - Approval obj, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - obj.amount, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.deposit, - output, - ); + void encodeTo(Approval obj, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(obj.amount, output); + _i1.U128Codec.codec.encodeTo(obj.deposit, output); } @override Approval decode(_i1.Input input) { - return Approval( - amount: _i1.U128Codec.codec.decode(input), - deposit: _i1.U128Codec.codec.decode(input), - ); + return Approval(amount: _i1.U128Codec.codec.decode(input), deposit: _i1.U128Codec.codec.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_account.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_account.dart index 05565bfb..7002cc2c 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_account.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_account.dart @@ -7,12 +7,7 @@ import 'account_status.dart' as _i2; import 'existence_reason.dart' as _i3; class AssetAccount { - const AssetAccount({ - required this.balance, - required this.status, - required this.reason, - required this.extra, - }); + const AssetAccount({required this.balance, required this.status, required this.reason, required this.extra}); factory AssetAccount.decode(_i1.Input input) { return codec.decode(input); @@ -37,18 +32,15 @@ class AssetAccount { } Map toJson() => { - 'balance': balance, - 'status': status.toJson(), - 'reason': reason.toJson(), - 'extra': null, - }; + 'balance': balance, + 'status': status.toJson(), + 'reason': reason.toJson(), + 'extra': null, + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is AssetAccount && other.balance == balance && other.status == status && @@ -56,38 +48,18 @@ class AssetAccount { other.extra == extra; @override - int get hashCode => Object.hash( - balance, - status, - reason, - extra, - ); + int get hashCode => Object.hash(balance, status, reason, extra); } class $AssetAccountCodec with _i1.Codec { const $AssetAccountCodec(); @override - void encodeTo( - AssetAccount obj, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - obj.balance, - output, - ); - _i2.AccountStatus.codec.encodeTo( - obj.status, - output, - ); - _i3.ExistenceReason.codec.encodeTo( - obj.reason, - output, - ); - _i1.NullCodec.codec.encodeTo( - obj.extra, - output, - ); + void encodeTo(AssetAccount obj, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(obj.balance, output); + _i2.AccountStatus.codec.encodeTo(obj.status, output); + _i3.ExistenceReason.codec.encodeTo(obj.reason, output); + _i1.NullCodec.codec.encodeTo(obj.extra, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_details.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_details.dart index 531aff9a..9a721ed9 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_details.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_details.dart @@ -70,43 +70,28 @@ class AssetDetails { } Map toJson() => { - 'owner': owner.toList(), - 'issuer': issuer.toList(), - 'admin': admin.toList(), - 'freezer': freezer.toList(), - 'supply': supply, - 'deposit': deposit, - 'minBalance': minBalance, - 'isSufficient': isSufficient, - 'accounts': accounts, - 'sufficients': sufficients, - 'approvals': approvals, - 'status': status.toJson(), - }; + 'owner': owner.toList(), + 'issuer': issuer.toList(), + 'admin': admin.toList(), + 'freezer': freezer.toList(), + 'supply': supply, + 'deposit': deposit, + 'minBalance': minBalance, + 'isSufficient': isSufficient, + 'accounts': accounts, + 'sufficients': sufficients, + 'approvals': approvals, + 'status': status.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is AssetDetails && - _i5.listsEqual( - other.owner, - owner, - ) && - _i5.listsEqual( - other.issuer, - issuer, - ) && - _i5.listsEqual( - other.admin, - admin, - ) && - _i5.listsEqual( - other.freezer, - freezer, - ) && + _i5.listsEqual(other.owner, owner) && + _i5.listsEqual(other.issuer, issuer) && + _i5.listsEqual(other.admin, admin) && + _i5.listsEqual(other.freezer, freezer) && other.supply == supply && other.deposit == deposit && other.minBalance == minBalance && @@ -118,77 +103,38 @@ class AssetDetails { @override int get hashCode => Object.hash( - owner, - issuer, - admin, - freezer, - supply, - deposit, - minBalance, - isSufficient, - accounts, - sufficients, - approvals, - status, - ); + owner, + issuer, + admin, + freezer, + supply, + deposit, + minBalance, + isSufficient, + accounts, + sufficients, + approvals, + status, + ); } class $AssetDetailsCodec with _i1.Codec { const $AssetDetailsCodec(); @override - void encodeTo( - AssetDetails obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - obj.owner, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - obj.issuer, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - obj.admin, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - obj.freezer, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.supply, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.deposit, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.minBalance, - output, - ); - _i1.BoolCodec.codec.encodeTo( - obj.isSufficient, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.accounts, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.sufficients, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.approvals, - output, - ); - _i3.AssetStatus.codec.encodeTo( - obj.status, - output, - ); + void encodeTo(AssetDetails obj, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(obj.owner, output); + const _i1.U8ArrayCodec(32).encodeTo(obj.issuer, output); + const _i1.U8ArrayCodec(32).encodeTo(obj.admin, output); + const _i1.U8ArrayCodec(32).encodeTo(obj.freezer, output); + _i1.U128Codec.codec.encodeTo(obj.supply, output); + _i1.U128Codec.codec.encodeTo(obj.deposit, output); + _i1.U128Codec.codec.encodeTo(obj.minBalance, output); + _i1.BoolCodec.codec.encodeTo(obj.isSufficient, output); + _i1.U32Codec.codec.encodeTo(obj.accounts, output); + _i1.U32Codec.codec.encodeTo(obj.sufficients, output); + _i1.U32Codec.codec.encodeTo(obj.approvals, output); + _i3.AssetStatus.codec.encodeTo(obj.status, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_metadata.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_metadata.dart index b24c6ad6..45f1f10f 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_metadata.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_metadata.dart @@ -39,70 +39,37 @@ class AssetMetadata { } Map toJson() => { - 'deposit': deposit, - 'name': name, - 'symbol': symbol, - 'decimals': decimals, - 'isFrozen': isFrozen, - }; + 'deposit': deposit, + 'name': name, + 'symbol': symbol, + 'decimals': decimals, + 'isFrozen': isFrozen, + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is AssetMetadata && other.deposit == deposit && - _i3.listsEqual( - other.name, - name, - ) && - _i3.listsEqual( - other.symbol, - symbol, - ) && + _i3.listsEqual(other.name, name) && + _i3.listsEqual(other.symbol, symbol) && other.decimals == decimals && other.isFrozen == isFrozen; @override - int get hashCode => Object.hash( - deposit, - name, - symbol, - decimals, - isFrozen, - ); + int get hashCode => Object.hash(deposit, name, symbol, decimals, isFrozen); } class $AssetMetadataCodec with _i1.Codec { const $AssetMetadataCodec(); @override - void encodeTo( - AssetMetadata obj, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - obj.deposit, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - obj.name, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - obj.symbol, - output, - ); - _i1.U8Codec.codec.encodeTo( - obj.decimals, - output, - ); - _i1.BoolCodec.codec.encodeTo( - obj.isFrozen, - output, - ); + void encodeTo(AssetMetadata obj, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(obj.deposit, output); + _i1.U8SequenceCodec.codec.encodeTo(obj.name, output); + _i1.U8SequenceCodec.codec.encodeTo(obj.symbol, output); + _i1.U8Codec.codec.encodeTo(obj.decimals, output); + _i1.BoolCodec.codec.encodeTo(obj.isFrozen, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_status.dart index a5e47797..38f8219f 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/asset_status.dart @@ -8,10 +8,7 @@ enum AssetStatus { frozen('Frozen', 1), destroying('Destroying', 2); - const AssetStatus( - this.variantName, - this.codecIndex, - ); + const AssetStatus(this.variantName, this.codecIndex); factory AssetStatus.decode(_i1.Input input) { return codec.decode(input); @@ -49,13 +46,7 @@ class $AssetStatusCodec with _i1.Codec { } @override - void encodeTo( - AssetStatus value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(AssetStatus value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/existence_reason.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/existence_reason.dart index b2ad2be5..d0714f82 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets/types/existence_reason.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets/types/existence_reason.dart @@ -49,14 +49,8 @@ class $ExistenceReason { return DepositRefunded(); } - DepositFrom depositFrom( - _i3.AccountId32 value0, - BigInt value1, - ) { - return DepositFrom( - value0, - value1, - ); + DepositFrom depositFrom(_i3.AccountId32 value0, BigInt value1) { + return DepositFrom(value0, value1); } } @@ -83,10 +77,7 @@ class $ExistenceReasonCodec with _i1.Codec { } @override - void encodeTo( - ExistenceReason value, - _i1.Output output, - ) { + void encodeTo(ExistenceReason value, _i1.Output output) { switch (value.runtimeType) { case Consumer: (value as Consumer).encodeTo(output); @@ -104,8 +95,7 @@ class $ExistenceReasonCodec with _i1.Codec { (value as DepositFrom).encodeTo(output); break; default: - throw Exception( - 'ExistenceReason: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('ExistenceReason: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -123,8 +113,7 @@ class $ExistenceReasonCodec with _i1.Codec { case DepositFrom: return (value as DepositFrom)._sizeHint(); default: - throw Exception( - 'ExistenceReason: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('ExistenceReason: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -136,10 +125,7 @@ class Consumer extends ExistenceReason { Map toJson() => {'Consumer': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); } @override @@ -156,10 +142,7 @@ class Sufficient extends ExistenceReason { Map toJson() => {'Sufficient': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); } @override @@ -189,23 +172,12 @@ class DepositHeld extends ExistenceReason { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U128Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U128Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DepositHeld && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is DepositHeld && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -218,10 +190,7 @@ class DepositRefunded extends ExistenceReason { Map toJson() => {'DepositRefunded': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); } @override @@ -232,16 +201,10 @@ class DepositRefunded extends ExistenceReason { } class DepositFrom extends ExistenceReason { - const DepositFrom( - this.value0, - this.value1, - ); + const DepositFrom(this.value0, this.value1); factory DepositFrom._decode(_i1.Input input) { - return DepositFrom( - const _i1.U8ArrayCodec(32).decode(input), - _i1.U128Codec.codec.decode(input), - ); + return DepositFrom(const _i1.U8ArrayCodec(32).decode(input), _i1.U128Codec.codec.decode(input)); } /// AccountId @@ -252,11 +215,8 @@ class DepositFrom extends ExistenceReason { @override Map> toJson() => { - 'DepositFrom': [ - value0.toList(), - value1, - ] - }; + 'DepositFrom': [value0.toList(), value1], + }; int _sizeHint() { int size = 1; @@ -266,36 +226,15 @@ class DepositFrom extends ExistenceReason { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - value0, - output, - ); - _i1.U128Codec.codec.encodeTo( - value1, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.U8ArrayCodec(32).encodeTo(value0, output); + _i1.U128Codec.codec.encodeTo(value1, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DepositFrom && - _i4.listsEqual( - other.value0, - value0, - ) && - other.value1 == value1; + identical(this, other) || other is DepositFrom && _i4.listsEqual(other.value0, value0) && other.value1 == value1; @override - int get hashCode => Object.hash( - value0, - value1, - ); + int get hashCode => Object.hash(value0, value1); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/error.dart index 7d1e7b0a..36edf4ea 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/error.dart @@ -8,10 +8,7 @@ enum Error { /// Number of holds on an account would exceed the count of `RuntimeHoldReason`. tooManyHolds('TooManyHolds', 0); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -45,13 +42,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/event.dart index 2ef6221d..1f214086 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_assets_holder/pallet/event.dart @@ -41,12 +41,7 @@ class $Event { required _i4.RuntimeHoldReason reason, required BigInt amount, }) { - return Held( - who: who, - assetId: assetId, - reason: reason, - amount: amount, - ); + return Held(who: who, assetId: assetId, reason: reason, amount: amount); } Released released({ @@ -55,12 +50,7 @@ class $Event { required _i4.RuntimeHoldReason reason, required BigInt amount, }) { - return Released( - who: who, - assetId: assetId, - reason: reason, - amount: amount, - ); + return Released(who: who, assetId: assetId, reason: reason, amount: amount); } Burned burned({ @@ -69,12 +59,7 @@ class $Event { required _i4.RuntimeHoldReason reason, required BigInt amount, }) { - return Burned( - who: who, - assetId: assetId, - reason: reason, - amount: amount, - ); + return Burned(who: who, assetId: assetId, reason: reason, amount: amount); } } @@ -97,10 +82,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case Held: (value as Held).encodeTo(output); @@ -112,8 +94,7 @@ class $EventCodec with _i1.Codec { (value as Burned).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -127,20 +108,14 @@ class $EventCodec with _i1.Codec { case Burned: return (value as Burned)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// `who`s balance on hold was increased by `amount`. class Held extends Event { - const Held({ - required this.who, - required this.assetId, - required this.reason, - required this.amount, - }); + const Held({required this.who, required this.assetId, required this.reason, required this.amount}); factory Held._decode(_i1.Input input) { return Held( @@ -165,13 +140,8 @@ class Held extends Event { @override Map> toJson() => { - 'Held': { - 'who': who.toList(), - 'assetId': assetId, - 'reason': reason.toJson(), - 'amount': amount, - } - }; + 'Held': {'who': who.toList(), 'assetId': assetId, 'reason': reason.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -183,60 +153,29 @@ class Held extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - _i4.RuntimeHoldReason.codec.encodeTo( - reason, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + _i4.RuntimeHoldReason.codec.encodeTo(reason, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Held && - _i5.listsEqual( - other.who, - who, - ) && + _i5.listsEqual(other.who, who) && other.assetId == assetId && other.reason == reason && other.amount == amount; @override - int get hashCode => Object.hash( - who, - assetId, - reason, - amount, - ); + int get hashCode => Object.hash(who, assetId, reason, amount); } /// `who`s balance on hold was decreased by `amount`. class Released extends Event { - const Released({ - required this.who, - required this.assetId, - required this.reason, - required this.amount, - }); + const Released({required this.who, required this.assetId, required this.reason, required this.amount}); factory Released._decode(_i1.Input input) { return Released( @@ -261,13 +200,8 @@ class Released extends Event { @override Map> toJson() => { - 'Released': { - 'who': who.toList(), - 'assetId': assetId, - 'reason': reason.toJson(), - 'amount': amount, - } - }; + 'Released': {'who': who.toList(), 'assetId': assetId, 'reason': reason.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -279,60 +213,29 @@ class Released extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - _i4.RuntimeHoldReason.codec.encodeTo( - reason, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + _i4.RuntimeHoldReason.codec.encodeTo(reason, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Released && - _i5.listsEqual( - other.who, - who, - ) && + _i5.listsEqual(other.who, who) && other.assetId == assetId && other.reason == reason && other.amount == amount; @override - int get hashCode => Object.hash( - who, - assetId, - reason, - amount, - ); + int get hashCode => Object.hash(who, assetId, reason, amount); } /// `who`s balance on hold was burned by `amount`. class Burned extends Event { - const Burned({ - required this.who, - required this.assetId, - required this.reason, - required this.amount, - }); + const Burned({required this.who, required this.assetId, required this.reason, required this.amount}); factory Burned._decode(_i1.Input input) { return Burned( @@ -357,13 +260,8 @@ class Burned extends Event { @override Map> toJson() => { - 'Burned': { - 'who': who.toList(), - 'assetId': assetId, - 'reason': reason.toJson(), - 'amount': amount, - } - }; + 'Burned': {'who': who.toList(), 'assetId': assetId, 'reason': reason.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -375,48 +273,22 @@ class Burned extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - _i4.RuntimeHoldReason.codec.encodeTo( - reason, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + _i4.RuntimeHoldReason.codec.encodeTo(reason, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Burned && - _i5.listsEqual( - other.who, - who, - ) && + _i5.listsEqual(other.who, who) && other.assetId == assetId && other.reason == reason && other.amount == amount; @override - int get hashCode => Object.hash( - who, - assetId, - reason, - amount, - ); + int get hashCode => Object.hash(who, assetId, reason, amount); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/call.dart index ff111d7a..0190e45b 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/call.dart @@ -36,14 +36,8 @@ abstract class Call { class $Call { const $Call(); - TransferAllowDeath transferAllowDeath({ - required _i3.MultiAddress dest, - required BigInt value, - }) { - return TransferAllowDeath( - dest: dest, - value: value, - ); + TransferAllowDeath transferAllowDeath({required _i3.MultiAddress dest, required BigInt value}) { + return TransferAllowDeath(dest: dest, value: value); } ForceTransfer forceTransfer({ @@ -51,75 +45,38 @@ class $Call { required _i3.MultiAddress dest, required BigInt value, }) { - return ForceTransfer( - source: source, - dest: dest, - value: value, - ); + return ForceTransfer(source: source, dest: dest, value: value); } - TransferKeepAlive transferKeepAlive({ - required _i3.MultiAddress dest, - required BigInt value, - }) { - return TransferKeepAlive( - dest: dest, - value: value, - ); + TransferKeepAlive transferKeepAlive({required _i3.MultiAddress dest, required BigInt value}) { + return TransferKeepAlive(dest: dest, value: value); } - TransferAll transferAll({ - required _i3.MultiAddress dest, - required bool keepAlive, - }) { - return TransferAll( - dest: dest, - keepAlive: keepAlive, - ); + TransferAll transferAll({required _i3.MultiAddress dest, required bool keepAlive}) { + return TransferAll(dest: dest, keepAlive: keepAlive); } - ForceUnreserve forceUnreserve({ - required _i3.MultiAddress who, - required BigInt amount, - }) { - return ForceUnreserve( - who: who, - amount: amount, - ); + ForceUnreserve forceUnreserve({required _i3.MultiAddress who, required BigInt amount}) { + return ForceUnreserve(who: who, amount: amount); } UpgradeAccounts upgradeAccounts({required List<_i4.AccountId32> who}) { return UpgradeAccounts(who: who); } - ForceSetBalance forceSetBalance({ - required _i3.MultiAddress who, - required BigInt newFree, - }) { - return ForceSetBalance( - who: who, - newFree: newFree, - ); + ForceSetBalance forceSetBalance({required _i3.MultiAddress who, required BigInt newFree}) { + return ForceSetBalance(who: who, newFree: newFree); } ForceAdjustTotalIssuance forceAdjustTotalIssuance({ required _i5.AdjustmentDirection direction, required BigInt delta, }) { - return ForceAdjustTotalIssuance( - direction: direction, - delta: delta, - ); + return ForceAdjustTotalIssuance(direction: direction, delta: delta); } - Burn burn({ - required BigInt value, - required bool keepAlive, - }) { - return Burn( - value: value, - keepAlive: keepAlive, - ); + Burn burn({required BigInt value, required bool keepAlive}) { + return Burn(value: value, keepAlive: keepAlive); } } @@ -154,10 +111,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case TransferAllowDeath: (value as TransferAllowDeath).encodeTo(output); @@ -187,8 +141,7 @@ class $CallCodec with _i1.Codec { (value as Burn).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -214,8 +167,7 @@ class $CallCodec with _i1.Codec { case Burn: return (value as Burn)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -228,10 +180,7 @@ class $CallCodec with _i1.Codec { /// /// The dispatch origin for this call must be `Signed` by the transactor. class TransferAllowDeath extends Call { - const TransferAllowDeath({ - required this.dest, - required this.value, - }); + const TransferAllowDeath({required this.dest, required this.value}); factory TransferAllowDeath._decode(_i1.Input input) { return TransferAllowDeath( @@ -248,11 +197,8 @@ class TransferAllowDeath extends Call { @override Map> toJson() => { - 'transfer_allow_death': { - 'dest': dest.toJson(), - 'value': value, - } - }; + 'transfer_allow_death': {'dest': dest.toJson(), 'value': value}, + }; int _sizeHint() { int size = 1; @@ -262,43 +208,23 @@ class TransferAllowDeath extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.MultiAddress.codec.encodeTo( - dest, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - value, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.MultiAddress.codec.encodeTo(dest, output); + _i1.CompactBigIntCodec.codec.encodeTo(value, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TransferAllowDeath && other.dest == dest && other.value == value; + identical(this, other) || other is TransferAllowDeath && other.dest == dest && other.value == value; @override - int get hashCode => Object.hash( - dest, - value, - ); + int get hashCode => Object.hash(dest, value); } /// Exactly as `transfer_allow_death`, except the origin must be root and the source account /// may be specified. class ForceTransfer extends Call { - const ForceTransfer({ - required this.source, - required this.dest, - required this.value, - }); + const ForceTransfer({required this.source, required this.dest, required this.value}); factory ForceTransfer._decode(_i1.Input input) { return ForceTransfer( @@ -319,12 +245,8 @@ class ForceTransfer extends Call { @override Map> toJson() => { - 'force_transfer': { - 'source': source.toJson(), - 'dest': dest.toJson(), - 'value': value, - } - }; + 'force_transfer': {'source': source.toJson(), 'dest': dest.toJson(), 'value': value}, + }; int _sizeHint() { int size = 1; @@ -335,41 +257,19 @@ class ForceTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i3.MultiAddress.codec.encodeTo( - source, - output, - ); - _i3.MultiAddress.codec.encodeTo( - dest, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - value, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i3.MultiAddress.codec.encodeTo(source, output); + _i3.MultiAddress.codec.encodeTo(dest, output); + _i1.CompactBigIntCodec.codec.encodeTo(value, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ForceTransfer && - other.source == source && - other.dest == dest && - other.value == value; + identical(this, other) || + other is ForceTransfer && other.source == source && other.dest == dest && other.value == value; @override - int get hashCode => Object.hash( - source, - dest, - value, - ); + int get hashCode => Object.hash(source, dest, value); } /// Same as the [`transfer_allow_death`] call, but with a check that the transfer will not @@ -379,10 +279,7 @@ class ForceTransfer extends Call { /// /// [`transfer_allow_death`]: struct.Pallet.html#method.transfer class TransferKeepAlive extends Call { - const TransferKeepAlive({ - required this.dest, - required this.value, - }); + const TransferKeepAlive({required this.dest, required this.value}); factory TransferKeepAlive._decode(_i1.Input input) { return TransferKeepAlive( @@ -399,11 +296,8 @@ class TransferKeepAlive extends Call { @override Map> toJson() => { - 'transfer_keep_alive': { - 'dest': dest.toJson(), - 'value': value, - } - }; + 'transfer_keep_alive': {'dest': dest.toJson(), 'value': value}, + }; int _sizeHint() { int size = 1; @@ -413,33 +307,17 @@ class TransferKeepAlive extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i3.MultiAddress.codec.encodeTo( - dest, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - value, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i3.MultiAddress.codec.encodeTo(dest, output); + _i1.CompactBigIntCodec.codec.encodeTo(value, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TransferKeepAlive && other.dest == dest && other.value == value; + identical(this, other) || other is TransferKeepAlive && other.dest == dest && other.value == value; @override - int get hashCode => Object.hash( - dest, - value, - ); + int get hashCode => Object.hash(dest, value); } /// Transfer the entire transferable balance from the caller account. @@ -458,16 +336,10 @@ class TransferKeepAlive extends Call { /// transfer everything except at least the existential deposit, which will guarantee to /// keep the sender account alive (true). class TransferAll extends Call { - const TransferAll({ - required this.dest, - required this.keepAlive, - }); + const TransferAll({required this.dest, required this.keepAlive}); factory TransferAll._decode(_i1.Input input) { - return TransferAll( - dest: _i3.MultiAddress.codec.decode(input), - keepAlive: _i1.BoolCodec.codec.decode(input), - ); + return TransferAll(dest: _i3.MultiAddress.codec.decode(input), keepAlive: _i1.BoolCodec.codec.decode(input)); } /// AccountIdLookupOf @@ -478,11 +350,8 @@ class TransferAll extends Call { @override Map> toJson() => { - 'transfer_all': { - 'dest': dest.toJson(), - 'keepAlive': keepAlive, - } - }; + 'transfer_all': {'dest': dest.toJson(), 'keepAlive': keepAlive}, + }; int _sizeHint() { int size = 1; @@ -492,51 +361,27 @@ class TransferAll extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i3.MultiAddress.codec.encodeTo( - dest, - output, - ); - _i1.BoolCodec.codec.encodeTo( - keepAlive, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i3.MultiAddress.codec.encodeTo(dest, output); + _i1.BoolCodec.codec.encodeTo(keepAlive, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TransferAll && - other.dest == dest && - other.keepAlive == keepAlive; + identical(this, other) || other is TransferAll && other.dest == dest && other.keepAlive == keepAlive; @override - int get hashCode => Object.hash( - dest, - keepAlive, - ); + int get hashCode => Object.hash(dest, keepAlive); } /// Unreserve some balance from a user by force. /// /// Can only be called by ROOT. class ForceUnreserve extends Call { - const ForceUnreserve({ - required this.who, - required this.amount, - }); + const ForceUnreserve({required this.who, required this.amount}); factory ForceUnreserve._decode(_i1.Input input) { - return ForceUnreserve( - who: _i3.MultiAddress.codec.decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return ForceUnreserve(who: _i3.MultiAddress.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// AccountIdLookupOf @@ -547,11 +392,8 @@ class ForceUnreserve extends Call { @override Map> toJson() => { - 'force_unreserve': { - 'who': who.toJson(), - 'amount': amount, - } - }; + 'force_unreserve': {'who': who.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -561,33 +403,17 @@ class ForceUnreserve extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i3.MultiAddress.codec.encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ForceUnreserve && other.who == who && other.amount == amount; + identical(this, other) || other is ForceUnreserve && other.who == who && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Upgrade a specified account. @@ -602,9 +428,7 @@ class UpgradeAccounts extends Call { const UpgradeAccounts({required this.who}); factory UpgradeAccounts._decode(_i1.Input input) { - return UpgradeAccounts( - who: const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()) - .decode(input)); + return UpgradeAccounts(who: const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()).decode(input)); } /// Vec @@ -612,39 +436,23 @@ class UpgradeAccounts extends Call { @override Map>>> toJson() => { - 'upgrade_accounts': {'who': who.map((value) => value.toList()).toList()} - }; + 'upgrade_accounts': {'who': who.map((value) => value.toList()).toList()}, + }; int _sizeHint() { int size = 1; - size = size + - const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()) - .sizeHint(who); + size = size + const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()).sizeHint(who); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()).encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + const _i1.SequenceCodec<_i4.AccountId32>(_i4.AccountId32Codec()).encodeTo(who, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is UpgradeAccounts && - _i6.listsEqual( - other.who, - who, - ); + identical(this, other) || other is UpgradeAccounts && _i6.listsEqual(other.who, who); @override int get hashCode => who.hashCode; @@ -654,10 +462,7 @@ class UpgradeAccounts extends Call { /// /// The dispatch origin for this call is `root`. class ForceSetBalance extends Call { - const ForceSetBalance({ - required this.who, - required this.newFree, - }); + const ForceSetBalance({required this.who, required this.newFree}); factory ForceSetBalance._decode(_i1.Input input) { return ForceSetBalance( @@ -674,11 +479,8 @@ class ForceSetBalance extends Call { @override Map> toJson() => { - 'force_set_balance': { - 'who': who.toJson(), - 'newFree': newFree, - } - }; + 'force_set_balance': {'who': who.toJson(), 'newFree': newFree}, + }; int _sizeHint() { int size = 1; @@ -688,33 +490,17 @@ class ForceSetBalance extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - newFree, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i3.MultiAddress.codec.encodeTo(who, output); + _i1.CompactBigIntCodec.codec.encodeTo(newFree, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ForceSetBalance && other.who == who && other.newFree == newFree; + identical(this, other) || other is ForceSetBalance && other.who == who && other.newFree == newFree; @override - int get hashCode => Object.hash( - who, - newFree, - ); + int get hashCode => Object.hash(who, newFree); } /// Adjust the total issuance in a saturating way. @@ -723,10 +509,7 @@ class ForceSetBalance extends Call { /// /// # Example class ForceAdjustTotalIssuance extends Call { - const ForceAdjustTotalIssuance({ - required this.direction, - required this.delta, - }); + const ForceAdjustTotalIssuance({required this.direction, required this.delta}); factory ForceAdjustTotalIssuance._decode(_i1.Input input) { return ForceAdjustTotalIssuance( @@ -743,11 +526,8 @@ class ForceAdjustTotalIssuance extends Call { @override Map> toJson() => { - 'force_adjust_total_issuance': { - 'direction': direction.toJson(), - 'delta': delta, - } - }; + 'force_adjust_total_issuance': {'direction': direction.toJson(), 'delta': delta}, + }; int _sizeHint() { int size = 1; @@ -757,35 +537,18 @@ class ForceAdjustTotalIssuance extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - _i5.AdjustmentDirection.codec.encodeTo( - direction, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - delta, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + _i5.AdjustmentDirection.codec.encodeTo(direction, output); + _i1.CompactBigIntCodec.codec.encodeTo(delta, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ForceAdjustTotalIssuance && - other.direction == direction && - other.delta == delta; + identical(this, other) || + other is ForceAdjustTotalIssuance && other.direction == direction && other.delta == delta; @override - int get hashCode => Object.hash( - direction, - delta, - ); + int get hashCode => Object.hash(direction, delta); } /// Burn the specified liquid free balance from the origin account. @@ -796,16 +559,10 @@ class ForceAdjustTotalIssuance extends Call { /// Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, /// this `burn` operation will reduce total issuance by the amount _burned_. class Burn extends Call { - const Burn({ - required this.value, - required this.keepAlive, - }); + const Burn({required this.value, required this.keepAlive}); factory Burn._decode(_i1.Input input) { - return Burn( - value: _i1.CompactBigIntCodec.codec.decode(input), - keepAlive: _i1.BoolCodec.codec.decode(input), - ); + return Burn(value: _i1.CompactBigIntCodec.codec.decode(input), keepAlive: _i1.BoolCodec.codec.decode(input)); } /// T::Balance @@ -816,11 +573,8 @@ class Burn extends Call { @override Map> toJson() => { - 'burn': { - 'value': value, - 'keepAlive': keepAlive, - } - }; + 'burn': {'value': value, 'keepAlive': keepAlive}, + }; int _sizeHint() { int size = 1; @@ -830,31 +584,15 @@ class Burn extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - value, - output, - ); - _i1.BoolCodec.codec.encodeTo( - keepAlive, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); + _i1.CompactBigIntCodec.codec.encodeTo(value, output); + _i1.BoolCodec.codec.encodeTo(keepAlive, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Burn && other.value == value && other.keepAlive == keepAlive; + identical(this, other) || other is Burn && other.value == value && other.keepAlive == keepAlive; @override - int get hashCode => Object.hash( - value, - keepAlive, - ); + int get hashCode => Object.hash(value, keepAlive); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/error.dart index 3fe90d47..3cc28b4e 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/error.dart @@ -41,10 +41,7 @@ enum Error { /// The delta cannot be zero. deltaZero('DeltaZero', 11); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -100,13 +97,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/event.dart index 3dc931c3..565949dd 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/event.dart @@ -37,66 +37,28 @@ abstract class Event { class $Event { const $Event(); - Endowed endowed({ - required _i3.AccountId32 account, - required BigInt freeBalance, - }) { - return Endowed( - account: account, - freeBalance: freeBalance, - ); + Endowed endowed({required _i3.AccountId32 account, required BigInt freeBalance}) { + return Endowed(account: account, freeBalance: freeBalance); } - DustLost dustLost({ - required _i3.AccountId32 account, - required BigInt amount, - }) { - return DustLost( - account: account, - amount: amount, - ); + DustLost dustLost({required _i3.AccountId32 account, required BigInt amount}) { + return DustLost(account: account, amount: amount); } - Transfer transfer({ - required _i3.AccountId32 from, - required _i3.AccountId32 to, - required BigInt amount, - }) { - return Transfer( - from: from, - to: to, - amount: amount, - ); + Transfer transfer({required _i3.AccountId32 from, required _i3.AccountId32 to, required BigInt amount}) { + return Transfer(from: from, to: to, amount: amount); } - BalanceSet balanceSet({ - required _i3.AccountId32 who, - required BigInt free, - }) { - return BalanceSet( - who: who, - free: free, - ); + BalanceSet balanceSet({required _i3.AccountId32 who, required BigInt free}) { + return BalanceSet(who: who, free: free); } - Reserved reserved({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Reserved( - who: who, - amount: amount, - ); + Reserved reserved({required _i3.AccountId32 who, required BigInt amount}) { + return Reserved(who: who, amount: amount); } - Unreserved unreserved({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Unreserved( - who: who, - amount: amount, - ); + Unreserved unreserved({required _i3.AccountId32 who, required BigInt amount}) { + return Unreserved(who: who, amount: amount); } ReserveRepatriated reserveRepatriated({ @@ -105,90 +67,43 @@ class $Event { required BigInt amount, required _i4.BalanceStatus destinationStatus, }) { - return ReserveRepatriated( - from: from, - to: to, - amount: amount, - destinationStatus: destinationStatus, - ); + return ReserveRepatriated(from: from, to: to, amount: amount, destinationStatus: destinationStatus); } - Deposit deposit({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Deposit( - who: who, - amount: amount, - ); + Deposit deposit({required _i3.AccountId32 who, required BigInt amount}) { + return Deposit(who: who, amount: amount); } - Withdraw withdraw({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Withdraw( - who: who, - amount: amount, - ); + Withdraw withdraw({required _i3.AccountId32 who, required BigInt amount}) { + return Withdraw(who: who, amount: amount); } - Slashed slashed({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Slashed( - who: who, - amount: amount, - ); + Slashed slashed({required _i3.AccountId32 who, required BigInt amount}) { + return Slashed(who: who, amount: amount); } - Minted minted({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Minted( - who: who, - amount: amount, - ); + Minted minted({required _i3.AccountId32 who, required BigInt amount}) { + return Minted(who: who, amount: amount); } MintedCredit mintedCredit({required BigInt amount}) { return MintedCredit(amount: amount); } - Burned burned({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Burned( - who: who, - amount: amount, - ); + Burned burned({required _i3.AccountId32 who, required BigInt amount}) { + return Burned(who: who, amount: amount); } BurnedDebt burnedDebt({required BigInt amount}) { return BurnedDebt(amount: amount); } - Suspended suspended({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Suspended( - who: who, - amount: amount, - ); + Suspended suspended({required _i3.AccountId32 who, required BigInt amount}) { + return Suspended(who: who, amount: amount); } - Restored restored({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Restored( - who: who, - amount: amount, - ); + Restored restored({required _i3.AccountId32 who, required BigInt amount}) { + return Restored(who: who, amount: amount); } Upgraded upgraded({required _i3.AccountId32 who}) { @@ -203,78 +118,32 @@ class $Event { return Rescinded(amount: amount); } - Locked locked({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Locked( - who: who, - amount: amount, - ); + Locked locked({required _i3.AccountId32 who, required BigInt amount}) { + return Locked(who: who, amount: amount); } - Unlocked unlocked({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Unlocked( - who: who, - amount: amount, - ); + Unlocked unlocked({required _i3.AccountId32 who, required BigInt amount}) { + return Unlocked(who: who, amount: amount); } - Frozen frozen({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Frozen( - who: who, - amount: amount, - ); + Frozen frozen({required _i3.AccountId32 who, required BigInt amount}) { + return Frozen(who: who, amount: amount); } - Thawed thawed({ - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Thawed( - who: who, - amount: amount, - ); + Thawed thawed({required _i3.AccountId32 who, required BigInt amount}) { + return Thawed(who: who, amount: amount); } - TotalIssuanceForced totalIssuanceForced({ - required BigInt old, - required BigInt new_, - }) { - return TotalIssuanceForced( - old: old, - new_: new_, - ); + TotalIssuanceForced totalIssuanceForced({required BigInt old, required BigInt new_}) { + return TotalIssuanceForced(old: old, new_: new_); } - Held held({ - required _i5.RuntimeHoldReason reason, - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Held( - reason: reason, - who: who, - amount: amount, - ); + Held held({required _i5.RuntimeHoldReason reason, required _i3.AccountId32 who, required BigInt amount}) { + return Held(reason: reason, who: who, amount: amount); } - BurnedHeld burnedHeld({ - required _i5.RuntimeHoldReason reason, - required _i3.AccountId32 who, - required BigInt amount, - }) { - return BurnedHeld( - reason: reason, - who: who, - amount: amount, - ); + BurnedHeld burnedHeld({required _i5.RuntimeHoldReason reason, required _i3.AccountId32 who, required BigInt amount}) { + return BurnedHeld(reason: reason, who: who, amount: amount); } TransferOnHold transferOnHold({ @@ -283,12 +152,7 @@ class $Event { required _i3.AccountId32 dest, required BigInt amount, }) { - return TransferOnHold( - reason: reason, - source: source, - dest: dest, - amount: amount, - ); + return TransferOnHold(reason: reason, source: source, dest: dest, amount: amount); } TransferAndHold transferAndHold({ @@ -297,24 +161,11 @@ class $Event { required _i3.AccountId32 dest, required BigInt transferred, }) { - return TransferAndHold( - reason: reason, - source: source, - dest: dest, - transferred: transferred, - ); + return TransferAndHold(reason: reason, source: source, dest: dest, transferred: transferred); } - Released released({ - required _i5.RuntimeHoldReason reason, - required _i3.AccountId32 who, - required BigInt amount, - }) { - return Released( - reason: reason, - who: who, - amount: amount, - ); + Released released({required _i5.RuntimeHoldReason reason, required _i3.AccountId32 who, required BigInt amount}) { + return Released(reason: reason, who: who, amount: amount); } Unexpected unexpected(_i6.UnexpectedKind value0) { @@ -395,10 +246,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case Endowed: (value as Endowed).encodeTo(output); @@ -491,8 +339,7 @@ class $EventCodec with _i1.Codec { (value as Unexpected).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -560,24 +407,17 @@ class $EventCodec with _i1.Codec { case Unexpected: return (value as Unexpected)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// An account was created with some free balance. class Endowed extends Event { - const Endowed({ - required this.account, - required this.freeBalance, - }); + const Endowed({required this.account, required this.freeBalance}); factory Endowed._decode(_i1.Input input) { - return Endowed( - account: const _i1.U8ArrayCodec(32).decode(input), - freeBalance: _i1.U128Codec.codec.decode(input), - ); + return Endowed(account: const _i1.U8ArrayCodec(32).decode(input), freeBalance: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -588,11 +428,8 @@ class Endowed extends Event { @override Map> toJson() => { - 'Endowed': { - 'account': account.toList(), - 'freeBalance': freeBalance, - } - }; + 'Endowed': {'account': account.toList(), 'freeBalance': freeBalance}, + }; int _sizeHint() { int size = 1; @@ -602,53 +439,27 @@ class Endowed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); - _i1.U128Codec.codec.encodeTo( - freeBalance, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U128Codec.codec.encodeTo(freeBalance, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Endowed && - _i7.listsEqual( - other.account, - account, - ) && - other.freeBalance == freeBalance; - - @override - int get hashCode => Object.hash( - account, - freeBalance, - ); + identical(this, other) || + other is Endowed && _i7.listsEqual(other.account, account) && other.freeBalance == freeBalance; + + @override + int get hashCode => Object.hash(account, freeBalance); } /// An account was removed whose balance was non-zero but below ExistentialDeposit, /// resulting in an outright loss. class DustLost extends Event { - const DustLost({ - required this.account, - required this.amount, - }); + const DustLost({required this.account, required this.amount}); factory DustLost._decode(_i1.Input input) { - return DustLost( - account: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return DustLost(account: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -659,11 +470,8 @@ class DustLost extends Event { @override Map> toJson() => { - 'DustLost': { - 'account': account.toList(), - 'amount': amount, - } - }; + 'DustLost': {'account': account.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -673,47 +481,22 @@ class DustLost extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DustLost && - _i7.listsEqual( - other.account, - account, - ) && - other.amount == amount; + identical(this, other) || other is DustLost && _i7.listsEqual(other.account, account) && other.amount == amount; @override - int get hashCode => Object.hash( - account, - amount, - ); + int get hashCode => Object.hash(account, amount); } /// Transfer succeeded. class Transfer extends Event { - const Transfer({ - required this.from, - required this.to, - required this.amount, - }); + const Transfer({required this.from, required this.to, required this.amount}); factory Transfer._decode(_i1.Input input) { return Transfer( @@ -734,12 +517,8 @@ class Transfer extends Event { @override Map> toJson() => { - 'Transfer': { - 'from': from.toList(), - 'to': to.toList(), - 'amount': amount, - } - }; + 'Transfer': {'from': from.toList(), 'to': to.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -750,61 +529,27 @@ class Transfer extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - from, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - to, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(from, output); + const _i1.U8ArrayCodec(32).encodeTo(to, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Transfer && - _i7.listsEqual( - other.from, - from, - ) && - _i7.listsEqual( - other.to, - to, - ) && - other.amount == amount; + identical(this, other) || + other is Transfer && _i7.listsEqual(other.from, from) && _i7.listsEqual(other.to, to) && other.amount == amount; @override - int get hashCode => Object.hash( - from, - to, - amount, - ); + int get hashCode => Object.hash(from, to, amount); } /// A balance was set by root. class BalanceSet extends Event { - const BalanceSet({ - required this.who, - required this.free, - }); + const BalanceSet({required this.who, required this.free}); factory BalanceSet._decode(_i1.Input input) { - return BalanceSet( - who: const _i1.U8ArrayCodec(32).decode(input), - free: _i1.U128Codec.codec.decode(input), - ); + return BalanceSet(who: const _i1.U8ArrayCodec(32).decode(input), free: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -815,11 +560,8 @@ class BalanceSet extends Event { @override Map> toJson() => { - 'BalanceSet': { - 'who': who.toList(), - 'free': free, - } - }; + 'BalanceSet': {'who': who.toList(), 'free': free}, + }; int _sizeHint() { int size = 1; @@ -829,52 +571,25 @@ class BalanceSet extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - free, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(free, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is BalanceSet && - _i7.listsEqual( - other.who, - who, - ) && - other.free == free; - - @override - int get hashCode => Object.hash( - who, - free, - ); + identical(this, other) || other is BalanceSet && _i7.listsEqual(other.who, who) && other.free == free; + + @override + int get hashCode => Object.hash(who, free); } /// Some balance was reserved (moved from free to reserved). class Reserved extends Event { - const Reserved({ - required this.who, - required this.amount, - }); + const Reserved({required this.who, required this.amount}); factory Reserved._decode(_i1.Input input) { - return Reserved( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Reserved(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -885,11 +600,8 @@ class Reserved extends Event { @override Map> toJson() => { - 'Reserved': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Reserved': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -899,52 +611,25 @@ class Reserved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Reserved && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Reserved && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Some balance was unreserved (moved from reserved to free). class Unreserved extends Event { - const Unreserved({ - required this.who, - required this.amount, - }); + const Unreserved({required this.who, required this.amount}); factory Unreserved._decode(_i1.Input input) { - return Unreserved( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Unreserved(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -955,11 +640,8 @@ class Unreserved extends Event { @override Map> toJson() => { - 'Unreserved': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Unreserved': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -969,38 +651,17 @@ class Unreserved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Unreserved && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Unreserved && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Some balance was moved from the reserve of the first account to the second account. @@ -1036,13 +697,13 @@ class ReserveRepatriated extends Event { @override Map> toJson() => { - 'ReserveRepatriated': { - 'from': from.toList(), - 'to': to.toList(), - 'amount': amount, - 'destinationStatus': destinationStatus.toJson(), - } - }; + 'ReserveRepatriated': { + 'from': from.toList(), + 'to': to.toList(), + 'amount': amount, + 'destinationStatus': destinationStatus.toJson(), + }, + }; int _sizeHint() { int size = 1; @@ -1054,67 +715,32 @@ class ReserveRepatriated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - from, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - to, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); - _i4.BalanceStatus.codec.encodeTo( - destinationStatus, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + const _i1.U8ArrayCodec(32).encodeTo(from, output); + const _i1.U8ArrayCodec(32).encodeTo(to, output); + _i1.U128Codec.codec.encodeTo(amount, output); + _i4.BalanceStatus.codec.encodeTo(destinationStatus, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ReserveRepatriated && - _i7.listsEqual( - other.from, - from, - ) && - _i7.listsEqual( - other.to, - to, - ) && + _i7.listsEqual(other.from, from) && + _i7.listsEqual(other.to, to) && other.amount == amount && other.destinationStatus == destinationStatus; @override - int get hashCode => Object.hash( - from, - to, - amount, - destinationStatus, - ); + int get hashCode => Object.hash(from, to, amount, destinationStatus); } /// Some amount was deposited (e.g. for transaction fees). class Deposit extends Event { - const Deposit({ - required this.who, - required this.amount, - }); + const Deposit({required this.who, required this.amount}); factory Deposit._decode(_i1.Input input) { - return Deposit( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Deposit(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -1125,11 +751,8 @@ class Deposit extends Event { @override Map> toJson() => { - 'Deposit': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Deposit': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1139,52 +762,25 @@ class Deposit extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Deposit && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Deposit && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Some amount was withdrawn from the account (e.g. for transaction fees). class Withdraw extends Event { - const Withdraw({ - required this.who, - required this.amount, - }); + const Withdraw({required this.who, required this.amount}); factory Withdraw._decode(_i1.Input input) { - return Withdraw( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Withdraw(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -1195,11 +791,8 @@ class Withdraw extends Event { @override Map> toJson() => { - 'Withdraw': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Withdraw': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1209,52 +802,25 @@ class Withdraw extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Withdraw && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Withdraw && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Some amount was removed from the account (e.g. for misbehavior). class Slashed extends Event { - const Slashed({ - required this.who, - required this.amount, - }); + const Slashed({required this.who, required this.amount}); factory Slashed._decode(_i1.Input input) { - return Slashed( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Slashed(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -1265,11 +831,8 @@ class Slashed extends Event { @override Map> toJson() => { - 'Slashed': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Slashed': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1279,52 +842,25 @@ class Slashed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Slashed && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Slashed && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Some amount was minted into an account. class Minted extends Event { - const Minted({ - required this.who, - required this.amount, - }); + const Minted({required this.who, required this.amount}); factory Minted._decode(_i1.Input input) { - return Minted( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Minted(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -1335,11 +871,8 @@ class Minted extends Event { @override Map> toJson() => { - 'Minted': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Minted': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1349,38 +882,17 @@ class Minted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Minted && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Minted && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Some credit was balanced and added to the TotalIssuance. @@ -1396,8 +908,8 @@ class MintedCredit extends Event { @override Map> toJson() => { - 'MintedCredit': {'amount': amount} - }; + 'MintedCredit': {'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1406,23 +918,12 @@ class MintedCredit extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MintedCredit && other.amount == amount; + bool operator ==(Object other) => identical(this, other) || other is MintedCredit && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -1430,16 +931,10 @@ class MintedCredit extends Event { /// Some amount was burned from an account. class Burned extends Event { - const Burned({ - required this.who, - required this.amount, - }); + const Burned({required this.who, required this.amount}); factory Burned._decode(_i1.Input input) { - return Burned( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Burned(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -1450,11 +945,8 @@ class Burned extends Event { @override Map> toJson() => { - 'Burned': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Burned': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1464,38 +956,17 @@ class Burned extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 12, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(12, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Burned && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Burned && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Some debt has been dropped from the Total Issuance. @@ -1511,8 +982,8 @@ class BurnedDebt extends Event { @override Map> toJson() => { - 'BurnedDebt': {'amount': amount} - }; + 'BurnedDebt': {'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1521,23 +992,12 @@ class BurnedDebt extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 13, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(13, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is BurnedDebt && other.amount == amount; + bool operator ==(Object other) => identical(this, other) || other is BurnedDebt && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -1545,16 +1005,10 @@ class BurnedDebt extends Event { /// Some amount was suspended from an account (it can be restored later). class Suspended extends Event { - const Suspended({ - required this.who, - required this.amount, - }); + const Suspended({required this.who, required this.amount}); factory Suspended._decode(_i1.Input input) { - return Suspended( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Suspended(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -1565,11 +1019,8 @@ class Suspended extends Event { @override Map> toJson() => { - 'Suspended': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Suspended': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1579,52 +1030,25 @@ class Suspended extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 14, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(14, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Suspended && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Suspended && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Some amount was restored into an account. class Restored extends Event { - const Restored({ - required this.who, - required this.amount, - }); + const Restored({required this.who, required this.amount}); factory Restored._decode(_i1.Input input) { - return Restored( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Restored(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -1635,11 +1059,8 @@ class Restored extends Event { @override Map> toJson() => { - 'Restored': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Restored': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1649,38 +1070,17 @@ class Restored extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 15, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(15, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Restored && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Restored && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// An account was upgraded. @@ -1696,8 +1096,8 @@ class Upgraded extends Event { @override Map>> toJson() => { - 'Upgraded': {'who': who.toList()} - }; + 'Upgraded': {'who': who.toList()}, + }; int _sizeHint() { int size = 1; @@ -1706,27 +1106,12 @@ class Upgraded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 16, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(16, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Upgraded && - _i7.listsEqual( - other.who, - who, - ); + bool operator ==(Object other) => identical(this, other) || other is Upgraded && _i7.listsEqual(other.who, who); @override int get hashCode => who.hashCode; @@ -1745,8 +1130,8 @@ class Issued extends Event { @override Map> toJson() => { - 'Issued': {'amount': amount} - }; + 'Issued': {'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1755,23 +1140,12 @@ class Issued extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 17, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(17, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Issued && other.amount == amount; + bool operator ==(Object other) => identical(this, other) || other is Issued && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -1790,8 +1164,8 @@ class Rescinded extends Event { @override Map> toJson() => { - 'Rescinded': {'amount': amount} - }; + 'Rescinded': {'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1800,23 +1174,12 @@ class Rescinded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 18, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(18, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Rescinded && other.amount == amount; + bool operator ==(Object other) => identical(this, other) || other is Rescinded && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -1824,16 +1187,10 @@ class Rescinded extends Event { /// Some balance was locked. class Locked extends Event { - const Locked({ - required this.who, - required this.amount, - }); + const Locked({required this.who, required this.amount}); factory Locked._decode(_i1.Input input) { - return Locked( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Locked(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -1844,11 +1201,8 @@ class Locked extends Event { @override Map> toJson() => { - 'Locked': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Locked': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1858,52 +1212,25 @@ class Locked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 19, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(19, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Locked && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Locked && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Some balance was unlocked. class Unlocked extends Event { - const Unlocked({ - required this.who, - required this.amount, - }); + const Unlocked({required this.who, required this.amount}); factory Unlocked._decode(_i1.Input input) { - return Unlocked( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Unlocked(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -1914,11 +1241,8 @@ class Unlocked extends Event { @override Map> toJson() => { - 'Unlocked': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Unlocked': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1928,52 +1252,25 @@ class Unlocked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 20, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(20, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Unlocked && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Unlocked && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Some balance was frozen. class Frozen extends Event { - const Frozen({ - required this.who, - required this.amount, - }); + const Frozen({required this.who, required this.amount}); factory Frozen._decode(_i1.Input input) { - return Frozen( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Frozen(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -1984,11 +1281,8 @@ class Frozen extends Event { @override Map> toJson() => { - 'Frozen': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Frozen': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1998,52 +1292,25 @@ class Frozen extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 21, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(21, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Frozen && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Frozen && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// Some balance was thawed. class Thawed extends Event { - const Thawed({ - required this.who, - required this.amount, - }); + const Thawed({required this.who, required this.amount}); factory Thawed._decode(_i1.Input input) { - return Thawed( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Thawed(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -2054,11 +1321,8 @@ class Thawed extends Event { @override Map> toJson() => { - 'Thawed': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'Thawed': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -2068,52 +1332,25 @@ class Thawed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 22, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(22, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Thawed && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Thawed && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// The `TotalIssuance` was forcefully changed. class TotalIssuanceForced extends Event { - const TotalIssuanceForced({ - required this.old, - required this.new_, - }); + const TotalIssuanceForced({required this.old, required this.new_}); factory TotalIssuanceForced._decode(_i1.Input input) { - return TotalIssuanceForced( - old: _i1.U128Codec.codec.decode(input), - new_: _i1.U128Codec.codec.decode(input), - ); + return TotalIssuanceForced(old: _i1.U128Codec.codec.decode(input), new_: _i1.U128Codec.codec.decode(input)); } /// T::Balance @@ -2124,11 +1361,8 @@ class TotalIssuanceForced extends Event { @override Map> toJson() => { - 'TotalIssuanceForced': { - 'old': old, - 'new': new_, - } - }; + 'TotalIssuanceForced': {'old': old, 'new': new_}, + }; int _sizeHint() { int size = 1; @@ -2138,42 +1372,22 @@ class TotalIssuanceForced extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 23, - output, - ); - _i1.U128Codec.codec.encodeTo( - old, - output, - ); - _i1.U128Codec.codec.encodeTo( - new_, - output, - ); + _i1.U8Codec.codec.encodeTo(23, output); + _i1.U128Codec.codec.encodeTo(old, output); + _i1.U128Codec.codec.encodeTo(new_, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TotalIssuanceForced && other.old == old && other.new_ == new_; + identical(this, other) || other is TotalIssuanceForced && other.old == old && other.new_ == new_; @override - int get hashCode => Object.hash( - old, - new_, - ); + int get hashCode => Object.hash(old, new_); } /// Some balance was placed on hold. class Held extends Event { - const Held({ - required this.reason, - required this.who, - required this.amount, - }); + const Held({required this.reason, required this.who, required this.amount}); factory Held._decode(_i1.Input input) { return Held( @@ -2194,12 +1408,8 @@ class Held extends Event { @override Map> toJson() => { - 'Held': { - 'reason': reason.toJson(), - 'who': who.toList(), - 'amount': amount, - } - }; + 'Held': {'reason': reason.toJson(), 'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -2210,53 +1420,24 @@ class Held extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 24, - output, - ); - _i5.RuntimeHoldReason.codec.encodeTo( - reason, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(24, output); + _i5.RuntimeHoldReason.codec.encodeTo(reason, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Held && - other.reason == reason && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || + other is Held && other.reason == reason && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - reason, - who, - amount, - ); + int get hashCode => Object.hash(reason, who, amount); } /// Held balance was burned from an account. class BurnedHeld extends Event { - const BurnedHeld({ - required this.reason, - required this.who, - required this.amount, - }); + const BurnedHeld({required this.reason, required this.who, required this.amount}); factory BurnedHeld._decode(_i1.Input input) { return BurnedHeld( @@ -2277,12 +1458,8 @@ class BurnedHeld extends Event { @override Map> toJson() => { - 'BurnedHeld': { - 'reason': reason.toJson(), - 'who': who.toList(), - 'amount': amount, - } - }; + 'BurnedHeld': {'reason': reason.toJson(), 'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -2293,54 +1470,24 @@ class BurnedHeld extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 25, - output, - ); - _i5.RuntimeHoldReason.codec.encodeTo( - reason, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(25, output); + _i5.RuntimeHoldReason.codec.encodeTo(reason, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is BurnedHeld && - other.reason == reason && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || + other is BurnedHeld && other.reason == reason && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - reason, - who, - amount, - ); + int get hashCode => Object.hash(reason, who, amount); } /// A transfer of `amount` on hold from `source` to `dest` was initiated. class TransferOnHold extends Event { - const TransferOnHold({ - required this.reason, - required this.source, - required this.dest, - required this.amount, - }); + const TransferOnHold({required this.reason, required this.source, required this.dest, required this.amount}); factory TransferOnHold._decode(_i1.Input input) { return TransferOnHold( @@ -2365,13 +1512,8 @@ class TransferOnHold extends Event { @override Map> toJson() => { - 'TransferOnHold': { - 'reason': reason.toJson(), - 'source': source.toList(), - 'dest': dest.toList(), - 'amount': amount, - } - }; + 'TransferOnHold': {'reason': reason.toJson(), 'source': source.toList(), 'dest': dest.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -2383,63 +1525,29 @@ class TransferOnHold extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 26, - output, - ); - _i5.RuntimeHoldReason.codec.encodeTo( - reason, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - source, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - dest, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(26, output); + _i5.RuntimeHoldReason.codec.encodeTo(reason, output); + const _i1.U8ArrayCodec(32).encodeTo(source, output); + const _i1.U8ArrayCodec(32).encodeTo(dest, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is TransferOnHold && other.reason == reason && - _i7.listsEqual( - other.source, - source, - ) && - _i7.listsEqual( - other.dest, - dest, - ) && + _i7.listsEqual(other.source, source) && + _i7.listsEqual(other.dest, dest) && other.amount == amount; @override - int get hashCode => Object.hash( - reason, - source, - dest, - amount, - ); + int get hashCode => Object.hash(reason, source, dest, amount); } /// The `transferred` balance is placed on hold at the `dest` account. class TransferAndHold extends Event { - const TransferAndHold({ - required this.reason, - required this.source, - required this.dest, - required this.transferred, - }); + const TransferAndHold({required this.reason, required this.source, required this.dest, required this.transferred}); factory TransferAndHold._decode(_i1.Input input) { return TransferAndHold( @@ -2464,13 +1572,13 @@ class TransferAndHold extends Event { @override Map> toJson() => { - 'TransferAndHold': { - 'reason': reason.toJson(), - 'source': source.toList(), - 'dest': dest.toList(), - 'transferred': transferred, - } - }; + 'TransferAndHold': { + 'reason': reason.toJson(), + 'source': source.toList(), + 'dest': dest.toList(), + 'transferred': transferred, + }, + }; int _sizeHint() { int size = 1; @@ -2482,62 +1590,29 @@ class TransferAndHold extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 27, - output, - ); - _i5.RuntimeHoldReason.codec.encodeTo( - reason, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - source, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - dest, - output, - ); - _i1.U128Codec.codec.encodeTo( - transferred, - output, - ); + _i1.U8Codec.codec.encodeTo(27, output); + _i5.RuntimeHoldReason.codec.encodeTo(reason, output); + const _i1.U8ArrayCodec(32).encodeTo(source, output); + const _i1.U8ArrayCodec(32).encodeTo(dest, output); + _i1.U128Codec.codec.encodeTo(transferred, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is TransferAndHold && other.reason == reason && - _i7.listsEqual( - other.source, - source, - ) && - _i7.listsEqual( - other.dest, - dest, - ) && + _i7.listsEqual(other.source, source) && + _i7.listsEqual(other.dest, dest) && other.transferred == transferred; @override - int get hashCode => Object.hash( - reason, - source, - dest, - transferred, - ); + int get hashCode => Object.hash(reason, source, dest, transferred); } /// Some balance was released from hold. class Released extends Event { - const Released({ - required this.reason, - required this.who, - required this.amount, - }); + const Released({required this.reason, required this.who, required this.amount}); factory Released._decode(_i1.Input input) { return Released( @@ -2558,12 +1633,8 @@ class Released extends Event { @override Map> toJson() => { - 'Released': { - 'reason': reason.toJson(), - 'who': who.toList(), - 'amount': amount, - } - }; + 'Released': {'reason': reason.toJson(), 'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -2574,44 +1645,19 @@ class Released extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 28, - output, - ); - _i5.RuntimeHoldReason.codec.encodeTo( - reason, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(28, output); + _i5.RuntimeHoldReason.codec.encodeTo(reason, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Released && - other.reason == reason && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || + other is Released && other.reason == reason && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - reason, - who, - amount, - ); + int get hashCode => Object.hash(reason, who, amount); } /// An unexpected/defensive event was triggered. @@ -2635,23 +1681,12 @@ class Unexpected extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 29, - output, - ); - _i6.UnexpectedKind.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(29, output); + _i6.UnexpectedKind.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Unexpected && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Unexpected && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/unexpected_kind.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/unexpected_kind.dart index 29cde5a5..98c84a75 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/unexpected_kind.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/pallet/unexpected_kind.dart @@ -7,10 +7,7 @@ enum UnexpectedKind { balanceUpdated('BalanceUpdated', 0), failedToMutateAccount('FailedToMutateAccount', 1); - const UnexpectedKind( - this.variantName, - this.codecIndex, - ); + const UnexpectedKind(this.variantName, this.codecIndex); factory UnexpectedKind.decode(_i1.Input input) { return codec.decode(input); @@ -46,13 +43,7 @@ class $UnexpectedKindCodec with _i1.Codec { } @override - void encodeTo( - UnexpectedKind value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(UnexpectedKind value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/account_data.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/account_data.dart index e2da160c..751ca8ed 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/account_data.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/account_data.dart @@ -6,12 +6,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; import 'extra_flags.dart' as _i2; class AccountData { - const AccountData({ - required this.free, - required this.reserved, - required this.frozen, - required this.flags, - }); + const AccountData({required this.free, required this.reserved, required this.frozen, required this.flags}); factory AccountData.decode(_i1.Input input) { return codec.decode(input); @@ -35,19 +30,11 @@ class AccountData { return codec.encode(this); } - Map toJson() => { - 'free': free, - 'reserved': reserved, - 'frozen': frozen, - 'flags': flags, - }; + Map toJson() => {'free': free, 'reserved': reserved, 'frozen': frozen, 'flags': flags}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is AccountData && other.free == free && other.reserved == reserved && @@ -55,38 +42,18 @@ class AccountData { other.flags == flags; @override - int get hashCode => Object.hash( - free, - reserved, - frozen, - flags, - ); + int get hashCode => Object.hash(free, reserved, frozen, flags); } class $AccountDataCodec with _i1.Codec { const $AccountDataCodec(); @override - void encodeTo( - AccountData obj, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - obj.free, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.reserved, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.frozen, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.flags, - output, - ); + void encodeTo(AccountData obj, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(obj.free, output); + _i1.U128Codec.codec.encodeTo(obj.reserved, output); + _i1.U128Codec.codec.encodeTo(obj.frozen, output); + _i1.U128Codec.codec.encodeTo(obj.flags, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/adjustment_direction.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/adjustment_direction.dart index 95bf0934..8e87929c 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/adjustment_direction.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/adjustment_direction.dart @@ -7,10 +7,7 @@ enum AdjustmentDirection { increase('Increase', 0), decrease('Decrease', 1); - const AdjustmentDirection( - this.variantName, - this.codecIndex, - ); + const AdjustmentDirection(this.variantName, this.codecIndex); factory AdjustmentDirection.decode(_i1.Input input) { return codec.decode(input); @@ -46,13 +43,7 @@ class $AdjustmentDirectionCodec with _i1.Codec { } @override - void encodeTo( - AdjustmentDirection value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(AdjustmentDirection value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/balance_lock.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/balance_lock.dart index 4e28efb6..9f9f90bc 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/balance_lock.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/balance_lock.dart @@ -7,11 +7,7 @@ import 'package:quiver/collection.dart' as _i4; import 'reasons.dart' as _i2; class BalanceLock { - const BalanceLock({ - required this.id, - required this.amount, - required this.reasons, - }); + const BalanceLock({required this.id, required this.amount, required this.reasons}); factory BalanceLock.decode(_i1.Input input) { return codec.decode(input); @@ -32,54 +28,25 @@ class BalanceLock { return codec.encode(this); } - Map toJson() => { - 'id': id.toList(), - 'amount': amount, - 'reasons': reasons.toJson(), - }; + Map toJson() => {'id': id.toList(), 'amount': amount, 'reasons': reasons.toJson()}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is BalanceLock && - _i4.listsEqual( - other.id, - id, - ) && - other.amount == amount && - other.reasons == reasons; + identical(this, other) || + other is BalanceLock && _i4.listsEqual(other.id, id) && other.amount == amount && other.reasons == reasons; @override - int get hashCode => Object.hash( - id, - amount, - reasons, - ); + int get hashCode => Object.hash(id, amount, reasons); } class $BalanceLockCodec with _i1.Codec { const $BalanceLockCodec(); @override - void encodeTo( - BalanceLock obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(8).encodeTo( - obj.id, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.amount, - output, - ); - _i2.Reasons.codec.encodeTo( - obj.reasons, - output, - ); + void encodeTo(BalanceLock obj, _i1.Output output) { + const _i1.U8ArrayCodec(8).encodeTo(obj.id, output); + _i1.U128Codec.codec.encodeTo(obj.amount, output); + _i2.Reasons.codec.encodeTo(obj.reasons, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/extra_flags.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/extra_flags.dart index d4ef898a..275f36a9 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/extra_flags.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/extra_flags.dart @@ -12,14 +12,8 @@ class ExtraFlagsCodec with _i1.Codec { } @override - void encodeTo( - ExtraFlags value, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - value, - output, - ); + void encodeTo(ExtraFlags value, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reasons.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reasons.dart index 6fd58c0e..6fbab947 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reasons.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reasons.dart @@ -8,10 +8,7 @@ enum Reasons { misc('Misc', 1), all('All', 2); - const Reasons( - this.variantName, - this.codecIndex, - ); + const Reasons(this.variantName, this.codecIndex); factory Reasons.decode(_i1.Input input) { return codec.decode(input); @@ -49,13 +46,7 @@ class $ReasonsCodec with _i1.Codec { } @override - void encodeTo( - Reasons value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Reasons value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reserve_data.dart b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reserve_data.dart index 93664958..c1436d9a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reserve_data.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_balances/types/reserve_data.dart @@ -5,10 +5,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; import 'package:quiver/collection.dart' as _i3; class ReserveData { - const ReserveData({ - required this.id, - required this.amount, - }); + const ReserveData({required this.id, required this.amount}); factory ReserveData.decode(_i1.Input input) { return codec.decode(input); @@ -26,55 +23,28 @@ class ReserveData { return codec.encode(this); } - Map toJson() => { - 'id': id.toList(), - 'amount': amount, - }; + Map toJson() => {'id': id.toList(), 'amount': amount}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ReserveData && - _i3.listsEqual( - other.id, - id, - ) && - other.amount == amount; + identical(this, other) || other is ReserveData && _i3.listsEqual(other.id, id) && other.amount == amount; @override - int get hashCode => Object.hash( - id, - amount, - ); + int get hashCode => Object.hash(id, amount); } class $ReserveDataCodec with _i1.Codec { const $ReserveDataCodec(); @override - void encodeTo( - ReserveData obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(8).encodeTo( - obj.id, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.amount, - output, - ); + void encodeTo(ReserveData obj, _i1.Output output) { + const _i1.U8ArrayCodec(8).encodeTo(obj.id, output); + _i1.U128Codec.codec.encodeTo(obj.amount, output); } @override ReserveData decode(_i1.Input input) { - return ReserveData( - id: const _i1.U8ArrayCodec(8).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return ReserveData(id: const _i1.U8ArrayCodec(8).decode(input), amount: _i1.U128Codec.codec.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/conviction/conviction.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/conviction/conviction.dart index 59822f18..f4ed4eeb 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/conviction/conviction.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/conviction/conviction.dart @@ -12,10 +12,7 @@ enum Conviction { locked5x('Locked5x', 5), locked6x('Locked6x', 6); - const Conviction( - this.variantName, - this.codecIndex, - ); + const Conviction(this.variantName, this.codecIndex); factory Conviction.decode(_i1.Input input) { return codec.decode(input); @@ -61,13 +58,7 @@ class $ConvictionCodec with _i1.Codec { } @override - void encodeTo( - Conviction value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Conviction value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/call.dart index 34bd45de..45074a76 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/call.dart @@ -35,14 +35,8 @@ abstract class Call { class $Call { const $Call(); - Vote vote({ - required BigInt pollIndex, - required _i3.AccountVote vote, - }) { - return Vote( - pollIndex: pollIndex, - vote: vote, - ); + Vote vote({required BigInt pollIndex, required _i3.AccountVote vote}) { + return Vote(pollIndex: pollIndex, vote: vote); } Delegate delegate({ @@ -51,48 +45,23 @@ class $Call { required _i5.Conviction conviction, required BigInt balance, }) { - return Delegate( - class_: class_, - to: to, - conviction: conviction, - balance: balance, - ); + return Delegate(class_: class_, to: to, conviction: conviction, balance: balance); } Undelegate undelegate({required int class_}) { return Undelegate(class_: class_); } - Unlock unlock({ - required int class_, - required _i4.MultiAddress target, - }) { - return Unlock( - class_: class_, - target: target, - ); + Unlock unlock({required int class_, required _i4.MultiAddress target}) { + return Unlock(class_: class_, target: target); } - RemoveVote removeVote({ - int? class_, - required int index, - }) { - return RemoveVote( - class_: class_, - index: index, - ); + RemoveVote removeVote({int? class_, required int index}) { + return RemoveVote(class_: class_, index: index); } - RemoveOtherVote removeOtherVote({ - required _i4.MultiAddress target, - required int class_, - required int index, - }) { - return RemoveOtherVote( - target: target, - class_: class_, - index: index, - ); + RemoveOtherVote removeOtherVote({required _i4.MultiAddress target, required int class_, required int index}) { + return RemoveOtherVote(target: target, class_: class_, index: index); } } @@ -121,10 +90,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case Vote: (value as Vote).encodeTo(output); @@ -145,8 +111,7 @@ class $CallCodec with _i1.Codec { (value as RemoveOtherVote).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -166,8 +131,7 @@ class $CallCodec with _i1.Codec { case RemoveOtherVote: return (value as RemoveOtherVote)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -182,16 +146,10 @@ class $CallCodec with _i1.Codec { /// /// Weight: `O(R)` where R is the number of polls the voter has voted on. class Vote extends Call { - const Vote({ - required this.pollIndex, - required this.vote, - }); + const Vote({required this.pollIndex, required this.vote}); factory Vote._decode(_i1.Input input) { - return Vote( - pollIndex: _i1.CompactBigIntCodec.codec.decode(input), - vote: _i3.AccountVote.codec.decode(input), - ); + return Vote(pollIndex: _i1.CompactBigIntCodec.codec.decode(input), vote: _i3.AccountVote.codec.decode(input)); } /// PollIndexOf @@ -202,11 +160,8 @@ class Vote extends Call { @override Map> toJson() => { - 'vote': { - 'pollIndex': pollIndex, - 'vote': vote.toJson(), - } - }; + 'vote': {'pollIndex': pollIndex, 'vote': vote.toJson()}, + }; int _sizeHint() { int size = 1; @@ -216,33 +171,17 @@ class Vote extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - pollIndex, - output, - ); - _i3.AccountVote.codec.encodeTo( - vote, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.CompactBigIntCodec.codec.encodeTo(pollIndex, output); + _i3.AccountVote.codec.encodeTo(vote, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Vote && other.pollIndex == pollIndex && other.vote == vote; + identical(this, other) || other is Vote && other.pollIndex == pollIndex && other.vote == vote; @override - int get hashCode => Object.hash( - pollIndex, - vote, - ); + int get hashCode => Object.hash(pollIndex, vote); } /// Delegate the voting power (with some given conviction) of the sending account for a @@ -269,12 +208,7 @@ class Vote extends Call { /// Weight: `O(R)` where R is the number of polls the voter delegating to has /// voted on. Weight is initially charged as if maximum votes, but is refunded later. class Delegate extends Call { - const Delegate({ - required this.class_, - required this.to, - required this.conviction, - required this.balance, - }); + const Delegate({required this.class_, required this.to, required this.conviction, required this.balance}); factory Delegate._decode(_i1.Input input) { return Delegate( @@ -299,13 +233,8 @@ class Delegate extends Call { @override Map> toJson() => { - 'delegate': { - 'class': class_, - 'to': to.toJson(), - 'conviction': conviction.toJson(), - 'balance': balance, - } - }; + 'delegate': {'class': class_, 'to': to.toJson(), 'conviction': conviction.toJson(), 'balance': balance}, + }; int _sizeHint() { int size = 1; @@ -317,34 +246,16 @@ class Delegate extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U16Codec.codec.encodeTo( - class_, - output, - ); - _i4.MultiAddress.codec.encodeTo( - to, - output, - ); - _i5.Conviction.codec.encodeTo( - conviction, - output, - ); - _i1.U128Codec.codec.encodeTo( - balance, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U16Codec.codec.encodeTo(class_, output); + _i4.MultiAddress.codec.encodeTo(to, output); + _i5.Conviction.codec.encodeTo(conviction, output); + _i1.U128Codec.codec.encodeTo(balance, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Delegate && other.class_ == class_ && other.to == to && @@ -352,12 +263,7 @@ class Delegate extends Call { other.balance == balance; @override - int get hashCode => Object.hash( - class_, - to, - conviction, - balance, - ); + int get hashCode => Object.hash(class_, to, conviction, balance); } /// Undelegate the voting power of the sending account for a particular class of polls. @@ -386,8 +292,8 @@ class Undelegate extends Call { @override Map> toJson() => { - 'undelegate': {'class': class_} - }; + 'undelegate': {'class': class_}, + }; int _sizeHint() { int size = 1; @@ -396,23 +302,12 @@ class Undelegate extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U16Codec.codec.encodeTo( - class_, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U16Codec.codec.encodeTo(class_, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Undelegate && other.class_ == class_; + bool operator ==(Object other) => identical(this, other) || other is Undelegate && other.class_ == class_; @override int get hashCode => class_.hashCode; @@ -428,16 +323,10 @@ class Undelegate extends Call { /// /// Weight: `O(R)` with R number of vote of target. class Unlock extends Call { - const Unlock({ - required this.class_, - required this.target, - }); + const Unlock({required this.class_, required this.target}); factory Unlock._decode(_i1.Input input) { - return Unlock( - class_: _i1.U16Codec.codec.decode(input), - target: _i4.MultiAddress.codec.decode(input), - ); + return Unlock(class_: _i1.U16Codec.codec.decode(input), target: _i4.MultiAddress.codec.decode(input)); } /// ClassOf @@ -448,11 +337,8 @@ class Unlock extends Call { @override Map> toJson() => { - 'unlock': { - 'class': class_, - 'target': target.toJson(), - } - }; + 'unlock': {'class': class_, 'target': target.toJson()}, + }; int _sizeHint() { int size = 1; @@ -462,33 +348,17 @@ class Unlock extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.U16Codec.codec.encodeTo( - class_, - output, - ); - _i4.MultiAddress.codec.encodeTo( - target, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.U16Codec.codec.encodeTo(class_, output); + _i4.MultiAddress.codec.encodeTo(target, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Unlock && other.class_ == class_ && other.target == target; + identical(this, other) || other is Unlock && other.class_ == class_ && other.target == target; @override - int get hashCode => Object.hash( - class_, - target, - ); + int get hashCode => Object.hash(class_, target); } /// Remove a vote for a poll. @@ -521,10 +391,7 @@ class Unlock extends Call { /// Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. /// Weight is calculated for the maximum number of vote. class RemoveVote extends Call { - const RemoveVote({ - this.class_, - required this.index, - }); + const RemoveVote({this.class_, required this.index}); factory RemoveVote._decode(_i1.Input input) { return RemoveVote( @@ -541,48 +408,28 @@ class RemoveVote extends Call { @override Map> toJson() => { - 'remove_vote': { - 'class': class_, - 'index': index, - } - }; + 'remove_vote': {'class': class_, 'index': index}, + }; int _sizeHint() { int size = 1; - size = - size + const _i1.OptionCodec(_i1.U16Codec.codec).sizeHint(class_); + size = size + const _i1.OptionCodec(_i1.U16Codec.codec).sizeHint(class_); size = size + _i1.U32Codec.codec.sizeHint(index); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.OptionCodec(_i1.U16Codec.codec).encodeTo( - class_, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.OptionCodec(_i1.U16Codec.codec).encodeTo(class_, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RemoveVote && other.class_ == class_ && other.index == index; + identical(this, other) || other is RemoveVote && other.class_ == class_ && other.index == index; @override - int get hashCode => Object.hash( - class_, - index, - ); + int get hashCode => Object.hash(class_, index); } /// Remove a vote for a poll. @@ -602,11 +449,7 @@ class RemoveVote extends Call { /// Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. /// Weight is calculated for the maximum number of vote. class RemoveOtherVote extends Call { - const RemoveOtherVote({ - required this.target, - required this.class_, - required this.index, - }); + const RemoveOtherVote({required this.target, required this.class_, required this.index}); factory RemoveOtherVote._decode(_i1.Input input) { return RemoveOtherVote( @@ -627,12 +470,8 @@ class RemoveOtherVote extends Call { @override Map> toJson() => { - 'remove_other_vote': { - 'target': target.toJson(), - 'class': class_, - 'index': index, - } - }; + 'remove_other_vote': {'target': target.toJson(), 'class': class_, 'index': index}, + }; int _sizeHint() { int size = 1; @@ -643,39 +482,17 @@ class RemoveOtherVote extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i4.MultiAddress.codec.encodeTo( - target, - output, - ); - _i1.U16Codec.codec.encodeTo( - class_, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i4.MultiAddress.codec.encodeTo(target, output); + _i1.U16Codec.codec.encodeTo(class_, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RemoveOtherVote && - other.target == target && - other.class_ == class_ && - other.index == index; + identical(this, other) || + other is RemoveOtherVote && other.target == target && other.class_ == class_ && other.index == index; @override - int get hashCode => Object.hash( - target, - class_, - index, - ); + int get hashCode => Object.hash(target, class_, index); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/error.dart index 981b9bbc..783ece3d 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/error.dart @@ -42,10 +42,7 @@ enum Error { /// The class ID supplied is invalid. badClass('BadClass', 11); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -101,13 +98,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/event.dart index 1fa9b655..7f39dea3 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/pallet/event.dart @@ -35,60 +35,24 @@ abstract class Event { class $Event { const $Event(); - Delegated delegated( - _i3.AccountId32 value0, - _i3.AccountId32 value1, - int value2, - ) { - return Delegated( - value0, - value1, - value2, - ); + Delegated delegated(_i3.AccountId32 value0, _i3.AccountId32 value1, int value2) { + return Delegated(value0, value1, value2); } - Undelegated undelegated( - _i3.AccountId32 value0, - int value1, - ) { - return Undelegated( - value0, - value1, - ); + Undelegated undelegated(_i3.AccountId32 value0, int value1) { + return Undelegated(value0, value1); } - Voted voted({ - required _i3.AccountId32 who, - required _i4.AccountVote vote, - required int pollIndex, - }) { - return Voted( - who: who, - vote: vote, - pollIndex: pollIndex, - ); + Voted voted({required _i3.AccountId32 who, required _i4.AccountVote vote, required int pollIndex}) { + return Voted(who: who, vote: vote, pollIndex: pollIndex); } - VoteRemoved voteRemoved({ - required _i3.AccountId32 who, - required _i4.AccountVote vote, - required int pollIndex, - }) { - return VoteRemoved( - who: who, - vote: vote, - pollIndex: pollIndex, - ); + VoteRemoved voteRemoved({required _i3.AccountId32 who, required _i4.AccountVote vote, required int pollIndex}) { + return VoteRemoved(who: who, vote: vote, pollIndex: pollIndex); } - VoteUnlocked voteUnlocked({ - required _i3.AccountId32 who, - required int class_, - }) { - return VoteUnlocked( - who: who, - class_: class_, - ); + VoteUnlocked voteUnlocked({required _i3.AccountId32 who, required int class_}) { + return VoteUnlocked(who: who, class_: class_); } } @@ -115,10 +79,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case Delegated: (value as Delegated).encodeTo(output); @@ -136,8 +97,7 @@ class $EventCodec with _i1.Codec { (value as VoteUnlocked).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -155,19 +115,14 @@ class $EventCodec with _i1.Codec { case VoteUnlocked: return (value as VoteUnlocked)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// An account has delegated their vote to another account. \[who, target\] class Delegated extends Event { - const Delegated( - this.value0, - this.value1, - this.value2, - ); + const Delegated(this.value0, this.value1, this.value2); factory Delegated._decode(_i1.Input input) { return Delegated( @@ -188,12 +143,8 @@ class Delegated extends Event { @override Map> toJson() => { - 'Delegated': [ - value0.toList(), - value1.toList(), - value2, - ] - }; + 'Delegated': [value0.toList(), value1.toList(), value2], + }; int _sizeHint() { int size = 1; @@ -204,61 +155,30 @@ class Delegated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - value0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - value1, - output, - ); - _i1.U16Codec.codec.encodeTo( - value2, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(value0, output); + const _i1.U8ArrayCodec(32).encodeTo(value1, output); + _i1.U16Codec.codec.encodeTo(value2, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Delegated && - _i5.listsEqual( - other.value0, - value0, - ) && - _i5.listsEqual( - other.value1, - value1, - ) && + _i5.listsEqual(other.value0, value0) && + _i5.listsEqual(other.value1, value1) && other.value2 == value2; @override - int get hashCode => Object.hash( - value0, - value1, - value2, - ); + int get hashCode => Object.hash(value0, value1, value2); } /// An \[account\] has cancelled a previous delegation operation. class Undelegated extends Event { - const Undelegated( - this.value0, - this.value1, - ); + const Undelegated(this.value0, this.value1); factory Undelegated._decode(_i1.Input input) { - return Undelegated( - const _i1.U8ArrayCodec(32).decode(input), - _i1.U16Codec.codec.decode(input), - ); + return Undelegated(const _i1.U8ArrayCodec(32).decode(input), _i1.U16Codec.codec.decode(input)); } /// T::AccountId @@ -269,11 +189,8 @@ class Undelegated extends Event { @override Map> toJson() => { - 'Undelegated': [ - value0.toList(), - value1, - ] - }; + 'Undelegated': [value0.toList(), value1], + }; int _sizeHint() { int size = 1; @@ -283,47 +200,22 @@ class Undelegated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - value0, - output, - ); - _i1.U16Codec.codec.encodeTo( - value1, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(value0, output); + _i1.U16Codec.codec.encodeTo(value1, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Undelegated && - _i5.listsEqual( - other.value0, - value0, - ) && - other.value1 == value1; + identical(this, other) || other is Undelegated && _i5.listsEqual(other.value0, value0) && other.value1 == value1; @override - int get hashCode => Object.hash( - value0, - value1, - ); + int get hashCode => Object.hash(value0, value1); } /// An account has voted class Voted extends Event { - const Voted({ - required this.who, - required this.vote, - required this.pollIndex, - }); + const Voted({required this.who, required this.vote, required this.pollIndex}); factory Voted._decode(_i1.Input input) { return Voted( @@ -344,12 +236,8 @@ class Voted extends Event { @override Map> toJson() => { - 'Voted': { - 'who': who.toList(), - 'vote': vote.toJson(), - 'pollIndex': pollIndex, - } - }; + 'Voted': {'who': who.toList(), 'vote': vote.toJson(), 'pollIndex': pollIndex}, + }; int _sizeHint() { int size = 1; @@ -360,53 +248,24 @@ class Voted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i4.AccountVote.codec.encodeTo( - vote, - output, - ); - _i1.U32Codec.codec.encodeTo( - pollIndex, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i4.AccountVote.codec.encodeTo(vote, output); + _i1.U32Codec.codec.encodeTo(pollIndex, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Voted && - _i5.listsEqual( - other.who, - who, - ) && - other.vote == vote && - other.pollIndex == pollIndex; + identical(this, other) || + other is Voted && _i5.listsEqual(other.who, who) && other.vote == vote && other.pollIndex == pollIndex; @override - int get hashCode => Object.hash( - who, - vote, - pollIndex, - ); + int get hashCode => Object.hash(who, vote, pollIndex); } /// A vote has been removed class VoteRemoved extends Event { - const VoteRemoved({ - required this.who, - required this.vote, - required this.pollIndex, - }); + const VoteRemoved({required this.who, required this.vote, required this.pollIndex}); factory VoteRemoved._decode(_i1.Input input) { return VoteRemoved( @@ -427,12 +286,8 @@ class VoteRemoved extends Event { @override Map> toJson() => { - 'VoteRemoved': { - 'who': who.toList(), - 'vote': vote.toJson(), - 'pollIndex': pollIndex, - } - }; + 'VoteRemoved': {'who': who.toList(), 'vote': vote.toJson(), 'pollIndex': pollIndex}, + }; int _sizeHint() { int size = 1; @@ -443,58 +298,27 @@ class VoteRemoved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i4.AccountVote.codec.encodeTo( - vote, - output, - ); - _i1.U32Codec.codec.encodeTo( - pollIndex, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i4.AccountVote.codec.encodeTo(vote, output); + _i1.U32Codec.codec.encodeTo(pollIndex, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is VoteRemoved && - _i5.listsEqual( - other.who, - who, - ) && - other.vote == vote && - other.pollIndex == pollIndex; + identical(this, other) || + other is VoteRemoved && _i5.listsEqual(other.who, who) && other.vote == vote && other.pollIndex == pollIndex; @override - int get hashCode => Object.hash( - who, - vote, - pollIndex, - ); + int get hashCode => Object.hash(who, vote, pollIndex); } /// The lockup period of a conviction vote expired, and the funds have been unlocked. class VoteUnlocked extends Event { - const VoteUnlocked({ - required this.who, - required this.class_, - }); + const VoteUnlocked({required this.who, required this.class_}); factory VoteUnlocked._decode(_i1.Input input) { - return VoteUnlocked( - who: const _i1.U8ArrayCodec(32).decode(input), - class_: _i1.U16Codec.codec.decode(input), - ); + return VoteUnlocked(who: const _i1.U8ArrayCodec(32).decode(input), class_: _i1.U16Codec.codec.decode(input)); } /// T::AccountId @@ -505,11 +329,8 @@ class VoteUnlocked extends Event { @override Map> toJson() => { - 'VoteUnlocked': { - 'who': who.toList(), - 'class': class_, - } - }; + 'VoteUnlocked': {'who': who.toList(), 'class': class_}, + }; int _sizeHint() { int size = 1; @@ -519,36 +340,15 @@ class VoteUnlocked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U16Codec.codec.encodeTo( - class_, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U16Codec.codec.encodeTo(class_, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is VoteUnlocked && - _i5.listsEqual( - other.who, - who, - ) && - other.class_ == class_; + identical(this, other) || other is VoteUnlocked && _i5.listsEqual(other.who, who) && other.class_ == class_; @override - int get hashCode => Object.hash( - who, - class_, - ); + int get hashCode => Object.hash(who, class_); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/delegations.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/delegations.dart index 8c818a91..fdac6304 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/delegations.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/delegations.dart @@ -4,10 +4,7 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class Delegations { - const Delegations({ - required this.votes, - required this.capital, - }); + const Delegations({required this.votes, required this.capital}); factory Delegations.decode(_i1.Input input) { return codec.decode(input); @@ -25,50 +22,28 @@ class Delegations { return codec.encode(this); } - Map toJson() => { - 'votes': votes, - 'capital': capital, - }; + Map toJson() => {'votes': votes, 'capital': capital}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Delegations && other.votes == votes && other.capital == capital; + identical(this, other) || other is Delegations && other.votes == votes && other.capital == capital; @override - int get hashCode => Object.hash( - votes, - capital, - ); + int get hashCode => Object.hash(votes, capital); } class $DelegationsCodec with _i1.Codec { const $DelegationsCodec(); @override - void encodeTo( - Delegations obj, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - obj.votes, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.capital, - output, - ); + void encodeTo(Delegations obj, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(obj.votes, output); + _i1.U128Codec.codec.encodeTo(obj.capital, output); } @override Delegations decode(_i1.Input input) { - return Delegations( - votes: _i1.U128Codec.codec.decode(input), - capital: _i1.U128Codec.codec.decode(input), - ); + return Delegations(votes: _i1.U128Codec.codec.decode(input), capital: _i1.U128Codec.codec.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/tally.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/tally.dart index a5a4d7bf..6b84fb7d 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/tally.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/types/tally.dart @@ -4,11 +4,7 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class Tally { - const Tally({ - required this.ayes, - required this.nays, - required this.support, - }); + const Tally({required this.ayes, required this.nays, required this.support}); factory Tally.decode(_i1.Input input) { return codec.decode(input); @@ -29,51 +25,24 @@ class Tally { return codec.encode(this); } - Map toJson() => { - 'ayes': ayes, - 'nays': nays, - 'support': support, - }; + Map toJson() => {'ayes': ayes, 'nays': nays, 'support': support}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Tally && - other.ayes == ayes && - other.nays == nays && - other.support == support; + identical(this, other) || other is Tally && other.ayes == ayes && other.nays == nays && other.support == support; @override - int get hashCode => Object.hash( - ayes, - nays, - support, - ); + int get hashCode => Object.hash(ayes, nays, support); } class $TallyCodec with _i1.Codec { const $TallyCodec(); @override - void encodeTo( - Tally obj, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - obj.ayes, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.nays, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.support, - output, - ); + void encodeTo(Tally obj, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(obj.ayes, output); + _i1.U128Codec.codec.encodeTo(obj.nays, output); + _i1.U128Codec.codec.encodeTo(obj.support, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/account_vote.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/account_vote.dart index 3614ca52..c0f7997b 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/account_vote.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/account_vote.dart @@ -32,36 +32,16 @@ abstract class AccountVote { class $AccountVote { const $AccountVote(); - Standard standard({ - required _i3.Vote vote, - required BigInt balance, - }) { - return Standard( - vote: vote, - balance: balance, - ); + Standard standard({required _i3.Vote vote, required BigInt balance}) { + return Standard(vote: vote, balance: balance); } - Split split({ - required BigInt aye, - required BigInt nay, - }) { - return Split( - aye: aye, - nay: nay, - ); + Split split({required BigInt aye, required BigInt nay}) { + return Split(aye: aye, nay: nay); } - SplitAbstain splitAbstain({ - required BigInt aye, - required BigInt nay, - required BigInt abstain, - }) { - return SplitAbstain( - aye: aye, - nay: nay, - abstain: abstain, - ); + SplitAbstain splitAbstain({required BigInt aye, required BigInt nay, required BigInt abstain}) { + return SplitAbstain(aye: aye, nay: nay, abstain: abstain); } } @@ -84,10 +64,7 @@ class $AccountVoteCodec with _i1.Codec { } @override - void encodeTo( - AccountVote value, - _i1.Output output, - ) { + void encodeTo(AccountVote value, _i1.Output output) { switch (value.runtimeType) { case Standard: (value as Standard).encodeTo(output); @@ -99,8 +76,7 @@ class $AccountVoteCodec with _i1.Codec { (value as SplitAbstain).encodeTo(output); break; default: - throw Exception( - 'AccountVote: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('AccountVote: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -114,23 +90,16 @@ class $AccountVoteCodec with _i1.Codec { case SplitAbstain: return (value as SplitAbstain)._sizeHint(); default: - throw Exception( - 'AccountVote: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('AccountVote: Unsupported "$value" of type "${value.runtimeType}"'); } } } class Standard extends AccountVote { - const Standard({ - required this.vote, - required this.balance, - }); + const Standard({required this.vote, required this.balance}); factory Standard._decode(_i1.Input input) { - return Standard( - vote: _i1.U8Codec.codec.decode(input), - balance: _i1.U128Codec.codec.decode(input), - ); + return Standard(vote: _i1.U8Codec.codec.decode(input), balance: _i1.U128Codec.codec.decode(input)); } /// Vote @@ -141,11 +110,8 @@ class Standard extends AccountVote { @override Map> toJson() => { - 'Standard': { - 'vote': vote, - 'balance': balance, - } - }; + 'Standard': {'vote': vote, 'balance': balance}, + }; int _sizeHint() { int size = 1; @@ -155,46 +121,24 @@ class Standard extends AccountVote { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U8Codec.codec.encodeTo( - vote, - output, - ); - _i1.U128Codec.codec.encodeTo( - balance, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8Codec.codec.encodeTo(vote, output); + _i1.U128Codec.codec.encodeTo(balance, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Standard && other.vote == vote && other.balance == balance; + identical(this, other) || other is Standard && other.vote == vote && other.balance == balance; @override - int get hashCode => Object.hash( - vote, - balance, - ); + int get hashCode => Object.hash(vote, balance); } class Split extends AccountVote { - const Split({ - required this.aye, - required this.nay, - }); + const Split({required this.aye, required this.nay}); factory Split._decode(_i1.Input input) { - return Split( - aye: _i1.U128Codec.codec.decode(input), - nay: _i1.U128Codec.codec.decode(input), - ); + return Split(aye: _i1.U128Codec.codec.decode(input), nay: _i1.U128Codec.codec.decode(input)); } /// Balance @@ -205,11 +149,8 @@ class Split extends AccountVote { @override Map> toJson() => { - 'Split': { - 'aye': aye, - 'nay': nay, - } - }; + 'Split': {'aye': aye, 'nay': nay}, + }; int _sizeHint() { int size = 1; @@ -219,41 +160,20 @@ class Split extends AccountVote { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U128Codec.codec.encodeTo( - aye, - output, - ); - _i1.U128Codec.codec.encodeTo( - nay, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U128Codec.codec.encodeTo(aye, output); + _i1.U128Codec.codec.encodeTo(nay, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Split && other.aye == aye && other.nay == nay; + bool operator ==(Object other) => identical(this, other) || other is Split && other.aye == aye && other.nay == nay; @override - int get hashCode => Object.hash( - aye, - nay, - ); + int get hashCode => Object.hash(aye, nay); } class SplitAbstain extends AccountVote { - const SplitAbstain({ - required this.aye, - required this.nay, - required this.abstain, - }); + const SplitAbstain({required this.aye, required this.nay, required this.abstain}); factory SplitAbstain._decode(_i1.Input input) { return SplitAbstain( @@ -274,12 +194,8 @@ class SplitAbstain extends AccountVote { @override Map> toJson() => { - 'SplitAbstain': { - 'aye': aye, - 'nay': nay, - 'abstain': abstain, - } - }; + 'SplitAbstain': {'aye': aye, 'nay': nay, 'abstain': abstain}, + }; int _sizeHint() { int size = 1; @@ -290,39 +206,17 @@ class SplitAbstain extends AccountVote { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U128Codec.codec.encodeTo( - aye, - output, - ); - _i1.U128Codec.codec.encodeTo( - nay, - output, - ); - _i1.U128Codec.codec.encodeTo( - abstain, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U128Codec.codec.encodeTo(aye, output); + _i1.U128Codec.codec.encodeTo(nay, output); + _i1.U128Codec.codec.encodeTo(abstain, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SplitAbstain && - other.aye == aye && - other.nay == nay && - other.abstain == abstain; + identical(this, other) || + other is SplitAbstain && other.aye == aye && other.nay == nay && other.abstain == abstain; @override - int get hashCode => Object.hash( - aye, - nay, - abstain, - ); + int get hashCode => Object.hash(aye, nay, abstain); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/casting.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/casting.dart index 6313a889..851190cf 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/casting.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/casting.dart @@ -10,11 +10,7 @@ import 'account_vote.dart' as _i3; import 'prior_lock.dart' as _i5; class Casting { - const Casting({ - required this.votes, - required this.delegations, - required this.prior, - }); + const Casting({required this.votes, required this.delegations, required this.prior}); factory Casting.decode(_i1.Input input) { return codec.decode(input); @@ -36,72 +32,41 @@ class Casting { } Map toJson() => { - 'votes': votes - .map((value) => [ - value.value0, - value.value1.toJson(), - ]) - .toList(), - 'delegations': delegations.toJson(), - 'prior': prior.toJson(), - }; + 'votes': votes.map((value) => [value.value0, value.value1.toJson()]).toList(), + 'delegations': delegations.toJson(), + 'prior': prior.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Casting && - _i7.listsEqual( - other.votes, - votes, - ) && + _i7.listsEqual(other.votes, votes) && other.delegations == delegations && other.prior == prior; @override - int get hashCode => Object.hash( - votes, - delegations, - prior, - ); + int get hashCode => Object.hash(votes, delegations, prior); } class $CastingCodec with _i1.Codec { const $CastingCodec(); @override - void encodeTo( - Casting obj, - _i1.Output output, - ) { + void encodeTo(Casting obj, _i1.Output output) { const _i1.SequenceCodec<_i2.Tuple2>( - _i2.Tuple2Codec( - _i1.U32Codec.codec, - _i3.AccountVote.codec, - )).encodeTo( - obj.votes, - output, - ); - _i4.Delegations.codec.encodeTo( - obj.delegations, - output, - ); - _i5.PriorLock.codec.encodeTo( - obj.prior, - output, - ); + _i2.Tuple2Codec(_i1.U32Codec.codec, _i3.AccountVote.codec), + ).encodeTo(obj.votes, output); + _i4.Delegations.codec.encodeTo(obj.delegations, output); + _i5.PriorLock.codec.encodeTo(obj.prior, output); } @override Casting decode(_i1.Input input) { return Casting( votes: const _i1.SequenceCodec<_i2.Tuple2>( - _i2.Tuple2Codec( - _i1.U32Codec.codec, - _i3.AccountVote.codec, - )).decode(input), + _i2.Tuple2Codec(_i1.U32Codec.codec, _i3.AccountVote.codec), + ).decode(input), delegations: _i4.Delegations.codec.decode(input), prior: _i5.PriorLock.codec.decode(input), ); @@ -110,12 +75,11 @@ class $CastingCodec with _i1.Codec { @override int sizeHint(Casting obj) { int size = 0; - size = size + + size = + size + const _i1.SequenceCodec<_i2.Tuple2>( - _i2.Tuple2Codec( - _i1.U32Codec.codec, - _i3.AccountVote.codec, - )).sizeHint(obj.votes); + _i2.Tuple2Codec(_i1.U32Codec.codec, _i3.AccountVote.codec), + ).sizeHint(obj.votes); size = size + _i4.Delegations.codec.sizeHint(obj.delegations); size = size + _i5.PriorLock.codec.sizeHint(obj.prior); return size; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/delegating.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/delegating.dart index 66cc48bd..c18056c7 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/delegating.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/delegating.dart @@ -44,67 +44,37 @@ class Delegating { } Map toJson() => { - 'balance': balance, - 'target': target.toList(), - 'conviction': conviction.toJson(), - 'delegations': delegations.toJson(), - 'prior': prior.toJson(), - }; + 'balance': balance, + 'target': target.toList(), + 'conviction': conviction.toJson(), + 'delegations': delegations.toJson(), + 'prior': prior.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Delegating && other.balance == balance && - _i7.listsEqual( - other.target, - target, - ) && + _i7.listsEqual(other.target, target) && other.conviction == conviction && other.delegations == delegations && other.prior == prior; @override - int get hashCode => Object.hash( - balance, - target, - conviction, - delegations, - prior, - ); + int get hashCode => Object.hash(balance, target, conviction, delegations, prior); } class $DelegatingCodec with _i1.Codec { const $DelegatingCodec(); @override - void encodeTo( - Delegating obj, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - obj.balance, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - obj.target, - output, - ); - _i3.Conviction.codec.encodeTo( - obj.conviction, - output, - ); - _i4.Delegations.codec.encodeTo( - obj.delegations, - output, - ); - _i5.PriorLock.codec.encodeTo( - obj.prior, - output, - ); + void encodeTo(Delegating obj, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(obj.balance, output); + const _i1.U8ArrayCodec(32).encodeTo(obj.target, output); + _i3.Conviction.codec.encodeTo(obj.conviction, output); + _i4.Delegations.codec.encodeTo(obj.delegations, output); + _i5.PriorLock.codec.encodeTo(obj.prior, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/prior_lock.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/prior_lock.dart index ff2043cb..34b7627f 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/prior_lock.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/prior_lock.dart @@ -4,10 +4,7 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class PriorLock { - const PriorLock( - this.value0, - this.value1, - ); + const PriorLock(this.value0, this.value1); factory PriorLock.decode(_i1.Input input) { return codec.decode(input); @@ -25,50 +22,28 @@ class PriorLock { return codec.encode(this); } - List toJson() => [ - value0, - value1, - ]; + List toJson() => [value0, value1]; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is PriorLock && other.value0 == value0 && other.value1 == value1; + identical(this, other) || other is PriorLock && other.value0 == value0 && other.value1 == value1; @override - int get hashCode => Object.hash( - value0, - value1, - ); + int get hashCode => Object.hash(value0, value1); } class $PriorLockCodec with _i1.Codec { const $PriorLockCodec(); @override - void encodeTo( - PriorLock obj, - _i1.Output output, - ) { - _i1.U32Codec.codec.encodeTo( - obj.value0, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.value1, - output, - ); + void encodeTo(PriorLock obj, _i1.Output output) { + _i1.U32Codec.codec.encodeTo(obj.value0, output); + _i1.U128Codec.codec.encodeTo(obj.value1, output); } @override PriorLock decode(_i1.Input input) { - return PriorLock( - _i1.U32Codec.codec.decode(input), - _i1.U128Codec.codec.decode(input), - ); + return PriorLock(_i1.U32Codec.codec.decode(input), _i1.U128Codec.codec.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/vote.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/vote.dart index 992c5dbc..c78cd6dc 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/vote.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/vote.dart @@ -12,14 +12,8 @@ class VoteCodec with _i1.Codec { } @override - void encodeTo( - Vote value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value, - output, - ); + void encodeTo(Vote value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/voting.dart b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/voting.dart index c520bab0..4c150bb6 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/voting.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_conviction_voting/vote/voting.dart @@ -59,10 +59,7 @@ class $VotingCodec with _i1.Codec { } @override - void encodeTo( - Voting value, - _i1.Output output, - ) { + void encodeTo(Voting value, _i1.Output output) { switch (value.runtimeType) { case Casting: (value as Casting).encodeTo(output); @@ -71,8 +68,7 @@ class $VotingCodec with _i1.Codec { (value as Delegating).encodeTo(output); break; default: - throw Exception( - 'Voting: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Voting: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -84,8 +80,7 @@ class $VotingCodec with _i1.Codec { case Delegating: return (value as Delegating)._sizeHint(); default: - throw Exception( - 'Voting: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Voting: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -110,23 +105,12 @@ class Casting extends Voting { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.Casting.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.Casting.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Casting && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Casting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -152,23 +136,12 @@ class Delegating extends Voting { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i4.Delegating.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i4.Delegating.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Delegating && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Delegating && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_mining_rewards/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_mining_rewards/pallet/event.dart index 682765a1..125bb42f 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_mining_rewards/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_mining_rewards/pallet/event.dart @@ -34,38 +34,20 @@ abstract class Event { class $Event { const $Event(); - MinerRewarded minerRewarded({ - required _i3.AccountId32 miner, - required BigInt reward, - }) { - return MinerRewarded( - miner: miner, - reward: reward, - ); + MinerRewarded minerRewarded({required _i3.AccountId32 miner, required BigInt reward}) { + return MinerRewarded(miner: miner, reward: reward); } - FeesCollected feesCollected({ - required BigInt amount, - required BigInt total, - }) { - return FeesCollected( - amount: amount, - total: total, - ); + FeesCollected feesCollected({required BigInt amount, required BigInt total}) { + return FeesCollected(amount: amount, total: total); } TreasuryRewarded treasuryRewarded({required BigInt reward}) { return TreasuryRewarded(reward: reward); } - MinerRewardRedirected minerRewardRedirected({ - required _i3.AccountId32 miner, - required BigInt reward, - }) { - return MinerRewardRedirected( - miner: miner, - reward: reward, - ); + MinerRewardRedirected minerRewardRedirected({required _i3.AccountId32 miner, required BigInt reward}) { + return MinerRewardRedirected(miner: miner, reward: reward); } } @@ -90,10 +72,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case MinerRewarded: (value as MinerRewarded).encodeTo(output); @@ -108,8 +87,7 @@ class $EventCodec with _i1.Codec { (value as MinerRewardRedirected).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -125,24 +103,17 @@ class $EventCodec with _i1.Codec { case MinerRewardRedirected: return (value as MinerRewardRedirected)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A miner has been identified for a block class MinerRewarded extends Event { - const MinerRewarded({ - required this.miner, - required this.reward, - }); + const MinerRewarded({required this.miner, required this.reward}); factory MinerRewarded._decode(_i1.Input input) { - return MinerRewarded( - miner: const _i1.U8ArrayCodec(32).decode(input), - reward: _i1.U128Codec.codec.decode(input), - ); + return MinerRewarded(miner: const _i1.U8ArrayCodec(32).decode(input), reward: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -155,11 +126,8 @@ class MinerRewarded extends Event { @override Map> toJson() => { - 'MinerRewarded': { - 'miner': miner.toList(), - 'reward': reward, - } - }; + 'MinerRewarded': {'miner': miner.toList(), 'reward': reward}, + }; int _sizeHint() { int size = 1; @@ -169,52 +137,25 @@ class MinerRewarded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - miner, - output, - ); - _i1.U128Codec.codec.encodeTo( - reward, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(miner, output); + _i1.U128Codec.codec.encodeTo(reward, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MinerRewarded && - _i4.listsEqual( - other.miner, - miner, - ) && - other.reward == reward; + identical(this, other) || other is MinerRewarded && _i4.listsEqual(other.miner, miner) && other.reward == reward; @override - int get hashCode => Object.hash( - miner, - reward, - ); + int get hashCode => Object.hash(miner, reward); } /// Transaction fees were collected for later distribution class FeesCollected extends Event { - const FeesCollected({ - required this.amount, - required this.total, - }); + const FeesCollected({required this.amount, required this.total}); factory FeesCollected._decode(_i1.Input input) { - return FeesCollected( - amount: _i1.U128Codec.codec.decode(input), - total: _i1.U128Codec.codec.decode(input), - ); + return FeesCollected(amount: _i1.U128Codec.codec.decode(input), total: _i1.U128Codec.codec.decode(input)); } /// BalanceOf @@ -227,11 +168,8 @@ class FeesCollected extends Event { @override Map> toJson() => { - 'FeesCollected': { - 'amount': amount, - 'total': total, - } - }; + 'FeesCollected': {'amount': amount, 'total': total}, + }; int _sizeHint() { int size = 1; @@ -241,33 +179,17 @@ class FeesCollected extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); - _i1.U128Codec.codec.encodeTo( - total, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U128Codec.codec.encodeTo(total, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is FeesCollected && other.amount == amount && other.total == total; + identical(this, other) || other is FeesCollected && other.amount == amount && other.total == total; @override - int get hashCode => Object.hash( - amount, - total, - ); + int get hashCode => Object.hash(amount, total); } /// Rewards were sent to Treasury when no miner was specified @@ -284,8 +206,8 @@ class TreasuryRewarded extends Event { @override Map> toJson() => { - 'TreasuryRewarded': {'reward': reward} - }; + 'TreasuryRewarded': {'reward': reward}, + }; int _sizeHint() { int size = 1; @@ -294,23 +216,12 @@ class TreasuryRewarded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U128Codec.codec.encodeTo( - reward, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U128Codec.codec.encodeTo(reward, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TreasuryRewarded && other.reward == reward; + bool operator ==(Object other) => identical(this, other) || other is TreasuryRewarded && other.reward == reward; @override int get hashCode => reward.hashCode; @@ -318,10 +229,7 @@ class TreasuryRewarded extends Event { /// Miner reward was redirected to treasury due to mint failure class MinerRewardRedirected extends Event { - const MinerRewardRedirected({ - required this.miner, - required this.reward, - }); + const MinerRewardRedirected({required this.miner, required this.reward}); factory MinerRewardRedirected._decode(_i1.Input input) { return MinerRewardRedirected( @@ -340,11 +248,8 @@ class MinerRewardRedirected extends Event { @override Map> toJson() => { - 'MinerRewardRedirected': { - 'miner': miner.toList(), - 'reward': reward, - } - }; + 'MinerRewardRedirected': {'miner': miner.toList(), 'reward': reward}, + }; int _sizeHint() { int size = 1; @@ -354,36 +259,16 @@ class MinerRewardRedirected extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - miner, - output, - ); - _i1.U128Codec.codec.encodeTo( - reward, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(miner, output); + _i1.U128Codec.codec.encodeTo(reward, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MinerRewardRedirected && - _i4.listsEqual( - other.miner, - miner, - ) && - other.reward == reward; + identical(this, other) || + other is MinerRewardRedirected && _i4.listsEqual(other.miner, miner) && other.reward == reward; @override - int get hashCode => Object.hash( - miner, - reward, - ); + int get hashCode => Object.hash(miner, reward); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/multisig_data.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/multisig_data.dart index fbdcc78b..e13e63a3 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/multisig_data.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/multisig_data.dart @@ -4,8 +4,7 @@ import 'dart:typed_data' as _i4; import 'package:polkadart/scale_codec.dart' as _i1; import 'package:quiver/collection.dart' as _i5; -import '../bounded_collections/bounded_btree_map/bounded_b_tree_map.dart' - as _i3; +import '../bounded_collections/bounded_btree_map/bounded_b_tree_map.dart' as _i3; import '../sp_core/crypto/account_id32.dart' as _i2; import '../tuples.dart' as _i6; @@ -44,95 +43,51 @@ class MultisigData { } Map toJson() => { - 'creator': creator.toList(), - 'signers': signers.map((value) => value.toList()).toList(), - 'threshold': threshold, - 'proposalNonce': proposalNonce, - 'proposalsPerSigner': proposalsPerSigner - .map((value) => [ - value.value0.toList(), - value.value1, - ]) - .toList(), - }; + 'creator': creator.toList(), + 'signers': signers.map((value) => value.toList()).toList(), + 'threshold': threshold, + 'proposalNonce': proposalNonce, + 'proposalsPerSigner': proposalsPerSigner.map((value) => [value.value0.toList(), value.value1]).toList(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is MultisigData && - _i5.listsEqual( - other.creator, - creator, - ) && - _i5.listsEqual( - other.signers, - signers, - ) && + _i5.listsEqual(other.creator, creator) && + _i5.listsEqual(other.signers, signers) && other.threshold == threshold && other.proposalNonce == proposalNonce && other.proposalsPerSigner == proposalsPerSigner; @override - int get hashCode => Object.hash( - creator, - signers, - threshold, - proposalNonce, - proposalsPerSigner, - ); + int get hashCode => Object.hash(creator, signers, threshold, proposalNonce, proposalsPerSigner); } class $MultisigDataCodec with _i1.Codec { const $MultisigDataCodec(); @override - void encodeTo( - MultisigData obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - obj.creator, - output, - ); - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo( - obj.signers, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.threshold, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.proposalNonce, - output, - ); + void encodeTo(MultisigData obj, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(obj.creator, output); + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo(obj.signers, output); + _i1.U32Codec.codec.encodeTo(obj.threshold, output); + _i1.U32Codec.codec.encodeTo(obj.proposalNonce, output); const _i1.SequenceCodec<_i6.Tuple2<_i2.AccountId32, int>>( - _i6.Tuple2Codec<_i2.AccountId32, int>( - _i2.AccountId32Codec(), - _i1.U32Codec.codec, - )).encodeTo( - obj.proposalsPerSigner, - output, - ); + _i6.Tuple2Codec<_i2.AccountId32, int>(_i2.AccountId32Codec(), _i1.U32Codec.codec), + ).encodeTo(obj.proposalsPerSigner, output); } @override MultisigData decode(_i1.Input input) { return MultisigData( creator: const _i1.U8ArrayCodec(32).decode(input), - signers: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) - .decode(input), + signers: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).decode(input), threshold: _i1.U32Codec.codec.decode(input), proposalNonce: _i1.U32Codec.codec.decode(input), - proposalsPerSigner: - const _i1.SequenceCodec<_i6.Tuple2<_i2.AccountId32, int>>( - _i6.Tuple2Codec<_i2.AccountId32, int>( - _i2.AccountId32Codec(), - _i1.U32Codec.codec, - )).decode(input), + proposalsPerSigner: const _i1.SequenceCodec<_i6.Tuple2<_i2.AccountId32, int>>( + _i6.Tuple2Codec<_i2.AccountId32, int>(_i2.AccountId32Codec(), _i1.U32Codec.codec), + ).decode(input), ); } @@ -140,13 +95,10 @@ class $MultisigDataCodec with _i1.Codec { int sizeHint(MultisigData obj) { int size = 0; size = size + const _i2.AccountId32Codec().sizeHint(obj.creator); - size = size + - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) - .sizeHint(obj.signers); + size = size + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).sizeHint(obj.signers); size = size + _i1.U32Codec.codec.sizeHint(obj.threshold); size = size + _i1.U32Codec.codec.sizeHint(obj.proposalNonce); - size = size + - const _i3.BoundedBTreeMapCodec().sizeHint(obj.proposalsPerSigner); + size = size + const _i3.BoundedBTreeMapCodec().sizeHint(obj.proposalsPerSigner); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/call.dart index d47a1a0c..e444f8dd 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/call.dart @@ -39,67 +39,31 @@ class $Call { required int threshold, required BigInt nonce, }) { - return CreateMultisig( - signers: signers, - threshold: threshold, - nonce: nonce, - ); + return CreateMultisig(signers: signers, threshold: threshold, nonce: nonce); } - Propose propose({ - required _i3.AccountId32 multisigAddress, - required List call, - required int expiry, - }) { - return Propose( - multisigAddress: multisigAddress, - call: call, - expiry: expiry, - ); + Propose propose({required _i3.AccountId32 multisigAddress, required List call, required int expiry}) { + return Propose(multisigAddress: multisigAddress, call: call, expiry: expiry); } - Approve approve({ - required _i3.AccountId32 multisigAddress, - required int proposalId, - }) { - return Approve( - multisigAddress: multisigAddress, - proposalId: proposalId, - ); + Approve approve({required _i3.AccountId32 multisigAddress, required int proposalId}) { + return Approve(multisigAddress: multisigAddress, proposalId: proposalId); } - Cancel cancel({ - required _i3.AccountId32 multisigAddress, - required int proposalId, - }) { - return Cancel( - multisigAddress: multisigAddress, - proposalId: proposalId, - ); + Cancel cancel({required _i3.AccountId32 multisigAddress, required int proposalId}) { + return Cancel(multisigAddress: multisigAddress, proposalId: proposalId); } - RemoveExpired removeExpired({ - required _i3.AccountId32 multisigAddress, - required int proposalId, - }) { - return RemoveExpired( - multisigAddress: multisigAddress, - proposalId: proposalId, - ); + RemoveExpired removeExpired({required _i3.AccountId32 multisigAddress, required int proposalId}) { + return RemoveExpired(multisigAddress: multisigAddress, proposalId: proposalId); } ClaimDeposits claimDeposits({required _i3.AccountId32 multisigAddress}) { return ClaimDeposits(multisigAddress: multisigAddress); } - Execute execute({ - required _i3.AccountId32 multisigAddress, - required int proposalId, - }) { - return Execute( - multisigAddress: multisigAddress, - proposalId: proposalId, - ); + Execute execute({required _i3.AccountId32 multisigAddress, required int proposalId}) { + return Execute(multisigAddress: multisigAddress, proposalId: proposalId); } } @@ -130,10 +94,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case CreateMultisig: (value as CreateMultisig).encodeTo(output); @@ -157,8 +118,7 @@ class $CallCodec with _i1.Codec { (value as Execute).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -180,8 +140,7 @@ class $CallCodec with _i1.Codec { case Execute: return (value as Execute)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -201,16 +160,11 @@ class $CallCodec with _i1.Codec { /// Economic costs: /// - MultisigFee: burned immediately (spam prevention) class CreateMultisig extends Call { - const CreateMultisig({ - required this.signers, - required this.threshold, - required this.nonce, - }); + const CreateMultisig({required this.signers, required this.threshold, required this.nonce}); factory CreateMultisig._decode(_i1.Input input) { return CreateMultisig( - signers: const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) - .decode(input), + signers: const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).decode(input), threshold: _i1.U32Codec.codec.decode(input), nonce: _i1.U64Codec.codec.decode(input), ); @@ -227,62 +181,38 @@ class CreateMultisig extends Call { @override Map> toJson() => { - 'create_multisig': { - 'signers': signers.map((value) => value.toList()).toList(), - 'threshold': threshold, - 'nonce': nonce, - } - }; + 'create_multisig': { + 'signers': signers.map((value) => value.toList()).toList(), + 'threshold': threshold, + 'nonce': nonce, + }, + }; int _sizeHint() { int size = 1; - size = size + - const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) - .sizeHint(signers); + size = size + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).sizeHint(signers); size = size + _i1.U32Codec.codec.sizeHint(threshold); size = size + _i1.U64Codec.codec.sizeHint(nonce); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo( - signers, - output, - ); - _i1.U32Codec.codec.encodeTo( - threshold, - output, - ); - _i1.U64Codec.codec.encodeTo( - nonce, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo(signers, output); + _i1.U32Codec.codec.encodeTo(threshold, output); + _i1.U64Codec.codec.encodeTo(nonce, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is CreateMultisig && - _i4.listsEqual( - other.signers, - signers, - ) && + _i4.listsEqual(other.signers, signers) && other.threshold == threshold && other.nonce == nonce; @override - int get hashCode => Object.hash( - signers, - threshold, - nonce, - ); + int get hashCode => Object.hash(signers, threshold, nonce); } /// Propose a transaction to be executed by the multisig @@ -302,11 +232,7 @@ class CreateMultisig extends Call { /// **Weight:** Charged upfront for worst-case (high-security path with decode). /// Refunded to actual cost on success based on whether HS path was taken. class Propose extends Call { - const Propose({ - required this.multisigAddress, - required this.call, - required this.expiry, - }); + const Propose({required this.multisigAddress, required this.call, required this.expiry}); factory Propose._decode(_i1.Input input) { return Propose( @@ -327,12 +253,8 @@ class Propose extends Call { @override Map> toJson() => { - 'propose': { - 'multisigAddress': multisigAddress.toList(), - 'call': call, - 'expiry': expiry, - } - }; + 'propose': {'multisigAddress': multisigAddress.toList(), 'call': call, 'expiry': expiry}, + }; int _sizeHint() { int size = 1; @@ -343,47 +265,22 @@ class Propose extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - call, - output, - ); - _i1.U32Codec.codec.encodeTo( - expiry, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + _i1.U8SequenceCodec.codec.encodeTo(call, output); + _i1.U32Codec.codec.encodeTo(expiry, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Propose && - _i4.listsEqual( - other.multisigAddress, - multisigAddress, - ) && - _i4.listsEqual( - other.call, - call, - ) && + _i4.listsEqual(other.multisigAddress, multisigAddress) && + _i4.listsEqual(other.call, call) && other.expiry == expiry; @override - int get hashCode => Object.hash( - multisigAddress, - call, - expiry, - ); + int get hashCode => Object.hash(multisigAddress, call, expiry); } /// Approve a proposed transaction @@ -397,10 +294,7 @@ class Propose extends Call { /// /// Weight: Charges for MAX call size, refunds based on actual class Approve extends Call { - const Approve({ - required this.multisigAddress, - required this.proposalId, - }); + const Approve({required this.multisigAddress, required this.proposalId}); factory Approve._decode(_i1.Input input) { return Approve( @@ -417,11 +311,8 @@ class Approve extends Call { @override Map> toJson() => { - 'approve': { - 'multisigAddress': multisigAddress.toList(), - 'proposalId': proposalId, - } - }; + 'approve': {'multisigAddress': multisigAddress.toList(), 'proposalId': proposalId}, + }; int _sizeHint() { int size = 1; @@ -431,38 +322,18 @@ class Approve extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalId, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + _i1.U32Codec.codec.encodeTo(proposalId, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Approve && - _i4.listsEqual( - other.multisigAddress, - multisigAddress, - ) && - other.proposalId == proposalId; + identical(this, other) || + other is Approve && _i4.listsEqual(other.multisigAddress, multisigAddress) && other.proposalId == proposalId; @override - int get hashCode => Object.hash( - multisigAddress, - proposalId, - ); + int get hashCode => Object.hash(multisigAddress, proposalId); } /// Cancel a proposed transaction (only by proposer) @@ -471,10 +342,7 @@ class Approve extends Call { /// - `multisig_address`: The multisig account /// - `proposal_id`: ID (nonce) of the proposal to cancel class Cancel extends Call { - const Cancel({ - required this.multisigAddress, - required this.proposalId, - }); + const Cancel({required this.multisigAddress, required this.proposalId}); factory Cancel._decode(_i1.Input input) { return Cancel( @@ -491,11 +359,8 @@ class Cancel extends Call { @override Map> toJson() => { - 'cancel': { - 'multisigAddress': multisigAddress.toList(), - 'proposalId': proposalId, - } - }; + 'cancel': {'multisigAddress': multisigAddress.toList(), 'proposalId': proposalId}, + }; int _sizeHint() { int size = 1; @@ -505,38 +370,18 @@ class Cancel extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalId, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + _i1.U32Codec.codec.encodeTo(proposalId, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Cancel && - _i4.listsEqual( - other.multisigAddress, - multisigAddress, - ) && - other.proposalId == proposalId; + identical(this, other) || + other is Cancel && _i4.listsEqual(other.multisigAddress, multisigAddress) && other.proposalId == proposalId; @override - int get hashCode => Object.hash( - multisigAddress, - proposalId, - ); + int get hashCode => Object.hash(multisigAddress, proposalId); } /// Remove expired proposals and return deposits to proposers @@ -551,10 +396,7 @@ class Cancel extends Call { /// /// The deposit is always returned to the original proposer, not the caller. class RemoveExpired extends Call { - const RemoveExpired({ - required this.multisigAddress, - required this.proposalId, - }); + const RemoveExpired({required this.multisigAddress, required this.proposalId}); factory RemoveExpired._decode(_i1.Input input) { return RemoveExpired( @@ -571,11 +413,8 @@ class RemoveExpired extends Call { @override Map> toJson() => { - 'remove_expired': { - 'multisigAddress': multisigAddress.toList(), - 'proposalId': proposalId, - } - }; + 'remove_expired': {'multisigAddress': multisigAddress.toList(), 'proposalId': proposalId}, + }; int _sizeHint() { int size = 1; @@ -585,38 +424,20 @@ class RemoveExpired extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalId, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + _i1.U32Codec.codec.encodeTo(proposalId, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is RemoveExpired && - _i4.listsEqual( - other.multisigAddress, - multisigAddress, - ) && + _i4.listsEqual(other.multisigAddress, multisigAddress) && other.proposalId == proposalId; @override - int get hashCode => Object.hash( - multisigAddress, - proposalId, - ); + int get hashCode => Object.hash(multisigAddress, proposalId); } /// Claim all deposits from expired proposals @@ -633,8 +454,7 @@ class ClaimDeposits extends Call { const ClaimDeposits({required this.multisigAddress}); factory ClaimDeposits._decode(_i1.Input input) { - return ClaimDeposits( - multisigAddress: const _i1.U8ArrayCodec(32).decode(input)); + return ClaimDeposits(multisigAddress: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AccountId @@ -642,8 +462,8 @@ class ClaimDeposits extends Call { @override Map>> toJson() => { - 'claim_deposits': {'multisigAddress': multisigAddress.toList()} - }; + 'claim_deposits': {'multisigAddress': multisigAddress.toList()}, + }; int _sizeHint() { int size = 1; @@ -652,27 +472,13 @@ class ClaimDeposits extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ClaimDeposits && - _i4.listsEqual( - other.multisigAddress, - multisigAddress, - ); + identical(this, other) || other is ClaimDeposits && _i4.listsEqual(other.multisigAddress, multisigAddress); @override int get hashCode => multisigAddress.hashCode; @@ -696,10 +502,7 @@ class ClaimDeposits extends Call { /// Actual weight is refunded based on the inner call's post-dispatch info. /// The inner call's weight is validated against MaxInnerCallWeight at propose time. class Execute extends Call { - const Execute({ - required this.multisigAddress, - required this.proposalId, - }); + const Execute({required this.multisigAddress, required this.proposalId}); factory Execute._decode(_i1.Input input) { return Execute( @@ -716,11 +519,8 @@ class Execute extends Call { @override Map> toJson() => { - 'execute': { - 'multisigAddress': multisigAddress.toList(), - 'proposalId': proposalId, - } - }; + 'execute': {'multisigAddress': multisigAddress.toList(), 'proposalId': proposalId}, + }; int _sizeHint() { int size = 1; @@ -730,36 +530,16 @@ class Execute extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalId, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + _i1.U32Codec.codec.encodeTo(proposalId, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Execute && - _i4.listsEqual( - other.multisigAddress, - multisigAddress, - ) && - other.proposalId == proposalId; + identical(this, other) || + other is Execute && _i4.listsEqual(other.multisigAddress, multisigAddress) && other.proposalId == proposalId; @override - int get hashCode => Object.hash( - multisigAddress, - proposalId, - ); + int get hashCode => Object.hash(multisigAddress, proposalId); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/error.dart index 28a293b1..43b01496 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/error.dart @@ -73,8 +73,7 @@ enum Error { proposalNotApproved('ProposalNotApproved', 21), /// Call is not allowed for high-security multisig - callNotAllowedForHighSecurityMultisig( - 'CallNotAllowedForHighSecurityMultisig', 22), + callNotAllowedForHighSecurityMultisig('CallNotAllowedForHighSecurityMultisig', 22), /// Proposal nonce exhausted (u32::MAX reached) proposalNonceExhausted('ProposalNonceExhausted', 23), @@ -82,10 +81,7 @@ enum Error { /// Call weight exceeds MaxInnerCallWeight limit callWeightExceedsLimit('CallWeightExceedsLimit', 24); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -167,13 +163,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/event.dart index 1d3b92fc..8c87a4c4 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/pallet/event.dart @@ -56,11 +56,7 @@ class $Event { required _i3.AccountId32 proposer, required int proposalId, }) { - return ProposalCreated( - multisigAddress: multisigAddress, - proposer: proposer, - proposalId: proposalId, - ); + return ProposalCreated(multisigAddress: multisigAddress, proposer: proposer, proposalId: proposalId); } SignerApproved signerApproved({ @@ -112,11 +108,7 @@ class $Event { required _i3.AccountId32 proposer, required int proposalId, }) { - return ProposalCancelled( - multisigAddress: multisigAddress, - proposer: proposer, - proposalId: proposalId, - ); + return ProposalCancelled(multisigAddress: multisigAddress, proposer: proposer, proposalId: proposalId); } ProposalRemoved proposalRemoved({ @@ -177,10 +169,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case MultisigCreated: (value as MultisigCreated).encodeTo(output); @@ -207,8 +196,7 @@ class $EventCodec with _i1.Codec { (value as DepositsClaimed).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -232,8 +220,7 @@ class $EventCodec with _i1.Codec { case DepositsClaimed: return (value as DepositsClaimed)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -253,8 +240,7 @@ class MultisigCreated extends Event { return MultisigCreated( creator: const _i1.U8ArrayCodec(32).decode(input), multisigAddress: const _i1.U8ArrayCodec(32).decode(input), - signers: const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) - .decode(input), + signers: const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).decode(input), threshold: _i1.U32Codec.codec.decode(input), nonce: _i1.U64Codec.codec.decode(input), ); @@ -277,93 +263,51 @@ class MultisigCreated extends Event { @override Map> toJson() => { - 'MultisigCreated': { - 'creator': creator.toList(), - 'multisigAddress': multisigAddress.toList(), - 'signers': signers.map((value) => value.toList()).toList(), - 'threshold': threshold, - 'nonce': nonce, - } - }; + 'MultisigCreated': { + 'creator': creator.toList(), + 'multisigAddress': multisigAddress.toList(), + 'signers': signers.map((value) => value.toList()).toList(), + 'threshold': threshold, + 'nonce': nonce, + }, + }; int _sizeHint() { int size = 1; size = size + const _i3.AccountId32Codec().sizeHint(creator); size = size + const _i3.AccountId32Codec().sizeHint(multisigAddress); - size = size + - const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) - .sizeHint(signers); + size = size + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).sizeHint(signers); size = size + _i1.U32Codec.codec.sizeHint(threshold); size = size + _i1.U64Codec.codec.sizeHint(nonce); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - creator, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo( - signers, - output, - ); - _i1.U32Codec.codec.encodeTo( - threshold, - output, - ); - _i1.U64Codec.codec.encodeTo( - nonce, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(creator, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo(signers, output); + _i1.U32Codec.codec.encodeTo(threshold, output); + _i1.U64Codec.codec.encodeTo(nonce, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is MultisigCreated && - _i5.listsEqual( - other.creator, - creator, - ) && - _i5.listsEqual( - other.multisigAddress, - multisigAddress, - ) && - _i5.listsEqual( - other.signers, - signers, - ) && + _i5.listsEqual(other.creator, creator) && + _i5.listsEqual(other.multisigAddress, multisigAddress) && + _i5.listsEqual(other.signers, signers) && other.threshold == threshold && other.nonce == nonce; @override - int get hashCode => Object.hash( - creator, - multisigAddress, - signers, - threshold, - nonce, - ); + int get hashCode => Object.hash(creator, multisigAddress, signers, threshold, nonce); } /// A proposal has been created class ProposalCreated extends Event { - const ProposalCreated({ - required this.multisigAddress, - required this.proposer, - required this.proposalId, - }); + const ProposalCreated({required this.multisigAddress, required this.proposer, required this.proposalId}); factory ProposalCreated._decode(_i1.Input input) { return ProposalCreated( @@ -384,12 +328,12 @@ class ProposalCreated extends Event { @override Map> toJson() => { - 'ProposalCreated': { - 'multisigAddress': multisigAddress.toList(), - 'proposer': proposer.toList(), - 'proposalId': proposalId, - } - }; + 'ProposalCreated': { + 'multisigAddress': multisigAddress.toList(), + 'proposer': proposer.toList(), + 'proposalId': proposalId, + }, + }; int _sizeHint() { int size = 1; @@ -400,47 +344,22 @@ class ProposalCreated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - proposer, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalId, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + const _i1.U8ArrayCodec(32).encodeTo(proposer, output); + _i1.U32Codec.codec.encodeTo(proposalId, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ProposalCreated && - _i5.listsEqual( - other.multisigAddress, - multisigAddress, - ) && - _i5.listsEqual( - other.proposer, - proposer, - ) && + _i5.listsEqual(other.multisigAddress, multisigAddress) && + _i5.listsEqual(other.proposer, proposer) && other.proposalId == proposalId; @override - int get hashCode => Object.hash( - multisigAddress, - proposer, - proposalId, - ); + int get hashCode => Object.hash(multisigAddress, proposer, proposalId); } /// A signer has approved a proposal (does not imply threshold reached) @@ -475,13 +394,13 @@ class SignerApproved extends Event { @override Map> toJson() => { - 'SignerApproved': { - 'multisigAddress': multisigAddress.toList(), - 'approver': approver.toList(), - 'proposalId': proposalId, - 'approvalsCount': approvalsCount, - } - }; + 'SignerApproved': { + 'multisigAddress': multisigAddress.toList(), + 'approver': approver.toList(), + 'proposalId': proposalId, + 'approvalsCount': approvalsCount, + }, + }; int _sizeHint() { int size = 1; @@ -493,62 +412,29 @@ class SignerApproved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - approver, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalId, - output, - ); - _i1.U32Codec.codec.encodeTo( - approvalsCount, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + const _i1.U8ArrayCodec(32).encodeTo(approver, output); + _i1.U32Codec.codec.encodeTo(proposalId, output); + _i1.U32Codec.codec.encodeTo(approvalsCount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is SignerApproved && - _i5.listsEqual( - other.multisigAddress, - multisigAddress, - ) && - _i5.listsEqual( - other.approver, - approver, - ) && + _i5.listsEqual(other.multisigAddress, multisigAddress) && + _i5.listsEqual(other.approver, approver) && other.proposalId == proposalId && other.approvalsCount == approvalsCount; @override - int get hashCode => Object.hash( - multisigAddress, - approver, - proposalId, - approvalsCount, - ); + int get hashCode => Object.hash(multisigAddress, approver, proposalId, approvalsCount); } /// A proposal has reached threshold and is ready to execute class ProposalReadyToExecute extends Event { - const ProposalReadyToExecute({ - required this.multisigAddress, - required this.proposalId, - required this.approvalsCount, - }); + const ProposalReadyToExecute({required this.multisigAddress, required this.proposalId, required this.approvalsCount}); factory ProposalReadyToExecute._decode(_i1.Input input) { return ProposalReadyToExecute( @@ -569,12 +455,12 @@ class ProposalReadyToExecute extends Event { @override Map> toJson() => { - 'ProposalReadyToExecute': { - 'multisigAddress': multisigAddress.toList(), - 'proposalId': proposalId, - 'approvalsCount': approvalsCount, - } - }; + 'ProposalReadyToExecute': { + 'multisigAddress': multisigAddress.toList(), + 'proposalId': proposalId, + 'approvalsCount': approvalsCount, + }, + }; int _sizeHint() { int size = 1; @@ -585,44 +471,22 @@ class ProposalReadyToExecute extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalId, - output, - ); - _i1.U32Codec.codec.encodeTo( - approvalsCount, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + _i1.U32Codec.codec.encodeTo(proposalId, output); + _i1.U32Codec.codec.encodeTo(approvalsCount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ProposalReadyToExecute && - _i5.listsEqual( - other.multisigAddress, - multisigAddress, - ) && + _i5.listsEqual(other.multisigAddress, multisigAddress) && other.proposalId == proposalId && other.approvalsCount == approvalsCount; @override - int get hashCode => Object.hash( - multisigAddress, - proposalId, - approvalsCount, - ); + int get hashCode => Object.hash(multisigAddress, proposalId, approvalsCount); } /// A proposal has been executed @@ -643,9 +507,7 @@ class ProposalExecuted extends Event { proposalId: _i1.U32Codec.codec.decode(input), proposer: const _i1.U8ArrayCodec(32).decode(input), call: _i1.U8SequenceCodec.codec.decode(input), - approvers: - const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) - .decode(input), + approvers: const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).decode(input), result: const _i1.ResultCodec( _i1.NullCodec.codec, _i4.DispatchError.codec, @@ -673,15 +535,15 @@ class ProposalExecuted extends Event { @override Map> toJson() => { - 'ProposalExecuted': { - 'multisigAddress': multisigAddress.toList(), - 'proposalId': proposalId, - 'proposer': proposer.toList(), - 'call': call, - 'approvers': approvers.map((value) => value.toList()).toList(), - 'result': result.toJson(), - } - }; + 'ProposalExecuted': { + 'multisigAddress': multisigAddress.toList(), + 'proposalId': proposalId, + 'proposer': proposer.toList(), + 'call': call, + 'approvers': approvers.map((value) => value.toList()).toList(), + 'result': result.toJson(), + }, + }; int _sizeHint() { int size = 1; @@ -689,10 +551,9 @@ class ProposalExecuted extends Event { size = size + _i1.U32Codec.codec.sizeHint(proposalId); size = size + const _i3.AccountId32Codec().sizeHint(proposer); size = size + _i1.U8SequenceCodec.codec.sizeHint(call); - size = size + - const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()) - .sizeHint(approvers); - size = size + + size = size + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).sizeHint(approvers); + size = + size + const _i1.ResultCodec( _i1.NullCodec.codec, _i4.DispatchError.codec, @@ -701,83 +562,36 @@ class ProposalExecuted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - proposer, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - call, - output, - ); - const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo( - approvers, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + _i1.U32Codec.codec.encodeTo(proposalId, output); + const _i1.U8ArrayCodec(32).encodeTo(proposer, output); + _i1.U8SequenceCodec.codec.encodeTo(call, output); + const _i1.SequenceCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo(approvers, output); const _i1.ResultCodec( _i1.NullCodec.codec, _i4.DispatchError.codec, - ).encodeTo( - result, - output, - ); + ).encodeTo(result, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ProposalExecuted && - _i5.listsEqual( - other.multisigAddress, - multisigAddress, - ) && + _i5.listsEqual(other.multisigAddress, multisigAddress) && other.proposalId == proposalId && - _i5.listsEqual( - other.proposer, - proposer, - ) && - _i5.listsEqual( - other.call, - call, - ) && - _i5.listsEqual( - other.approvers, - approvers, - ) && + _i5.listsEqual(other.proposer, proposer) && + _i5.listsEqual(other.call, call) && + _i5.listsEqual(other.approvers, approvers) && other.result == result; @override - int get hashCode => Object.hash( - multisigAddress, - proposalId, - proposer, - call, - approvers, - result, - ); + int get hashCode => Object.hash(multisigAddress, proposalId, proposer, call, approvers, result); } /// A proposal has been cancelled by the proposer class ProposalCancelled extends Event { - const ProposalCancelled({ - required this.multisigAddress, - required this.proposer, - required this.proposalId, - }); + const ProposalCancelled({required this.multisigAddress, required this.proposer, required this.proposalId}); factory ProposalCancelled._decode(_i1.Input input) { return ProposalCancelled( @@ -798,12 +612,12 @@ class ProposalCancelled extends Event { @override Map> toJson() => { - 'ProposalCancelled': { - 'multisigAddress': multisigAddress.toList(), - 'proposer': proposer.toList(), - 'proposalId': proposalId, - } - }; + 'ProposalCancelled': { + 'multisigAddress': multisigAddress.toList(), + 'proposer': proposer.toList(), + 'proposalId': proposalId, + }, + }; int _sizeHint() { int size = 1; @@ -814,47 +628,22 @@ class ProposalCancelled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - proposer, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalId, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + const _i1.U8ArrayCodec(32).encodeTo(proposer, output); + _i1.U32Codec.codec.encodeTo(proposalId, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ProposalCancelled && - _i5.listsEqual( - other.multisigAddress, - multisigAddress, - ) && - _i5.listsEqual( - other.proposer, - proposer, - ) && + _i5.listsEqual(other.multisigAddress, multisigAddress) && + _i5.listsEqual(other.proposer, proposer) && other.proposalId == proposalId; @override - int get hashCode => Object.hash( - multisigAddress, - proposer, - proposalId, - ); + int get hashCode => Object.hash(multisigAddress, proposer, proposalId); } /// Expired proposal was removed from storage @@ -889,13 +678,13 @@ class ProposalRemoved extends Event { @override Map> toJson() => { - 'ProposalRemoved': { - 'multisigAddress': multisigAddress.toList(), - 'proposalId': proposalId, - 'proposer': proposer.toList(), - 'removedBy': removedBy.toList(), - } - }; + 'ProposalRemoved': { + 'multisigAddress': multisigAddress.toList(), + 'proposalId': proposalId, + 'proposer': proposer.toList(), + 'removedBy': removedBy.toList(), + }, + }; int _sizeHint() { int size = 1; @@ -907,56 +696,24 @@ class ProposalRemoved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - proposer, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - removedBy, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + _i1.U32Codec.codec.encodeTo(proposalId, output); + const _i1.U8ArrayCodec(32).encodeTo(proposer, output); + const _i1.U8ArrayCodec(32).encodeTo(removedBy, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ProposalRemoved && - _i5.listsEqual( - other.multisigAddress, - multisigAddress, - ) && + _i5.listsEqual(other.multisigAddress, multisigAddress) && other.proposalId == proposalId && - _i5.listsEqual( - other.proposer, - proposer, - ) && - _i5.listsEqual( - other.removedBy, - removedBy, - ); + _i5.listsEqual(other.proposer, proposer) && + _i5.listsEqual(other.removedBy, removedBy); @override - int get hashCode => Object.hash( - multisigAddress, - proposalId, - proposer, - removedBy, - ); + int get hashCode => Object.hash(multisigAddress, proposalId, proposer, removedBy); } /// Batch deposits claimed @@ -991,13 +748,13 @@ class DepositsClaimed extends Event { @override Map> toJson() => { - 'DepositsClaimed': { - 'multisigAddress': multisigAddress.toList(), - 'claimer': claimer.toList(), - 'totalReturned': totalReturned, - 'proposalsRemoved': proposalsRemoved, - } - }; + 'DepositsClaimed': { + 'multisigAddress': multisigAddress.toList(), + 'claimer': claimer.toList(), + 'totalReturned': totalReturned, + 'proposalsRemoved': proposalsRemoved, + }, + }; int _sizeHint() { int size = 1; @@ -1009,51 +766,22 @@ class DepositsClaimed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - multisigAddress, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - claimer, - output, - ); - _i1.U128Codec.codec.encodeTo( - totalReturned, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalsRemoved, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + const _i1.U8ArrayCodec(32).encodeTo(multisigAddress, output); + const _i1.U8ArrayCodec(32).encodeTo(claimer, output); + _i1.U128Codec.codec.encodeTo(totalReturned, output); + _i1.U32Codec.codec.encodeTo(proposalsRemoved, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is DepositsClaimed && - _i5.listsEqual( - other.multisigAddress, - multisigAddress, - ) && - _i5.listsEqual( - other.claimer, - claimer, - ) && + _i5.listsEqual(other.multisigAddress, multisigAddress) && + _i5.listsEqual(other.claimer, claimer) && other.totalReturned == totalReturned && other.proposalsRemoved == proposalsRemoved; @override - int get hashCode => Object.hash( - multisigAddress, - claimer, - totalReturned, - proposalsRemoved, - ); + int get hashCode => Object.hash(multisigAddress, claimer, totalReturned, proposalsRemoved); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_data.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_data.dart index 55ac362d..b31061c1 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_data.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_data.dart @@ -51,87 +51,43 @@ class ProposalData { } Map toJson() => { - 'proposer': proposer.toList(), - 'call': call, - 'callWeight': callWeight.toJson(), - 'expiry': expiry, - 'approvals': approvals.map((value) => value.toList()).toList(), - 'deposit': deposit, - 'status': status.toJson(), - }; + 'proposer': proposer.toList(), + 'call': call, + 'callWeight': callWeight.toJson(), + 'expiry': expiry, + 'approvals': approvals.map((value) => value.toList()).toList(), + 'deposit': deposit, + 'status': status.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ProposalData && - _i6.listsEqual( - other.proposer, - proposer, - ) && - _i6.listsEqual( - other.call, - call, - ) && + _i6.listsEqual(other.proposer, proposer) && + _i6.listsEqual(other.call, call) && other.callWeight == callWeight && other.expiry == expiry && - _i6.listsEqual( - other.approvals, - approvals, - ) && + _i6.listsEqual(other.approvals, approvals) && other.deposit == deposit && other.status == status; @override - int get hashCode => Object.hash( - proposer, - call, - callWeight, - expiry, - approvals, - deposit, - status, - ); + int get hashCode => Object.hash(proposer, call, callWeight, expiry, approvals, deposit, status); } class $ProposalDataCodec with _i1.Codec { const $ProposalDataCodec(); @override - void encodeTo( - ProposalData obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - obj.proposer, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - obj.call, - output, - ); - _i3.Weight.codec.encodeTo( - obj.callWeight, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.expiry, - output, - ); - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo( - obj.approvals, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.deposit, - output, - ); - _i4.ProposalStatus.codec.encodeTo( - obj.status, - output, - ); + void encodeTo(ProposalData obj, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(obj.proposer, output); + _i1.U8SequenceCodec.codec.encodeTo(obj.call, output); + _i3.Weight.codec.encodeTo(obj.callWeight, output); + _i1.U32Codec.codec.encodeTo(obj.expiry, output); + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo(obj.approvals, output); + _i1.U128Codec.codec.encodeTo(obj.deposit, output); + _i4.ProposalStatus.codec.encodeTo(obj.status, output); } @override @@ -141,9 +97,7 @@ class $ProposalDataCodec with _i1.Codec { call: _i1.U8SequenceCodec.codec.decode(input), callWeight: _i3.Weight.codec.decode(input), expiry: _i1.U32Codec.codec.decode(input), - approvals: - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) - .decode(input), + approvals: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).decode(input), deposit: _i1.U128Codec.codec.decode(input), status: _i4.ProposalStatus.codec.decode(input), ); @@ -156,9 +110,7 @@ class $ProposalDataCodec with _i1.Codec { size = size + _i1.U8SequenceCodec.codec.sizeHint(obj.call); size = size + _i3.Weight.codec.sizeHint(obj.callWeight); size = size + _i1.U32Codec.codec.sizeHint(obj.expiry); - size = size + - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) - .sizeHint(obj.approvals); + size = size + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).sizeHint(obj.approvals); size = size + _i1.U128Codec.codec.sizeHint(obj.deposit); size = size + _i4.ProposalStatus.codec.sizeHint(obj.status); return size; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_status.dart index cf8700b7..6019a34c 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_multisig/proposal_status.dart @@ -7,10 +7,7 @@ enum ProposalStatus { active('Active', 0), approved('Approved', 1); - const ProposalStatus( - this.variantName, - this.codecIndex, - ); + const ProposalStatus(this.variantName, this.codecIndex); factory ProposalStatus.decode(_i1.Input input) { return codec.decode(input); @@ -46,13 +43,7 @@ class $ProposalStatusCodec with _i1.Codec { } @override - void encodeTo( - ProposalStatus value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(ProposalStatus value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/old_request_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/old_request_status.dart index 89471be7..69303e64 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/old_request_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/old_request_status.dart @@ -33,26 +33,12 @@ abstract class OldRequestStatus { class $OldRequestStatus { const $OldRequestStatus(); - Unrequested unrequested({ - required _i3.Tuple2<_i4.AccountId32, BigInt> deposit, - required int len, - }) { - return Unrequested( - deposit: deposit, - len: len, - ); + Unrequested unrequested({required _i3.Tuple2<_i4.AccountId32, BigInt> deposit, required int len}) { + return Unrequested(deposit: deposit, len: len); } - Requested requested({ - _i3.Tuple2<_i4.AccountId32, BigInt>? deposit, - required int count, - int? len, - }) { - return Requested( - deposit: deposit, - count: count, - len: len, - ); + Requested requested({_i3.Tuple2<_i4.AccountId32, BigInt>? deposit, required int count, int? len}) { + return Requested(deposit: deposit, count: count, len: len); } } @@ -73,10 +59,7 @@ class $OldRequestStatusCodec with _i1.Codec { } @override - void encodeTo( - OldRequestStatus value, - _i1.Output output, - ) { + void encodeTo(OldRequestStatus value, _i1.Output output) { switch (value.runtimeType) { case Unrequested: (value as Unrequested).encodeTo(output); @@ -85,8 +68,7 @@ class $OldRequestStatusCodec with _i1.Codec { (value as Requested).encodeTo(output); break; default: - throw Exception( - 'OldRequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('OldRequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -98,17 +80,13 @@ class $OldRequestStatusCodec with _i1.Codec { case Requested: return (value as Requested)._sizeHint(); default: - throw Exception( - 'OldRequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('OldRequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); } } } class Unrequested extends OldRequestStatus { - const Unrequested({ - required this.deposit, - required this.len, - }); + const Unrequested({required this.deposit, required this.len}); factory Unrequested._decode(_i1.Input input) { return Unrequested( @@ -128,73 +106,46 @@ class Unrequested extends OldRequestStatus { @override Map> toJson() => { - 'Unrequested': { - 'deposit': [ - deposit.value0.toList(), - deposit.value1, - ], - 'len': len, - } - }; + 'Unrequested': { + 'deposit': [deposit.value0.toList(), deposit.value1], + 'len': len, + }, + }; int _sizeHint() { int size = 1; - size = size + - const _i3.Tuple2Codec<_i4.AccountId32, BigInt>( - _i4.AccountId32Codec(), - _i1.U128Codec.codec, - ).sizeHint(deposit); + size = + size + + const _i3.Tuple2Codec<_i4.AccountId32, BigInt>(_i4.AccountId32Codec(), _i1.U128Codec.codec).sizeHint(deposit); size = size + _i1.U32Codec.codec.sizeHint(len); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); const _i3.Tuple2Codec<_i4.AccountId32, BigInt>( _i4.AccountId32Codec(), _i1.U128Codec.codec, - ).encodeTo( - deposit, - output, - ); - _i1.U32Codec.codec.encodeTo( - len, - output, - ); + ).encodeTo(deposit, output); + _i1.U32Codec.codec.encodeTo(len, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Unrequested && other.deposit == deposit && other.len == len; + identical(this, other) || other is Unrequested && other.deposit == deposit && other.len == len; @override - int get hashCode => Object.hash( - deposit, - len, - ); + int get hashCode => Object.hash(deposit, len); } class Requested extends OldRequestStatus { - const Requested({ - this.deposit, - required this.count, - this.len, - }); + const Requested({this.deposit, required this.count, this.len}); factory Requested._decode(_i1.Input input) { return Requested( deposit: const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, BigInt>>( - _i3.Tuple2Codec<_i4.AccountId32, BigInt>( - _i4.AccountId32Codec(), - _i1.U128Codec.codec, - )).decode(input), + _i3.Tuple2Codec<_i4.AccountId32, BigInt>(_i4.AccountId32Codec(), _i1.U128Codec.codec), + ).decode(input), count: _i1.U32Codec.codec.decode(input), len: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), ); @@ -211,67 +162,39 @@ class Requested extends OldRequestStatus { @override Map> toJson() => { - 'Requested': { - 'deposit': [ - deposit?.value0.toList(), - deposit?.value1, - ], - 'count': count, - 'len': len, - } - }; + 'Requested': { + 'deposit': [deposit?.value0.toList(), deposit?.value1], + 'count': count, + 'len': len, + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, BigInt>>( - _i3.Tuple2Codec<_i4.AccountId32, BigInt>( - _i4.AccountId32Codec(), - _i1.U128Codec.codec, - )).sizeHint(deposit); + _i3.Tuple2Codec<_i4.AccountId32, BigInt>(_i4.AccountId32Codec(), _i1.U128Codec.codec), + ).sizeHint(deposit); size = size + _i1.U32Codec.codec.sizeHint(count); size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(len); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, BigInt>>( - _i3.Tuple2Codec<_i4.AccountId32, BigInt>( - _i4.AccountId32Codec(), - _i1.U128Codec.codec, - )).encodeTo( - deposit, - output, - ); - _i1.U32Codec.codec.encodeTo( - count, - output, - ); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( - len, - output, - ); + _i3.Tuple2Codec<_i4.AccountId32, BigInt>(_i4.AccountId32Codec(), _i1.U128Codec.codec), + ).encodeTo(deposit, output); + _i1.U32Codec.codec.encodeTo(count, output); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(len, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Requested && - other.deposit == deposit && - other.count == count && - other.len == len; + identical(this, other) || + other is Requested && other.deposit == deposit && other.count == count && other.len == len; @override - int get hashCode => Object.hash( - deposit, - count, - len, - ); + int get hashCode => Object.hash(deposit, count, len); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/call.dart index 8a69a1dd..246d31d2 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/call.dart @@ -78,10 +78,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case NotePreimage: (value as NotePreimage).encodeTo(output); @@ -99,8 +96,7 @@ class $CallCodec with _i1.Codec { (value as EnsureUpdated).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -118,8 +114,7 @@ class $CallCodec with _i1.Codec { case EnsureUpdated: return (value as EnsureUpdated)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -140,8 +135,8 @@ class NotePreimage extends Call { @override Map>> toJson() => { - 'note_preimage': {'bytes': bytes} - }; + 'note_preimage': {'bytes': bytes}, + }; int _sizeHint() { int size = 1; @@ -150,27 +145,13 @@ class NotePreimage extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - bytes, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8SequenceCodec.codec.encodeTo(bytes, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is NotePreimage && - _i4.listsEqual( - other.bytes, - bytes, - ); + identical(this, other) || other is NotePreimage && _i4.listsEqual(other.bytes, bytes); @override int get hashCode => bytes.hashCode; @@ -194,8 +175,8 @@ class UnnotePreimage extends Call { @override Map>> toJson() => { - 'unnote_preimage': {'hash': hash.toList()} - }; + 'unnote_preimage': {'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -204,27 +185,13 @@ class UnnotePreimage extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is UnnotePreimage && - _i4.listsEqual( - other.hash, - hash, - ); + identical(this, other) || other is UnnotePreimage && _i4.listsEqual(other.hash, hash); @override int get hashCode => hash.hashCode; @@ -246,8 +213,8 @@ class RequestPreimage extends Call { @override Map>> toJson() => { - 'request_preimage': {'hash': hash.toList()} - }; + 'request_preimage': {'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -256,27 +223,13 @@ class RequestPreimage extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RequestPreimage && - _i4.listsEqual( - other.hash, - hash, - ); + identical(this, other) || other is RequestPreimage && _i4.listsEqual(other.hash, hash); @override int get hashCode => hash.hashCode; @@ -297,8 +250,8 @@ class UnrequestPreimage extends Call { @override Map>> toJson() => { - 'unrequest_preimage': {'hash': hash.toList()} - }; + 'unrequest_preimage': {'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -307,27 +260,13 @@ class UnrequestPreimage extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is UnrequestPreimage && - _i4.listsEqual( - other.hash, - hash, - ); + identical(this, other) || other is UnrequestPreimage && _i4.listsEqual(other.hash, hash); @override int get hashCode => hash.hashCode; @@ -340,9 +279,7 @@ class EnsureUpdated extends Call { const EnsureUpdated({required this.hashes}); factory EnsureUpdated._decode(_i1.Input input) { - return EnsureUpdated( - hashes: - const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).decode(input)); + return EnsureUpdated(hashes: const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).decode(input)); } /// Vec @@ -350,40 +287,23 @@ class EnsureUpdated extends Call { @override Map>>> toJson() => { - 'ensure_updated': { - 'hashes': hashes.map((value) => value.toList()).toList() - } - }; + 'ensure_updated': {'hashes': hashes.map((value) => value.toList()).toList()}, + }; int _sizeHint() { int size = 1; - size = size + - const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).sizeHint(hashes); + size = size + const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).sizeHint(hashes); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).encodeTo( - hashes, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.SequenceCodec<_i3.H256>(_i3.H256Codec()).encodeTo(hashes, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is EnsureUpdated && - _i4.listsEqual( - other.hashes, - hashes, - ); + identical(this, other) || other is EnsureUpdated && _i4.listsEqual(other.hashes, hashes); @override int get hashCode => hashes.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/error.dart index b6dce94a..74a1a50f 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/error.dart @@ -29,10 +29,7 @@ enum Error { /// Too few hashes were requested to be upgraded (i.e. zero). tooFew('TooFew', 7); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -80,13 +77,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/event.dart index f54cb52b..26f10fba 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/event.dart @@ -66,10 +66,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case Noted: (value as Noted).encodeTo(output); @@ -81,8 +78,7 @@ class $EventCodec with _i1.Codec { (value as Cleared).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -96,8 +92,7 @@ class $EventCodec with _i1.Codec { case Cleared: return (value as Cleared)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -115,8 +110,8 @@ class Noted extends Event { @override Map>> toJson() => { - 'Noted': {'hash': hash.toList()} - }; + 'Noted': {'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -125,27 +120,12 @@ class Noted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Noted && - _i4.listsEqual( - other.hash, - hash, - ); + bool operator ==(Object other) => identical(this, other) || other is Noted && _i4.listsEqual(other.hash, hash); @override int get hashCode => hash.hashCode; @@ -164,8 +144,8 @@ class Requested extends Event { @override Map>> toJson() => { - 'Requested': {'hash': hash.toList()} - }; + 'Requested': {'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -174,27 +154,12 @@ class Requested extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Requested && - _i4.listsEqual( - other.hash, - hash, - ); + bool operator ==(Object other) => identical(this, other) || other is Requested && _i4.listsEqual(other.hash, hash); @override int get hashCode => hash.hashCode; @@ -213,8 +178,8 @@ class Cleared extends Event { @override Map>> toJson() => { - 'Cleared': {'hash': hash.toList()} - }; + 'Cleared': {'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -223,27 +188,12 @@ class Cleared extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Cleared && - _i4.listsEqual( - other.hash, - hash, - ); + bool operator ==(Object other) => identical(this, other) || other is Cleared && _i4.listsEqual(other.hash, hash); @override int get hashCode => hash.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/hold_reason.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/hold_reason.dart index ac2a0290..6bcca1d8 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/hold_reason.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/pallet/hold_reason.dart @@ -6,10 +6,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; enum HoldReason { preimage('Preimage', 0); - const HoldReason( - this.variantName, - this.codecIndex, - ); + const HoldReason(this.variantName, this.codecIndex); factory HoldReason.decode(_i1.Input input) { return codec.decode(input); @@ -43,13 +40,7 @@ class $HoldReasonCodec with _i1.Codec { } @override - void encodeTo( - HoldReason value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(HoldReason value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_preimage/request_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_preimage/request_status.dart index 573053c2..c3a46ad8 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_preimage/request_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_preimage/request_status.dart @@ -34,14 +34,8 @@ abstract class RequestStatus { class $RequestStatus { const $RequestStatus(); - Unrequested unrequested({ - required _i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit> ticket, - required int len, - }) { - return Unrequested( - ticket: ticket, - len: len, - ); + Unrequested unrequested({required _i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit> ticket, required int len}) { + return Unrequested(ticket: ticket, len: len); } Requested requested({ @@ -49,11 +43,7 @@ class $RequestStatus { required int count, int? maybeLen, }) { - return Requested( - maybeTicket: maybeTicket, - count: count, - maybeLen: maybeLen, - ); + return Requested(maybeTicket: maybeTicket, count: count, maybeLen: maybeLen); } } @@ -74,10 +64,7 @@ class $RequestStatusCodec with _i1.Codec { } @override - void encodeTo( - RequestStatus value, - _i1.Output output, - ) { + void encodeTo(RequestStatus value, _i1.Output output) { switch (value.runtimeType) { case Unrequested: (value as Unrequested).encodeTo(output); @@ -86,8 +73,7 @@ class $RequestStatusCodec with _i1.Codec { (value as Requested).encodeTo(output); break; default: - throw Exception( - 'RequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -99,17 +85,13 @@ class $RequestStatusCodec with _i1.Codec { case Requested: return (value as Requested)._sizeHint(); default: - throw Exception( - 'RequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); } } } class Unrequested extends RequestStatus { - const Unrequested({ - required this.ticket, - required this.len, - }); + const Unrequested({required this.ticket, required this.len}); factory Unrequested._decode(_i1.Input input) { return Unrequested( @@ -129,18 +111,16 @@ class Unrequested extends RequestStatus { @override Map> toJson() => { - 'Unrequested': { - 'ticket': [ - ticket.value0.toList(), - ticket.value1.toJson(), - ], - 'len': len, - } - }; + 'Unrequested': { + 'ticket': [ticket.value0.toList(), ticket.value1.toJson()], + 'len': len, + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( _i4.AccountId32Codec(), _i5.PreimageDeposit.codec, @@ -150,53 +130,30 @@ class Unrequested extends RequestStatus { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); const _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( _i4.AccountId32Codec(), _i5.PreimageDeposit.codec, - ).encodeTo( - ticket, - output, - ); - _i1.U32Codec.codec.encodeTo( - len, - output, - ); + ).encodeTo(ticket, output); + _i1.U32Codec.codec.encodeTo(len, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Unrequested && other.ticket == ticket && other.len == len; + identical(this, other) || other is Unrequested && other.ticket == ticket && other.len == len; @override - int get hashCode => Object.hash( - ticket, - len, - ); + int get hashCode => Object.hash(ticket, len); } class Requested extends RequestStatus { - const Requested({ - this.maybeTicket, - required this.count, - this.maybeLen, - }); + const Requested({this.maybeTicket, required this.count, this.maybeLen}); factory Requested._decode(_i1.Input input) { return Requested( - maybeTicket: const _i1 - .OptionCodec<_i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit>>( - _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( - _i4.AccountId32Codec(), - _i5.PreimageDeposit.codec, - )).decode(input), + maybeTicket: const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit>>( + _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>(_i4.AccountId32Codec(), _i5.PreimageDeposit.codec), + ).decode(input), count: _i1.U32Codec.codec.decode(input), maybeLen: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), ); @@ -213,68 +170,39 @@ class Requested extends RequestStatus { @override Map> toJson() => { - 'Requested': { - 'maybeTicket': [ - maybeTicket?.value0.toList(), - maybeTicket?.value1.toJson(), - ], - 'count': count, - 'maybeLen': maybeLen, - } - }; + 'Requested': { + 'maybeTicket': [maybeTicket?.value0.toList(), maybeTicket?.value1.toJson()], + 'count': count, + 'maybeLen': maybeLen, + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit>>( - _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( - _i4.AccountId32Codec(), - _i5.PreimageDeposit.codec, - )).sizeHint(maybeTicket); + _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>(_i4.AccountId32Codec(), _i5.PreimageDeposit.codec), + ).sizeHint(maybeTicket); size = size + _i1.U32Codec.codec.sizeHint(count); - size = size + - const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(maybeLen); + size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(maybeLen); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit>>( - _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( - _i4.AccountId32Codec(), - _i5.PreimageDeposit.codec, - )).encodeTo( - maybeTicket, - output, - ); - _i1.U32Codec.codec.encodeTo( - count, - output, - ); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( - maybeLen, - output, - ); + _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>(_i4.AccountId32Codec(), _i5.PreimageDeposit.codec), + ).encodeTo(maybeTicket, output); + _i1.U32Codec.codec.encodeTo(count, output); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(maybeLen, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Requested && - other.maybeTicket == maybeTicket && - other.count == count && - other.maybeLen == maybeLen; + identical(this, other) || + other is Requested && other.maybeTicket == maybeTicket && other.count == count && other.maybeLen == maybeLen; @override - int get hashCode => Object.hash( - maybeTicket, - count, - maybeLen, - ); + int get hashCode => Object.hash(maybeTicket, count, maybeLen); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_qpow/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_qpow/pallet/event.dart index 45174ad5..e35e03cc 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_qpow/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_qpow/pallet/event.dart @@ -39,11 +39,7 @@ class $Event { required _i3.U512 difficulty, required _i3.U512 hashAchieved, }) { - return ProofSubmitted( - nonce: nonce, - difficulty: difficulty, - hashAchieved: hashAchieved, - ); + return ProofSubmitted(nonce: nonce, difficulty: difficulty, hashAchieved: hashAchieved); } DifficultyAdjusted difficultyAdjusted({ @@ -76,10 +72,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case ProofSubmitted: (value as ProofSubmitted).encodeTo(output); @@ -88,8 +81,7 @@ class $EventCodec with _i1.Codec { (value as DifficultyAdjusted).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -101,18 +93,13 @@ class $EventCodec with _i1.Codec { case DifficultyAdjusted: return (value as DifficultyAdjusted)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } class ProofSubmitted extends Event { - const ProofSubmitted({ - required this.nonce, - required this.difficulty, - required this.hashAchieved, - }); + const ProofSubmitted({required this.nonce, required this.difficulty, required this.hashAchieved}); factory ProofSubmitted._decode(_i1.Input input) { return ProofSubmitted( @@ -133,12 +120,12 @@ class ProofSubmitted extends Event { @override Map>> toJson() => { - 'ProofSubmitted': { - 'nonce': nonce.toList(), - 'difficulty': difficulty.toList(), - 'hashAchieved': hashAchieved.toList(), - } - }; + 'ProofSubmitted': { + 'nonce': nonce.toList(), + 'difficulty': difficulty.toList(), + 'hashAchieved': hashAchieved.toList(), + }, + }; int _sizeHint() { int size = 1; @@ -149,58 +136,26 @@ class ProofSubmitted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(64).encodeTo( - nonce, - output, - ); - const _i1.U64ArrayCodec(8).encodeTo( - difficulty, - output, - ); - const _i1.U64ArrayCodec(8).encodeTo( - hashAchieved, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(64).encodeTo(nonce, output); + const _i1.U64ArrayCodec(8).encodeTo(difficulty, output); + const _i1.U64ArrayCodec(8).encodeTo(hashAchieved, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ProofSubmitted && - _i4.listsEqual( - other.nonce, - nonce, - ) && - _i4.listsEqual( - other.difficulty, - difficulty, - ) && - _i4.listsEqual( - other.hashAchieved, - hashAchieved, - ); + _i4.listsEqual(other.nonce, nonce) && + _i4.listsEqual(other.difficulty, difficulty) && + _i4.listsEqual(other.hashAchieved, hashAchieved); @override - int get hashCode => Object.hash( - nonce, - difficulty, - hashAchieved, - ); + int get hashCode => Object.hash(nonce, difficulty, hashAchieved); } class DifficultyAdjusted extends Event { - const DifficultyAdjusted({ - required this.oldDifficulty, - required this.newDifficulty, - required this.observedBlockTime, - }); + const DifficultyAdjusted({required this.oldDifficulty, required this.newDifficulty, required this.observedBlockTime}); factory DifficultyAdjusted._decode(_i1.Input input) { return DifficultyAdjusted( @@ -221,12 +176,12 @@ class DifficultyAdjusted extends Event { @override Map> toJson() => { - 'DifficultyAdjusted': { - 'oldDifficulty': oldDifficulty.toList(), - 'newDifficulty': newDifficulty.toList(), - 'observedBlockTime': observedBlockTime, - } - }; + 'DifficultyAdjusted': { + 'oldDifficulty': oldDifficulty.toList(), + 'newDifficulty': newDifficulty.toList(), + 'observedBlockTime': observedBlockTime, + }, + }; int _sizeHint() { int size = 1; @@ -237,45 +192,20 @@ class DifficultyAdjusted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U64ArrayCodec(8).encodeTo( - oldDifficulty, - output, - ); - const _i1.U64ArrayCodec(8).encodeTo( - newDifficulty, - output, - ); - _i1.U64Codec.codec.encodeTo( - observedBlockTime, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U64ArrayCodec(8).encodeTo(oldDifficulty, output); + const _i1.U64ArrayCodec(8).encodeTo(newDifficulty, output); + _i1.U64Codec.codec.encodeTo(observedBlockTime, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is DifficultyAdjusted && - _i4.listsEqual( - other.oldDifficulty, - oldDifficulty, - ) && - _i4.listsEqual( - other.newDifficulty, - newDifficulty, - ) && + _i4.listsEqual(other.oldDifficulty, oldDifficulty) && + _i4.listsEqual(other.newDifficulty, newDifficulty) && other.observedBlockTime == observedBlockTime; @override - int get hashCode => Object.hash( - oldDifficulty, - newDifficulty, - observedBlockTime, - ); + int get hashCode => Object.hash(oldDifficulty, newDifficulty, observedBlockTime); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/member_record.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/member_record.dart index 66c7e5db..bbcabb46 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/member_record.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/member_record.dart @@ -22,12 +22,7 @@ class MemberRecord { Map toJson() => {'rank': rank}; @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MemberRecord && other.rank == rank; + bool operator ==(Object other) => identical(this, other) || other is MemberRecord && other.rank == rank; @override int get hashCode => rank.hashCode; @@ -37,14 +32,8 @@ class $MemberRecordCodec with _i1.Codec { const $MemberRecordCodec(); @override - void encodeTo( - MemberRecord obj, - _i1.Output output, - ) { - _i1.U16Codec.codec.encodeTo( - obj.rank, - output, - ); + void encodeTo(MemberRecord obj, _i1.Output output) { + _i1.U16Codec.codec.encodeTo(obj.rank, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/call.dart index a7c7d089..430c043f 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/call.dart @@ -45,44 +45,20 @@ class $Call { return DemoteMember(who: who); } - RemoveMember removeMember({ - required _i3.MultiAddress who, - required int minRank, - }) { - return RemoveMember( - who: who, - minRank: minRank, - ); - } - - Vote vote({ - required int poll, - required bool aye, - }) { - return Vote( - poll: poll, - aye: aye, - ); - } - - CleanupPoll cleanupPoll({ - required int pollIndex, - required int max, - }) { - return CleanupPoll( - pollIndex: pollIndex, - max: max, - ); - } - - ExchangeMember exchangeMember({ - required _i3.MultiAddress who, - required _i3.MultiAddress newWho, - }) { - return ExchangeMember( - who: who, - newWho: newWho, - ); + RemoveMember removeMember({required _i3.MultiAddress who, required int minRank}) { + return RemoveMember(who: who, minRank: minRank); + } + + Vote vote({required int poll, required bool aye}) { + return Vote(poll: poll, aye: aye); + } + + CleanupPoll cleanupPoll({required int pollIndex, required int max}) { + return CleanupPoll(pollIndex: pollIndex, max: max); + } + + ExchangeMember exchangeMember({required _i3.MultiAddress who, required _i3.MultiAddress newWho}) { + return ExchangeMember(who: who, newWho: newWho); } } @@ -113,10 +89,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case AddMember: (value as AddMember).encodeTo(output); @@ -140,8 +113,7 @@ class $CallCodec with _i1.Codec { (value as ExchangeMember).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -163,8 +135,7 @@ class $CallCodec with _i1.Codec { case ExchangeMember: return (value as ExchangeMember)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -187,8 +158,8 @@ class AddMember extends Call { @override Map>> toJson() => { - 'add_member': {'who': who.toJson()} - }; + 'add_member': {'who': who.toJson()}, + }; int _sizeHint() { int size = 1; @@ -197,23 +168,12 @@ class AddMember extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.MultiAddress.codec.encodeTo(who, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AddMember && other.who == who; + bool operator ==(Object other) => identical(this, other) || other is AddMember && other.who == who; @override int get hashCode => who.hashCode; @@ -237,8 +197,8 @@ class PromoteMember extends Call { @override Map>> toJson() => { - 'promote_member': {'who': who.toJson()} - }; + 'promote_member': {'who': who.toJson()}, + }; int _sizeHint() { int size = 1; @@ -247,23 +207,12 @@ class PromoteMember extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i3.MultiAddress.codec.encodeTo(who, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is PromoteMember && other.who == who; + bool operator ==(Object other) => identical(this, other) || other is PromoteMember && other.who == who; @override int get hashCode => who.hashCode; @@ -288,8 +237,8 @@ class DemoteMember extends Call { @override Map>> toJson() => { - 'demote_member': {'who': who.toJson()} - }; + 'demote_member': {'who': who.toJson()}, + }; int _sizeHint() { int size = 1; @@ -298,23 +247,12 @@ class DemoteMember extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i3.MultiAddress.codec.encodeTo(who, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DemoteMember && other.who == who; + bool operator ==(Object other) => identical(this, other) || other is DemoteMember && other.who == who; @override int get hashCode => who.hashCode; @@ -328,16 +266,10 @@ class DemoteMember extends Call { /// /// Weight: `O(min_rank)`. class RemoveMember extends Call { - const RemoveMember({ - required this.who, - required this.minRank, - }); + const RemoveMember({required this.who, required this.minRank}); factory RemoveMember._decode(_i1.Input input) { - return RemoveMember( - who: _i3.MultiAddress.codec.decode(input), - minRank: _i1.U16Codec.codec.decode(input), - ); + return RemoveMember(who: _i3.MultiAddress.codec.decode(input), minRank: _i1.U16Codec.codec.decode(input)); } /// AccountIdLookupOf @@ -348,11 +280,8 @@ class RemoveMember extends Call { @override Map> toJson() => { - 'remove_member': { - 'who': who.toJson(), - 'minRank': minRank, - } - }; + 'remove_member': {'who': who.toJson(), 'minRank': minRank}, + }; int _sizeHint() { int size = 1; @@ -362,33 +291,17 @@ class RemoveMember extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); - _i1.U16Codec.codec.encodeTo( - minRank, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i3.MultiAddress.codec.encodeTo(who, output); + _i1.U16Codec.codec.encodeTo(minRank, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RemoveMember && other.who == who && other.minRank == minRank; + identical(this, other) || other is RemoveMember && other.who == who && other.minRank == minRank; @override - int get hashCode => Object.hash( - who, - minRank, - ); + int get hashCode => Object.hash(who, minRank); } /// Add an aye or nay vote for the sender to the given proposal. @@ -403,16 +316,10 @@ class RemoveMember extends Call { /// /// Weight: `O(1)`, less if there was no previous vote on the poll by the member. class Vote extends Call { - const Vote({ - required this.poll, - required this.aye, - }); + const Vote({required this.poll, required this.aye}); factory Vote._decode(_i1.Input input) { - return Vote( - poll: _i1.U32Codec.codec.decode(input), - aye: _i1.BoolCodec.codec.decode(input), - ); + return Vote(poll: _i1.U32Codec.codec.decode(input), aye: _i1.BoolCodec.codec.decode(input)); } /// PollIndexOf @@ -423,11 +330,8 @@ class Vote extends Call { @override Map> toJson() => { - 'vote': { - 'poll': poll, - 'aye': aye, - } - }; + 'vote': {'poll': poll, 'aye': aye}, + }; int _sizeHint() { int size = 1; @@ -437,33 +341,16 @@ class Vote extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.U32Codec.codec.encodeTo( - poll, - output, - ); - _i1.BoolCodec.codec.encodeTo( - aye, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.U32Codec.codec.encodeTo(poll, output); + _i1.BoolCodec.codec.encodeTo(aye, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Vote && other.poll == poll && other.aye == aye; + bool operator ==(Object other) => identical(this, other) || other is Vote && other.poll == poll && other.aye == aye; @override - int get hashCode => Object.hash( - poll, - aye, - ); + int get hashCode => Object.hash(poll, aye); } /// Remove votes from the given poll. It must have ended. @@ -477,16 +364,10 @@ class Vote extends Call { /// /// Weight `O(max)` (less if there are fewer items to remove than `max`). class CleanupPoll extends Call { - const CleanupPoll({ - required this.pollIndex, - required this.max, - }); + const CleanupPoll({required this.pollIndex, required this.max}); factory CleanupPoll._decode(_i1.Input input) { - return CleanupPoll( - pollIndex: _i1.U32Codec.codec.decode(input), - max: _i1.U32Codec.codec.decode(input), - ); + return CleanupPoll(pollIndex: _i1.U32Codec.codec.decode(input), max: _i1.U32Codec.codec.decode(input)); } /// PollIndexOf @@ -497,11 +378,8 @@ class CleanupPoll extends Call { @override Map> toJson() => { - 'cleanup_poll': { - 'pollIndex': pollIndex, - 'max': max, - } - }; + 'cleanup_poll': {'pollIndex': pollIndex, 'max': max}, + }; int _sizeHint() { int size = 1; @@ -511,33 +389,17 @@ class CleanupPoll extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.U32Codec.codec.encodeTo( - pollIndex, - output, - ); - _i1.U32Codec.codec.encodeTo( - max, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.U32Codec.codec.encodeTo(pollIndex, output); + _i1.U32Codec.codec.encodeTo(max, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is CleanupPoll && other.pollIndex == pollIndex && other.max == max; + identical(this, other) || other is CleanupPoll && other.pollIndex == pollIndex && other.max == max; @override - int get hashCode => Object.hash( - pollIndex, - max, - ); + int get hashCode => Object.hash(pollIndex, max); } /// Exchanges a member with a new account and the same existing rank. @@ -546,16 +408,10 @@ class CleanupPoll extends Call { /// - `who`: Account of existing member of rank greater than zero to be exchanged. /// - `new_who`: New Account of existing member of rank greater than zero to exchanged to. class ExchangeMember extends Call { - const ExchangeMember({ - required this.who, - required this.newWho, - }); + const ExchangeMember({required this.who, required this.newWho}); factory ExchangeMember._decode(_i1.Input input) { - return ExchangeMember( - who: _i3.MultiAddress.codec.decode(input), - newWho: _i3.MultiAddress.codec.decode(input), - ); + return ExchangeMember(who: _i3.MultiAddress.codec.decode(input), newWho: _i3.MultiAddress.codec.decode(input)); } /// AccountIdLookupOf @@ -566,11 +422,8 @@ class ExchangeMember extends Call { @override Map>> toJson() => { - 'exchange_member': { - 'who': who.toJson(), - 'newWho': newWho.toJson(), - } - }; + 'exchange_member': {'who': who.toJson(), 'newWho': newWho.toJson()}, + }; int _sizeHint() { int size = 1; @@ -580,31 +433,15 @@ class ExchangeMember extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i3.MultiAddress.codec.encodeTo( - who, - output, - ); - _i3.MultiAddress.codec.encodeTo( - newWho, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i3.MultiAddress.codec.encodeTo(who, output); + _i3.MultiAddress.codec.encodeTo(newWho, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ExchangeMember && other.who == who && other.newWho == newWho; + identical(this, other) || other is ExchangeMember && other.who == who && other.newWho == newWho; @override - int get hashCode => Object.hash( - who, - newWho, - ); + int get hashCode => Object.hash(who, newWho); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/error.dart index 64a40299..a0939c33 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/error.dart @@ -38,10 +38,7 @@ enum Error { /// The max member count for the rank has been reached. tooManyMembers('TooManyMembers', 10); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -95,13 +92,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/event.dart index 44350e40..380795e3 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/pallet/event.dart @@ -40,24 +40,12 @@ class $Event { return MemberAdded(who: who); } - RankChanged rankChanged({ - required _i3.AccountId32 who, - required int rank, - }) { - return RankChanged( - who: who, - rank: rank, - ); + RankChanged rankChanged({required _i3.AccountId32 who, required int rank}) { + return RankChanged(who: who, rank: rank); } - MemberRemoved memberRemoved({ - required _i3.AccountId32 who, - required int rank, - }) { - return MemberRemoved( - who: who, - rank: rank, - ); + MemberRemoved memberRemoved({required _i3.AccountId32 who, required int rank}) { + return MemberRemoved(who: who, rank: rank); } Voted voted({ @@ -66,22 +54,11 @@ class $Event { required _i4.VoteRecord vote, required _i5.Tally tally, }) { - return Voted( - who: who, - poll: poll, - vote: vote, - tally: tally, - ); + return Voted(who: who, poll: poll, vote: vote, tally: tally); } - MemberExchanged memberExchanged({ - required _i3.AccountId32 who, - required _i3.AccountId32 newWho, - }) { - return MemberExchanged( - who: who, - newWho: newWho, - ); + MemberExchanged memberExchanged({required _i3.AccountId32 who, required _i3.AccountId32 newWho}) { + return MemberExchanged(who: who, newWho: newWho); } } @@ -108,10 +85,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case MemberAdded: (value as MemberAdded).encodeTo(output); @@ -129,8 +103,7 @@ class $EventCodec with _i1.Codec { (value as MemberExchanged).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -148,8 +121,7 @@ class $EventCodec with _i1.Codec { case MemberExchanged: return (value as MemberExchanged)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -167,8 +139,8 @@ class MemberAdded extends Event { @override Map>> toJson() => { - 'MemberAdded': {'who': who.toList()} - }; + 'MemberAdded': {'who': who.toList()}, + }; int _sizeHint() { int size = 1; @@ -177,27 +149,12 @@ class MemberAdded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MemberAdded && - _i6.listsEqual( - other.who, - who, - ); + bool operator ==(Object other) => identical(this, other) || other is MemberAdded && _i6.listsEqual(other.who, who); @override int get hashCode => who.hashCode; @@ -205,16 +162,10 @@ class MemberAdded extends Event { /// The member `who`se rank has been changed to the given `rank`. class RankChanged extends Event { - const RankChanged({ - required this.who, - required this.rank, - }); + const RankChanged({required this.who, required this.rank}); factory RankChanged._decode(_i1.Input input) { - return RankChanged( - who: const _i1.U8ArrayCodec(32).decode(input), - rank: _i1.U16Codec.codec.decode(input), - ); + return RankChanged(who: const _i1.U8ArrayCodec(32).decode(input), rank: _i1.U16Codec.codec.decode(input)); } /// T::AccountId @@ -225,11 +176,8 @@ class RankChanged extends Event { @override Map> toJson() => { - 'RankChanged': { - 'who': who.toList(), - 'rank': rank, - } - }; + 'RankChanged': {'who': who.toList(), 'rank': rank}, + }; int _sizeHint() { int size = 1; @@ -239,52 +187,25 @@ class RankChanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U16Codec.codec.encodeTo( - rank, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U16Codec.codec.encodeTo(rank, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RankChanged && - _i6.listsEqual( - other.who, - who, - ) && - other.rank == rank; + identical(this, other) || other is RankChanged && _i6.listsEqual(other.who, who) && other.rank == rank; @override - int get hashCode => Object.hash( - who, - rank, - ); + int get hashCode => Object.hash(who, rank); } /// The member `who` of given `rank` has been removed from the collective. class MemberRemoved extends Event { - const MemberRemoved({ - required this.who, - required this.rank, - }); + const MemberRemoved({required this.who, required this.rank}); factory MemberRemoved._decode(_i1.Input input) { - return MemberRemoved( - who: const _i1.U8ArrayCodec(32).decode(input), - rank: _i1.U16Codec.codec.decode(input), - ); + return MemberRemoved(who: const _i1.U8ArrayCodec(32).decode(input), rank: _i1.U16Codec.codec.decode(input)); } /// T::AccountId @@ -295,11 +216,8 @@ class MemberRemoved extends Event { @override Map> toJson() => { - 'MemberRemoved': { - 'who': who.toList(), - 'rank': rank, - } - }; + 'MemberRemoved': {'who': who.toList(), 'rank': rank}, + }; int _sizeHint() { int size = 1; @@ -309,49 +227,23 @@ class MemberRemoved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U16Codec.codec.encodeTo( - rank, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U16Codec.codec.encodeTo(rank, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MemberRemoved && - _i6.listsEqual( - other.who, - who, - ) && - other.rank == rank; + identical(this, other) || other is MemberRemoved && _i6.listsEqual(other.who, who) && other.rank == rank; @override - int get hashCode => Object.hash( - who, - rank, - ); + int get hashCode => Object.hash(who, rank); } /// The member `who` has voted for the `poll` with the given `vote` leading to an updated /// `tally`. class Voted extends Event { - const Voted({ - required this.who, - required this.poll, - required this.vote, - required this.tally, - }); + const Voted({required this.who, required this.poll, required this.vote, required this.tally}); factory Voted._decode(_i1.Input input) { return Voted( @@ -376,13 +268,8 @@ class Voted extends Event { @override Map> toJson() => { - 'Voted': { - 'who': who.toList(), - 'poll': poll, - 'vote': vote.toJson(), - 'tally': tally.toJson(), - } - }; + 'Voted': {'who': who.toList(), 'poll': poll, 'vote': vote.toJson(), 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -394,58 +281,29 @@ class Voted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U32Codec.codec.encodeTo( - poll, - output, - ); - _i4.VoteRecord.codec.encodeTo( - vote, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U32Codec.codec.encodeTo(poll, output); + _i4.VoteRecord.codec.encodeTo(vote, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Voted && - _i6.listsEqual( - other.who, - who, - ) && + _i6.listsEqual(other.who, who) && other.poll == poll && other.vote == vote && other.tally == tally; @override - int get hashCode => Object.hash( - who, - poll, - vote, - tally, - ); + int get hashCode => Object.hash(who, poll, vote, tally); } /// The member `who` had their `AccountId` changed to `new_who`. class MemberExchanged extends Event { - const MemberExchanged({ - required this.who, - required this.newWho, - }); + const MemberExchanged({required this.who, required this.newWho}); factory MemberExchanged._decode(_i1.Input input) { return MemberExchanged( @@ -462,11 +320,8 @@ class MemberExchanged extends Event { @override Map>> toJson() => { - 'MemberExchanged': { - 'who': who.toList(), - 'newWho': newWho.toList(), - } - }; + 'MemberExchanged': {'who': who.toList(), 'newWho': newWho.toList()}, + }; int _sizeHint() { int size = 1; @@ -476,39 +331,16 @@ class MemberExchanged extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - newWho, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + const _i1.U8ArrayCodec(32).encodeTo(newWho, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MemberExchanged && - _i6.listsEqual( - other.who, - who, - ) && - _i6.listsEqual( - other.newWho, - newWho, - ); + identical(this, other) || + other is MemberExchanged && _i6.listsEqual(other.who, who) && _i6.listsEqual(other.newWho, newWho); @override - int get hashCode => Object.hash( - who, - newWho, - ); + int get hashCode => Object.hash(who, newWho); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/tally.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/tally.dart index 77fac349..dcacb46c 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/tally.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/tally.dart @@ -4,11 +4,7 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class Tally { - const Tally({ - required this.bareAyes, - required this.ayes, - required this.nays, - }); + const Tally({required this.bareAyes, required this.ayes, required this.nays}); factory Tally.decode(_i1.Input input) { return codec.decode(input); @@ -29,51 +25,25 @@ class Tally { return codec.encode(this); } - Map toJson() => { - 'bareAyes': bareAyes, - 'ayes': ayes, - 'nays': nays, - }; + Map toJson() => {'bareAyes': bareAyes, 'ayes': ayes, 'nays': nays}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Tally && - other.bareAyes == bareAyes && - other.ayes == ayes && - other.nays == nays; + identical(this, other) || + other is Tally && other.bareAyes == bareAyes && other.ayes == ayes && other.nays == nays; @override - int get hashCode => Object.hash( - bareAyes, - ayes, - nays, - ); + int get hashCode => Object.hash(bareAyes, ayes, nays); } class $TallyCodec with _i1.Codec { const $TallyCodec(); @override - void encodeTo( - Tally obj, - _i1.Output output, - ) { - _i1.U32Codec.codec.encodeTo( - obj.bareAyes, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.ayes, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.nays, - output, - ); + void encodeTo(Tally obj, _i1.Output output) { + _i1.U32Codec.codec.encodeTo(obj.bareAyes, output); + _i1.U32Codec.codec.encodeTo(obj.ayes, output); + _i1.U32Codec.codec.encodeTo(obj.nays, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/vote_record.dart b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/vote_record.dart index 4a5a5ccf..8a05fdc3 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/vote_record.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_ranked_collective/vote_record.dart @@ -56,10 +56,7 @@ class $VoteRecordCodec with _i1.Codec { } @override - void encodeTo( - VoteRecord value, - _i1.Output output, - ) { + void encodeTo(VoteRecord value, _i1.Output output) { switch (value.runtimeType) { case Aye: (value as Aye).encodeTo(output); @@ -68,8 +65,7 @@ class $VoteRecordCodec with _i1.Codec { (value as Nay).encodeTo(output); break; default: - throw Exception( - 'VoteRecord: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('VoteRecord: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -81,8 +77,7 @@ class $VoteRecordCodec with _i1.Codec { case Nay: return (value as Nay)._sizeHint(); default: - throw Exception( - 'VoteRecord: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('VoteRecord: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -107,23 +102,12 @@ class Aye extends VoteRecord { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Aye && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Aye && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -149,23 +133,12 @@ class Nay extends VoteRecord { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Nay && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Nay && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/active_recovery.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/active_recovery.dart index dda7b5da..2df5af34 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/active_recovery.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/active_recovery.dart @@ -7,11 +7,7 @@ import 'package:quiver/collection.dart' as _i4; import '../sp_core/crypto/account_id32.dart' as _i2; class ActiveRecovery { - const ActiveRecovery({ - required this.created, - required this.deposit, - required this.friends, - }); + const ActiveRecovery({required this.created, required this.deposit, required this.friends}); factory ActiveRecovery.decode(_i1.Input input) { return codec.decode(input); @@ -33,53 +29,31 @@ class ActiveRecovery { } Map toJson() => { - 'created': created, - 'deposit': deposit, - 'friends': friends.map((value) => value.toList()).toList(), - }; + 'created': created, + 'deposit': deposit, + 'friends': friends.map((value) => value.toList()).toList(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ActiveRecovery && other.created == created && other.deposit == deposit && - _i4.listsEqual( - other.friends, - friends, - ); + _i4.listsEqual(other.friends, friends); @override - int get hashCode => Object.hash( - created, - deposit, - friends, - ); + int get hashCode => Object.hash(created, deposit, friends); } class $ActiveRecoveryCodec with _i1.Codec { const $ActiveRecoveryCodec(); @override - void encodeTo( - ActiveRecovery obj, - _i1.Output output, - ) { - _i1.U32Codec.codec.encodeTo( - obj.created, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.deposit, - output, - ); - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo( - obj.friends, - output, - ); + void encodeTo(ActiveRecovery obj, _i1.Output output) { + _i1.U32Codec.codec.encodeTo(obj.created, output); + _i1.U128Codec.codec.encodeTo(obj.deposit, output); + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo(obj.friends, output); } @override @@ -87,8 +61,7 @@ class $ActiveRecoveryCodec with _i1.Codec { return ActiveRecovery( created: _i1.U32Codec.codec.decode(input), deposit: _i1.U128Codec.codec.decode(input), - friends: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) - .decode(input), + friends: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).decode(input), ); } @@ -97,9 +70,7 @@ class $ActiveRecoveryCodec with _i1.Codec { int size = 0; size = size + _i1.U32Codec.codec.sizeHint(obj.created); size = size + _i1.U128Codec.codec.sizeHint(obj.deposit); - size = size + - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) - .sizeHint(obj.friends); + size = size + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).sizeHint(obj.friends); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/deposit_kind.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/deposit_kind.dart index f9b5c57b..8e0a6d10 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/deposit_kind.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/deposit_kind.dart @@ -59,10 +59,7 @@ class $DepositKindCodec with _i1.Codec { } @override - void encodeTo( - DepositKind value, - _i1.Output output, - ) { + void encodeTo(DepositKind value, _i1.Output output) { switch (value.runtimeType) { case RecoveryConfig: (value as RecoveryConfig).encodeTo(output); @@ -71,8 +68,7 @@ class $DepositKindCodec with _i1.Codec { (value as ActiveRecoveryFor).encodeTo(output); break; default: - throw Exception( - 'DepositKind: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DepositKind: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -84,8 +80,7 @@ class $DepositKindCodec with _i1.Codec { case ActiveRecoveryFor: return (value as ActiveRecoveryFor)._sizeHint(); default: - throw Exception( - 'DepositKind: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DepositKind: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -97,10 +92,7 @@ class RecoveryConfig extends DepositKind { Map toJson() => {'RecoveryConfig': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); } @override @@ -130,27 +122,13 @@ class ActiveRecoveryFor extends DepositKind { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(value0, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ActiveRecoveryFor && - _i4.listsEqual( - other.value0, - value0, - ); + identical(this, other) || other is ActiveRecoveryFor && _i4.listsEqual(other.value0, value0); @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/call.dart index cfb0f532..6aa962cb 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/call.dart @@ -36,24 +36,12 @@ abstract class Call { class $Call { const $Call(); - AsRecovered asRecovered({ - required _i3.MultiAddress account, - required _i4.RuntimeCall call, - }) { - return AsRecovered( - account: account, - call: call, - ); + AsRecovered asRecovered({required _i3.MultiAddress account, required _i4.RuntimeCall call}) { + return AsRecovered(account: account, call: call); } - SetRecovered setRecovered({ - required _i3.MultiAddress lost, - required _i3.MultiAddress rescuer, - }) { - return SetRecovered( - lost: lost, - rescuer: rescuer, - ); + SetRecovered setRecovered({required _i3.MultiAddress lost, required _i3.MultiAddress rescuer}) { + return SetRecovered(lost: lost, rescuer: rescuer); } CreateRecovery createRecovery({ @@ -61,25 +49,15 @@ class $Call { required int threshold, required int delayPeriod, }) { - return CreateRecovery( - friends: friends, - threshold: threshold, - delayPeriod: delayPeriod, - ); + return CreateRecovery(friends: friends, threshold: threshold, delayPeriod: delayPeriod); } InitiateRecovery initiateRecovery({required _i3.MultiAddress account}) { return InitiateRecovery(account: account); } - VouchRecovery vouchRecovery({ - required _i3.MultiAddress lost, - required _i3.MultiAddress rescuer, - }) { - return VouchRecovery( - lost: lost, - rescuer: rescuer, - ); + VouchRecovery vouchRecovery({required _i3.MultiAddress lost, required _i3.MultiAddress rescuer}) { + return VouchRecovery(lost: lost, rescuer: rescuer); } ClaimRecovery claimRecovery({required _i3.MultiAddress account}) { @@ -136,10 +114,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case AsRecovered: (value as AsRecovered).encodeTo(output); @@ -172,8 +147,7 @@ class $CallCodec with _i1.Codec { (value as PokeDeposit).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -201,8 +175,7 @@ class $CallCodec with _i1.Codec { case PokeDeposit: return (value as PokeDeposit)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -216,16 +189,10 @@ class $CallCodec with _i1.Codec { /// - `account`: The recovered account you want to make a call on-behalf-of. /// - `call`: The call you want to make with the recovered account. class AsRecovered extends Call { - const AsRecovered({ - required this.account, - required this.call, - }); + const AsRecovered({required this.account, required this.call}); factory AsRecovered._decode(_i1.Input input) { - return AsRecovered( - account: _i3.MultiAddress.codec.decode(input), - call: _i4.RuntimeCall.codec.decode(input), - ); + return AsRecovered(account: _i3.MultiAddress.codec.decode(input), call: _i4.RuntimeCall.codec.decode(input)); } /// AccountIdLookupOf @@ -236,11 +203,8 @@ class AsRecovered extends Call { @override Map>> toJson() => { - 'as_recovered': { - 'account': account.toJson(), - 'call': call.toJson(), - } - }; + 'as_recovered': {'account': account.toJson(), 'call': call.toJson()}, + }; int _sizeHint() { int size = 1; @@ -250,33 +214,17 @@ class AsRecovered extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.MultiAddress.codec.encodeTo( - account, - output, - ); - _i4.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.MultiAddress.codec.encodeTo(account, output); + _i4.RuntimeCall.codec.encodeTo(call, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AsRecovered && other.account == account && other.call == call; + identical(this, other) || other is AsRecovered && other.account == account && other.call == call; @override - int get hashCode => Object.hash( - account, - call, - ); + int get hashCode => Object.hash(account, call); } /// Allow ROOT to bypass the recovery process and set a rescuer account @@ -288,16 +236,10 @@ class AsRecovered extends Call { /// - `lost`: The "lost account" to be recovered. /// - `rescuer`: The "rescuer account" which can call as the lost account. class SetRecovered extends Call { - const SetRecovered({ - required this.lost, - required this.rescuer, - }); + const SetRecovered({required this.lost, required this.rescuer}); factory SetRecovered._decode(_i1.Input input) { - return SetRecovered( - lost: _i3.MultiAddress.codec.decode(input), - rescuer: _i3.MultiAddress.codec.decode(input), - ); + return SetRecovered(lost: _i3.MultiAddress.codec.decode(input), rescuer: _i3.MultiAddress.codec.decode(input)); } /// AccountIdLookupOf @@ -308,11 +250,8 @@ class SetRecovered extends Call { @override Map>> toJson() => { - 'set_recovered': { - 'lost': lost.toJson(), - 'rescuer': rescuer.toJson(), - } - }; + 'set_recovered': {'lost': lost.toJson(), 'rescuer': rescuer.toJson()}, + }; int _sizeHint() { int size = 1; @@ -322,33 +261,17 @@ class SetRecovered extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i3.MultiAddress.codec.encodeTo( - lost, - output, - ); - _i3.MultiAddress.codec.encodeTo( - rescuer, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i3.MultiAddress.codec.encodeTo(lost, output); + _i3.MultiAddress.codec.encodeTo(rescuer, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetRecovered && other.lost == lost && other.rescuer == rescuer; + identical(this, other) || other is SetRecovered && other.lost == lost && other.rescuer == rescuer; @override - int get hashCode => Object.hash( - lost, - rescuer, - ); + int get hashCode => Object.hash(lost, rescuer); } /// Create a recovery configuration for your account. This makes your account recoverable. @@ -368,16 +291,11 @@ class SetRecovered extends Call { /// - `delay_period`: The number of blocks after a recovery attempt is initialized that /// needs to pass before the account can be recovered. class CreateRecovery extends Call { - const CreateRecovery({ - required this.friends, - required this.threshold, - required this.delayPeriod, - }); + const CreateRecovery({required this.friends, required this.threshold, required this.delayPeriod}); factory CreateRecovery._decode(_i1.Input input) { return CreateRecovery( - friends: const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()) - .decode(input), + friends: const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()).decode(input), threshold: _i1.U16Codec.codec.decode(input), delayPeriod: _i1.U32Codec.codec.decode(input), ); @@ -394,62 +312,38 @@ class CreateRecovery extends Call { @override Map> toJson() => { - 'create_recovery': { - 'friends': friends.map((value) => value.toList()).toList(), - 'threshold': threshold, - 'delayPeriod': delayPeriod, - } - }; + 'create_recovery': { + 'friends': friends.map((value) => value.toList()).toList(), + 'threshold': threshold, + 'delayPeriod': delayPeriod, + }, + }; int _sizeHint() { int size = 1; - size = size + - const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()) - .sizeHint(friends); + size = size + const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()).sizeHint(friends); size = size + _i1.U16Codec.codec.sizeHint(threshold); size = size + _i1.U32Codec.codec.sizeHint(delayPeriod); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()).encodeTo( - friends, - output, - ); - _i1.U16Codec.codec.encodeTo( - threshold, - output, - ); - _i1.U32Codec.codec.encodeTo( - delayPeriod, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()).encodeTo(friends, output); + _i1.U16Codec.codec.encodeTo(threshold, output); + _i1.U32Codec.codec.encodeTo(delayPeriod, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is CreateRecovery && - _i6.listsEqual( - other.friends, - friends, - ) && + _i6.listsEqual(other.friends, friends) && other.threshold == threshold && other.delayPeriod == delayPeriod; @override - int get hashCode => Object.hash( - friends, - threshold, - delayPeriod, - ); + int get hashCode => Object.hash(friends, threshold, delayPeriod); } /// Initiate the process for recovering a recoverable account. @@ -475,8 +369,8 @@ class InitiateRecovery extends Call { @override Map>> toJson() => { - 'initiate_recovery': {'account': account.toJson()} - }; + 'initiate_recovery': {'account': account.toJson()}, + }; int _sizeHint() { int size = 1; @@ -485,23 +379,12 @@ class InitiateRecovery extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i3.MultiAddress.codec.encodeTo( - account, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i3.MultiAddress.codec.encodeTo(account, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is InitiateRecovery && other.account == account; + bool operator ==(Object other) => identical(this, other) || other is InitiateRecovery && other.account == account; @override int get hashCode => account.hashCode; @@ -520,16 +403,10 @@ class InitiateRecovery extends Call { /// The combination of these two parameters must point to an active recovery /// process. class VouchRecovery extends Call { - const VouchRecovery({ - required this.lost, - required this.rescuer, - }); + const VouchRecovery({required this.lost, required this.rescuer}); factory VouchRecovery._decode(_i1.Input input) { - return VouchRecovery( - lost: _i3.MultiAddress.codec.decode(input), - rescuer: _i3.MultiAddress.codec.decode(input), - ); + return VouchRecovery(lost: _i3.MultiAddress.codec.decode(input), rescuer: _i3.MultiAddress.codec.decode(input)); } /// AccountIdLookupOf @@ -540,11 +417,8 @@ class VouchRecovery extends Call { @override Map>> toJson() => { - 'vouch_recovery': { - 'lost': lost.toJson(), - 'rescuer': rescuer.toJson(), - } - }; + 'vouch_recovery': {'lost': lost.toJson(), 'rescuer': rescuer.toJson()}, + }; int _sizeHint() { int size = 1; @@ -554,33 +428,17 @@ class VouchRecovery extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i3.MultiAddress.codec.encodeTo( - lost, - output, - ); - _i3.MultiAddress.codec.encodeTo( - rescuer, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i3.MultiAddress.codec.encodeTo(lost, output); + _i3.MultiAddress.codec.encodeTo(rescuer, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is VouchRecovery && other.lost == lost && other.rescuer == rescuer; + identical(this, other) || other is VouchRecovery && other.lost == lost && other.rescuer == rescuer; @override - int get hashCode => Object.hash( - lost, - rescuer, - ); + int get hashCode => Object.hash(lost, rescuer); } /// Allow a successful rescuer to claim their recovered account. @@ -604,8 +462,8 @@ class ClaimRecovery extends Call { @override Map>> toJson() => { - 'claim_recovery': {'account': account.toJson()} - }; + 'claim_recovery': {'account': account.toJson()}, + }; int _sizeHint() { int size = 1; @@ -614,23 +472,12 @@ class ClaimRecovery extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i3.MultiAddress.codec.encodeTo( - account, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i3.MultiAddress.codec.encodeTo(account, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ClaimRecovery && other.account == account; + bool operator ==(Object other) => identical(this, other) || other is ClaimRecovery && other.account == account; @override int get hashCode => account.hashCode; @@ -659,8 +506,8 @@ class CloseRecovery extends Call { @override Map>> toJson() => { - 'close_recovery': {'rescuer': rescuer.toJson()} - }; + 'close_recovery': {'rescuer': rescuer.toJson()}, + }; int _sizeHint() { int size = 1; @@ -669,23 +516,12 @@ class CloseRecovery extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i3.MultiAddress.codec.encodeTo( - rescuer, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i3.MultiAddress.codec.encodeTo(rescuer, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is CloseRecovery && other.rescuer == rescuer; + bool operator ==(Object other) => identical(this, other) || other is CloseRecovery && other.rescuer == rescuer; @override int get hashCode => rescuer.hashCode; @@ -709,10 +545,7 @@ class RemoveRecovery extends Call { Map toJson() => {'remove_recovery': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); } @override @@ -741,8 +574,8 @@ class CancelRecovered extends Call { @override Map>> toJson() => { - 'cancel_recovered': {'account': account.toJson()} - }; + 'cancel_recovered': {'account': account.toJson()}, + }; int _sizeHint() { int size = 1; @@ -751,23 +584,12 @@ class CancelRecovered extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i3.MultiAddress.codec.encodeTo( - account, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i3.MultiAddress.codec.encodeTo(account, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is CancelRecovered && other.account == account; + bool operator ==(Object other) => identical(this, other) || other is CancelRecovered && other.account == account; @override int get hashCode => account.hashCode; @@ -800,10 +622,7 @@ class PokeDeposit extends Call { const PokeDeposit({this.maybeAccount}); factory PokeDeposit._decode(_i1.Input input) { - return PokeDeposit( - maybeAccount: - const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec) - .decode(input)); + return PokeDeposit(maybeAccount: const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec).decode(input)); } /// Option> @@ -811,35 +630,23 @@ class PokeDeposit extends Call { @override Map?>> toJson() => { - 'poke_deposit': {'maybeAccount': maybeAccount?.toJson()} - }; + 'poke_deposit': {'maybeAccount': maybeAccount?.toJson()}, + }; int _sizeHint() { int size = 1; - size = size + - const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec) - .sizeHint(maybeAccount); + size = size + const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec).sizeHint(maybeAccount); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec).encodeTo( - maybeAccount, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + const _i1.OptionCodec<_i3.MultiAddress>(_i3.MultiAddress.codec).encodeTo(maybeAccount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is PokeDeposit && other.maybeAccount == maybeAccount; + identical(this, other) || other is PokeDeposit && other.maybeAccount == maybeAccount; @override int get hashCode => maybeAccount.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/error.dart index e8555cf7..7a117318 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/error.dart @@ -53,10 +53,7 @@ enum Error { /// Some internal state is broken. badState('BadState', 15); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -120,13 +117,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/event.dart index a69b27fd..6544b0b1 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/pallet/event.dart @@ -39,14 +39,8 @@ class $Event { return RecoveryCreated(account: account); } - RecoveryInitiated recoveryInitiated({ - required _i3.AccountId32 lostAccount, - required _i3.AccountId32 rescuerAccount, - }) { - return RecoveryInitiated( - lostAccount: lostAccount, - rescuerAccount: rescuerAccount, - ); + RecoveryInitiated recoveryInitiated({required _i3.AccountId32 lostAccount, required _i3.AccountId32 rescuerAccount}) { + return RecoveryInitiated(lostAccount: lostAccount, rescuerAccount: rescuerAccount); } RecoveryVouched recoveryVouched({ @@ -54,31 +48,15 @@ class $Event { required _i3.AccountId32 rescuerAccount, required _i3.AccountId32 sender, }) { - return RecoveryVouched( - lostAccount: lostAccount, - rescuerAccount: rescuerAccount, - sender: sender, - ); + return RecoveryVouched(lostAccount: lostAccount, rescuerAccount: rescuerAccount, sender: sender); } - RecoveryClosed recoveryClosed({ - required _i3.AccountId32 lostAccount, - required _i3.AccountId32 rescuerAccount, - }) { - return RecoveryClosed( - lostAccount: lostAccount, - rescuerAccount: rescuerAccount, - ); + RecoveryClosed recoveryClosed({required _i3.AccountId32 lostAccount, required _i3.AccountId32 rescuerAccount}) { + return RecoveryClosed(lostAccount: lostAccount, rescuerAccount: rescuerAccount); } - AccountRecovered accountRecovered({ - required _i3.AccountId32 lostAccount, - required _i3.AccountId32 rescuerAccount, - }) { - return AccountRecovered( - lostAccount: lostAccount, - rescuerAccount: rescuerAccount, - ); + AccountRecovered accountRecovered({required _i3.AccountId32 lostAccount, required _i3.AccountId32 rescuerAccount}) { + return AccountRecovered(lostAccount: lostAccount, rescuerAccount: rescuerAccount); } RecoveryRemoved recoveryRemoved({required _i3.AccountId32 lostAccount}) { @@ -91,12 +69,7 @@ class $Event { required BigInt oldDeposit, required BigInt newDeposit, }) { - return DepositPoked( - who: who, - kind: kind, - oldDeposit: oldDeposit, - newDeposit: newDeposit, - ); + return DepositPoked(who: who, kind: kind, oldDeposit: oldDeposit, newDeposit: newDeposit); } } @@ -127,10 +100,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case RecoveryCreated: (value as RecoveryCreated).encodeTo(output); @@ -154,8 +124,7 @@ class $EventCodec with _i1.Codec { (value as DepositPoked).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -177,8 +146,7 @@ class $EventCodec with _i1.Codec { case DepositPoked: return (value as DepositPoked)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -196,8 +164,8 @@ class RecoveryCreated extends Event { @override Map>> toJson() => { - 'RecoveryCreated': {'account': account.toList()} - }; + 'RecoveryCreated': {'account': account.toList()}, + }; int _sizeHint() { int size = 1; @@ -206,27 +174,13 @@ class RecoveryCreated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RecoveryCreated && - _i5.listsEqual( - other.account, - account, - ); + identical(this, other) || other is RecoveryCreated && _i5.listsEqual(other.account, account); @override int get hashCode => account.hashCode; @@ -234,10 +188,7 @@ class RecoveryCreated extends Event { /// A recovery process has been initiated for lost account by rescuer account. class RecoveryInitiated extends Event { - const RecoveryInitiated({ - required this.lostAccount, - required this.rescuerAccount, - }); + const RecoveryInitiated({required this.lostAccount, required this.rescuerAccount}); factory RecoveryInitiated._decode(_i1.Input input) { return RecoveryInitiated( @@ -254,11 +205,8 @@ class RecoveryInitiated extends Event { @override Map>> toJson() => { - 'RecoveryInitiated': { - 'lostAccount': lostAccount.toList(), - 'rescuerAccount': rescuerAccount.toList(), - } - }; + 'RecoveryInitiated': {'lostAccount': lostAccount.toList(), 'rescuerAccount': rescuerAccount.toList()}, + }; int _sizeHint() { int size = 1; @@ -268,50 +216,25 @@ class RecoveryInitiated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - lostAccount, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - rescuerAccount, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(lostAccount, output); + const _i1.U8ArrayCodec(32).encodeTo(rescuerAccount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is RecoveryInitiated && - _i5.listsEqual( - other.lostAccount, - lostAccount, - ) && - _i5.listsEqual( - other.rescuerAccount, - rescuerAccount, - ); + _i5.listsEqual(other.lostAccount, lostAccount) && + _i5.listsEqual(other.rescuerAccount, rescuerAccount); @override - int get hashCode => Object.hash( - lostAccount, - rescuerAccount, - ); + int get hashCode => Object.hash(lostAccount, rescuerAccount); } /// A recovery process for lost account by rescuer account has been vouched for by sender. class RecoveryVouched extends Event { - const RecoveryVouched({ - required this.lostAccount, - required this.rescuerAccount, - required this.sender, - }); + const RecoveryVouched({required this.lostAccount, required this.rescuerAccount, required this.sender}); factory RecoveryVouched._decode(_i1.Input input) { return RecoveryVouched( @@ -332,12 +255,12 @@ class RecoveryVouched extends Event { @override Map>> toJson() => { - 'RecoveryVouched': { - 'lostAccount': lostAccount.toList(), - 'rescuerAccount': rescuerAccount.toList(), - 'sender': sender.toList(), - } - }; + 'RecoveryVouched': { + 'lostAccount': lostAccount.toList(), + 'rescuerAccount': rescuerAccount.toList(), + 'sender': sender.toList(), + }, + }; int _sizeHint() { int size = 1; @@ -348,58 +271,27 @@ class RecoveryVouched extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - lostAccount, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - rescuerAccount, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - sender, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(lostAccount, output); + const _i1.U8ArrayCodec(32).encodeTo(rescuerAccount, output); + const _i1.U8ArrayCodec(32).encodeTo(sender, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is RecoveryVouched && - _i5.listsEqual( - other.lostAccount, - lostAccount, - ) && - _i5.listsEqual( - other.rescuerAccount, - rescuerAccount, - ) && - _i5.listsEqual( - other.sender, - sender, - ); + _i5.listsEqual(other.lostAccount, lostAccount) && + _i5.listsEqual(other.rescuerAccount, rescuerAccount) && + _i5.listsEqual(other.sender, sender); @override - int get hashCode => Object.hash( - lostAccount, - rescuerAccount, - sender, - ); + int get hashCode => Object.hash(lostAccount, rescuerAccount, sender); } /// A recovery process for lost account by rescuer account has been closed. class RecoveryClosed extends Event { - const RecoveryClosed({ - required this.lostAccount, - required this.rescuerAccount, - }); + const RecoveryClosed({required this.lostAccount, required this.rescuerAccount}); factory RecoveryClosed._decode(_i1.Input input) { return RecoveryClosed( @@ -416,11 +308,8 @@ class RecoveryClosed extends Event { @override Map>> toJson() => { - 'RecoveryClosed': { - 'lostAccount': lostAccount.toList(), - 'rescuerAccount': rescuerAccount.toList(), - } - }; + 'RecoveryClosed': {'lostAccount': lostAccount.toList(), 'rescuerAccount': rescuerAccount.toList()}, + }; int _sizeHint() { int size = 1; @@ -430,49 +319,25 @@ class RecoveryClosed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - lostAccount, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - rescuerAccount, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(lostAccount, output); + const _i1.U8ArrayCodec(32).encodeTo(rescuerAccount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is RecoveryClosed && - _i5.listsEqual( - other.lostAccount, - lostAccount, - ) && - _i5.listsEqual( - other.rescuerAccount, - rescuerAccount, - ); + _i5.listsEqual(other.lostAccount, lostAccount) && + _i5.listsEqual(other.rescuerAccount, rescuerAccount); @override - int get hashCode => Object.hash( - lostAccount, - rescuerAccount, - ); + int get hashCode => Object.hash(lostAccount, rescuerAccount); } /// Lost account has been successfully recovered by rescuer account. class AccountRecovered extends Event { - const AccountRecovered({ - required this.lostAccount, - required this.rescuerAccount, - }); + const AccountRecovered({required this.lostAccount, required this.rescuerAccount}); factory AccountRecovered._decode(_i1.Input input) { return AccountRecovered( @@ -489,11 +354,8 @@ class AccountRecovered extends Event { @override Map>> toJson() => { - 'AccountRecovered': { - 'lostAccount': lostAccount.toList(), - 'rescuerAccount': rescuerAccount.toList(), - } - }; + 'AccountRecovered': {'lostAccount': lostAccount.toList(), 'rescuerAccount': rescuerAccount.toList()}, + }; int _sizeHint() { int size = 1; @@ -503,41 +365,20 @@ class AccountRecovered extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - lostAccount, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - rescuerAccount, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.U8ArrayCodec(32).encodeTo(lostAccount, output); + const _i1.U8ArrayCodec(32).encodeTo(rescuerAccount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is AccountRecovered && - _i5.listsEqual( - other.lostAccount, - lostAccount, - ) && - _i5.listsEqual( - other.rescuerAccount, - rescuerAccount, - ); + _i5.listsEqual(other.lostAccount, lostAccount) && + _i5.listsEqual(other.rescuerAccount, rescuerAccount); @override - int get hashCode => Object.hash( - lostAccount, - rescuerAccount, - ); + int get hashCode => Object.hash(lostAccount, rescuerAccount); } /// A recovery process has been removed for an account. @@ -545,8 +386,7 @@ class RecoveryRemoved extends Event { const RecoveryRemoved({required this.lostAccount}); factory RecoveryRemoved._decode(_i1.Input input) { - return RecoveryRemoved( - lostAccount: const _i1.U8ArrayCodec(32).decode(input)); + return RecoveryRemoved(lostAccount: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AccountId @@ -554,8 +394,8 @@ class RecoveryRemoved extends Event { @override Map>> toJson() => { - 'RecoveryRemoved': {'lostAccount': lostAccount.toList()} - }; + 'RecoveryRemoved': {'lostAccount': lostAccount.toList()}, + }; int _sizeHint() { int size = 1; @@ -564,27 +404,13 @@ class RecoveryRemoved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - lostAccount, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + const _i1.U8ArrayCodec(32).encodeTo(lostAccount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RecoveryRemoved && - _i5.listsEqual( - other.lostAccount, - lostAccount, - ); + identical(this, other) || other is RecoveryRemoved && _i5.listsEqual(other.lostAccount, lostAccount); @override int get hashCode => lostAccount.hashCode; @@ -592,12 +418,7 @@ class RecoveryRemoved extends Event { /// A deposit has been updated. class DepositPoked extends Event { - const DepositPoked({ - required this.who, - required this.kind, - required this.oldDeposit, - required this.newDeposit, - }); + const DepositPoked({required this.who, required this.kind, required this.oldDeposit, required this.newDeposit}); factory DepositPoked._decode(_i1.Input input) { return DepositPoked( @@ -622,13 +443,8 @@ class DepositPoked extends Event { @override Map> toJson() => { - 'DepositPoked': { - 'who': who.toList(), - 'kind': kind.toJson(), - 'oldDeposit': oldDeposit, - 'newDeposit': newDeposit, - } - }; + 'DepositPoked': {'who': who.toList(), 'kind': kind.toJson(), 'oldDeposit': oldDeposit, 'newDeposit': newDeposit}, + }; int _sizeHint() { int size = 1; @@ -640,48 +456,22 @@ class DepositPoked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i4.DepositKind.codec.encodeTo( - kind, - output, - ); - _i1.U128Codec.codec.encodeTo( - oldDeposit, - output, - ); - _i1.U128Codec.codec.encodeTo( - newDeposit, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i4.DepositKind.codec.encodeTo(kind, output); + _i1.U128Codec.codec.encodeTo(oldDeposit, output); + _i1.U128Codec.codec.encodeTo(newDeposit, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is DepositPoked && - _i5.listsEqual( - other.who, - who, - ) && + _i5.listsEqual(other.who, who) && other.kind == kind && other.oldDeposit == oldDeposit && other.newDeposit == newDeposit; @override - int get hashCode => Object.hash( - who, - kind, - oldDeposit, - newDeposit, - ); + int get hashCode => Object.hash(who, kind, oldDeposit, newDeposit); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_recovery/recovery_config.dart b/quantus_sdk/lib/generated/planck/types/pallet_recovery/recovery_config.dart index 75daa32a..2a6992a2 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_recovery/recovery_config.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_recovery/recovery_config.dart @@ -37,60 +37,34 @@ class RecoveryConfig { } Map toJson() => { - 'delayPeriod': delayPeriod, - 'deposit': deposit, - 'friends': friends.map((value) => value.toList()).toList(), - 'threshold': threshold, - }; + 'delayPeriod': delayPeriod, + 'deposit': deposit, + 'friends': friends.map((value) => value.toList()).toList(), + 'threshold': threshold, + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is RecoveryConfig && other.delayPeriod == delayPeriod && other.deposit == deposit && - _i4.listsEqual( - other.friends, - friends, - ) && + _i4.listsEqual(other.friends, friends) && other.threshold == threshold; @override - int get hashCode => Object.hash( - delayPeriod, - deposit, - friends, - threshold, - ); + int get hashCode => Object.hash(delayPeriod, deposit, friends, threshold); } class $RecoveryConfigCodec with _i1.Codec { const $RecoveryConfigCodec(); @override - void encodeTo( - RecoveryConfig obj, - _i1.Output output, - ) { - _i1.U32Codec.codec.encodeTo( - obj.delayPeriod, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.deposit, - output, - ); - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo( - obj.friends, - output, - ); - _i1.U16Codec.codec.encodeTo( - obj.threshold, - output, - ); + void encodeTo(RecoveryConfig obj, _i1.Output output) { + _i1.U32Codec.codec.encodeTo(obj.delayPeriod, output); + _i1.U128Codec.codec.encodeTo(obj.deposit, output); + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).encodeTo(obj.friends, output); + _i1.U16Codec.codec.encodeTo(obj.threshold, output); } @override @@ -98,8 +72,7 @@ class $RecoveryConfigCodec with _i1.Codec { return RecoveryConfig( delayPeriod: _i1.U32Codec.codec.decode(input), deposit: _i1.U128Codec.codec.decode(input), - friends: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) - .decode(input), + friends: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).decode(input), threshold: _i1.U16Codec.codec.decode(input), ); } @@ -109,9 +82,7 @@ class $RecoveryConfigCodec with _i1.Codec { int size = 0; size = size + _i1.U32Codec.codec.sizeHint(obj.delayPeriod); size = size + _i1.U128Codec.codec.sizeHint(obj.deposit); - size = size + - const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()) - .sizeHint(obj.friends); + size = size + const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).sizeHint(obj.friends); size = size + _i1.U16Codec.codec.sizeHint(obj.threshold); return size; } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_1.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_1.dart index 1e8b28e5..bb798313 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_1.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_1.dart @@ -41,11 +41,7 @@ class $Call { required _i4.Bounded proposal, required _i5.DispatchTime enactmentMoment, }) { - return Submit( - proposalOrigin: proposalOrigin, - proposal: proposal, - enactmentMoment: enactmentMoment, - ); + return Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment); } PlaceDecisionDeposit placeDecisionDeposit({required int index}) { @@ -76,14 +72,8 @@ class $Call { return RefundSubmissionDeposit(index: index); } - SetMetadata setMetadata({ - required int index, - _i6.H256? maybeHash, - }) { - return SetMetadata( - index: index, - maybeHash: maybeHash, - ); + SetMetadata setMetadata({required int index, _i6.H256? maybeHash}) { + return SetMetadata(index: index, maybeHash: maybeHash); } } @@ -118,10 +108,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case Submit: (value as Submit).encodeTo(output); @@ -151,8 +138,7 @@ class $CallCodec with _i1.Codec { (value as SetMetadata).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -178,8 +164,7 @@ class $CallCodec with _i1.Codec { case SetMetadata: return (value as SetMetadata)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -194,11 +179,7 @@ class $CallCodec with _i1.Codec { /// /// Emits `Submitted`. class Submit extends Call { - const Submit({ - required this.proposalOrigin, - required this.proposal, - required this.enactmentMoment, - }); + const Submit({required this.proposalOrigin, required this.proposal, required this.enactmentMoment}); factory Submit._decode(_i1.Input input) { return Submit( @@ -219,12 +200,12 @@ class Submit extends Call { @override Map>> toJson() => { - 'submit': { - 'proposalOrigin': proposalOrigin.toJson(), - 'proposal': proposal.toJson(), - 'enactmentMoment': enactmentMoment.toJson(), - } - }; + 'submit': { + 'proposalOrigin': proposalOrigin.toJson(), + 'proposal': proposal.toJson(), + 'enactmentMoment': enactmentMoment.toJson(), + }, + }; int _sizeHint() { int size = 1; @@ -235,41 +216,22 @@ class Submit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.OriginCaller.codec.encodeTo( - proposalOrigin, - output, - ); - _i4.Bounded.codec.encodeTo( - proposal, - output, - ); - _i5.DispatchTime.codec.encodeTo( - enactmentMoment, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.OriginCaller.codec.encodeTo(proposalOrigin, output); + _i4.Bounded.codec.encodeTo(proposal, output); + _i5.DispatchTime.codec.encodeTo(enactmentMoment, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Submit && other.proposalOrigin == proposalOrigin && other.proposal == proposal && other.enactmentMoment == enactmentMoment; @override - int get hashCode => Object.hash( - proposalOrigin, - proposal, - enactmentMoment, - ); + int get hashCode => Object.hash(proposalOrigin, proposal, enactmentMoment); } /// Post the Decision Deposit for a referendum. @@ -292,8 +254,8 @@ class PlaceDecisionDeposit extends Call { @override Map> toJson() => { - 'place_decision_deposit': {'index': index} - }; + 'place_decision_deposit': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -302,23 +264,12 @@ class PlaceDecisionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is PlaceDecisionDeposit && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is PlaceDecisionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -343,8 +294,8 @@ class RefundDecisionDeposit extends Call { @override Map> toJson() => { - 'refund_decision_deposit': {'index': index} - }; + 'refund_decision_deposit': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -353,23 +304,12 @@ class RefundDecisionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RefundDecisionDeposit && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is RefundDecisionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -393,8 +333,8 @@ class Cancel extends Call { @override Map> toJson() => { - 'cancel': {'index': index} - }; + 'cancel': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -403,23 +343,12 @@ class Cancel extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Cancel && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is Cancel && other.index == index; @override int get hashCode => index.hashCode; @@ -443,8 +372,8 @@ class Kill extends Call { @override Map> toJson() => { - 'kill': {'index': index} - }; + 'kill': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -453,23 +382,12 @@ class Kill extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Kill && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is Kill && other.index == index; @override int get hashCode => index.hashCode; @@ -491,8 +409,8 @@ class NudgeReferendum extends Call { @override Map> toJson() => { - 'nudge_referendum': {'index': index} - }; + 'nudge_referendum': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -501,23 +419,12 @@ class NudgeReferendum extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is NudgeReferendum && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is NudgeReferendum && other.index == index; @override int get hashCode => index.hashCode; @@ -544,8 +451,8 @@ class OneFewerDeciding extends Call { @override Map> toJson() => { - 'one_fewer_deciding': {'track': track} - }; + 'one_fewer_deciding': {'track': track}, + }; int _sizeHint() { int size = 1; @@ -554,23 +461,12 @@ class OneFewerDeciding extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i1.U16Codec.codec.encodeTo( - track, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i1.U16Codec.codec.encodeTo(track, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is OneFewerDeciding && other.track == track; + bool operator ==(Object other) => identical(this, other) || other is OneFewerDeciding && other.track == track; @override int get hashCode => track.hashCode; @@ -595,8 +491,8 @@ class RefundSubmissionDeposit extends Call { @override Map> toJson() => { - 'refund_submission_deposit': {'index': index} - }; + 'refund_submission_deposit': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -605,23 +501,12 @@ class RefundSubmissionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RefundSubmissionDeposit && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is RefundSubmissionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -635,10 +520,7 @@ class RefundSubmissionDeposit extends Call { /// - `index`: The index of a referendum to set or clear metadata for. /// - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. class SetMetadata extends Call { - const SetMetadata({ - required this.index, - this.maybeHash, - }); + const SetMetadata({required this.index, this.maybeHash}); factory SetMetadata._decode(_i1.Input input) { return SetMetadata( @@ -655,48 +537,26 @@ class SetMetadata extends Call { @override Map> toJson() => { - 'set_metadata': { - 'index': index, - 'maybeHash': maybeHash?.toList(), - } - }; + 'set_metadata': {'index': index, 'maybeHash': maybeHash?.toList()}, + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + - const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).sizeHint(maybeHash); + size = size + const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).sizeHint(maybeHash); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).encodeTo( - maybeHash, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).encodeTo(maybeHash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetMetadata && - other.index == index && - other.maybeHash == maybeHash; + identical(this, other) || other is SetMetadata && other.index == index && other.maybeHash == maybeHash; @override - int get hashCode => Object.hash( - index, - maybeHash, - ); + int get hashCode => Object.hash(index, maybeHash); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_2.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_2.dart index 1e8b28e5..bb798313 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_2.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/call_2.dart @@ -41,11 +41,7 @@ class $Call { required _i4.Bounded proposal, required _i5.DispatchTime enactmentMoment, }) { - return Submit( - proposalOrigin: proposalOrigin, - proposal: proposal, - enactmentMoment: enactmentMoment, - ); + return Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment); } PlaceDecisionDeposit placeDecisionDeposit({required int index}) { @@ -76,14 +72,8 @@ class $Call { return RefundSubmissionDeposit(index: index); } - SetMetadata setMetadata({ - required int index, - _i6.H256? maybeHash, - }) { - return SetMetadata( - index: index, - maybeHash: maybeHash, - ); + SetMetadata setMetadata({required int index, _i6.H256? maybeHash}) { + return SetMetadata(index: index, maybeHash: maybeHash); } } @@ -118,10 +108,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case Submit: (value as Submit).encodeTo(output); @@ -151,8 +138,7 @@ class $CallCodec with _i1.Codec { (value as SetMetadata).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -178,8 +164,7 @@ class $CallCodec with _i1.Codec { case SetMetadata: return (value as SetMetadata)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -194,11 +179,7 @@ class $CallCodec with _i1.Codec { /// /// Emits `Submitted`. class Submit extends Call { - const Submit({ - required this.proposalOrigin, - required this.proposal, - required this.enactmentMoment, - }); + const Submit({required this.proposalOrigin, required this.proposal, required this.enactmentMoment}); factory Submit._decode(_i1.Input input) { return Submit( @@ -219,12 +200,12 @@ class Submit extends Call { @override Map>> toJson() => { - 'submit': { - 'proposalOrigin': proposalOrigin.toJson(), - 'proposal': proposal.toJson(), - 'enactmentMoment': enactmentMoment.toJson(), - } - }; + 'submit': { + 'proposalOrigin': proposalOrigin.toJson(), + 'proposal': proposal.toJson(), + 'enactmentMoment': enactmentMoment.toJson(), + }, + }; int _sizeHint() { int size = 1; @@ -235,41 +216,22 @@ class Submit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.OriginCaller.codec.encodeTo( - proposalOrigin, - output, - ); - _i4.Bounded.codec.encodeTo( - proposal, - output, - ); - _i5.DispatchTime.codec.encodeTo( - enactmentMoment, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.OriginCaller.codec.encodeTo(proposalOrigin, output); + _i4.Bounded.codec.encodeTo(proposal, output); + _i5.DispatchTime.codec.encodeTo(enactmentMoment, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Submit && other.proposalOrigin == proposalOrigin && other.proposal == proposal && other.enactmentMoment == enactmentMoment; @override - int get hashCode => Object.hash( - proposalOrigin, - proposal, - enactmentMoment, - ); + int get hashCode => Object.hash(proposalOrigin, proposal, enactmentMoment); } /// Post the Decision Deposit for a referendum. @@ -292,8 +254,8 @@ class PlaceDecisionDeposit extends Call { @override Map> toJson() => { - 'place_decision_deposit': {'index': index} - }; + 'place_decision_deposit': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -302,23 +264,12 @@ class PlaceDecisionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is PlaceDecisionDeposit && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is PlaceDecisionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -343,8 +294,8 @@ class RefundDecisionDeposit extends Call { @override Map> toJson() => { - 'refund_decision_deposit': {'index': index} - }; + 'refund_decision_deposit': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -353,23 +304,12 @@ class RefundDecisionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RefundDecisionDeposit && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is RefundDecisionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -393,8 +333,8 @@ class Cancel extends Call { @override Map> toJson() => { - 'cancel': {'index': index} - }; + 'cancel': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -403,23 +343,12 @@ class Cancel extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Cancel && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is Cancel && other.index == index; @override int get hashCode => index.hashCode; @@ -443,8 +372,8 @@ class Kill extends Call { @override Map> toJson() => { - 'kill': {'index': index} - }; + 'kill': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -453,23 +382,12 @@ class Kill extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Kill && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is Kill && other.index == index; @override int get hashCode => index.hashCode; @@ -491,8 +409,8 @@ class NudgeReferendum extends Call { @override Map> toJson() => { - 'nudge_referendum': {'index': index} - }; + 'nudge_referendum': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -501,23 +419,12 @@ class NudgeReferendum extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is NudgeReferendum && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is NudgeReferendum && other.index == index; @override int get hashCode => index.hashCode; @@ -544,8 +451,8 @@ class OneFewerDeciding extends Call { @override Map> toJson() => { - 'one_fewer_deciding': {'track': track} - }; + 'one_fewer_deciding': {'track': track}, + }; int _sizeHint() { int size = 1; @@ -554,23 +461,12 @@ class OneFewerDeciding extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i1.U16Codec.codec.encodeTo( - track, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i1.U16Codec.codec.encodeTo(track, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is OneFewerDeciding && other.track == track; + bool operator ==(Object other) => identical(this, other) || other is OneFewerDeciding && other.track == track; @override int get hashCode => track.hashCode; @@ -595,8 +491,8 @@ class RefundSubmissionDeposit extends Call { @override Map> toJson() => { - 'refund_submission_deposit': {'index': index} - }; + 'refund_submission_deposit': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -605,23 +501,12 @@ class RefundSubmissionDeposit extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RefundSubmissionDeposit && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is RefundSubmissionDeposit && other.index == index; @override int get hashCode => index.hashCode; @@ -635,10 +520,7 @@ class RefundSubmissionDeposit extends Call { /// - `index`: The index of a referendum to set or clear metadata for. /// - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. class SetMetadata extends Call { - const SetMetadata({ - required this.index, - this.maybeHash, - }); + const SetMetadata({required this.index, this.maybeHash}); factory SetMetadata._decode(_i1.Input input) { return SetMetadata( @@ -655,48 +537,26 @@ class SetMetadata extends Call { @override Map> toJson() => { - 'set_metadata': { - 'index': index, - 'maybeHash': maybeHash?.toList(), - } - }; + 'set_metadata': {'index': index, 'maybeHash': maybeHash?.toList()}, + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + - const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).sizeHint(maybeHash); + size = size + const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).sizeHint(maybeHash); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).encodeTo( - maybeHash, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).encodeTo(maybeHash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetMetadata && - other.index == index && - other.maybeHash == maybeHash; + identical(this, other) || other is SetMetadata && other.index == index && other.maybeHash == maybeHash; @override - int get hashCode => Object.hash( - index, - maybeHash, - ); + int get hashCode => Object.hash(index, maybeHash); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_1.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_1.dart index b238e661..79d21e4a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_1.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_1.dart @@ -47,10 +47,7 @@ enum Error { /// The preimage is stored with a different length than the one provided. preimageStoredWithDifferentLength('PreimageStoredWithDifferentLength', 13); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -110,13 +107,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_2.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_2.dart index b238e661..79d21e4a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_2.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/error_2.dart @@ -47,10 +47,7 @@ enum Error { /// The preimage is stored with a different length than the one provided. preimageStoredWithDifferentLength('PreimageStoredWithDifferentLength', 13); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -110,13 +107,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_1.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_1.dart index af8eb6e4..1be40aae 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_1.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_1.dart @@ -37,16 +37,8 @@ abstract class Event { class $Event { const $Event(); - Submitted submitted({ - required int index, - required int track, - required _i3.Bounded proposal, - }) { - return Submitted( - index: index, - track: track, - proposal: proposal, - ); + Submitted submitted({required int index, required int track, required _i3.Bounded proposal}) { + return Submitted(index: index, track: track, proposal: proposal); } DecisionDepositPlaced decisionDepositPlaced({ @@ -54,11 +46,7 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return DecisionDepositPlaced( - index: index, - who: who, - amount: amount, - ); + return DecisionDepositPlaced(index: index, who: who, amount: amount); } DecisionDepositRefunded decisionDepositRefunded({ @@ -66,21 +54,11 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return DecisionDepositRefunded( - index: index, - who: who, - amount: amount, - ); + return DecisionDepositRefunded(index: index, who: who, amount: amount); } - DepositSlashed depositSlashed({ - required _i4.AccountId32 who, - required BigInt amount, - }) { - return DepositSlashed( - who: who, - amount: amount, - ); + DepositSlashed depositSlashed({required _i4.AccountId32 who, required BigInt amount}) { + return DepositSlashed(who: who, amount: amount); } DecisionStarted decisionStarted({ @@ -89,12 +67,7 @@ class $Event { required _i3.Bounded proposal, required _i5.Tally tally, }) { - return DecisionStarted( - index: index, - track: track, - proposal: proposal, - tally: tally, - ); + return DecisionStarted(index: index, track: track, proposal: proposal, tally: tally); } ConfirmStarted confirmStarted({required int index}) { @@ -105,58 +78,28 @@ class $Event { return ConfirmAborted(index: index); } - Confirmed confirmed({ - required int index, - required _i5.Tally tally, - }) { - return Confirmed( - index: index, - tally: tally, - ); + Confirmed confirmed({required int index, required _i5.Tally tally}) { + return Confirmed(index: index, tally: tally); } Approved approved({required int index}) { return Approved(index: index); } - Rejected rejected({ - required int index, - required _i5.Tally tally, - }) { - return Rejected( - index: index, - tally: tally, - ); + Rejected rejected({required int index, required _i5.Tally tally}) { + return Rejected(index: index, tally: tally); } - TimedOut timedOut({ - required int index, - required _i5.Tally tally, - }) { - return TimedOut( - index: index, - tally: tally, - ); + TimedOut timedOut({required int index, required _i5.Tally tally}) { + return TimedOut(index: index, tally: tally); } - Cancelled cancelled({ - required int index, - required _i5.Tally tally, - }) { - return Cancelled( - index: index, - tally: tally, - ); + Cancelled cancelled({required int index, required _i5.Tally tally}) { + return Cancelled(index: index, tally: tally); } - Killed killed({ - required int index, - required _i5.Tally tally, - }) { - return Killed( - index: index, - tally: tally, - ); + Killed killed({required int index, required _i5.Tally tally}) { + return Killed(index: index, tally: tally); } SubmissionDepositRefunded submissionDepositRefunded({ @@ -164,31 +107,15 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return SubmissionDepositRefunded( - index: index, - who: who, - amount: amount, - ); + return SubmissionDepositRefunded(index: index, who: who, amount: amount); } - MetadataSet metadataSet({ - required int index, - required _i6.H256 hash, - }) { - return MetadataSet( - index: index, - hash: hash, - ); + MetadataSet metadataSet({required int index, required _i6.H256 hash}) { + return MetadataSet(index: index, hash: hash); } - MetadataCleared metadataCleared({ - required int index, - required _i6.H256 hash, - }) { - return MetadataCleared( - index: index, - hash: hash, - ); + MetadataCleared metadataCleared({required int index, required _i6.H256 hash}) { + return MetadataCleared(index: index, hash: hash); } } @@ -237,10 +164,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case Submitted: (value as Submitted).encodeTo(output); @@ -291,8 +215,7 @@ class $EventCodec with _i1.Codec { (value as MetadataCleared).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -332,19 +255,14 @@ class $EventCodec with _i1.Codec { case MetadataCleared: return (value as MetadataCleared)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A referendum has been submitted. class Submitted extends Event { - const Submitted({ - required this.index, - required this.track, - required this.proposal, - }); + const Submitted({required this.index, required this.track, required this.proposal}); factory Submitted._decode(_i1.Input input) { return Submitted( @@ -368,12 +286,8 @@ class Submitted extends Event { @override Map> toJson() => { - 'Submitted': { - 'index': index, - 'track': track, - 'proposal': proposal.toJson(), - } - }; + 'Submitted': {'index': index, 'track': track, 'proposal': proposal.toJson()}, + }; int _sizeHint() { int size = 1; @@ -384,50 +298,24 @@ class Submitted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i1.U16Codec.codec.encodeTo( - track, - output, - ); - _i3.Bounded.codec.encodeTo( - proposal, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i1.U16Codec.codec.encodeTo(track, output); + _i3.Bounded.codec.encodeTo(proposal, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Submitted && - other.index == index && - other.track == track && - other.proposal == proposal; + identical(this, other) || + other is Submitted && other.index == index && other.track == track && other.proposal == proposal; @override - int get hashCode => Object.hash( - index, - track, - proposal, - ); + int get hashCode => Object.hash(index, track, proposal); } /// The decision deposit has been placed. class DecisionDepositPlaced extends Event { - const DecisionDepositPlaced({ - required this.index, - required this.who, - required this.amount, - }); + const DecisionDepositPlaced({required this.index, required this.who, required this.amount}); factory DecisionDepositPlaced._decode(_i1.Input input) { return DecisionDepositPlaced( @@ -451,12 +339,8 @@ class DecisionDepositPlaced extends Event { @override Map> toJson() => { - 'DecisionDepositPlaced': { - 'index': index, - 'who': who.toList(), - 'amount': amount, - } - }; + 'DecisionDepositPlaced': {'index': index, 'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -467,53 +351,27 @@ class DecisionDepositPlaced extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is DecisionDepositPlaced && other.index == index && - _i7.listsEqual( - other.who, - who, - ) && + _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - index, - who, - amount, - ); + int get hashCode => Object.hash(index, who, amount); } /// The decision deposit has been refunded. class DecisionDepositRefunded extends Event { - const DecisionDepositRefunded({ - required this.index, - required this.who, - required this.amount, - }); + const DecisionDepositRefunded({required this.index, required this.who, required this.amount}); factory DecisionDepositRefunded._decode(_i1.Input input) { return DecisionDepositRefunded( @@ -537,12 +395,8 @@ class DecisionDepositRefunded extends Event { @override Map> toJson() => { - 'DecisionDepositRefunded': { - 'index': index, - 'who': who.toList(), - 'amount': amount, - } - }; + 'DecisionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -553,58 +407,30 @@ class DecisionDepositRefunded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is DecisionDepositRefunded && other.index == index && - _i7.listsEqual( - other.who, - who, - ) && + _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - index, - who, - amount, - ); + int get hashCode => Object.hash(index, who, amount); } /// A deposit has been slashed. class DepositSlashed extends Event { - const DepositSlashed({ - required this.who, - required this.amount, - }); + const DepositSlashed({required this.who, required this.amount}); factory DepositSlashed._decode(_i1.Input input) { - return DepositSlashed( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return DepositSlashed(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -617,11 +443,8 @@ class DepositSlashed extends Event { @override Map> toJson() => { - 'DepositSlashed': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'DepositSlashed': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -631,48 +454,22 @@ class DepositSlashed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DepositSlashed && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is DepositSlashed && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// A referendum has moved into the deciding phase. class DecisionStarted extends Event { - const DecisionStarted({ - required this.index, - required this.track, - required this.proposal, - required this.tally, - }); + const DecisionStarted({required this.index, required this.track, required this.proposal, required this.tally}); factory DecisionStarted._decode(_i1.Input input) { return DecisionStarted( @@ -701,13 +498,8 @@ class DecisionStarted extends Event { @override Map> toJson() => { - 'DecisionStarted': { - 'index': index, - 'track': track, - 'proposal': proposal.toJson(), - 'tally': tally.toJson(), - } - }; + 'DecisionStarted': {'index': index, 'track': track, 'proposal': proposal.toJson(), 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -719,34 +511,16 @@ class DecisionStarted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i1.U16Codec.codec.encodeTo( - track, - output, - ); - _i3.Bounded.codec.encodeTo( - proposal, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i1.U16Codec.codec.encodeTo(track, output); + _i3.Bounded.codec.encodeTo(proposal, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is DecisionStarted && other.index == index && other.track == track && @@ -754,12 +528,7 @@ class DecisionStarted extends Event { other.tally == tally; @override - int get hashCode => Object.hash( - index, - track, - proposal, - tally, - ); + int get hashCode => Object.hash(index, track, proposal, tally); } class ConfirmStarted extends Event { @@ -775,8 +544,8 @@ class ConfirmStarted extends Event { @override Map> toJson() => { - 'ConfirmStarted': {'index': index} - }; + 'ConfirmStarted': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -785,23 +554,12 @@ class ConfirmStarted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ConfirmStarted && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is ConfirmStarted && other.index == index; @override int get hashCode => index.hashCode; @@ -820,8 +578,8 @@ class ConfirmAborted extends Event { @override Map> toJson() => { - 'ConfirmAborted': {'index': index} - }; + 'ConfirmAborted': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -830,23 +588,12 @@ class ConfirmAborted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ConfirmAborted && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is ConfirmAborted && other.index == index; @override int get hashCode => index.hashCode; @@ -854,16 +601,10 @@ class ConfirmAborted extends Event { /// A referendum has ended its confirmation phase and is ready for approval. class Confirmed extends Event { - const Confirmed({ - required this.index, - required this.tally, - }); + const Confirmed({required this.index, required this.tally}); factory Confirmed._decode(_i1.Input input) { - return Confirmed( - index: _i1.U32Codec.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); + return Confirmed(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); } /// ReferendumIndex @@ -876,11 +617,8 @@ class Confirmed extends Event { @override Map> toJson() => { - 'Confirmed': { - 'index': index, - 'tally': tally.toJson(), - } - }; + 'Confirmed': {'index': index, 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -890,33 +628,17 @@ class Confirmed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Confirmed && other.index == index && other.tally == tally; + identical(this, other) || other is Confirmed && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash( - index, - tally, - ); + int get hashCode => Object.hash(index, tally); } /// A referendum has been approved and its proposal has been scheduled. @@ -933,8 +655,8 @@ class Approved extends Event { @override Map> toJson() => { - 'Approved': {'index': index} - }; + 'Approved': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -943,23 +665,12 @@ class Approved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Approved && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is Approved && other.index == index; @override int get hashCode => index.hashCode; @@ -967,16 +678,10 @@ class Approved extends Event { /// A proposal has been rejected by referendum. class Rejected extends Event { - const Rejected({ - required this.index, - required this.tally, - }); + const Rejected({required this.index, required this.tally}); factory Rejected._decode(_i1.Input input) { - return Rejected( - index: _i1.U32Codec.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); + return Rejected(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); } /// ReferendumIndex @@ -989,11 +694,8 @@ class Rejected extends Event { @override Map> toJson() => { - 'Rejected': { - 'index': index, - 'tally': tally.toJson(), - } - }; + 'Rejected': {'index': index, 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1003,47 +705,25 @@ class Rejected extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Rejected && other.index == index && other.tally == tally; + identical(this, other) || other is Rejected && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash( - index, - tally, - ); + int get hashCode => Object.hash(index, tally); } /// A referendum has been timed out without being decided. class TimedOut extends Event { - const TimedOut({ - required this.index, - required this.tally, - }); + const TimedOut({required this.index, required this.tally}); factory TimedOut._decode(_i1.Input input) { - return TimedOut( - index: _i1.U32Codec.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); + return TimedOut(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); } /// ReferendumIndex @@ -1056,11 +736,8 @@ class TimedOut extends Event { @override Map> toJson() => { - 'TimedOut': { - 'index': index, - 'tally': tally.toJson(), - } - }; + 'TimedOut': {'index': index, 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1070,47 +747,25 @@ class TimedOut extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TimedOut && other.index == index && other.tally == tally; + identical(this, other) || other is TimedOut && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash( - index, - tally, - ); + int get hashCode => Object.hash(index, tally); } /// A referendum has been cancelled. class Cancelled extends Event { - const Cancelled({ - required this.index, - required this.tally, - }); + const Cancelled({required this.index, required this.tally}); factory Cancelled._decode(_i1.Input input) { - return Cancelled( - index: _i1.U32Codec.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); + return Cancelled(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); } /// ReferendumIndex @@ -1123,11 +778,8 @@ class Cancelled extends Event { @override Map> toJson() => { - 'Cancelled': { - 'index': index, - 'tally': tally.toJson(), - } - }; + 'Cancelled': {'index': index, 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1137,47 +789,25 @@ class Cancelled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Cancelled && other.index == index && other.tally == tally; + identical(this, other) || other is Cancelled && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash( - index, - tally, - ); + int get hashCode => Object.hash(index, tally); } /// A referendum has been killed. class Killed extends Event { - const Killed({ - required this.index, - required this.tally, - }); + const Killed({required this.index, required this.tally}); factory Killed._decode(_i1.Input input) { - return Killed( - index: _i1.U32Codec.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); + return Killed(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); } /// ReferendumIndex @@ -1190,11 +820,8 @@ class Killed extends Event { @override Map> toJson() => { - 'Killed': { - 'index': index, - 'tally': tally.toJson(), - } - }; + 'Killed': {'index': index, 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1204,42 +831,22 @@ class Killed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 12, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(12, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Killed && other.index == index && other.tally == tally; + identical(this, other) || other is Killed && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash( - index, - tally, - ); + int get hashCode => Object.hash(index, tally); } /// The submission deposit has been refunded. class SubmissionDepositRefunded extends Event { - const SubmissionDepositRefunded({ - required this.index, - required this.who, - required this.amount, - }); + const SubmissionDepositRefunded({required this.index, required this.who, required this.amount}); factory SubmissionDepositRefunded._decode(_i1.Input input) { return SubmissionDepositRefunded( @@ -1263,12 +870,8 @@ class SubmissionDepositRefunded extends Event { @override Map> toJson() => { - 'SubmissionDepositRefunded': { - 'index': index, - 'who': who.toList(), - 'amount': amount, - } - }; + 'SubmissionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1279,58 +882,30 @@ class SubmissionDepositRefunded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 13, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(13, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is SubmissionDepositRefunded && other.index == index && - _i7.listsEqual( - other.who, - who, - ) && + _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - index, - who, - amount, - ); + int get hashCode => Object.hash(index, who, amount); } /// Metadata for a referendum has been set. class MetadataSet extends Event { - const MetadataSet({ - required this.index, - required this.hash, - }); + const MetadataSet({required this.index, required this.hash}); factory MetadataSet._decode(_i1.Input input) { - return MetadataSet( - index: _i1.U32Codec.codec.decode(input), - hash: const _i1.U8ArrayCodec(32).decode(input), - ); + return MetadataSet(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); } /// ReferendumIndex @@ -1343,11 +918,8 @@ class MetadataSet extends Event { @override Map> toJson() => { - 'MetadataSet': { - 'index': index, - 'hash': hash.toList(), - } - }; + 'MetadataSet': {'index': index, 'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -1357,52 +929,25 @@ class MetadataSet extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 14, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(14, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MetadataSet && - other.index == index && - _i7.listsEqual( - other.hash, - hash, - ); + identical(this, other) || other is MetadataSet && other.index == index && _i7.listsEqual(other.hash, hash); @override - int get hashCode => Object.hash( - index, - hash, - ); + int get hashCode => Object.hash(index, hash); } /// Metadata for a referendum has been cleared. class MetadataCleared extends Event { - const MetadataCleared({ - required this.index, - required this.hash, - }); + const MetadataCleared({required this.index, required this.hash}); factory MetadataCleared._decode(_i1.Input input) { - return MetadataCleared( - index: _i1.U32Codec.codec.decode(input), - hash: const _i1.U8ArrayCodec(32).decode(input), - ); + return MetadataCleared(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); } /// ReferendumIndex @@ -1415,11 +960,8 @@ class MetadataCleared extends Event { @override Map> toJson() => { - 'MetadataCleared': { - 'index': index, - 'hash': hash.toList(), - } - }; + 'MetadataCleared': {'index': index, 'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -1429,36 +971,15 @@ class MetadataCleared extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 15, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(15, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MetadataCleared && - other.index == index && - _i7.listsEqual( - other.hash, - hash, - ); + identical(this, other) || other is MetadataCleared && other.index == index && _i7.listsEqual(other.hash, hash); @override - int get hashCode => Object.hash( - index, - hash, - ); + int get hashCode => Object.hash(index, hash); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_2.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_2.dart index a205a0a7..4010a513 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_2.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/pallet/event_2.dart @@ -37,16 +37,8 @@ abstract class Event { class $Event { const $Event(); - Submitted submitted({ - required int index, - required int track, - required _i3.Bounded proposal, - }) { - return Submitted( - index: index, - track: track, - proposal: proposal, - ); + Submitted submitted({required int index, required int track, required _i3.Bounded proposal}) { + return Submitted(index: index, track: track, proposal: proposal); } DecisionDepositPlaced decisionDepositPlaced({ @@ -54,11 +46,7 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return DecisionDepositPlaced( - index: index, - who: who, - amount: amount, - ); + return DecisionDepositPlaced(index: index, who: who, amount: amount); } DecisionDepositRefunded decisionDepositRefunded({ @@ -66,21 +54,11 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return DecisionDepositRefunded( - index: index, - who: who, - amount: amount, - ); + return DecisionDepositRefunded(index: index, who: who, amount: amount); } - DepositSlashed depositSlashed({ - required _i4.AccountId32 who, - required BigInt amount, - }) { - return DepositSlashed( - who: who, - amount: amount, - ); + DepositSlashed depositSlashed({required _i4.AccountId32 who, required BigInt amount}) { + return DepositSlashed(who: who, amount: amount); } DecisionStarted decisionStarted({ @@ -89,12 +67,7 @@ class $Event { required _i3.Bounded proposal, required _i5.Tally tally, }) { - return DecisionStarted( - index: index, - track: track, - proposal: proposal, - tally: tally, - ); + return DecisionStarted(index: index, track: track, proposal: proposal, tally: tally); } ConfirmStarted confirmStarted({required int index}) { @@ -105,58 +78,28 @@ class $Event { return ConfirmAborted(index: index); } - Confirmed confirmed({ - required int index, - required _i5.Tally tally, - }) { - return Confirmed( - index: index, - tally: tally, - ); + Confirmed confirmed({required int index, required _i5.Tally tally}) { + return Confirmed(index: index, tally: tally); } Approved approved({required int index}) { return Approved(index: index); } - Rejected rejected({ - required int index, - required _i5.Tally tally, - }) { - return Rejected( - index: index, - tally: tally, - ); + Rejected rejected({required int index, required _i5.Tally tally}) { + return Rejected(index: index, tally: tally); } - TimedOut timedOut({ - required int index, - required _i5.Tally tally, - }) { - return TimedOut( - index: index, - tally: tally, - ); + TimedOut timedOut({required int index, required _i5.Tally tally}) { + return TimedOut(index: index, tally: tally); } - Cancelled cancelled({ - required int index, - required _i5.Tally tally, - }) { - return Cancelled( - index: index, - tally: tally, - ); + Cancelled cancelled({required int index, required _i5.Tally tally}) { + return Cancelled(index: index, tally: tally); } - Killed killed({ - required int index, - required _i5.Tally tally, - }) { - return Killed( - index: index, - tally: tally, - ); + Killed killed({required int index, required _i5.Tally tally}) { + return Killed(index: index, tally: tally); } SubmissionDepositRefunded submissionDepositRefunded({ @@ -164,31 +107,15 @@ class $Event { required _i4.AccountId32 who, required BigInt amount, }) { - return SubmissionDepositRefunded( - index: index, - who: who, - amount: amount, - ); + return SubmissionDepositRefunded(index: index, who: who, amount: amount); } - MetadataSet metadataSet({ - required int index, - required _i6.H256 hash, - }) { - return MetadataSet( - index: index, - hash: hash, - ); + MetadataSet metadataSet({required int index, required _i6.H256 hash}) { + return MetadataSet(index: index, hash: hash); } - MetadataCleared metadataCleared({ - required int index, - required _i6.H256 hash, - }) { - return MetadataCleared( - index: index, - hash: hash, - ); + MetadataCleared metadataCleared({required int index, required _i6.H256 hash}) { + return MetadataCleared(index: index, hash: hash); } } @@ -237,10 +164,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case Submitted: (value as Submitted).encodeTo(output); @@ -291,8 +215,7 @@ class $EventCodec with _i1.Codec { (value as MetadataCleared).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -332,19 +255,14 @@ class $EventCodec with _i1.Codec { case MetadataCleared: return (value as MetadataCleared)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A referendum has been submitted. class Submitted extends Event { - const Submitted({ - required this.index, - required this.track, - required this.proposal, - }); + const Submitted({required this.index, required this.track, required this.proposal}); factory Submitted._decode(_i1.Input input) { return Submitted( @@ -368,12 +286,8 @@ class Submitted extends Event { @override Map> toJson() => { - 'Submitted': { - 'index': index, - 'track': track, - 'proposal': proposal.toJson(), - } - }; + 'Submitted': {'index': index, 'track': track, 'proposal': proposal.toJson()}, + }; int _sizeHint() { int size = 1; @@ -384,50 +298,24 @@ class Submitted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i1.U16Codec.codec.encodeTo( - track, - output, - ); - _i3.Bounded.codec.encodeTo( - proposal, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i1.U16Codec.codec.encodeTo(track, output); + _i3.Bounded.codec.encodeTo(proposal, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Submitted && - other.index == index && - other.track == track && - other.proposal == proposal; + identical(this, other) || + other is Submitted && other.index == index && other.track == track && other.proposal == proposal; @override - int get hashCode => Object.hash( - index, - track, - proposal, - ); + int get hashCode => Object.hash(index, track, proposal); } /// The decision deposit has been placed. class DecisionDepositPlaced extends Event { - const DecisionDepositPlaced({ - required this.index, - required this.who, - required this.amount, - }); + const DecisionDepositPlaced({required this.index, required this.who, required this.amount}); factory DecisionDepositPlaced._decode(_i1.Input input) { return DecisionDepositPlaced( @@ -451,12 +339,8 @@ class DecisionDepositPlaced extends Event { @override Map> toJson() => { - 'DecisionDepositPlaced': { - 'index': index, - 'who': who.toList(), - 'amount': amount, - } - }; + 'DecisionDepositPlaced': {'index': index, 'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -467,53 +351,27 @@ class DecisionDepositPlaced extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is DecisionDepositPlaced && other.index == index && - _i7.listsEqual( - other.who, - who, - ) && + _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - index, - who, - amount, - ); + int get hashCode => Object.hash(index, who, amount); } /// The decision deposit has been refunded. class DecisionDepositRefunded extends Event { - const DecisionDepositRefunded({ - required this.index, - required this.who, - required this.amount, - }); + const DecisionDepositRefunded({required this.index, required this.who, required this.amount}); factory DecisionDepositRefunded._decode(_i1.Input input) { return DecisionDepositRefunded( @@ -537,12 +395,8 @@ class DecisionDepositRefunded extends Event { @override Map> toJson() => { - 'DecisionDepositRefunded': { - 'index': index, - 'who': who.toList(), - 'amount': amount, - } - }; + 'DecisionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -553,58 +407,30 @@ class DecisionDepositRefunded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is DecisionDepositRefunded && other.index == index && - _i7.listsEqual( - other.who, - who, - ) && + _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - index, - who, - amount, - ); + int get hashCode => Object.hash(index, who, amount); } /// A deposit has been slashed. class DepositSlashed extends Event { - const DepositSlashed({ - required this.who, - required this.amount, - }); + const DepositSlashed({required this.who, required this.amount}); factory DepositSlashed._decode(_i1.Input input) { - return DepositSlashed( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return DepositSlashed(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// T::AccountId @@ -617,11 +443,8 @@ class DepositSlashed extends Event { @override Map> toJson() => { - 'DepositSlashed': { - 'who': who.toList(), - 'amount': amount, - } - }; + 'DepositSlashed': {'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -631,48 +454,22 @@ class DepositSlashed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DepositSlashed && - _i7.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is DepositSlashed && _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } /// A referendum has moved into the deciding phase. class DecisionStarted extends Event { - const DecisionStarted({ - required this.index, - required this.track, - required this.proposal, - required this.tally, - }); + const DecisionStarted({required this.index, required this.track, required this.proposal, required this.tally}); factory DecisionStarted._decode(_i1.Input input) { return DecisionStarted( @@ -701,13 +498,8 @@ class DecisionStarted extends Event { @override Map> toJson() => { - 'DecisionStarted': { - 'index': index, - 'track': track, - 'proposal': proposal.toJson(), - 'tally': tally.toJson(), - } - }; + 'DecisionStarted': {'index': index, 'track': track, 'proposal': proposal.toJson(), 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -719,34 +511,16 @@ class DecisionStarted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i1.U16Codec.codec.encodeTo( - track, - output, - ); - _i3.Bounded.codec.encodeTo( - proposal, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i1.U16Codec.codec.encodeTo(track, output); + _i3.Bounded.codec.encodeTo(proposal, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is DecisionStarted && other.index == index && other.track == track && @@ -754,12 +528,7 @@ class DecisionStarted extends Event { other.tally == tally; @override - int get hashCode => Object.hash( - index, - track, - proposal, - tally, - ); + int get hashCode => Object.hash(index, track, proposal, tally); } class ConfirmStarted extends Event { @@ -775,8 +544,8 @@ class ConfirmStarted extends Event { @override Map> toJson() => { - 'ConfirmStarted': {'index': index} - }; + 'ConfirmStarted': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -785,23 +554,12 @@ class ConfirmStarted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ConfirmStarted && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is ConfirmStarted && other.index == index; @override int get hashCode => index.hashCode; @@ -820,8 +578,8 @@ class ConfirmAborted extends Event { @override Map> toJson() => { - 'ConfirmAborted': {'index': index} - }; + 'ConfirmAborted': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -830,23 +588,12 @@ class ConfirmAborted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ConfirmAborted && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is ConfirmAborted && other.index == index; @override int get hashCode => index.hashCode; @@ -854,16 +601,10 @@ class ConfirmAborted extends Event { /// A referendum has ended its confirmation phase and is ready for approval. class Confirmed extends Event { - const Confirmed({ - required this.index, - required this.tally, - }); + const Confirmed({required this.index, required this.tally}); factory Confirmed._decode(_i1.Input input) { - return Confirmed( - index: _i1.U32Codec.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); + return Confirmed(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); } /// ReferendumIndex @@ -876,11 +617,8 @@ class Confirmed extends Event { @override Map> toJson() => { - 'Confirmed': { - 'index': index, - 'tally': tally.toJson(), - } - }; + 'Confirmed': {'index': index, 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -890,33 +628,17 @@ class Confirmed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Confirmed && other.index == index && other.tally == tally; + identical(this, other) || other is Confirmed && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash( - index, - tally, - ); + int get hashCode => Object.hash(index, tally); } /// A referendum has been approved and its proposal has been scheduled. @@ -933,8 +655,8 @@ class Approved extends Event { @override Map> toJson() => { - 'Approved': {'index': index} - }; + 'Approved': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -943,23 +665,12 @@ class Approved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Approved && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is Approved && other.index == index; @override int get hashCode => index.hashCode; @@ -967,16 +678,10 @@ class Approved extends Event { /// A proposal has been rejected by referendum. class Rejected extends Event { - const Rejected({ - required this.index, - required this.tally, - }); + const Rejected({required this.index, required this.tally}); factory Rejected._decode(_i1.Input input) { - return Rejected( - index: _i1.U32Codec.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); + return Rejected(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); } /// ReferendumIndex @@ -989,11 +694,8 @@ class Rejected extends Event { @override Map> toJson() => { - 'Rejected': { - 'index': index, - 'tally': tally.toJson(), - } - }; + 'Rejected': {'index': index, 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1003,47 +705,25 @@ class Rejected extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Rejected && other.index == index && other.tally == tally; + identical(this, other) || other is Rejected && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash( - index, - tally, - ); + int get hashCode => Object.hash(index, tally); } /// A referendum has been timed out without being decided. class TimedOut extends Event { - const TimedOut({ - required this.index, - required this.tally, - }); + const TimedOut({required this.index, required this.tally}); factory TimedOut._decode(_i1.Input input) { - return TimedOut( - index: _i1.U32Codec.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); + return TimedOut(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); } /// ReferendumIndex @@ -1056,11 +736,8 @@ class TimedOut extends Event { @override Map> toJson() => { - 'TimedOut': { - 'index': index, - 'tally': tally.toJson(), - } - }; + 'TimedOut': {'index': index, 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1070,47 +747,25 @@ class TimedOut extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TimedOut && other.index == index && other.tally == tally; + identical(this, other) || other is TimedOut && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash( - index, - tally, - ); + int get hashCode => Object.hash(index, tally); } /// A referendum has been cancelled. class Cancelled extends Event { - const Cancelled({ - required this.index, - required this.tally, - }); + const Cancelled({required this.index, required this.tally}); factory Cancelled._decode(_i1.Input input) { - return Cancelled( - index: _i1.U32Codec.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); + return Cancelled(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); } /// ReferendumIndex @@ -1123,11 +778,8 @@ class Cancelled extends Event { @override Map> toJson() => { - 'Cancelled': { - 'index': index, - 'tally': tally.toJson(), - } - }; + 'Cancelled': {'index': index, 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1137,47 +789,25 @@ class Cancelled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Cancelled && other.index == index && other.tally == tally; + identical(this, other) || other is Cancelled && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash( - index, - tally, - ); + int get hashCode => Object.hash(index, tally); } /// A referendum has been killed. class Killed extends Event { - const Killed({ - required this.index, - required this.tally, - }); + const Killed({required this.index, required this.tally}); factory Killed._decode(_i1.Input input) { - return Killed( - index: _i1.U32Codec.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); + return Killed(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); } /// ReferendumIndex @@ -1190,11 +820,8 @@ class Killed extends Event { @override Map> toJson() => { - 'Killed': { - 'index': index, - 'tally': tally.toJson(), - } - }; + 'Killed': {'index': index, 'tally': tally.toJson()}, + }; int _sizeHint() { int size = 1; @@ -1204,42 +831,22 @@ class Killed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 12, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i5.Tally.codec.encodeTo( - tally, - output, - ); + _i1.U8Codec.codec.encodeTo(12, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i5.Tally.codec.encodeTo(tally, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Killed && other.index == index && other.tally == tally; + identical(this, other) || other is Killed && other.index == index && other.tally == tally; @override - int get hashCode => Object.hash( - index, - tally, - ); + int get hashCode => Object.hash(index, tally); } /// The submission deposit has been refunded. class SubmissionDepositRefunded extends Event { - const SubmissionDepositRefunded({ - required this.index, - required this.who, - required this.amount, - }); + const SubmissionDepositRefunded({required this.index, required this.who, required this.amount}); factory SubmissionDepositRefunded._decode(_i1.Input input) { return SubmissionDepositRefunded( @@ -1263,12 +870,8 @@ class SubmissionDepositRefunded extends Event { @override Map> toJson() => { - 'SubmissionDepositRefunded': { - 'index': index, - 'who': who.toList(), - 'amount': amount, - } - }; + 'SubmissionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1279,58 +882,30 @@ class SubmissionDepositRefunded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 13, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(13, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is SubmissionDepositRefunded && other.index == index && - _i7.listsEqual( - other.who, - who, - ) && + _i7.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - index, - who, - amount, - ); + int get hashCode => Object.hash(index, who, amount); } /// Metadata for a referendum has been set. class MetadataSet extends Event { - const MetadataSet({ - required this.index, - required this.hash, - }); + const MetadataSet({required this.index, required this.hash}); factory MetadataSet._decode(_i1.Input input) { - return MetadataSet( - index: _i1.U32Codec.codec.decode(input), - hash: const _i1.U8ArrayCodec(32).decode(input), - ); + return MetadataSet(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); } /// ReferendumIndex @@ -1343,11 +918,8 @@ class MetadataSet extends Event { @override Map> toJson() => { - 'MetadataSet': { - 'index': index, - 'hash': hash.toList(), - } - }; + 'MetadataSet': {'index': index, 'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -1357,52 +929,25 @@ class MetadataSet extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 14, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(14, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MetadataSet && - other.index == index && - _i7.listsEqual( - other.hash, - hash, - ); + identical(this, other) || other is MetadataSet && other.index == index && _i7.listsEqual(other.hash, hash); @override - int get hashCode => Object.hash( - index, - hash, - ); + int get hashCode => Object.hash(index, hash); } /// Metadata for a referendum has been cleared. class MetadataCleared extends Event { - const MetadataCleared({ - required this.index, - required this.hash, - }); + const MetadataCleared({required this.index, required this.hash}); factory MetadataCleared._decode(_i1.Input input) { - return MetadataCleared( - index: _i1.U32Codec.codec.decode(input), - hash: const _i1.U8ArrayCodec(32).decode(input), - ); + return MetadataCleared(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); } /// ReferendumIndex @@ -1415,11 +960,8 @@ class MetadataCleared extends Event { @override Map> toJson() => { - 'MetadataCleared': { - 'index': index, - 'hash': hash.toList(), - } - }; + 'MetadataCleared': {'index': index, 'hash': hash.toList()}, + }; int _sizeHint() { int size = 1; @@ -1429,36 +971,15 @@ class MetadataCleared extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 15, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - hash, - output, - ); + _i1.U8Codec.codec.encodeTo(15, output); + _i1.U32Codec.codec.encodeTo(index, output); + const _i1.U8ArrayCodec(32).encodeTo(hash, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MetadataCleared && - other.index == index && - _i7.listsEqual( - other.hash, - hash, - ); + identical(this, other) || other is MetadataCleared && other.index == index && _i7.listsEqual(other.hash, hash); @override - int get hashCode => Object.hash( - index, - hash, - ); + int get hashCode => Object.hash(index, hash); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/curve.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/curve.dart index 4650f0d1..79a32460 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/curve.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/curve.dart @@ -38,11 +38,7 @@ class $Curve { required _i3.Perbill floor, required _i3.Perbill ceil, }) { - return LinearDecreasing( - length: length, - floor: floor, - ceil: ceil, - ); + return LinearDecreasing(length: length, floor: floor, ceil: ceil); } SteppedDecreasing steppedDecreasing({ @@ -51,24 +47,11 @@ class $Curve { required _i3.Perbill step, required _i3.Perbill period, }) { - return SteppedDecreasing( - begin: begin, - end: end, - step: step, - period: period, - ); + return SteppedDecreasing(begin: begin, end: end, step: step, period: period); } - Reciprocal reciprocal({ - required _i4.FixedI64 factor, - required _i4.FixedI64 xOffset, - required _i4.FixedI64 yOffset, - }) { - return Reciprocal( - factor: factor, - xOffset: xOffset, - yOffset: yOffset, - ); + Reciprocal reciprocal({required _i4.FixedI64 factor, required _i4.FixedI64 xOffset, required _i4.FixedI64 yOffset}) { + return Reciprocal(factor: factor, xOffset: xOffset, yOffset: yOffset); } } @@ -91,10 +74,7 @@ class $CurveCodec with _i1.Codec { } @override - void encodeTo( - Curve value, - _i1.Output output, - ) { + void encodeTo(Curve value, _i1.Output output) { switch (value.runtimeType) { case LinearDecreasing: (value as LinearDecreasing).encodeTo(output); @@ -106,8 +86,7 @@ class $CurveCodec with _i1.Codec { (value as Reciprocal).encodeTo(output); break; default: - throw Exception( - 'Curve: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Curve: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -121,18 +100,13 @@ class $CurveCodec with _i1.Codec { case Reciprocal: return (value as Reciprocal)._sizeHint(); default: - throw Exception( - 'Curve: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Curve: Unsupported "$value" of type "${value.runtimeType}"'); } } } class LinearDecreasing extends Curve { - const LinearDecreasing({ - required this.length, - required this.floor, - required this.ceil, - }); + const LinearDecreasing({required this.length, required this.floor, required this.ceil}); factory LinearDecreasing._decode(_i1.Input input) { return LinearDecreasing( @@ -153,12 +127,8 @@ class LinearDecreasing extends Curve { @override Map> toJson() => { - 'LinearDecreasing': { - 'length': length, - 'floor': floor, - 'ceil': ceil, - } - }; + 'LinearDecreasing': {'length': length, 'floor': floor, 'ceil': ceil}, + }; int _sizeHint() { int size = 1; @@ -169,50 +139,23 @@ class LinearDecreasing extends Curve { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - length, - output, - ); - _i1.U32Codec.codec.encodeTo( - floor, - output, - ); - _i1.U32Codec.codec.encodeTo( - ceil, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(length, output); + _i1.U32Codec.codec.encodeTo(floor, output); + _i1.U32Codec.codec.encodeTo(ceil, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is LinearDecreasing && - other.length == length && - other.floor == floor && - other.ceil == ceil; + identical(this, other) || + other is LinearDecreasing && other.length == length && other.floor == floor && other.ceil == ceil; @override - int get hashCode => Object.hash( - length, - floor, - ceil, - ); + int get hashCode => Object.hash(length, floor, ceil); } class SteppedDecreasing extends Curve { - const SteppedDecreasing({ - required this.begin, - required this.end, - required this.step, - required this.period, - }); + const SteppedDecreasing({required this.begin, required this.end, required this.step, required this.period}); factory SteppedDecreasing._decode(_i1.Input input) { return SteppedDecreasing( @@ -237,13 +180,8 @@ class SteppedDecreasing extends Curve { @override Map> toJson() => { - 'SteppedDecreasing': { - 'begin': begin, - 'end': end, - 'step': step, - 'period': period, - } - }; + 'SteppedDecreasing': {'begin': begin, 'end': end, 'step': step, 'period': period}, + }; int _sizeHint() { int size = 1; @@ -255,34 +193,16 @@ class SteppedDecreasing extends Curve { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - begin, - output, - ); - _i1.U32Codec.codec.encodeTo( - end, - output, - ); - _i1.U32Codec.codec.encodeTo( - step, - output, - ); - _i1.U32Codec.codec.encodeTo( - period, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(begin, output); + _i1.U32Codec.codec.encodeTo(end, output); + _i1.U32Codec.codec.encodeTo(step, output); + _i1.U32Codec.codec.encodeTo(period, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is SteppedDecreasing && other.begin == begin && other.end == end && @@ -290,20 +210,11 @@ class SteppedDecreasing extends Curve { other.period == period; @override - int get hashCode => Object.hash( - begin, - end, - step, - period, - ); + int get hashCode => Object.hash(begin, end, step, period); } class Reciprocal extends Curve { - const Reciprocal({ - required this.factor, - required this.xOffset, - required this.yOffset, - }); + const Reciprocal({required this.factor, required this.xOffset, required this.yOffset}); factory Reciprocal._decode(_i1.Input input) { return Reciprocal( @@ -324,12 +235,8 @@ class Reciprocal extends Curve { @override Map> toJson() => { - 'Reciprocal': { - 'factor': factor, - 'xOffset': xOffset, - 'yOffset': yOffset, - } - }; + 'Reciprocal': {'factor': factor, 'xOffset': xOffset, 'yOffset': yOffset}, + }; int _sizeHint() { int size = 1; @@ -340,39 +247,17 @@ class Reciprocal extends Curve { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.I64Codec.codec.encodeTo( - factor, - output, - ); - _i1.I64Codec.codec.encodeTo( - xOffset, - output, - ); - _i1.I64Codec.codec.encodeTo( - yOffset, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.I64Codec.codec.encodeTo(factor, output); + _i1.I64Codec.codec.encodeTo(xOffset, output); + _i1.I64Codec.codec.encodeTo(yOffset, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Reciprocal && - other.factor == factor && - other.xOffset == xOffset && - other.yOffset == yOffset; + identical(this, other) || + other is Reciprocal && other.factor == factor && other.xOffset == xOffset && other.yOffset == yOffset; @override - int get hashCode => Object.hash( - factor, - xOffset, - yOffset, - ); + int get hashCode => Object.hash(factor, xOffset, yOffset); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deciding_status.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deciding_status.dart index 96baa433..0330544f 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deciding_status.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deciding_status.dart @@ -4,10 +4,7 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class DecidingStatus { - const DecidingStatus({ - required this.since, - this.confirming, - }); + const DecidingStatus({required this.since, this.confirming}); factory DecidingStatus.decode(_i1.Input input) { return codec.decode(input); @@ -25,44 +22,23 @@ class DecidingStatus { return codec.encode(this); } - Map toJson() => { - 'since': since, - 'confirming': confirming, - }; + Map toJson() => {'since': since, 'confirming': confirming}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DecidingStatus && - other.since == since && - other.confirming == confirming; + identical(this, other) || other is DecidingStatus && other.since == since && other.confirming == confirming; @override - int get hashCode => Object.hash( - since, - confirming, - ); + int get hashCode => Object.hash(since, confirming); } class $DecidingStatusCodec with _i1.Codec { const $DecidingStatusCodec(); @override - void encodeTo( - DecidingStatus obj, - _i1.Output output, - ) { - _i1.U32Codec.codec.encodeTo( - obj.since, - output, - ); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( - obj.confirming, - output, - ); + void encodeTo(DecidingStatus obj, _i1.Output output) { + _i1.U32Codec.codec.encodeTo(obj.since, output); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(obj.confirming, output); } @override @@ -77,8 +53,7 @@ class $DecidingStatusCodec with _i1.Codec { int sizeHint(DecidingStatus obj) { int size = 0; size = size + _i1.U32Codec.codec.sizeHint(obj.since); - size = size + - const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.confirming); + size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.confirming); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deposit.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deposit.dart index 50fa863e..7477eb42 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deposit.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/deposit.dart @@ -7,10 +7,7 @@ import 'package:quiver/collection.dart' as _i4; import '../../sp_core/crypto/account_id32.dart' as _i2; class Deposit { - const Deposit({ - required this.who, - required this.amount, - }); + const Deposit({required this.who, required this.amount}); factory Deposit.decode(_i1.Input input) { return codec.decode(input); @@ -28,55 +25,28 @@ class Deposit { return codec.encode(this); } - Map toJson() => { - 'who': who.toList(), - 'amount': amount, - }; + Map toJson() => {'who': who.toList(), 'amount': amount}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Deposit && - _i4.listsEqual( - other.who, - who, - ) && - other.amount == amount; + identical(this, other) || other is Deposit && _i4.listsEqual(other.who, who) && other.amount == amount; @override - int get hashCode => Object.hash( - who, - amount, - ); + int get hashCode => Object.hash(who, amount); } class $DepositCodec with _i1.Codec { const $DepositCodec(); @override - void encodeTo( - Deposit obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - obj.who, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.amount, - output, - ); + void encodeTo(Deposit obj, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(obj.who, output); + _i1.U128Codec.codec.encodeTo(obj.amount, output); } @override Deposit decode(_i1.Input input) { - return Deposit( - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return Deposit(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_1.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_1.dart index 6e81d583..a4fe6c9b 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_1.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_1.dart @@ -37,52 +37,20 @@ class $ReferendumInfo { return Ongoing(value0); } - Approved approved( - int value0, - _i4.Deposit? value1, - _i4.Deposit? value2, - ) { - return Approved( - value0, - value1, - value2, - ); + Approved approved(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { + return Approved(value0, value1, value2); } - Rejected rejected( - int value0, - _i4.Deposit? value1, - _i4.Deposit? value2, - ) { - return Rejected( - value0, - value1, - value2, - ); + Rejected rejected(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { + return Rejected(value0, value1, value2); } - Cancelled cancelled( - int value0, - _i4.Deposit? value1, - _i4.Deposit? value2, - ) { - return Cancelled( - value0, - value1, - value2, - ); + Cancelled cancelled(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { + return Cancelled(value0, value1, value2); } - TimedOut timedOut( - int value0, - _i4.Deposit? value1, - _i4.Deposit? value2, - ) { - return TimedOut( - value0, - value1, - value2, - ); + TimedOut timedOut(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { + return TimedOut(value0, value1, value2); } Killed killed(int value0) { @@ -115,10 +83,7 @@ class $ReferendumInfoCodec with _i1.Codec { } @override - void encodeTo( - ReferendumInfo value, - _i1.Output output, - ) { + void encodeTo(ReferendumInfo value, _i1.Output output) { switch (value.runtimeType) { case Ongoing: (value as Ongoing).encodeTo(output); @@ -139,8 +104,7 @@ class $ReferendumInfoCodec with _i1.Codec { (value as Killed).encodeTo(output); break; default: - throw Exception( - 'ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -160,8 +124,7 @@ class $ReferendumInfoCodec with _i1.Codec { case Killed: return (value as Killed)._sizeHint(); default: - throw Exception( - 'ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -187,34 +150,19 @@ class Ongoing extends ReferendumInfo { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.ReferendumStatus.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.ReferendumStatus.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Ongoing && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Ongoing && other.value0 == value0; @override int get hashCode => value0.hashCode; } class Approved extends ReferendumInfo { - const Approved( - this.value0, - this.value1, - this.value2, - ); + const Approved(this.value0, this.value1, this.value2); factory Approved._decode(_i1.Input input) { return Approved( @@ -235,67 +183,35 @@ class Approved extends ReferendumInfo { @override Map> toJson() => { - 'Approved': [ - value0, - value1?.toJson(), - value2?.toJson(), - ] - }; + 'Approved': [value0, value1?.toJson(), value2?.toJson()], + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value1, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value2, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(value0, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Approved && - other.value0 == value0 && - other.value1 == value1 && - other.value2 == value2; + identical(this, other) || + other is Approved && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; @override - int get hashCode => Object.hash( - value0, - value1, - value2, - ); + int get hashCode => Object.hash(value0, value1, value2); } class Rejected extends ReferendumInfo { - const Rejected( - this.value0, - this.value1, - this.value2, - ); + const Rejected(this.value0, this.value1, this.value2); factory Rejected._decode(_i1.Input input) { return Rejected( @@ -316,67 +232,35 @@ class Rejected extends ReferendumInfo { @override Map> toJson() => { - 'Rejected': [ - value0, - value1?.toJson(), - value2?.toJson(), - ] - }; + 'Rejected': [value0, value1?.toJson(), value2?.toJson()], + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value1, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value2, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U32Codec.codec.encodeTo(value0, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Rejected && - other.value0 == value0 && - other.value1 == value1 && - other.value2 == value2; + identical(this, other) || + other is Rejected && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; @override - int get hashCode => Object.hash( - value0, - value1, - value2, - ); + int get hashCode => Object.hash(value0, value1, value2); } class Cancelled extends ReferendumInfo { - const Cancelled( - this.value0, - this.value1, - this.value2, - ); + const Cancelled(this.value0, this.value1, this.value2); factory Cancelled._decode(_i1.Input input) { return Cancelled( @@ -397,67 +281,35 @@ class Cancelled extends ReferendumInfo { @override Map> toJson() => { - 'Cancelled': [ - value0, - value1?.toJson(), - value2?.toJson(), - ] - }; + 'Cancelled': [value0, value1?.toJson(), value2?.toJson()], + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value1, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value2, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.U32Codec.codec.encodeTo(value0, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Cancelled && - other.value0 == value0 && - other.value1 == value1 && - other.value2 == value2; + identical(this, other) || + other is Cancelled && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; @override - int get hashCode => Object.hash( - value0, - value1, - value2, - ); + int get hashCode => Object.hash(value0, value1, value2); } class TimedOut extends ReferendumInfo { - const TimedOut( - this.value0, - this.value1, - this.value2, - ); + const TimedOut(this.value0, this.value1, this.value2); factory TimedOut._decode(_i1.Input input) { return TimedOut( @@ -478,59 +330,31 @@ class TimedOut extends ReferendumInfo { @override Map> toJson() => { - 'TimedOut': [ - value0, - value1?.toJson(), - value2?.toJson(), - ] - }; + 'TimedOut': [value0, value1?.toJson(), value2?.toJson()], + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value1, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value2, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.U32Codec.codec.encodeTo(value0, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TimedOut && - other.value0 == value0 && - other.value1 == value1 && - other.value2 == value2; + identical(this, other) || + other is TimedOut && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; @override - int get hashCode => Object.hash( - value0, - value1, - value2, - ); + int get hashCode => Object.hash(value0, value1, value2); } class Killed extends ReferendumInfo { @@ -553,23 +377,12 @@ class Killed extends ReferendumInfo { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.U32Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Killed && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Killed && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_2.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_2.dart index 566ef150..90cca436 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_2.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_info_2.dart @@ -37,52 +37,20 @@ class $ReferendumInfo { return Ongoing(value0); } - Approved approved( - int value0, - _i4.Deposit? value1, - _i4.Deposit? value2, - ) { - return Approved( - value0, - value1, - value2, - ); + Approved approved(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { + return Approved(value0, value1, value2); } - Rejected rejected( - int value0, - _i4.Deposit? value1, - _i4.Deposit? value2, - ) { - return Rejected( - value0, - value1, - value2, - ); + Rejected rejected(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { + return Rejected(value0, value1, value2); } - Cancelled cancelled( - int value0, - _i4.Deposit? value1, - _i4.Deposit? value2, - ) { - return Cancelled( - value0, - value1, - value2, - ); + Cancelled cancelled(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { + return Cancelled(value0, value1, value2); } - TimedOut timedOut( - int value0, - _i4.Deposit? value1, - _i4.Deposit? value2, - ) { - return TimedOut( - value0, - value1, - value2, - ); + TimedOut timedOut(int value0, _i4.Deposit? value1, _i4.Deposit? value2) { + return TimedOut(value0, value1, value2); } Killed killed(int value0) { @@ -115,10 +83,7 @@ class $ReferendumInfoCodec with _i1.Codec { } @override - void encodeTo( - ReferendumInfo value, - _i1.Output output, - ) { + void encodeTo(ReferendumInfo value, _i1.Output output) { switch (value.runtimeType) { case Ongoing: (value as Ongoing).encodeTo(output); @@ -139,8 +104,7 @@ class $ReferendumInfoCodec with _i1.Codec { (value as Killed).encodeTo(output); break; default: - throw Exception( - 'ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -160,8 +124,7 @@ class $ReferendumInfoCodec with _i1.Codec { case Killed: return (value as Killed)._sizeHint(); default: - throw Exception( - 'ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -187,34 +150,19 @@ class Ongoing extends ReferendumInfo { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.ReferendumStatus.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.ReferendumStatus.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Ongoing && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Ongoing && other.value0 == value0; @override int get hashCode => value0.hashCode; } class Approved extends ReferendumInfo { - const Approved( - this.value0, - this.value1, - this.value2, - ); + const Approved(this.value0, this.value1, this.value2); factory Approved._decode(_i1.Input input) { return Approved( @@ -235,67 +183,35 @@ class Approved extends ReferendumInfo { @override Map> toJson() => { - 'Approved': [ - value0, - value1?.toJson(), - value2?.toJson(), - ] - }; + 'Approved': [value0, value1?.toJson(), value2?.toJson()], + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value1, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value2, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(value0, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Approved && - other.value0 == value0 && - other.value1 == value1 && - other.value2 == value2; + identical(this, other) || + other is Approved && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; @override - int get hashCode => Object.hash( - value0, - value1, - value2, - ); + int get hashCode => Object.hash(value0, value1, value2); } class Rejected extends ReferendumInfo { - const Rejected( - this.value0, - this.value1, - this.value2, - ); + const Rejected(this.value0, this.value1, this.value2); factory Rejected._decode(_i1.Input input) { return Rejected( @@ -316,67 +232,35 @@ class Rejected extends ReferendumInfo { @override Map> toJson() => { - 'Rejected': [ - value0, - value1?.toJson(), - value2?.toJson(), - ] - }; + 'Rejected': [value0, value1?.toJson(), value2?.toJson()], + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value1, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value2, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U32Codec.codec.encodeTo(value0, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Rejected && - other.value0 == value0 && - other.value1 == value1 && - other.value2 == value2; + identical(this, other) || + other is Rejected && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; @override - int get hashCode => Object.hash( - value0, - value1, - value2, - ); + int get hashCode => Object.hash(value0, value1, value2); } class Cancelled extends ReferendumInfo { - const Cancelled( - this.value0, - this.value1, - this.value2, - ); + const Cancelled(this.value0, this.value1, this.value2); factory Cancelled._decode(_i1.Input input) { return Cancelled( @@ -397,67 +281,35 @@ class Cancelled extends ReferendumInfo { @override Map> toJson() => { - 'Cancelled': [ - value0, - value1?.toJson(), - value2?.toJson(), - ] - }; + 'Cancelled': [value0, value1?.toJson(), value2?.toJson()], + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value1, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value2, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.U32Codec.codec.encodeTo(value0, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Cancelled && - other.value0 == value0 && - other.value1 == value1 && - other.value2 == value2; + identical(this, other) || + other is Cancelled && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; @override - int get hashCode => Object.hash( - value0, - value1, - value2, - ); + int get hashCode => Object.hash(value0, value1, value2); } class TimedOut extends ReferendumInfo { - const TimedOut( - this.value0, - this.value1, - this.value2, - ); + const TimedOut(this.value0, this.value1, this.value2); factory TimedOut._decode(_i1.Input input) { return TimedOut( @@ -478,59 +330,31 @@ class TimedOut extends ReferendumInfo { @override Map> toJson() => { - 'TimedOut': [ - value0, - value1?.toJson(), - value2?.toJson(), - ] - }; + 'TimedOut': [value0, value1?.toJson(), value2?.toJson()], + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(value0); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); - size = size + - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value1); + size = size + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).sizeHint(value2); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value1, - output, - ); - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo( - value2, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.U32Codec.codec.encodeTo(value0, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value1, output); + const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).encodeTo(value2, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TimedOut && - other.value0 == value0 && - other.value1 == value1 && - other.value2 == value2; + identical(this, other) || + other is TimedOut && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; @override - int get hashCode => Object.hash( - value0, - value1, - value2, - ); + int get hashCode => Object.hash(value0, value1, value2); } class Killed extends ReferendumInfo { @@ -553,23 +377,12 @@ class Killed extends ReferendumInfo { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.U32Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Killed && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Killed && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_1.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_1.dart index 0b48bec7..8bd8a9f7 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_1.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_1.dart @@ -72,31 +72,25 @@ class ReferendumStatus { } Map toJson() => { - 'track': track, - 'origin': origin.toJson(), - 'proposal': proposal.toJson(), - 'enactment': enactment.toJson(), - 'submitted': submitted, - 'submissionDeposit': submissionDeposit.toJson(), - 'decisionDeposit': decisionDeposit?.toJson(), - 'deciding': deciding?.toJson(), - 'tally': tally.toJson(), - 'inQueue': inQueue, - 'alarm': [ - alarm?.value0, - [ - alarm?.value1.value0.toJson(), - alarm?.value1.value1, - ], - ], - }; + 'track': track, + 'origin': origin.toJson(), + 'proposal': proposal.toJson(), + 'enactment': enactment.toJson(), + 'submitted': submitted, + 'submissionDeposit': submissionDeposit.toJson(), + 'decisionDeposit': decisionDeposit?.toJson(), + 'deciding': deciding?.toJson(), + 'tally': tally.toJson(), + 'inQueue': inQueue, + 'alarm': [ + alarm?.value0, + [alarm?.value1.value0.toJson(), alarm?.value1.value1], + ], + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ReferendumStatus && other.track == track && other.origin == origin && @@ -112,81 +106,41 @@ class ReferendumStatus { @override int get hashCode => Object.hash( - track, - origin, - proposal, - enactment, - submitted, - submissionDeposit, - decisionDeposit, - deciding, - tally, - inQueue, - alarm, - ); + track, + origin, + proposal, + enactment, + submitted, + submissionDeposit, + decisionDeposit, + deciding, + tally, + inQueue, + alarm, + ); } class $ReferendumStatusCodec with _i1.Codec { const $ReferendumStatusCodec(); @override - void encodeTo( - ReferendumStatus obj, - _i1.Output output, - ) { - _i1.U16Codec.codec.encodeTo( - obj.track, - output, - ); - _i2.OriginCaller.codec.encodeTo( - obj.origin, - output, - ); - _i3.Bounded.codec.encodeTo( - obj.proposal, - output, - ); - _i4.DispatchTime.codec.encodeTo( - obj.enactment, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.submitted, - output, - ); - _i5.Deposit.codec.encodeTo( - obj.submissionDeposit, - output, - ); - const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).encodeTo( - obj.decisionDeposit, - output, - ); - const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) - .encodeTo( - obj.deciding, - output, - ); - _i7.Tally.codec.encodeTo( - obj.tally, - output, - ); - _i1.BoolCodec.codec.encodeTo( - obj.inQueue, - output, - ); - const _i1.OptionCodec< - _i8.Tuple2>>( - _i8.Tuple2Codec>( - _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( - _i10.BlockNumberOrTimestamp.codec, + void encodeTo(ReferendumStatus obj, _i1.Output output) { + _i1.U16Codec.codec.encodeTo(obj.track, output); + _i2.OriginCaller.codec.encodeTo(obj.origin, output); + _i3.Bounded.codec.encodeTo(obj.proposal, output); + _i4.DispatchTime.codec.encodeTo(obj.enactment, output); + _i1.U32Codec.codec.encodeTo(obj.submitted, output); + _i5.Deposit.codec.encodeTo(obj.submissionDeposit, output); + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).encodeTo(obj.decisionDeposit, output); + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).encodeTo(obj.deciding, output); + _i7.Tally.codec.encodeTo(obj.tally, output); + _i1.BoolCodec.codec.encodeTo(obj.inQueue, output); + const _i1.OptionCodec<_i8.Tuple2>>( + _i8.Tuple2Codec>( _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - )).encodeTo( - obj.alarm, - output, - ); + ).encodeTo(obj.alarm, output); } @override @@ -198,22 +152,16 @@ class $ReferendumStatusCodec with _i1.Codec { enactment: _i4.DispatchTime.codec.decode(input), submitted: _i1.U32Codec.codec.decode(input), submissionDeposit: _i5.Deposit.codec.decode(input), - decisionDeposit: - const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).decode(input), - deciding: - const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) - .decode(input), + decisionDeposit: const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).decode(input), + deciding: const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).decode(input), tally: _i7.Tally.codec.decode(input), inQueue: _i1.BoolCodec.codec.decode(input), - alarm: const _i1.OptionCodec< - _i8.Tuple2>>( - _i8.Tuple2Codec>( - _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( - _i10.BlockNumberOrTimestamp.codec, + alarm: const _i1.OptionCodec<_i8.Tuple2>>( + _i8.Tuple2Codec>( _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - )).decode(input), + ).decode(input), ); } @@ -226,24 +174,18 @@ class $ReferendumStatusCodec with _i1.Codec { size = size + _i4.DispatchTime.codec.sizeHint(obj.enactment); size = size + _i1.U32Codec.codec.sizeHint(obj.submitted); size = size + _i5.Deposit.codec.sizeHint(obj.submissionDeposit); - size = size + - const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec) - .sizeHint(obj.decisionDeposit); - size = size + - const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) - .sizeHint(obj.deciding); + size = size + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).sizeHint(obj.decisionDeposit); + size = size + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).sizeHint(obj.deciding); size = size + _i7.Tally.codec.sizeHint(obj.tally); size = size + _i1.BoolCodec.codec.sizeHint(obj.inQueue); - size = size + - const _i1.OptionCodec< - _i8.Tuple2>>( - _i8.Tuple2Codec>( - _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( - _i10.BlockNumberOrTimestamp.codec, + size = + size + + const _i1.OptionCodec<_i8.Tuple2>>( + _i8.Tuple2Codec>( _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - )).sizeHint(obj.alarm); + ).sizeHint(obj.alarm); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_2.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_2.dart index c910cc13..80e244fd 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_2.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/referendum_status_2.dart @@ -72,31 +72,25 @@ class ReferendumStatus { } Map toJson() => { - 'track': track, - 'origin': origin.toJson(), - 'proposal': proposal.toJson(), - 'enactment': enactment.toJson(), - 'submitted': submitted, - 'submissionDeposit': submissionDeposit.toJson(), - 'decisionDeposit': decisionDeposit?.toJson(), - 'deciding': deciding?.toJson(), - 'tally': tally.toJson(), - 'inQueue': inQueue, - 'alarm': [ - alarm?.value0, - [ - alarm?.value1.value0.toJson(), - alarm?.value1.value1, - ], - ], - }; + 'track': track, + 'origin': origin.toJson(), + 'proposal': proposal.toJson(), + 'enactment': enactment.toJson(), + 'submitted': submitted, + 'submissionDeposit': submissionDeposit.toJson(), + 'decisionDeposit': decisionDeposit?.toJson(), + 'deciding': deciding?.toJson(), + 'tally': tally.toJson(), + 'inQueue': inQueue, + 'alarm': [ + alarm?.value0, + [alarm?.value1.value0.toJson(), alarm?.value1.value1], + ], + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ReferendumStatus && other.track == track && other.origin == origin && @@ -112,81 +106,41 @@ class ReferendumStatus { @override int get hashCode => Object.hash( - track, - origin, - proposal, - enactment, - submitted, - submissionDeposit, - decisionDeposit, - deciding, - tally, - inQueue, - alarm, - ); + track, + origin, + proposal, + enactment, + submitted, + submissionDeposit, + decisionDeposit, + deciding, + tally, + inQueue, + alarm, + ); } class $ReferendumStatusCodec with _i1.Codec { const $ReferendumStatusCodec(); @override - void encodeTo( - ReferendumStatus obj, - _i1.Output output, - ) { - _i1.U16Codec.codec.encodeTo( - obj.track, - output, - ); - _i2.OriginCaller.codec.encodeTo( - obj.origin, - output, - ); - _i3.Bounded.codec.encodeTo( - obj.proposal, - output, - ); - _i4.DispatchTime.codec.encodeTo( - obj.enactment, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.submitted, - output, - ); - _i5.Deposit.codec.encodeTo( - obj.submissionDeposit, - output, - ); - const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).encodeTo( - obj.decisionDeposit, - output, - ); - const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) - .encodeTo( - obj.deciding, - output, - ); - _i7.Tally.codec.encodeTo( - obj.tally, - output, - ); - _i1.BoolCodec.codec.encodeTo( - obj.inQueue, - output, - ); - const _i1.OptionCodec< - _i8.Tuple2>>( - _i8.Tuple2Codec>( - _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( - _i10.BlockNumberOrTimestamp.codec, + void encodeTo(ReferendumStatus obj, _i1.Output output) { + _i1.U16Codec.codec.encodeTo(obj.track, output); + _i2.OriginCaller.codec.encodeTo(obj.origin, output); + _i3.Bounded.codec.encodeTo(obj.proposal, output); + _i4.DispatchTime.codec.encodeTo(obj.enactment, output); + _i1.U32Codec.codec.encodeTo(obj.submitted, output); + _i5.Deposit.codec.encodeTo(obj.submissionDeposit, output); + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).encodeTo(obj.decisionDeposit, output); + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).encodeTo(obj.deciding, output); + _i7.Tally.codec.encodeTo(obj.tally, output); + _i1.BoolCodec.codec.encodeTo(obj.inQueue, output); + const _i1.OptionCodec<_i8.Tuple2>>( + _i8.Tuple2Codec>( _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - )).encodeTo( - obj.alarm, - output, - ); + ).encodeTo(obj.alarm, output); } @override @@ -198,22 +152,16 @@ class $ReferendumStatusCodec with _i1.Codec { enactment: _i4.DispatchTime.codec.decode(input), submitted: _i1.U32Codec.codec.decode(input), submissionDeposit: _i5.Deposit.codec.decode(input), - decisionDeposit: - const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).decode(input), - deciding: - const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) - .decode(input), + decisionDeposit: const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).decode(input), + deciding: const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).decode(input), tally: _i7.Tally.codec.decode(input), inQueue: _i1.BoolCodec.codec.decode(input), - alarm: const _i1.OptionCodec< - _i8.Tuple2>>( - _i8.Tuple2Codec>( - _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( - _i10.BlockNumberOrTimestamp.codec, + alarm: const _i1.OptionCodec<_i8.Tuple2>>( + _i8.Tuple2Codec>( _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - )).decode(input), + ).decode(input), ); } @@ -226,24 +174,18 @@ class $ReferendumStatusCodec with _i1.Codec { size = size + _i4.DispatchTime.codec.sizeHint(obj.enactment); size = size + _i1.U32Codec.codec.sizeHint(obj.submitted); size = size + _i5.Deposit.codec.sizeHint(obj.submissionDeposit); - size = size + - const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec) - .sizeHint(obj.decisionDeposit); - size = size + - const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec) - .sizeHint(obj.deciding); + size = size + const _i1.OptionCodec<_i5.Deposit>(_i5.Deposit.codec).sizeHint(obj.decisionDeposit); + size = size + const _i1.OptionCodec<_i6.DecidingStatus>(_i6.DecidingStatus.codec).sizeHint(obj.deciding); size = size + _i7.Tally.codec.sizeHint(obj.tally); size = size + _i1.BoolCodec.codec.sizeHint(obj.inQueue); - size = size + - const _i1.OptionCodec< - _i8.Tuple2>>( - _i8.Tuple2Codec>( - _i1.U32Codec.codec, - _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>( - _i10.BlockNumberOrTimestamp.codec, + size = + size + + const _i1.OptionCodec<_i8.Tuple2>>( + _i8.Tuple2Codec>( _i1.U32Codec.codec, + _i9.Tuple2Codec<_i10.BlockNumberOrTimestamp, int>(_i10.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), ), - )).sizeHint(obj.alarm); + ).sizeHint(obj.alarm); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/track_details.dart b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/track_details.dart index c17b1809..fe353521 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/track_details.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_referenda/types/track_details.dart @@ -56,23 +56,20 @@ class TrackDetails { } Map toJson() => { - 'name': name, - 'maxDeciding': maxDeciding, - 'decisionDeposit': decisionDeposit, - 'preparePeriod': preparePeriod, - 'decisionPeriod': decisionPeriod, - 'confirmPeriod': confirmPeriod, - 'minEnactmentPeriod': minEnactmentPeriod, - 'minApproval': minApproval.toJson(), - 'minSupport': minSupport.toJson(), - }; + 'name': name, + 'maxDeciding': maxDeciding, + 'decisionDeposit': decisionDeposit, + 'preparePeriod': preparePeriod, + 'decisionPeriod': decisionPeriod, + 'confirmPeriod': confirmPeriod, + 'minEnactmentPeriod': minEnactmentPeriod, + 'minApproval': minApproval.toJson(), + 'minSupport': minSupport.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is TrackDetails && other.name == name && other.maxDeciding == maxDeciding && @@ -86,62 +83,32 @@ class TrackDetails { @override int get hashCode => Object.hash( - name, - maxDeciding, - decisionDeposit, - preparePeriod, - decisionPeriod, - confirmPeriod, - minEnactmentPeriod, - minApproval, - minSupport, - ); + name, + maxDeciding, + decisionDeposit, + preparePeriod, + decisionPeriod, + confirmPeriod, + minEnactmentPeriod, + minApproval, + minSupport, + ); } class $TrackDetailsCodec with _i1.Codec { const $TrackDetailsCodec(); @override - void encodeTo( - TrackDetails obj, - _i1.Output output, - ) { - _i1.StrCodec.codec.encodeTo( - obj.name, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.maxDeciding, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.decisionDeposit, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.preparePeriod, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.decisionPeriod, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.confirmPeriod, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.minEnactmentPeriod, - output, - ); - _i2.Curve.codec.encodeTo( - obj.minApproval, - output, - ); - _i2.Curve.codec.encodeTo( - obj.minSupport, - output, - ); + void encodeTo(TrackDetails obj, _i1.Output output) { + _i1.StrCodec.codec.encodeTo(obj.name, output); + _i1.U32Codec.codec.encodeTo(obj.maxDeciding, output); + _i1.U128Codec.codec.encodeTo(obj.decisionDeposit, output); + _i1.U32Codec.codec.encodeTo(obj.preparePeriod, output); + _i1.U32Codec.codec.encodeTo(obj.decisionPeriod, output); + _i1.U32Codec.codec.encodeTo(obj.confirmPeriod, output); + _i1.U32Codec.codec.encodeTo(obj.minEnactmentPeriod, output); + _i2.Curve.codec.encodeTo(obj.minApproval, output); + _i2.Curve.codec.encodeTo(obj.minSupport, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/high_security_account_data.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/high_security_account_data.dart index 29a7a79e..7ad2e58c 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/high_security_account_data.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/high_security_account_data.dart @@ -8,10 +8,7 @@ import '../qp_scheduler/block_number_or_timestamp.dart' as _i3; import '../sp_core/crypto/account_id32.dart' as _i2; class HighSecurityAccountData { - const HighSecurityAccountData({ - required this.guardian, - required this.delay, - }); + const HighSecurityAccountData({required this.guardian, required this.delay}); factory HighSecurityAccountData.decode(_i1.Input input) { return codec.decode(input); @@ -23,54 +20,30 @@ class HighSecurityAccountData { /// Delay final _i3.BlockNumberOrTimestamp delay; - static const $HighSecurityAccountDataCodec codec = - $HighSecurityAccountDataCodec(); + static const $HighSecurityAccountDataCodec codec = $HighSecurityAccountDataCodec(); _i4.Uint8List encode() { return codec.encode(this); } - Map toJson() => { - 'guardian': guardian.toList(), - 'delay': delay.toJson(), - }; + Map toJson() => {'guardian': guardian.toList(), 'delay': delay.toJson()}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is HighSecurityAccountData && - _i5.listsEqual( - other.guardian, - guardian, - ) && - other.delay == delay; + identical(this, other) || + other is HighSecurityAccountData && _i5.listsEqual(other.guardian, guardian) && other.delay == delay; @override - int get hashCode => Object.hash( - guardian, - delay, - ); + int get hashCode => Object.hash(guardian, delay); } class $HighSecurityAccountDataCodec with _i1.Codec { const $HighSecurityAccountDataCodec(); @override - void encodeTo( - HighSecurityAccountData obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - obj.guardian, - output, - ); - _i3.BlockNumberOrTimestamp.codec.encodeTo( - obj.delay, - output, - ); + void encodeTo(HighSecurityAccountData obj, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(obj.guardian, output); + _i3.BlockNumberOrTimestamp.codec.encodeTo(obj.delay, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/call.dart index 6c4755a3..6e88907e 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/call.dart @@ -37,14 +37,8 @@ abstract class Call { class $Call { const $Call(); - SetHighSecurity setHighSecurity({ - required _i3.BlockNumberOrTimestamp delay, - required _i4.AccountId32 guardian, - }) { - return SetHighSecurity( - delay: delay, - guardian: guardian, - ); + SetHighSecurity setHighSecurity({required _i3.BlockNumberOrTimestamp delay, required _i4.AccountId32 guardian}) { + return SetHighSecurity(delay: delay, guardian: guardian); } Cancel cancel({required _i5.H256 txId}) { @@ -55,14 +49,8 @@ class $Call { return ExecuteTransfer(txId: txId); } - ScheduleTransfer scheduleTransfer({ - required _i6.MultiAddress dest, - required BigInt amount, - }) { - return ScheduleTransfer( - dest: dest, - amount: amount, - ); + ScheduleTransfer scheduleTransfer({required _i6.MultiAddress dest, required BigInt amount}) { + return ScheduleTransfer(dest: dest, amount: amount); } ScheduleTransferWithDelay scheduleTransferWithDelay({ @@ -70,11 +58,7 @@ class $Call { required BigInt amount, required _i3.BlockNumberOrTimestamp delay, }) { - return ScheduleTransferWithDelay( - dest: dest, - amount: amount, - delay: delay, - ); + return ScheduleTransferWithDelay(dest: dest, amount: amount, delay: delay); } ScheduleAssetTransfer scheduleAssetTransfer({ @@ -82,11 +66,7 @@ class $Call { required _i6.MultiAddress dest, required BigInt amount, }) { - return ScheduleAssetTransfer( - assetId: assetId, - dest: dest, - amount: amount, - ); + return ScheduleAssetTransfer(assetId: assetId, dest: dest, amount: amount); } ScheduleAssetTransferWithDelay scheduleAssetTransferWithDelay({ @@ -95,12 +75,7 @@ class $Call { required BigInt amount, required _i3.BlockNumberOrTimestamp delay, }) { - return ScheduleAssetTransferWithDelay( - assetId: assetId, - dest: dest, - amount: amount, - delay: delay, - ); + return ScheduleAssetTransferWithDelay(assetId: assetId, dest: dest, amount: amount, delay: delay); } RecoverFunds recoverFunds({required _i4.AccountId32 account}) { @@ -137,10 +112,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case SetHighSecurity: (value as SetHighSecurity).encodeTo(output); @@ -167,8 +139,7 @@ class $CallCodec with _i1.Codec { (value as RecoverFunds).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -192,8 +163,7 @@ class $CallCodec with _i1.Codec { case RecoverFunds: return (value as RecoverFunds)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -231,10 +201,7 @@ class $CallCodec with _i1.Codec { /// - `guardian`: The guardian account that can cancel pending transfers and recover funds /// from this high-security account. class SetHighSecurity extends Call { - const SetHighSecurity({ - required this.delay, - required this.guardian, - }); + const SetHighSecurity({required this.delay, required this.guardian}); factory SetHighSecurity._decode(_i1.Input input) { return SetHighSecurity( @@ -251,11 +218,8 @@ class SetHighSecurity extends Call { @override Map> toJson() => { - 'set_high_security': { - 'delay': delay.toJson(), - 'guardian': guardian.toList(), - } - }; + 'set_high_security': {'delay': delay.toJson(), 'guardian': guardian.toList()}, + }; int _sizeHint() { int size = 1; @@ -265,38 +229,18 @@ class SetHighSecurity extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.BlockNumberOrTimestamp.codec.encodeTo( - delay, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - guardian, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.BlockNumberOrTimestamp.codec.encodeTo(delay, output); + const _i1.U8ArrayCodec(32).encodeTo(guardian, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetHighSecurity && - other.delay == delay && - _i7.listsEqual( - other.guardian, - guardian, - ); + identical(this, other) || + other is SetHighSecurity && other.delay == delay && _i7.listsEqual(other.guardian, guardian); @override - int get hashCode => Object.hash( - delay, - guardian, - ); + int get hashCode => Object.hash(delay, guardian); } /// Cancel a pending reversible transaction scheduled by the caller. @@ -314,8 +258,8 @@ class Cancel extends Call { @override Map>> toJson() => { - 'cancel': {'txId': txId.toList()} - }; + 'cancel': {'txId': txId.toList()}, + }; int _sizeHint() { int size = 1; @@ -324,27 +268,12 @@ class Cancel extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - txId, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(txId, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Cancel && - _i7.listsEqual( - other.txId, - txId, - ); + bool operator ==(Object other) => identical(this, other) || other is Cancel && _i7.listsEqual(other.txId, txId); @override int get hashCode => txId.hashCode; @@ -378,8 +307,8 @@ class ExecuteTransfer extends Call { @override Map>> toJson() => { - 'execute_transfer': {'txId': txId.toList()} - }; + 'execute_transfer': {'txId': txId.toList()}, + }; int _sizeHint() { int size = 1; @@ -388,27 +317,13 @@ class ExecuteTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - txId, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(txId, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ExecuteTransfer && - _i7.listsEqual( - other.txId, - txId, - ); + identical(this, other) || other is ExecuteTransfer && _i7.listsEqual(other.txId, txId); @override int get hashCode => txId.hashCode; @@ -416,16 +331,10 @@ class ExecuteTransfer extends Call { /// Schedule a transaction for delayed execution. class ScheduleTransfer extends Call { - const ScheduleTransfer({ - required this.dest, - required this.amount, - }); + const ScheduleTransfer({required this.dest, required this.amount}); factory ScheduleTransfer._decode(_i1.Input input) { - return ScheduleTransfer( - dest: _i6.MultiAddress.codec.decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return ScheduleTransfer(dest: _i6.MultiAddress.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// <::Lookup as StaticLookup>::Source @@ -436,11 +345,8 @@ class ScheduleTransfer extends Call { @override Map> toJson() => { - 'schedule_transfer': { - 'dest': dest.toJson(), - 'amount': amount, - } - }; + 'schedule_transfer': {'dest': dest.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -450,33 +356,17 @@ class ScheduleTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i6.MultiAddress.codec.encodeTo( - dest, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i6.MultiAddress.codec.encodeTo(dest, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ScheduleTransfer && other.dest == dest && other.amount == amount; + identical(this, other) || other is ScheduleTransfer && other.dest == dest && other.amount == amount; @override - int get hashCode => Object.hash( - dest, - amount, - ); + int get hashCode => Object.hash(dest, amount); } /// Schedule a transaction for delayed execution with a custom, one-time delay. @@ -486,11 +376,7 @@ class ScheduleTransfer extends Call { /// /// - `delay`: The time (in blocks or milliseconds) before the transaction executes. class ScheduleTransferWithDelay extends Call { - const ScheduleTransferWithDelay({ - required this.dest, - required this.amount, - required this.delay, - }); + const ScheduleTransferWithDelay({required this.dest, required this.amount, required this.delay}); factory ScheduleTransferWithDelay._decode(_i1.Input input) { return ScheduleTransferWithDelay( @@ -511,12 +397,8 @@ class ScheduleTransferWithDelay extends Call { @override Map> toJson() => { - 'schedule_transfer_with_delay': { - 'dest': dest.toJson(), - 'amount': amount, - 'delay': delay.toJson(), - } - }; + 'schedule_transfer_with_delay': {'dest': dest.toJson(), 'amount': amount, 'delay': delay.toJson()}, + }; int _sizeHint() { int size = 1; @@ -527,51 +409,25 @@ class ScheduleTransferWithDelay extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i6.MultiAddress.codec.encodeTo( - dest, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); - _i3.BlockNumberOrTimestamp.codec.encodeTo( - delay, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i6.MultiAddress.codec.encodeTo(dest, output); + _i1.U128Codec.codec.encodeTo(amount, output); + _i3.BlockNumberOrTimestamp.codec.encodeTo(delay, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ScheduleTransferWithDelay && - other.dest == dest && - other.amount == amount && - other.delay == delay; + identical(this, other) || + other is ScheduleTransferWithDelay && other.dest == dest && other.amount == amount && other.delay == delay; @override - int get hashCode => Object.hash( - dest, - amount, - delay, - ); + int get hashCode => Object.hash(dest, amount, delay); } /// Schedule an asset transfer (pallet-assets) for delayed execution using the configured /// delay. class ScheduleAssetTransfer extends Call { - const ScheduleAssetTransfer({ - required this.assetId, - required this.dest, - required this.amount, - }); + const ScheduleAssetTransfer({required this.assetId, required this.dest, required this.amount}); factory ScheduleAssetTransfer._decode(_i1.Input input) { return ScheduleAssetTransfer( @@ -592,12 +448,8 @@ class ScheduleAssetTransfer extends Call { @override Map> toJson() => { - 'schedule_asset_transfer': { - 'assetId': assetId, - 'dest': dest.toJson(), - 'amount': amount, - } - }; + 'schedule_asset_transfer': {'assetId': assetId, 'dest': dest.toJson(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -608,41 +460,19 @@ class ScheduleAssetTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - _i6.MultiAddress.codec.encodeTo( - dest, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + _i6.MultiAddress.codec.encodeTo(dest, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ScheduleAssetTransfer && - other.assetId == assetId && - other.dest == dest && - other.amount == amount; + identical(this, other) || + other is ScheduleAssetTransfer && other.assetId == assetId && other.dest == dest && other.amount == amount; @override - int get hashCode => Object.hash( - assetId, - dest, - amount, - ); + int get hashCode => Object.hash(assetId, dest, amount); } /// Schedule an asset transfer (pallet-assets) with a custom one-time delay. @@ -677,13 +507,13 @@ class ScheduleAssetTransferWithDelay extends Call { @override Map> toJson() => { - 'schedule_asset_transfer_with_delay': { - 'assetId': assetId, - 'dest': dest.toJson(), - 'amount': amount, - 'delay': delay.toJson(), - } - }; + 'schedule_asset_transfer_with_delay': { + 'assetId': assetId, + 'dest': dest.toJson(), + 'amount': amount, + 'delay': delay.toJson(), + }, + }; int _sizeHint() { int size = 1; @@ -695,34 +525,16 @@ class ScheduleAssetTransferWithDelay extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - _i6.MultiAddress.codec.encodeTo( - dest, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); - _i3.BlockNumberOrTimestamp.codec.encodeTo( - delay, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + _i6.MultiAddress.codec.encodeTo(dest, output); + _i1.U128Codec.codec.encodeTo(amount, output); + _i3.BlockNumberOrTimestamp.codec.encodeTo(delay, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ScheduleAssetTransferWithDelay && other.assetId == assetId && other.dest == dest && @@ -730,12 +542,7 @@ class ScheduleAssetTransferWithDelay extends Call { other.delay == delay; @override - int get hashCode => Object.hash( - assetId, - dest, - amount, - delay, - ); + int get hashCode => Object.hash(assetId, dest, amount, delay); } /// Allows the guardian to recover all funds from a high-security account @@ -760,8 +567,8 @@ class RecoverFunds extends Call { @override Map>> toJson() => { - 'recover_funds': {'account': account.toList()} - }; + 'recover_funds': {'account': account.toList()}, + }; int _sizeHint() { int size = 1; @@ -770,27 +577,13 @@ class RecoverFunds extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RecoverFunds && - _i7.listsEqual( - other.account, - account, - ); + identical(this, other) || other is RecoverFunds && _i7.listsEqual(other.account, account); @override int get hashCode => account.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/error.dart index d1f5bc7e..beb697bf 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/error.dart @@ -49,16 +49,12 @@ enum Error { /// Cannot schedule one time reversible transaction when account is reversible (theft /// deterrence) - accountAlreadyReversibleCannotScheduleOneTime( - 'AccountAlreadyReversibleCannotScheduleOneTime', 14), + accountAlreadyReversibleCannotScheduleOneTime('AccountAlreadyReversibleCannotScheduleOneTime', 14), /// The guardian has reached the maximum number of accounts they can protect. tooManyGuardianAccounts('TooManyGuardianAccounts', 15); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -122,13 +118,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/event.dart index c34bf9e2..a3cd1f12 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/event.dart @@ -44,11 +44,7 @@ class $Event { required _i3.AccountId32 guardian, required _i4.BlockNumberOrTimestamp delay, }) { - return HighSecuritySet( - who: who, - guardian: guardian, - delay: delay, - ); + return HighSecuritySet(who: who, guardian: guardian, delay: delay); } TransactionScheduled transactionScheduled({ @@ -71,35 +67,19 @@ class $Event { ); } - TransactionCancelled transactionCancelled({ - required _i3.AccountId32 who, - required _i5.H256 txId, - }) { - return TransactionCancelled( - who: who, - txId: txId, - ); + TransactionCancelled transactionCancelled({required _i3.AccountId32 who, required _i5.H256 txId}) { + return TransactionCancelled(who: who, txId: txId); } TransactionExecuted transactionExecuted({ required _i5.H256 txId, - required _i1.Result<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo> - result, + required _i1.Result<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo> result, }) { - return TransactionExecuted( - txId: txId, - result: result, - ); + return TransactionExecuted(txId: txId, result: result); } - FundsRecovered fundsRecovered({ - required _i3.AccountId32 account, - required _i3.AccountId32 guardian, - }) { - return FundsRecovered( - account: account, - guardian: guardian, - ); + FundsRecovered fundsRecovered({required _i3.AccountId32 account, required _i3.AccountId32 guardian}) { + return FundsRecovered(account: account, guardian: guardian); } TransferRecoveryFailed transferRecoveryFailed({required _i5.H256 txId}) { @@ -132,10 +112,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case HighSecuritySet: (value as HighSecuritySet).encodeTo(output); @@ -156,8 +133,7 @@ class $EventCodec with _i1.Codec { (value as TransferRecoveryFailed).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -177,19 +153,14 @@ class $EventCodec with _i1.Codec { case TransferRecoveryFailed: return (value as TransferRecoveryFailed)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A user has enabled their high-security settings. class HighSecuritySet extends Event { - const HighSecuritySet({ - required this.who, - required this.guardian, - required this.delay, - }); + const HighSecuritySet({required this.who, required this.guardian, required this.delay}); factory HighSecuritySet._decode(_i1.Input input) { return HighSecuritySet( @@ -211,12 +182,8 @@ class HighSecuritySet extends Event { @override Map> toJson() => { - 'HighSecuritySet': { - 'who': who.toList(), - 'guardian': guardian.toList(), - 'delay': delay.toJson(), - } - }; + 'HighSecuritySet': {'who': who.toList(), 'guardian': guardian.toList(), 'delay': delay.toJson()}, + }; int _sizeHint() { int size = 1; @@ -227,47 +194,22 @@ class HighSecuritySet extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - guardian, - output, - ); - _i4.BlockNumberOrTimestamp.codec.encodeTo( - delay, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + const _i1.U8ArrayCodec(32).encodeTo(guardian, output); + _i4.BlockNumberOrTimestamp.codec.encodeTo(delay, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is HighSecuritySet && - _i9.listsEqual( - other.who, - who, - ) && - _i9.listsEqual( - other.guardian, - guardian, - ) && + _i9.listsEqual(other.who, who) && + _i9.listsEqual(other.guardian, guardian) && other.delay == delay; @override - int get hashCode => Object.hash( - who, - guardian, - delay, - ); + int get hashCode => Object.hash(who, guardian, delay); } /// A transaction has been scheduled for delayed execution. @@ -318,24 +260,23 @@ class TransactionScheduled extends Event { @override Map> toJson() => { - 'TransactionScheduled': { - 'from': from.toList(), - 'to': to.toList(), - 'guardian': guardian.toList(), - 'assetId': assetId, - 'amount': amount, - 'txId': txId.toList(), - 'executeAt': executeAt.toJson(), - } - }; + 'TransactionScheduled': { + 'from': from.toList(), + 'to': to.toList(), + 'guardian': guardian.toList(), + 'assetId': assetId, + 'amount': amount, + 'txId': txId.toList(), + 'executeAt': executeAt.toJson(), + }, + }; int _sizeHint() { int size = 1; size = size + const _i3.AccountId32Codec().sizeHint(from); size = size + const _i3.AccountId32Codec().sizeHint(to); size = size + const _i3.AccountId32Codec().sizeHint(guardian); - size = - size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(assetId); + size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(assetId); size = size + _i1.U128Codec.codec.sizeHint(amount); size = size + const _i5.H256Codec().sizeHint(txId); size = size + _i6.DispatchTime.codec.sizeHint(executeAt); @@ -343,85 +284,35 @@ class TransactionScheduled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - from, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - to, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - guardian, - output, - ); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( - assetId, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - txId, - output, - ); - _i6.DispatchTime.codec.encodeTo( - executeAt, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(from, output); + const _i1.U8ArrayCodec(32).encodeTo(to, output); + const _i1.U8ArrayCodec(32).encodeTo(guardian, output); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(assetId, output); + _i1.U128Codec.codec.encodeTo(amount, output); + const _i1.U8ArrayCodec(32).encodeTo(txId, output); + _i6.DispatchTime.codec.encodeTo(executeAt, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is TransactionScheduled && - _i9.listsEqual( - other.from, - from, - ) && - _i9.listsEqual( - other.to, - to, - ) && - _i9.listsEqual( - other.guardian, - guardian, - ) && + _i9.listsEqual(other.from, from) && + _i9.listsEqual(other.to, to) && + _i9.listsEqual(other.guardian, guardian) && other.assetId == assetId && other.amount == amount && - _i9.listsEqual( - other.txId, - txId, - ) && + _i9.listsEqual(other.txId, txId) && other.executeAt == executeAt; @override - int get hashCode => Object.hash( - from, - to, - guardian, - assetId, - amount, - txId, - executeAt, - ); + int get hashCode => Object.hash(from, to, guardian, assetId, amount, txId, executeAt); } /// A scheduled transaction has been successfully cancelled. class TransactionCancelled extends Event { - const TransactionCancelled({ - required this.who, - required this.txId, - }); + const TransactionCancelled({required this.who, required this.txId}); factory TransactionCancelled._decode(_i1.Input input) { return TransactionCancelled( @@ -438,11 +329,8 @@ class TransactionCancelled extends Event { @override Map>> toJson() => { - 'TransactionCancelled': { - 'who': who.toList(), - 'txId': txId.toList(), - } - }; + 'TransactionCancelled': {'who': who.toList(), 'txId': txId.toList()}, + }; int _sizeHint() { int size = 1; @@ -452,55 +340,28 @@ class TransactionCancelled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - txId, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + const _i1.U8ArrayCodec(32).encodeTo(txId, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TransactionCancelled && - _i9.listsEqual( - other.who, - who, - ) && - _i9.listsEqual( - other.txId, - txId, - ); + identical(this, other) || + other is TransactionCancelled && _i9.listsEqual(other.who, who) && _i9.listsEqual(other.txId, txId); @override - int get hashCode => Object.hash( - who, - txId, - ); + int get hashCode => Object.hash(who, txId); } /// A scheduled transaction was executed by the scheduler. class TransactionExecuted extends Event { - const TransactionExecuted({ - required this.txId, - required this.result, - }); + const TransactionExecuted({required this.txId, required this.result}); factory TransactionExecuted._decode(_i1.Input input) { return TransactionExecuted( txId: const _i1.U8ArrayCodec(32).decode(input), - result: const _i1 - .ResultCodec<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo>( + result: const _i1.ResultCodec<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo>( _i7.PostDispatchInfo.codec, _i8.DispatchErrorWithPostInfo.codec, ).decode(input), @@ -515,18 +376,15 @@ class TransactionExecuted extends Event { @override Map> toJson() => { - 'TransactionExecuted': { - 'txId': txId.toList(), - 'result': result.toJson(), - } - }; + 'TransactionExecuted': {'txId': txId.toList(), 'result': result.toJson()}, + }; int _sizeHint() { int size = 1; size = size + const _i5.H256Codec().sizeHint(txId); - size = size + - const _i1 - .ResultCodec<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo>( + size = + size + + const _i1.ResultCodec<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo>( _i7.PostDispatchInfo.codec, _i8.DispatchErrorWithPostInfo.codec, ).sizeHint(result); @@ -534,49 +392,26 @@ class TransactionExecuted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - txId, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(txId, output); const _i1.ResultCodec<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo>( _i7.PostDispatchInfo.codec, _i8.DispatchErrorWithPostInfo.codec, - ).encodeTo( - result, - output, - ); + ).encodeTo(result, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TransactionExecuted && - _i9.listsEqual( - other.txId, - txId, - ) && - other.result == result; + identical(this, other) || + other is TransactionExecuted && _i9.listsEqual(other.txId, txId) && other.result == result; @override - int get hashCode => Object.hash( - txId, - result, - ); + int get hashCode => Object.hash(txId, result); } /// All funds were recovered from a high-security account by its guardian. class FundsRecovered extends Event { - const FundsRecovered({ - required this.account, - required this.guardian, - }); + const FundsRecovered({required this.account, required this.guardian}); factory FundsRecovered._decode(_i1.Input input) { return FundsRecovered( @@ -593,11 +428,8 @@ class FundsRecovered extends Event { @override Map>> toJson() => { - 'FundsRecovered': { - 'account': account.toList(), - 'guardian': guardian.toList(), - } - }; + 'FundsRecovered': {'account': account.toList(), 'guardian': guardian.toList()}, + }; int _sizeHint() { int size = 1; @@ -607,41 +439,18 @@ class FundsRecovered extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - guardian, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); + const _i1.U8ArrayCodec(32).encodeTo(guardian, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is FundsRecovered && - _i9.listsEqual( - other.account, - account, - ) && - _i9.listsEqual( - other.guardian, - guardian, - ); + identical(this, other) || + other is FundsRecovered && _i9.listsEqual(other.account, account) && _i9.listsEqual(other.guardian, guardian); @override - int get hashCode => Object.hash( - account, - guardian, - ); + int get hashCode => Object.hash(account, guardian); } /// Failed to release held funds during recovery. The transfer metadata is preserved @@ -650,8 +459,7 @@ class TransferRecoveryFailed extends Event { const TransferRecoveryFailed({required this.txId}); factory TransferRecoveryFailed._decode(_i1.Input input) { - return TransferRecoveryFailed( - txId: const _i1.U8ArrayCodec(32).decode(input)); + return TransferRecoveryFailed(txId: const _i1.U8ArrayCodec(32).decode(input)); } /// T::Hash @@ -659,8 +467,8 @@ class TransferRecoveryFailed extends Event { @override Map>> toJson() => { - 'TransferRecoveryFailed': {'txId': txId.toList()} - }; + 'TransferRecoveryFailed': {'txId': txId.toList()}, + }; int _sizeHint() { int size = 1; @@ -669,27 +477,13 @@ class TransferRecoveryFailed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - txId, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + const _i1.U8ArrayCodec(32).encodeTo(txId, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TransferRecoveryFailed && - _i9.listsEqual( - other.txId, - txId, - ); + identical(this, other) || other is TransferRecoveryFailed && _i9.listsEqual(other.txId, txId); @override int get hashCode => txId.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/hold_reason.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/hold_reason.dart index 00e3a2aa..12bf569f 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/hold_reason.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pallet/hold_reason.dart @@ -6,10 +6,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; enum HoldReason { scheduledTransfer('ScheduledTransfer', 0); - const HoldReason( - this.variantName, - this.codecIndex, - ); + const HoldReason(this.variantName, this.codecIndex); factory HoldReason.decode(_i1.Input input) { return codec.decode(input); @@ -43,13 +40,7 @@ class $HoldReasonCodec with _i1.Codec { } @override - void encodeTo( - HoldReason value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(HoldReason value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pending_transfer.dart b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pending_transfer.dart index 7b98b1a6..e5e14b35 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pending_transfer.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_reversible_transfers/pending_transfer.dart @@ -41,73 +41,37 @@ class PendingTransfer { } Map toJson() => { - 'from': from.toList(), - 'to': to.toList(), - 'guardian': guardian.toList(), - 'assetId': assetId, - 'amount': amount, - }; + 'from': from.toList(), + 'to': to.toList(), + 'guardian': guardian.toList(), + 'assetId': assetId, + 'amount': amount, + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is PendingTransfer && - _i4.listsEqual( - other.from, - from, - ) && - _i4.listsEqual( - other.to, - to, - ) && - _i4.listsEqual( - other.guardian, - guardian, - ) && + _i4.listsEqual(other.from, from) && + _i4.listsEqual(other.to, to) && + _i4.listsEqual(other.guardian, guardian) && other.assetId == assetId && other.amount == amount; @override - int get hashCode => Object.hash( - from, - to, - guardian, - assetId, - amount, - ); + int get hashCode => Object.hash(from, to, guardian, assetId, amount); } class $PendingTransferCodec with _i1.Codec { const $PendingTransferCodec(); @override - void encodeTo( - PendingTransfer obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - obj.from, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - obj.to, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - obj.guardian, - output, - ); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( - obj.assetId, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.amount, - output, - ); + void encodeTo(PendingTransfer obj, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(obj.from, output); + const _i1.U8ArrayCodec(32).encodeTo(obj.to, output); + const _i1.U8ArrayCodec(32).encodeTo(obj.guardian, output); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(obj.assetId, output); + _i1.U128Codec.codec.encodeTo(obj.amount, output); } @override @@ -127,8 +91,7 @@ class $PendingTransferCodec with _i1.Codec { size = size + const _i2.AccountId32Codec().sizeHint(obj.from); size = size + const _i2.AccountId32Codec().sizeHint(obj.to); size = size + const _i2.AccountId32Codec().sizeHint(obj.guardian); - size = size + - const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.assetId); + size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.assetId); size = size + _i1.U128Codec.codec.sizeHint(obj.amount); return size; } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/call.dart index a7609870..85d64849 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/call.dart @@ -36,26 +36,12 @@ abstract class Call { class $Call { const $Call(); - Schedule schedule({ - required int when, - required int priority, - required _i3.RuntimeCall call, - }) { - return Schedule( - when: when, - priority: priority, - call: call, - ); + Schedule schedule({required int when, required int priority, required _i3.RuntimeCall call}) { + return Schedule(when: when, priority: priority, call: call); } - Cancel cancel({ - required _i4.BlockNumberOrTimestamp when, - required int index, - }) { - return Cancel( - when: when, - index: index, - ); + Cancel cancel({required _i4.BlockNumberOrTimestamp when, required int index}) { + return Cancel(when: when, index: index); } ScheduleNamed scheduleNamed({ @@ -64,12 +50,7 @@ class $Call { required int priority, required _i3.RuntimeCall call, }) { - return ScheduleNamed( - id: id, - when: when, - priority: priority, - call: call, - ); + return ScheduleNamed(id: id, when: when, priority: priority, call: call); } CancelNamed cancelNamed({required List id}) { @@ -81,11 +62,7 @@ class $Call { required int priority, required _i3.RuntimeCall call, }) { - return ScheduleAfter( - after: after, - priority: priority, - call: call, - ); + return ScheduleAfter(after: after, priority: priority, call: call); } ScheduleNamedAfter scheduleNamedAfter({ @@ -94,12 +71,7 @@ class $Call { required int priority, required _i3.RuntimeCall call, }) { - return ScheduleNamedAfter( - id: id, - after: after, - priority: priority, - call: call, - ); + return ScheduleNamedAfter(id: id, after: after, priority: priority, call: call); } SetRetry setRetry({ @@ -107,11 +79,7 @@ class $Call { required int retries, required _i4.BlockNumberOrTimestamp period, }) { - return SetRetry( - task: task, - retries: retries, - period: period, - ); + return SetRetry(task: task, retries: retries, period: period); } SetRetryNamed setRetryNamed({ @@ -119,15 +87,10 @@ class $Call { required int retries, required _i4.BlockNumberOrTimestamp period, }) { - return SetRetryNamed( - id: id, - retries: retries, - period: period, - ); + return SetRetryNamed(id: id, retries: retries, period: period); } - CancelRetry cancelRetry( - {required _i5.Tuple2<_i4.BlockNumberOrTimestamp, int> task}) { + CancelRetry cancelRetry({required _i5.Tuple2<_i4.BlockNumberOrTimestamp, int> task}) { return CancelRetry(task: task); } @@ -169,10 +132,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case Schedule: (value as Schedule).encodeTo(output); @@ -205,8 +165,7 @@ class $CallCodec with _i1.Codec { (value as CancelRetryNamed).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -234,18 +193,13 @@ class $CallCodec with _i1.Codec { case CancelRetryNamed: return (value as CancelRetryNamed)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } class Schedule extends Call { - const Schedule({ - required this.when, - required this.priority, - required this.call, - }); + const Schedule({required this.when, required this.priority, required this.call}); factory Schedule._decode(_i1.Input input) { return Schedule( @@ -266,12 +220,8 @@ class Schedule extends Call { @override Map> toJson() => { - 'schedule': { - 'when': when, - 'priority': priority, - 'call': call.toJson(), - } - }; + 'schedule': {'when': when, 'priority': priority, 'call': call.toJson()}, + }; int _sizeHint() { int size = 1; @@ -282,55 +232,27 @@ class Schedule extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - when, - output, - ); - _i1.U8Codec.codec.encodeTo( - priority, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(when, output); + _i1.U8Codec.codec.encodeTo(priority, output); + _i3.RuntimeCall.codec.encodeTo(call, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Schedule && - other.when == when && - other.priority == priority && - other.call == call; + identical(this, other) || + other is Schedule && other.when == when && other.priority == priority && other.call == call; @override - int get hashCode => Object.hash( - when, - priority, - call, - ); + int get hashCode => Object.hash(when, priority, call); } /// Cancel an anonymously scheduled task. class Cancel extends Call { - const Cancel({ - required this.when, - required this.index, - }); + const Cancel({required this.when, required this.index}); factory Cancel._decode(_i1.Input input) { - return Cancel( - when: _i4.BlockNumberOrTimestamp.codec.decode(input), - index: _i1.U32Codec.codec.decode(input), - ); + return Cancel(when: _i4.BlockNumberOrTimestamp.codec.decode(input), index: _i1.U32Codec.codec.decode(input)); } /// BlockNumberOrTimestampOf @@ -341,11 +263,8 @@ class Cancel extends Call { @override Map> toJson() => { - 'cancel': { - 'when': when.toJson(), - 'index': index, - } - }; + 'cancel': {'when': when.toJson(), 'index': index}, + }; int _sizeHint() { int size = 1; @@ -355,42 +274,21 @@ class Cancel extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i4.BlockNumberOrTimestamp.codec.encodeTo( - when, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i4.BlockNumberOrTimestamp.codec.encodeTo(when, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Cancel && other.when == when && other.index == index; + identical(this, other) || other is Cancel && other.when == when && other.index == index; @override - int get hashCode => Object.hash( - when, - index, - ); + int get hashCode => Object.hash(when, index); } class ScheduleNamed extends Call { - const ScheduleNamed({ - required this.id, - required this.when, - required this.priority, - required this.call, - }); + const ScheduleNamed({required this.id, required this.when, required this.priority, required this.call}); factory ScheduleNamed._decode(_i1.Input input) { return ScheduleNamed( @@ -415,13 +313,8 @@ class ScheduleNamed extends Call { @override Map> toJson() => { - 'schedule_named': { - 'id': id.toList(), - 'when': when, - 'priority': priority, - 'call': call.toJson(), - } - }; + 'schedule_named': {'id': id.toList(), 'when': when, 'priority': priority, 'call': call.toJson()}, + }; int _sizeHint() { int size = 1; @@ -433,50 +326,24 @@ class ScheduleNamed extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - id, - output, - ); - _i1.U32Codec.codec.encodeTo( - when, - output, - ); - _i1.U8Codec.codec.encodeTo( - priority, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(id, output); + _i1.U32Codec.codec.encodeTo(when, output); + _i1.U8Codec.codec.encodeTo(priority, output); + _i3.RuntimeCall.codec.encodeTo(call, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ScheduleNamed && - _i6.listsEqual( - other.id, - id, - ) && + _i6.listsEqual(other.id, id) && other.when == when && other.priority == priority && other.call == call; @override - int get hashCode => Object.hash( - id, - when, - priority, - call, - ); + int get hashCode => Object.hash(id, when, priority, call); } /// Cancel a named scheduled task. @@ -492,8 +359,8 @@ class CancelNamed extends Call { @override Map>> toJson() => { - 'cancel_named': {'id': id.toList()} - }; + 'cancel_named': {'id': id.toList()}, + }; int _sizeHint() { int size = 1; @@ -502,38 +369,19 @@ class CancelNamed extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is CancelNamed && - _i6.listsEqual( - other.id, - id, - ); + bool operator ==(Object other) => identical(this, other) || other is CancelNamed && _i6.listsEqual(other.id, id); @override int get hashCode => id.hashCode; } class ScheduleAfter extends Call { - const ScheduleAfter({ - required this.after, - required this.priority, - required this.call, - }); + const ScheduleAfter({required this.after, required this.priority, required this.call}); factory ScheduleAfter._decode(_i1.Input input) { return ScheduleAfter( @@ -554,12 +402,8 @@ class ScheduleAfter extends Call { @override Map> toJson() => { - 'schedule_after': { - 'after': after.toJson(), - 'priority': priority, - 'call': call.toJson(), - } - }; + 'schedule_after': {'after': after.toJson(), 'priority': priority, 'call': call.toJson()}, + }; int _sizeHint() { int size = 1; @@ -570,50 +414,23 @@ class ScheduleAfter extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i4.BlockNumberOrTimestamp.codec.encodeTo( - after, - output, - ); - _i1.U8Codec.codec.encodeTo( - priority, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i4.BlockNumberOrTimestamp.codec.encodeTo(after, output); + _i1.U8Codec.codec.encodeTo(priority, output); + _i3.RuntimeCall.codec.encodeTo(call, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ScheduleAfter && - other.after == after && - other.priority == priority && - other.call == call; + identical(this, other) || + other is ScheduleAfter && other.after == after && other.priority == priority && other.call == call; @override - int get hashCode => Object.hash( - after, - priority, - call, - ); + int get hashCode => Object.hash(after, priority, call); } class ScheduleNamedAfter extends Call { - const ScheduleNamedAfter({ - required this.id, - required this.after, - required this.priority, - required this.call, - }); + const ScheduleNamedAfter({required this.id, required this.after, required this.priority, required this.call}); factory ScheduleNamedAfter._decode(_i1.Input input) { return ScheduleNamedAfter( @@ -638,13 +455,8 @@ class ScheduleNamedAfter extends Call { @override Map> toJson() => { - 'schedule_named_after': { - 'id': id.toList(), - 'after': after.toJson(), - 'priority': priority, - 'call': call.toJson(), - } - }; + 'schedule_named_after': {'id': id.toList(), 'after': after.toJson(), 'priority': priority, 'call': call.toJson()}, + }; int _sizeHint() { int size = 1; @@ -656,50 +468,24 @@ class ScheduleNamedAfter extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - id, - output, - ); - _i4.BlockNumberOrTimestamp.codec.encodeTo( - after, - output, - ); - _i1.U8Codec.codec.encodeTo( - priority, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + const _i1.U8ArrayCodec(32).encodeTo(id, output); + _i4.BlockNumberOrTimestamp.codec.encodeTo(after, output); + _i1.U8Codec.codec.encodeTo(priority, output); + _i3.RuntimeCall.codec.encodeTo(call, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ScheduleNamedAfter && - _i6.listsEqual( - other.id, - id, - ) && + _i6.listsEqual(other.id, id) && other.after == after && other.priority == priority && other.call == call; @override - int get hashCode => Object.hash( - id, - after, - priority, - call, - ); + int get hashCode => Object.hash(id, after, priority, call); } /// Set a retry configuration for a task so that, in case its scheduled run fails, it will @@ -718,11 +504,7 @@ class ScheduleNamedAfter extends Call { /// require a block-number period, and timestamp-scheduled tasks require a timestamp /// period. Mismatched types will return [`Error::RetryPeriodMismatch`]. class SetRetry extends Call { - const SetRetry({ - required this.task, - required this.retries, - required this.period, - }); + const SetRetry({required this.task, required this.retries, required this.period}); factory SetRetry._decode(_i1.Input input) { return SetRetry( @@ -746,19 +528,17 @@ class SetRetry extends Call { @override Map> toJson() => { - 'set_retry': { - 'task': [ - task.value0.toJson(), - task.value1, - ], - 'retries': retries, - 'period': period.toJson(), - } - }; + 'set_retry': { + 'task': [task.value0.toJson(), task.value1], + 'retries': retries, + 'period': period.toJson(), + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, @@ -769,44 +549,22 @@ class SetRetry extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo( - task, - output, - ); - _i1.U8Codec.codec.encodeTo( - retries, - output, - ); - _i4.BlockNumberOrTimestamp.codec.encodeTo( - period, - output, - ); + ).encodeTo(task, output); + _i1.U8Codec.codec.encodeTo(retries, output); + _i4.BlockNumberOrTimestamp.codec.encodeTo(period, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetRetry && - other.task == task && - other.retries == retries && - other.period == period; - - @override - int get hashCode => Object.hash( - task, - retries, - period, - ); + identical(this, other) || + other is SetRetry && other.task == task && other.retries == retries && other.period == period; + + @override + int get hashCode => Object.hash(task, retries, period); } /// Set a retry configuration for a named task so that, in case its scheduled run fails, it @@ -825,11 +583,7 @@ class SetRetry extends Call { /// require a block-number period, and timestamp-scheduled tasks require a timestamp /// period. Mismatched types will return [`Error::RetryPeriodMismatch`]. class SetRetryNamed extends Call { - const SetRetryNamed({ - required this.id, - required this.retries, - required this.period, - }); + const SetRetryNamed({required this.id, required this.retries, required this.period}); factory SetRetryNamed._decode(_i1.Input input) { return SetRetryNamed( @@ -850,12 +604,8 @@ class SetRetryNamed extends Call { @override Map> toJson() => { - 'set_retry_named': { - 'id': id.toList(), - 'retries': retries, - 'period': period.toJson(), - } - }; + 'set_retry_named': {'id': id.toList(), 'retries': retries, 'period': period.toJson()}, + }; int _sizeHint() { int size = 1; @@ -866,44 +616,19 @@ class SetRetryNamed extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - id, - output, - ); - _i1.U8Codec.codec.encodeTo( - retries, - output, - ); - _i4.BlockNumberOrTimestamp.codec.encodeTo( - period, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + const _i1.U8ArrayCodec(32).encodeTo(id, output); + _i1.U8Codec.codec.encodeTo(retries, output); + _i4.BlockNumberOrTimestamp.codec.encodeTo(period, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetRetryNamed && - _i6.listsEqual( - other.id, - id, - ) && - other.retries == retries && - other.period == period; - - @override - int get hashCode => Object.hash( - id, - retries, - period, - ); + identical(this, other) || + other is SetRetryNamed && _i6.listsEqual(other.id, id) && other.retries == retries && other.period == period; + + @override + int get hashCode => Object.hash(id, retries, period); } /// Removes the retry configuration of a task. @@ -912,10 +637,11 @@ class CancelRetry extends Call { factory CancelRetry._decode(_i1.Input input) { return CancelRetry( - task: const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input)); + task: const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + ).decode(input), + ); } /// TaskAddressOf @@ -923,17 +649,15 @@ class CancelRetry extends Call { @override Map>> toJson() => { - 'cancel_retry': { - 'task': [ - task.value0.toJson(), - task.value1, - ] - } - }; + 'cancel_retry': { + 'task': [task.value0.toJson(), task.value1], + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, @@ -942,26 +666,15 @@ class CancelRetry extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); const _i5.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo( - task, - output, - ); + ).encodeTo(task, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is CancelRetry && other.task == task; + bool operator ==(Object other) => identical(this, other) || other is CancelRetry && other.task == task; @override int get hashCode => task.hashCode; @@ -980,8 +693,8 @@ class CancelRetryNamed extends Call { @override Map>> toJson() => { - 'cancel_retry_named': {'id': id.toList()} - }; + 'cancel_retry_named': {'id': id.toList()}, + }; int _sizeHint() { int size = 1; @@ -990,27 +703,12 @@ class CancelRetryNamed extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + const _i1.U8ArrayCodec(32).encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is CancelRetryNamed && - _i6.listsEqual( - other.id, - id, - ); + bool operator ==(Object other) => identical(this, other) || other is CancelRetryNamed && _i6.listsEqual(other.id, id); @override int get hashCode => id.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/error.dart index a77fbc42..d4f3eb7b 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/error.dart @@ -32,10 +32,7 @@ enum Error { /// and timestamp-scheduled tasks require a timestamp retry period. retryPeriodMismatch('RetryPeriodMismatch', 7); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -83,13 +80,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/event.dart index 41214b9d..d0b914ec 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/pallet/event.dart @@ -35,24 +35,12 @@ abstract class Event { class $Event { const $Event(); - Scheduled scheduled({ - required _i3.BlockNumberOrTimestamp when, - required int index, - }) { - return Scheduled( - when: when, - index: index, - ); + Scheduled scheduled({required _i3.BlockNumberOrTimestamp when, required int index}) { + return Scheduled(when: when, index: index); } - Canceled canceled({ - required _i3.BlockNumberOrTimestamp when, - required int index, - }) { - return Canceled( - when: when, - index: index, - ); + Canceled canceled({required _i3.BlockNumberOrTimestamp when, required int index}) { + return Canceled(when: when, index: index); } Dispatched dispatched({ @@ -60,11 +48,7 @@ class $Event { List? id, required _i1.Result result, }) { - return Dispatched( - task: task, - id: id, - result: result, - ); + return Dispatched(task: task, id: id, result: result); } RetrySet retrySet({ @@ -73,52 +57,26 @@ class $Event { required _i3.BlockNumberOrTimestamp period, required int retries, }) { - return RetrySet( - task: task, - id: id, - period: period, - retries: retries, - ); + return RetrySet(task: task, id: id, period: period, retries: retries); } - RetryCancelled retryCancelled({ - required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, - List? id, - }) { - return RetryCancelled( - task: task, - id: id, - ); + RetryCancelled retryCancelled({required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id}) { + return RetryCancelled(task: task, id: id); } - CallUnavailable callUnavailable({ - required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, - List? id, - }) { - return CallUnavailable( - task: task, - id: id, - ); + CallUnavailable callUnavailable({required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id}) { + return CallUnavailable(task: task, id: id); } - RetryFailed retryFailed({ - required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, - List? id, - }) { - return RetryFailed( - task: task, - id: id, - ); + RetryFailed retryFailed({required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id}) { + return RetryFailed(task: task, id: id); } PermanentlyOverweight permanentlyOverweight({ required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id, }) { - return PermanentlyOverweight( - task: task, - id: id, - ); + return PermanentlyOverweight(task: task, id: id); } } @@ -151,10 +109,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case Scheduled: (value as Scheduled).encodeTo(output); @@ -181,8 +136,7 @@ class $EventCodec with _i1.Codec { (value as PermanentlyOverweight).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -206,24 +160,17 @@ class $EventCodec with _i1.Codec { case PermanentlyOverweight: return (value as PermanentlyOverweight)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// Scheduled some task. class Scheduled extends Event { - const Scheduled({ - required this.when, - required this.index, - }); + const Scheduled({required this.when, required this.index}); factory Scheduled._decode(_i1.Input input) { - return Scheduled( - when: _i3.BlockNumberOrTimestamp.codec.decode(input), - index: _i1.U32Codec.codec.decode(input), - ); + return Scheduled(when: _i3.BlockNumberOrTimestamp.codec.decode(input), index: _i1.U32Codec.codec.decode(input)); } /// BlockNumberOrTimestampOf @@ -234,11 +181,8 @@ class Scheduled extends Event { @override Map> toJson() => { - 'Scheduled': { - 'when': when.toJson(), - 'index': index, - } - }; + 'Scheduled': {'when': when.toJson(), 'index': index}, + }; int _sizeHint() { int size = 1; @@ -248,47 +192,25 @@ class Scheduled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.BlockNumberOrTimestamp.codec.encodeTo( - when, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.BlockNumberOrTimestamp.codec.encodeTo(when, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Scheduled && other.when == when && other.index == index; + identical(this, other) || other is Scheduled && other.when == when && other.index == index; @override - int get hashCode => Object.hash( - when, - index, - ); + int get hashCode => Object.hash(when, index); } /// Canceled some task. class Canceled extends Event { - const Canceled({ - required this.when, - required this.index, - }); + const Canceled({required this.when, required this.index}); factory Canceled._decode(_i1.Input input) { - return Canceled( - when: _i3.BlockNumberOrTimestamp.codec.decode(input), - index: _i1.U32Codec.codec.decode(input), - ); + return Canceled(when: _i3.BlockNumberOrTimestamp.codec.decode(input), index: _i1.U32Codec.codec.decode(input)); } /// BlockNumberOrTimestampOf @@ -299,11 +221,8 @@ class Canceled extends Event { @override Map> toJson() => { - 'Canceled': { - 'when': when.toJson(), - 'index': index, - } - }; + 'Canceled': {'when': when.toJson(), 'index': index}, + }; int _sizeHint() { int size = 1; @@ -313,42 +232,22 @@ class Canceled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i3.BlockNumberOrTimestamp.codec.encodeTo( - when, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i3.BlockNumberOrTimestamp.codec.encodeTo(when, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Canceled && other.when == when && other.index == index; + identical(this, other) || other is Canceled && other.when == when && other.index == index; @override - int get hashCode => Object.hash( - when, - index, - ); + int get hashCode => Object.hash(when, index); } /// Dispatched some task. class Dispatched extends Event { - const Dispatched({ - required this.task, - this.id, - required this.result, - }); + const Dispatched({required this.task, this.id, required this.result}); factory Dispatched._decode(_i1.Input input) { return Dispatched( @@ -375,26 +274,24 @@ class Dispatched extends Event { @override Map> toJson() => { - 'Dispatched': { - 'task': [ - task.value0.toJson(), - task.value1, - ], - 'id': id?.toList(), - 'result': result.toJson(), - } - }; + 'Dispatched': { + 'task': [task.value0.toJson(), task.value1], + 'id': id?.toList(), + 'result': result.toJson(), + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); - size = size + + size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = + size + const _i1.ResultCodec( _i1.NullCodec.codec, _i5.DispatchError.codec, @@ -403,57 +300,29 @@ class Dispatched extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo( - task, - output, - ); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( - id, - output, - ); + ).encodeTo(task, output); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); const _i1.ResultCodec( _i1.NullCodec.codec, _i5.DispatchError.codec, - ).encodeTo( - result, - output, - ); + ).encodeTo(result, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Dispatched && - other.task == task && - other.id == id && - other.result == result; + identical(this, other) || other is Dispatched && other.task == task && other.id == id && other.result == result; @override - int get hashCode => Object.hash( - task, - id, - result, - ); + int get hashCode => Object.hash(task, id, result); } /// Set a retry configuration for some task. class RetrySet extends Event { - const RetrySet({ - required this.task, - this.id, - required this.period, - required this.retries, - }); + const RetrySet({required this.task, this.id, required this.period, required this.retries}); factory RetrySet._decode(_i1.Input input) { return RetrySet( @@ -481,84 +350,51 @@ class RetrySet extends Event { @override Map> toJson() => { - 'RetrySet': { - 'task': [ - task.value0.toJson(), - task.value1, - ], - 'id': id?.toList(), - 'period': period.toJson(), - 'retries': retries, - } - }; + 'RetrySet': { + 'task': [task.value0.toJson(), task.value1], + 'id': id?.toList(), + 'period': period.toJson(), + 'retries': retries, + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); size = size + _i3.BlockNumberOrTimestamp.codec.sizeHint(period); size = size + _i1.U8Codec.codec.sizeHint(retries); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo( - task, - output, - ); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( - id, - output, - ); - _i3.BlockNumberOrTimestamp.codec.encodeTo( - period, - output, - ); - _i1.U8Codec.codec.encodeTo( - retries, - output, - ); + ).encodeTo(task, output); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); + _i3.BlockNumberOrTimestamp.codec.encodeTo(period, output); + _i1.U8Codec.codec.encodeTo(retries, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RetrySet && - other.task == task && - other.id == id && - other.period == period && - other.retries == retries; + identical(this, other) || + other is RetrySet && other.task == task && other.id == id && other.period == period && other.retries == retries; @override - int get hashCode => Object.hash( - task, - id, - period, - retries, - ); + int get hashCode => Object.hash(task, id, period, retries); } /// Cancel a retry configuration for some task. class RetryCancelled extends Event { - const RetryCancelled({ - required this.task, - this.id, - }); + const RetryCancelled({required this.task, this.id}); factory RetryCancelled._decode(_i1.Input input) { return RetryCancelled( @@ -578,66 +414,44 @@ class RetryCancelled extends Event { @override Map?>> toJson() => { - 'RetryCancelled': { - 'task': [ - task.value0.toJson(), - task.value1, - ], - 'id': id?.toList(), - } - }; + 'RetryCancelled': { + 'task': [task.value0.toJson(), task.value1], + 'id': id?.toList(), + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo( - task, - output, - ); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( - id, - output, - ); + ).encodeTo(task, output); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RetryCancelled && other.task == task && other.id == id; + identical(this, other) || other is RetryCancelled && other.task == task && other.id == id; @override - int get hashCode => Object.hash( - task, - id, - ); + int get hashCode => Object.hash(task, id); } /// The call for the provided hash was not found so the task has been aborted. class CallUnavailable extends Event { - const CallUnavailable({ - required this.task, - this.id, - }); + const CallUnavailable({required this.task, this.id}); factory CallUnavailable._decode(_i1.Input input) { return CallUnavailable( @@ -657,67 +471,45 @@ class CallUnavailable extends Event { @override Map?>> toJson() => { - 'CallUnavailable': { - 'task': [ - task.value0.toJson(), - task.value1, - ], - 'id': id?.toList(), - } - }; + 'CallUnavailable': { + 'task': [task.value0.toJson(), task.value1], + 'id': id?.toList(), + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo( - task, - output, - ); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( - id, - output, - ); + ).encodeTo(task, output); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is CallUnavailable && other.task == task && other.id == id; + identical(this, other) || other is CallUnavailable && other.task == task && other.id == id; @override - int get hashCode => Object.hash( - task, - id, - ); + int get hashCode => Object.hash(task, id); } /// The given task was unable to be retried since the agenda is full at that block or there /// was not enough weight to reschedule it. class RetryFailed extends Event { - const RetryFailed({ - required this.task, - this.id, - }); + const RetryFailed({required this.task, this.id}); factory RetryFailed._decode(_i1.Input input) { return RetryFailed( @@ -737,66 +529,44 @@ class RetryFailed extends Event { @override Map?>> toJson() => { - 'RetryFailed': { - 'task': [ - task.value0.toJson(), - task.value1, - ], - 'id': id?.toList(), - } - }; + 'RetryFailed': { + 'task': [task.value0.toJson(), task.value1], + 'id': id?.toList(), + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo( - task, - output, - ); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( - id, - output, - ); + ).encodeTo(task, output); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RetryFailed && other.task == task && other.id == id; + identical(this, other) || other is RetryFailed && other.task == task && other.id == id; @override - int get hashCode => Object.hash( - task, - id, - ); + int get hashCode => Object.hash(task, id); } /// The given task can never be executed since it is overweight. class PermanentlyOverweight extends Event { - const PermanentlyOverweight({ - required this.task, - this.id, - }); + const PermanentlyOverweight({required this.task, this.id}); factory PermanentlyOverweight._decode(_i1.Input input) { return PermanentlyOverweight( @@ -816,56 +586,37 @@ class PermanentlyOverweight extends Event { @override Map?>> toJson() => { - 'PermanentlyOverweight': { - 'task': [ - task.value0.toJson(), - task.value1, - ], - 'id': id?.toList(), - } - }; + 'PermanentlyOverweight': { + 'task': [task.value0.toJson(), task.value1], + 'id': id?.toList(), + }, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, ).sizeHint(task); - size = size + - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); + size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(id); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( _i3.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, - ).encodeTo( - task, - output, - ); - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( - id, - output, - ); + ).encodeTo(task, output); + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(id, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is PermanentlyOverweight && other.task == task && other.id == id; + identical(this, other) || other is PermanentlyOverweight && other.task == task && other.id == id; @override - int get hashCode => Object.hash( - task, - id, - ); + int get hashCode => Object.hash(task, id); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/retry_config.dart b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/retry_config.dart index efcc08b7..57203819 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/retry_config.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/retry_config.dart @@ -6,11 +6,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; import '../qp_scheduler/block_number_or_timestamp.dart' as _i2; class RetryConfig { - const RetryConfig({ - required this.totalRetries, - required this.remaining, - required this.period, - }); + const RetryConfig({required this.totalRetries, required this.remaining, required this.period}); factory RetryConfig.decode(_i1.Input input) { return codec.decode(input); @@ -31,51 +27,28 @@ class RetryConfig { return codec.encode(this); } - Map toJson() => { - 'totalRetries': totalRetries, - 'remaining': remaining, - 'period': period.toJson(), - }; + Map toJson() => {'totalRetries': totalRetries, 'remaining': remaining, 'period': period.toJson()}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is RetryConfig && other.totalRetries == totalRetries && other.remaining == remaining && other.period == period; @override - int get hashCode => Object.hash( - totalRetries, - remaining, - period, - ); + int get hashCode => Object.hash(totalRetries, remaining, period); } class $RetryConfigCodec with _i1.Codec { const $RetryConfigCodec(); @override - void encodeTo( - RetryConfig obj, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - obj.totalRetries, - output, - ); - _i1.U8Codec.codec.encodeTo( - obj.remaining, - output, - ); - _i2.BlockNumberOrTimestamp.codec.encodeTo( - obj.period, - output, - ); + void encodeTo(RetryConfig obj, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(obj.totalRetries, output); + _i1.U8Codec.codec.encodeTo(obj.remaining, output); + _i2.BlockNumberOrTimestamp.codec.encodeTo(obj.period, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/scheduled.dart b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/scheduled.dart index 28c0364f..db227595 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_scheduler/scheduled.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_scheduler/scheduled.dart @@ -7,12 +7,7 @@ import '../frame_support/traits/preimages/bounded.dart' as _i2; import '../quantus_runtime/origin_caller.dart' as _i3; class Scheduled { - const Scheduled({ - this.maybeId, - required this.priority, - required this.call, - required this.origin, - }); + const Scheduled({this.maybeId, required this.priority, required this.call, required this.origin}); factory Scheduled.decode(_i1.Input input) { return codec.decode(input); @@ -37,18 +32,15 @@ class Scheduled { } Map toJson() => { - 'maybeId': maybeId?.toList(), - 'priority': priority, - 'call': call.toJson(), - 'origin': origin.toJson(), - }; + 'maybeId': maybeId?.toList(), + 'priority': priority, + 'call': call.toJson(), + 'origin': origin.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Scheduled && other.maybeId == maybeId && other.priority == priority && @@ -56,45 +48,24 @@ class Scheduled { other.origin == origin; @override - int get hashCode => Object.hash( - maybeId, - priority, - call, - origin, - ); + int get hashCode => Object.hash(maybeId, priority, call, origin); } class $ScheduledCodec with _i1.Codec { const $ScheduledCodec(); @override - void encodeTo( - Scheduled obj, - _i1.Output output, - ) { - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo( - obj.maybeId, - output, - ); - _i1.U8Codec.codec.encodeTo( - obj.priority, - output, - ); - _i2.Bounded.codec.encodeTo( - obj.call, - output, - ); - _i3.OriginCaller.codec.encodeTo( - obj.origin, - output, - ); + void encodeTo(Scheduled obj, _i1.Output output) { + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).encodeTo(obj.maybeId, output); + _i1.U8Codec.codec.encodeTo(obj.priority, output); + _i2.Bounded.codec.encodeTo(obj.call, output); + _i3.OriginCaller.codec.encodeTo(obj.origin, output); } @override Scheduled decode(_i1.Input input) { return Scheduled( - maybeId: - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), + maybeId: const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), priority: _i1.U8Codec.codec.decode(input), call: _i2.Bounded.codec.decode(input), origin: _i3.OriginCaller.codec.decode(input), @@ -104,9 +75,7 @@ class $ScheduledCodec with _i1.Codec { @override int sizeHint(Scheduled obj) { int size = 0; - size = size + - const _i1.OptionCodec>(_i1.U8ArrayCodec(32)) - .sizeHint(obj.maybeId); + size = size + const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).sizeHint(obj.maybeId); size = size + _i1.U8Codec.codec.sizeHint(obj.priority); size = size + _i2.Bounded.codec.sizeHint(obj.call); size = size + _i3.OriginCaller.codec.sizeHint(obj.origin); diff --git a/quantus_sdk/lib/generated/planck/types/pallet_timestamp/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_timestamp/pallet/call.dart index 784b0d7c..513d9777 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_timestamp/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_timestamp/pallet/call.dart @@ -51,17 +51,13 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case Set: (value as Set).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -71,8 +67,7 @@ class $CallCodec with _i1.Codec { case Set: return (value as Set)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -108,8 +103,8 @@ class Set extends Call { @override Map> toJson() => { - 'set': {'now': now} - }; + 'set': {'now': now}, + }; int _sizeHint() { int size = 1; @@ -118,23 +113,12 @@ class Set extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - now, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.CompactBigIntCodec.codec.encodeTo(now, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Set && other.now == now; + bool operator ==(Object other) => identical(this, other) || other is Set && other.now == now; @override int get hashCode => now.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/charge_transaction_payment.dart b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/charge_transaction_payment.dart index 3abf4a8d..7146a0fb 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/charge_transaction_payment.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/charge_transaction_payment.dart @@ -12,14 +12,8 @@ class ChargeTransactionPaymentCodec with _i1.Codec { } @override - void encodeTo( - ChargeTransactionPayment value, - _i1.Output output, - ) { - _i1.CompactBigIntCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(ChargeTransactionPayment value, _i1.Output output) { + _i1.CompactBigIntCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/pallet/event.dart index c596daed..a0f28f9a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/pallet/event.dart @@ -39,11 +39,7 @@ class $Event { required BigInt actualFee, required BigInt tip, }) { - return TransactionFeePaid( - who: who, - actualFee: actualFee, - tip: tip, - ); + return TransactionFeePaid(who: who, actualFee: actualFee, tip: tip); } } @@ -62,17 +58,13 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case TransactionFeePaid: (value as TransactionFeePaid).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -82,8 +74,7 @@ class $EventCodec with _i1.Codec { case TransactionFeePaid: return (value as TransactionFeePaid)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -91,11 +82,7 @@ class $EventCodec with _i1.Codec { /// A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee, /// has been paid by `who`. class TransactionFeePaid extends Event { - const TransactionFeePaid({ - required this.who, - required this.actualFee, - required this.tip, - }); + const TransactionFeePaid({required this.who, required this.actualFee, required this.tip}); factory TransactionFeePaid._decode(_i1.Input input) { return TransactionFeePaid( @@ -116,12 +103,8 @@ class TransactionFeePaid extends Event { @override Map> toJson() => { - 'TransactionFeePaid': { - 'who': who.toList(), - 'actualFee': actualFee, - 'tip': tip, - } - }; + 'TransactionFeePaid': {'who': who.toList(), 'actualFee': actualFee, 'tip': tip}, + }; int _sizeHint() { int size = 1; @@ -132,42 +115,17 @@ class TransactionFeePaid extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - actualFee, - output, - ); - _i1.U128Codec.codec.encodeTo( - tip, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U128Codec.codec.encodeTo(actualFee, output); + _i1.U128Codec.codec.encodeTo(tip, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TransactionFeePaid && - _i4.listsEqual( - other.who, - who, - ) && - other.actualFee == actualFee && - other.tip == tip; + identical(this, other) || + other is TransactionFeePaid && _i4.listsEqual(other.who, who) && other.actualFee == actualFee && other.tip == tip; @override - int get hashCode => Object.hash( - who, - actualFee, - tip, - ); + int get hashCode => Object.hash(who, actualFee, tip); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/releases.dart b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/releases.dart index 641a7e2e..8669e3ca 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/releases.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_transaction_payment/releases.dart @@ -7,10 +7,7 @@ enum Releases { v1Ancient('V1Ancient', 0), v2('V2', 1); - const Releases( - this.variantName, - this.codecIndex, - ); + const Releases(this.variantName, this.codecIndex); factory Releases.decode(_i1.Input input) { return codec.decode(input); @@ -46,13 +43,7 @@ class $ReleasesCodec with _i1.Codec { } @override - void encodeTo( - Releases value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Releases value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/call.dart index 9ee64514..12fcd008 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/call.dart @@ -61,10 +61,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case SetTreasuryAccount: (value as SetTreasuryAccount).encodeTo(output); @@ -73,8 +70,7 @@ class $CallCodec with _i1.Codec { (value as SetTreasuryPortion).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -86,8 +82,7 @@ class $CallCodec with _i1.Codec { case SetTreasuryPortion: return (value as SetTreasuryPortion)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -102,8 +97,7 @@ class SetTreasuryAccount extends Call { const SetTreasuryAccount({required this.account}); factory SetTreasuryAccount._decode(_i1.Input input) { - return SetTreasuryAccount( - account: const _i1.U8ArrayCodec(32).decode(input)); + return SetTreasuryAccount(account: const _i1.U8ArrayCodec(32).decode(input)); } /// T::AccountId @@ -111,8 +105,8 @@ class SetTreasuryAccount extends Call { @override Map>> toJson() => { - 'set_treasury_account': {'account': account.toList()} - }; + 'set_treasury_account': {'account': account.toList()}, + }; int _sizeHint() { int size = 1; @@ -121,27 +115,13 @@ class SetTreasuryAccount extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetTreasuryAccount && - _i5.listsEqual( - other.account, - account, - ); + identical(this, other) || other is SetTreasuryAccount && _i5.listsEqual(other.account, account); @override int get hashCode => account.hashCode; @@ -160,8 +140,8 @@ class SetTreasuryPortion extends Call { @override Map> toJson() => { - 'set_treasury_portion': {'portion': portion} - }; + 'set_treasury_portion': {'portion': portion}, + }; int _sizeHint() { int size = 1; @@ -170,23 +150,12 @@ class SetTreasuryPortion extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - portion, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(portion, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetTreasuryPortion && other.portion == portion; + bool operator ==(Object other) => identical(this, other) || other is SetTreasuryPortion && other.portion == portion; @override int get hashCode => portion.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/error.dart index 7b8c34fe..51d12415 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/error.dart @@ -10,10 +10,7 @@ enum Error { /// Treasury account cannot be zero address (funds would be permanently locked). invalidTreasuryAccount('InvalidTreasuryAccount', 1); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -49,13 +46,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/event.dart index 9c984b1a..42854775 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_treasury/pallet/event.dart @@ -35,18 +35,11 @@ abstract class Event { class $Event { const $Event(); - TreasuryAccountUpdated treasuryAccountUpdated({ - _i3.AccountId32? oldAccount, - required _i3.AccountId32 newAccount, - }) { - return TreasuryAccountUpdated( - oldAccount: oldAccount, - newAccount: newAccount, - ); + TreasuryAccountUpdated treasuryAccountUpdated({_i3.AccountId32? oldAccount, required _i3.AccountId32 newAccount}) { + return TreasuryAccountUpdated(oldAccount: oldAccount, newAccount: newAccount); } - TreasuryPortionUpdated treasuryPortionUpdated( - {required _i4.Permill newPortion}) { + TreasuryPortionUpdated treasuryPortionUpdated({required _i4.Permill newPortion}) { return TreasuryPortionUpdated(newPortion: newPortion); } } @@ -68,10 +61,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case TreasuryAccountUpdated: (value as TreasuryAccountUpdated).encodeTo(output); @@ -80,8 +70,7 @@ class $EventCodec with _i1.Codec { (value as TreasuryPortionUpdated).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -93,8 +82,7 @@ class $EventCodec with _i1.Codec { case TreasuryPortionUpdated: return (value as TreasuryPortionUpdated)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -105,15 +93,11 @@ class $EventCodec with _i1.Codec { /// accumulated in the old account remains there and is NOT automatically migrated. /// Use a separate balance transfer if funds need to be moved. class TreasuryAccountUpdated extends Event { - const TreasuryAccountUpdated({ - this.oldAccount, - required this.newAccount, - }); + const TreasuryAccountUpdated({this.oldAccount, required this.newAccount}); factory TreasuryAccountUpdated._decode(_i1.Input input) { return TreasuryAccountUpdated( - oldAccount: const _i1.OptionCodec<_i3.AccountId32>(_i3.AccountId32Codec()) - .decode(input), + oldAccount: const _i1.OptionCodec<_i3.AccountId32>(_i3.AccountId32Codec()).decode(input), newAccount: const _i1.U8ArrayCodec(32).decode(input), ); } @@ -128,54 +112,29 @@ class TreasuryAccountUpdated extends Event { @override Map?>> toJson() => { - 'TreasuryAccountUpdated': { - 'oldAccount': oldAccount?.toList(), - 'newAccount': newAccount.toList(), - } - }; + 'TreasuryAccountUpdated': {'oldAccount': oldAccount?.toList(), 'newAccount': newAccount.toList()}, + }; int _sizeHint() { int size = 1; - size = size + - const _i1.OptionCodec<_i3.AccountId32>(_i3.AccountId32Codec()) - .sizeHint(oldAccount); + size = size + const _i1.OptionCodec<_i3.AccountId32>(_i3.AccountId32Codec()).sizeHint(oldAccount); size = size + const _i3.AccountId32Codec().sizeHint(newAccount); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.OptionCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo( - oldAccount, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - newAccount, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.OptionCodec<_i3.AccountId32>(_i3.AccountId32Codec()).encodeTo(oldAccount, output); + const _i1.U8ArrayCodec(32).encodeTo(newAccount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TreasuryAccountUpdated && - other.oldAccount == oldAccount && - _i5.listsEqual( - other.newAccount, - newAccount, - ); + identical(this, other) || + other is TreasuryAccountUpdated && other.oldAccount == oldAccount && _i5.listsEqual(other.newAccount, newAccount); @override - int get hashCode => Object.hash( - oldAccount, - newAccount, - ); + int get hashCode => Object.hash(oldAccount, newAccount); } /// The treasury portion (share of mining rewards) was updated. @@ -191,8 +150,8 @@ class TreasuryPortionUpdated extends Event { @override Map> toJson() => { - 'TreasuryPortionUpdated': {'newPortion': newPortion} - }; + 'TreasuryPortionUpdated': {'newPortion': newPortion}, + }; int _sizeHint() { int size = 1; @@ -201,23 +160,13 @@ class TreasuryPortionUpdated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - newPortion, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(newPortion, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TreasuryPortionUpdated && other.newPortion == newPortion; + identical(this, other) || other is TreasuryPortionUpdated && other.newPortion == newPortion; @override int get hashCode => newPortion.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/call.dart index 46a79794..3788829a 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/call.dart @@ -40,62 +40,32 @@ class $Call { return Batch(calls: calls); } - AsDerivative asDerivative({ - required int index, - required _i3.RuntimeCall call, - }) { - return AsDerivative( - index: index, - call: call, - ); + AsDerivative asDerivative({required int index, required _i3.RuntimeCall call}) { + return AsDerivative(index: index, call: call); } BatchAll batchAll({required List<_i3.RuntimeCall> calls}) { return BatchAll(calls: calls); } - DispatchAs dispatchAs({ - required _i4.OriginCaller asOrigin, - required _i3.RuntimeCall call, - }) { - return DispatchAs( - asOrigin: asOrigin, - call: call, - ); + DispatchAs dispatchAs({required _i4.OriginCaller asOrigin, required _i3.RuntimeCall call}) { + return DispatchAs(asOrigin: asOrigin, call: call); } ForceBatch forceBatch({required List<_i3.RuntimeCall> calls}) { return ForceBatch(calls: calls); } - WithWeight withWeight({ - required _i3.RuntimeCall call, - required _i5.Weight weight, - }) { - return WithWeight( - call: call, - weight: weight, - ); + WithWeight withWeight({required _i3.RuntimeCall call, required _i5.Weight weight}) { + return WithWeight(call: call, weight: weight); } - IfElse ifElse({ - required _i3.RuntimeCall main, - required _i3.RuntimeCall fallback, - }) { - return IfElse( - main: main, - fallback: fallback, - ); + IfElse ifElse({required _i3.RuntimeCall main, required _i3.RuntimeCall fallback}) { + return IfElse(main: main, fallback: fallback); } - DispatchAsFallible dispatchAsFallible({ - required _i4.OriginCaller asOrigin, - required _i3.RuntimeCall call, - }) { - return DispatchAsFallible( - asOrigin: asOrigin, - call: call, - ); + DispatchAsFallible dispatchAsFallible({required _i4.OriginCaller asOrigin, required _i3.RuntimeCall call}) { + return DispatchAsFallible(asOrigin: asOrigin, call: call); } } @@ -128,10 +98,7 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case Batch: (value as Batch).encodeTo(output); @@ -158,8 +125,7 @@ class $CallCodec with _i1.Codec { (value as DispatchAsFallible).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -183,8 +149,7 @@ class $CallCodec with _i1.Codec { case DispatchAsFallible: return (value as DispatchAsFallible)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -211,50 +176,30 @@ class Batch extends Call { const Batch({required this.calls}); factory Batch._decode(_i1.Input input) { - return Batch( - calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) - .decode(input)); + return Batch(calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).decode(input)); } /// Vec<::RuntimeCall> final List<_i3.RuntimeCall> calls; @override - Map>>>> toJson() => - { - 'batch': {'calls': calls.map((value) => value.toJson()).toList()} - }; + Map>>>> toJson() => { + 'batch': {'calls': calls.map((value) => value.toJson()).toList()}, + }; int _sizeHint() { int size = 1; - size = size + - const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) - .sizeHint(calls); + size = size + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).sizeHint(calls); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo( - calls, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo(calls, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Batch && - _i6.listsEqual( - other.calls, - calls, - ); + bool operator ==(Object other) => identical(this, other) || other is Batch && _i6.listsEqual(other.calls, calls); @override int get hashCode => calls.hashCode; @@ -274,16 +219,10 @@ class Batch extends Call { /// /// The dispatch origin for this call must be _Signed_. class AsDerivative extends Call { - const AsDerivative({ - required this.index, - required this.call, - }); + const AsDerivative({required this.index, required this.call}); factory AsDerivative._decode(_i1.Input input) { - return AsDerivative( - index: _i1.U16Codec.codec.decode(input), - call: _i3.RuntimeCall.codec.decode(input), - ); + return AsDerivative(index: _i1.U16Codec.codec.decode(input), call: _i3.RuntimeCall.codec.decode(input)); } /// u16 @@ -294,11 +233,8 @@ class AsDerivative extends Call { @override Map> toJson() => { - 'as_derivative': { - 'index': index, - 'call': call.toJson(), - } - }; + 'as_derivative': {'index': index, 'call': call.toJson()}, + }; int _sizeHint() { int size = 1; @@ -308,33 +244,17 @@ class AsDerivative extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U16Codec.codec.encodeTo( - index, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U16Codec.codec.encodeTo(index, output); + _i3.RuntimeCall.codec.encodeTo(call, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AsDerivative && other.index == index && other.call == call; + identical(this, other) || other is AsDerivative && other.index == index && other.call == call; @override - int get hashCode => Object.hash( - index, - call, - ); + int get hashCode => Object.hash(index, call); } /// Send a batch of dispatch calls and atomically execute them. @@ -354,9 +274,7 @@ class BatchAll extends Call { const BatchAll({required this.calls}); factory BatchAll._decode(_i1.Input input) { - return BatchAll( - calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) - .decode(input)); + return BatchAll(calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).decode(input)); } /// Vec<::RuntimeCall> @@ -364,39 +282,22 @@ class BatchAll extends Call { @override Map>> toJson() => { - 'batch_all': {'calls': calls.map((value) => value.toJson()).toList()} - }; + 'batch_all': {'calls': calls.map((value) => value.toJson()).toList()}, + }; int _sizeHint() { int size = 1; - size = size + - const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) - .sizeHint(calls); + size = size + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).sizeHint(calls); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo( - calls, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo(calls, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is BatchAll && - _i6.listsEqual( - other.calls, - calls, - ); + bool operator ==(Object other) => identical(this, other) || other is BatchAll && _i6.listsEqual(other.calls, calls); @override int get hashCode => calls.hashCode; @@ -409,16 +310,10 @@ class BatchAll extends Call { /// ## Complexity /// - O(1). class DispatchAs extends Call { - const DispatchAs({ - required this.asOrigin, - required this.call, - }); + const DispatchAs({required this.asOrigin, required this.call}); factory DispatchAs._decode(_i1.Input input) { - return DispatchAs( - asOrigin: _i4.OriginCaller.codec.decode(input), - call: _i3.RuntimeCall.codec.decode(input), - ); + return DispatchAs(asOrigin: _i4.OriginCaller.codec.decode(input), call: _i3.RuntimeCall.codec.decode(input)); } /// Box @@ -429,11 +324,8 @@ class DispatchAs extends Call { @override Map>> toJson() => { - 'dispatch_as': { - 'asOrigin': asOrigin.toJson(), - 'call': call.toJson(), - } - }; + 'dispatch_as': {'asOrigin': asOrigin.toJson(), 'call': call.toJson()}, + }; int _sizeHint() { int size = 1; @@ -443,33 +335,17 @@ class DispatchAs extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i4.OriginCaller.codec.encodeTo( - asOrigin, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i4.OriginCaller.codec.encodeTo(asOrigin, output); + _i3.RuntimeCall.codec.encodeTo(call, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DispatchAs && other.asOrigin == asOrigin && other.call == call; + identical(this, other) || other is DispatchAs && other.asOrigin == asOrigin && other.call == call; @override - int get hashCode => Object.hash( - asOrigin, - call, - ); + int get hashCode => Object.hash(asOrigin, call); } /// Send a batch of dispatch calls. @@ -489,9 +365,7 @@ class ForceBatch extends Call { const ForceBatch({required this.calls}); factory ForceBatch._decode(_i1.Input input) { - return ForceBatch( - calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) - .decode(input)); + return ForceBatch(calls: const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).decode(input)); } /// Vec<::RuntimeCall> @@ -499,39 +373,22 @@ class ForceBatch extends Call { @override Map>> toJson() => { - 'force_batch': {'calls': calls.map((value) => value.toJson()).toList()} - }; + 'force_batch': {'calls': calls.map((value) => value.toJson()).toList()}, + }; int _sizeHint() { int size = 1; - size = size + - const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec) - .sizeHint(calls); + size = size + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).sizeHint(calls); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo( - calls, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.SequenceCodec<_i3.RuntimeCall>(_i3.RuntimeCall.codec).encodeTo(calls, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ForceBatch && - _i6.listsEqual( - other.calls, - calls, - ); + bool operator ==(Object other) => identical(this, other) || other is ForceBatch && _i6.listsEqual(other.calls, calls); @override int get hashCode => calls.hashCode; @@ -544,16 +401,10 @@ class ForceBatch extends Call { /// /// The dispatch origin for this call must be _Root_. class WithWeight extends Call { - const WithWeight({ - required this.call, - required this.weight, - }); + const WithWeight({required this.call, required this.weight}); factory WithWeight._decode(_i1.Input input) { - return WithWeight( - call: _i3.RuntimeCall.codec.decode(input), - weight: _i5.Weight.codec.decode(input), - ); + return WithWeight(call: _i3.RuntimeCall.codec.decode(input), weight: _i5.Weight.codec.decode(input)); } /// Box<::RuntimeCall> @@ -564,11 +415,8 @@ class WithWeight extends Call { @override Map>> toJson() => { - 'with_weight': { - 'call': call.toJson(), - 'weight': weight.toJson(), - } - }; + 'with_weight': {'call': call.toJson(), 'weight': weight.toJson()}, + }; int _sizeHint() { int size = 1; @@ -578,33 +426,17 @@ class WithWeight extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - call, - output, - ); - _i5.Weight.codec.encodeTo( - weight, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i3.RuntimeCall.codec.encodeTo(call, output); + _i5.Weight.codec.encodeTo(weight, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is WithWeight && other.call == call && other.weight == weight; + identical(this, other) || other is WithWeight && other.call == call && other.weight == weight; @override - int get hashCode => Object.hash( - call, - weight, - ); + int get hashCode => Object.hash(call, weight); } /// Dispatch a fallback call in the event the main call fails to execute. @@ -631,16 +463,10 @@ class WithWeight extends Call { /// - Some use cases might involve submitting a `batch` type call in either main, fallback /// or both. class IfElse extends Call { - const IfElse({ - required this.main, - required this.fallback, - }); + const IfElse({required this.main, required this.fallback}); factory IfElse._decode(_i1.Input input) { - return IfElse( - main: _i3.RuntimeCall.codec.decode(input), - fallback: _i3.RuntimeCall.codec.decode(input), - ); + return IfElse(main: _i3.RuntimeCall.codec.decode(input), fallback: _i3.RuntimeCall.codec.decode(input)); } /// Box<::RuntimeCall> @@ -651,11 +477,8 @@ class IfElse extends Call { @override Map>> toJson() => { - 'if_else': { - 'main': main.toJson(), - 'fallback': fallback.toJson(), - } - }; + 'if_else': {'main': main.toJson(), 'fallback': fallback.toJson()}, + }; int _sizeHint() { int size = 1; @@ -665,33 +488,17 @@ class IfElse extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - main, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - fallback, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i3.RuntimeCall.codec.encodeTo(main, output); + _i3.RuntimeCall.codec.encodeTo(fallback, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is IfElse && other.main == main && other.fallback == fallback; + identical(this, other) || other is IfElse && other.main == main && other.fallback == fallback; @override - int get hashCode => Object.hash( - main, - fallback, - ); + int get hashCode => Object.hash(main, fallback); } /// Dispatches a function call with a provided origin. @@ -700,10 +507,7 @@ class IfElse extends Call { /// /// The dispatch origin for this call must be _Root_. class DispatchAsFallible extends Call { - const DispatchAsFallible({ - required this.asOrigin, - required this.call, - }); + const DispatchAsFallible({required this.asOrigin, required this.call}); factory DispatchAsFallible._decode(_i1.Input input) { return DispatchAsFallible( @@ -720,11 +524,8 @@ class DispatchAsFallible extends Call { @override Map>> toJson() => { - 'dispatch_as_fallible': { - 'asOrigin': asOrigin.toJson(), - 'call': call.toJson(), - } - }; + 'dispatch_as_fallible': {'asOrigin': asOrigin.toJson(), 'call': call.toJson()}, + }; int _sizeHint() { int size = 1; @@ -734,33 +535,15 @@ class DispatchAsFallible extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i4.OriginCaller.codec.encodeTo( - asOrigin, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i4.OriginCaller.codec.encodeTo(asOrigin, output); + _i3.RuntimeCall.codec.encodeTo(call, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DispatchAsFallible && - other.asOrigin == asOrigin && - other.call == call; + identical(this, other) || other is DispatchAsFallible && other.asOrigin == asOrigin && other.call == call; @override - int get hashCode => Object.hash( - asOrigin, - call, - ); + int get hashCode => Object.hash(asOrigin, call); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/error.dart index 8773b636..61dd7ad9 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/error.dart @@ -8,10 +8,7 @@ enum Error { /// Too many calls batched. tooManyCalls('TooManyCalls', 0); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -45,13 +42,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/event.dart index 9047d028..4f8e5095 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_utility/pallet/event.dart @@ -33,14 +33,8 @@ abstract class Event { class $Event { const $Event(); - BatchInterrupted batchInterrupted({ - required int index, - required _i3.DispatchError error, - }) { - return BatchInterrupted( - index: index, - error: error, - ); + BatchInterrupted batchInterrupted({required int index, required _i3.DispatchError error}) { + return BatchInterrupted(index: index, error: error); } BatchCompleted batchCompleted() { @@ -59,8 +53,7 @@ class $Event { return ItemFailed(error: error); } - DispatchedAs dispatchedAs( - {required _i1.Result result}) { + DispatchedAs dispatchedAs({required _i1.Result result}) { return DispatchedAs(result: result); } @@ -68,8 +61,7 @@ class $Event { return IfElseMainSuccess(); } - IfElseFallbackCalled ifElseFallbackCalled( - {required _i3.DispatchError mainError}) { + IfElseFallbackCalled ifElseFallbackCalled({required _i3.DispatchError mainError}) { return IfElseFallbackCalled(mainError: mainError); } } @@ -103,10 +95,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case BatchInterrupted: (value as BatchInterrupted).encodeTo(output); @@ -133,8 +122,7 @@ class $EventCodec with _i1.Codec { (value as IfElseFallbackCalled).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -158,8 +146,7 @@ class $EventCodec with _i1.Codec { case IfElseFallbackCalled: return (value as IfElseFallbackCalled)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -167,16 +154,10 @@ class $EventCodec with _i1.Codec { /// Batch of dispatches did not complete fully. Index of first failing dispatch given, as /// well as the error. class BatchInterrupted extends Event { - const BatchInterrupted({ - required this.index, - required this.error, - }); + const BatchInterrupted({required this.index, required this.error}); factory BatchInterrupted._decode(_i1.Input input) { - return BatchInterrupted( - index: _i1.U32Codec.codec.decode(input), - error: _i3.DispatchError.codec.decode(input), - ); + return BatchInterrupted(index: _i1.U32Codec.codec.decode(input), error: _i3.DispatchError.codec.decode(input)); } /// u32 @@ -187,11 +168,8 @@ class BatchInterrupted extends Event { @override Map> toJson() => { - 'BatchInterrupted': { - 'index': index, - 'error': error.toJson(), - } - }; + 'BatchInterrupted': {'index': index, 'error': error.toJson()}, + }; int _sizeHint() { int size = 1; @@ -201,33 +179,17 @@ class BatchInterrupted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i3.DispatchError.codec.encodeTo( - error, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i3.DispatchError.codec.encodeTo(error, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is BatchInterrupted && other.index == index && other.error == error; + identical(this, other) || other is BatchInterrupted && other.index == index && other.error == error; @override - int get hashCode => Object.hash( - index, - error, - ); + int get hashCode => Object.hash(index, error); } /// Batch of dispatches completed fully with no error. @@ -238,10 +200,7 @@ class BatchCompleted extends Event { Map toJson() => {'BatchCompleted': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); } @override @@ -259,10 +218,7 @@ class BatchCompletedWithErrors extends Event { Map toJson() => {'BatchCompletedWithErrors': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); } @override @@ -280,10 +236,7 @@ class ItemCompleted extends Event { Map toJson() => {'ItemCompleted': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); } @override @@ -306,8 +259,8 @@ class ItemFailed extends Event { @override Map>> toJson() => { - 'ItemFailed': {'error': error.toJson()} - }; + 'ItemFailed': {'error': error.toJson()}, + }; int _sizeHint() { int size = 1; @@ -316,23 +269,12 @@ class ItemFailed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i3.DispatchError.codec.encodeTo( - error, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i3.DispatchError.codec.encodeTo(error, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ItemFailed && other.error == error; + bool operator ==(Object other) => identical(this, other) || other is ItemFailed && other.error == error; @override int get hashCode => error.hashCode; @@ -344,10 +286,11 @@ class DispatchedAs extends Event { factory DispatchedAs._decode(_i1.Input input) { return DispatchedAs( - result: const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).decode(input)); + result: const _i1.ResultCodec( + _i1.NullCodec.codec, + _i3.DispatchError.codec, + ).decode(input), + ); } /// DispatchResult @@ -355,12 +298,13 @@ class DispatchedAs extends Event { @override Map>> toJson() => { - 'DispatchedAs': {'result': result.toJson()} - }; + 'DispatchedAs': {'result': result.toJson()}, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, @@ -369,26 +313,15 @@ class DispatchedAs extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, - ).encodeTo( - result, - output, - ); + ).encodeTo(result, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DispatchedAs && other.result == result; + bool operator ==(Object other) => identical(this, other) || other is DispatchedAs && other.result == result; @override int get hashCode => result.hashCode; @@ -402,10 +335,7 @@ class IfElseMainSuccess extends Event { Map toJson() => {'IfElseMainSuccess': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); } @override @@ -420,8 +350,7 @@ class IfElseFallbackCalled extends Event { const IfElseFallbackCalled({required this.mainError}); factory IfElseFallbackCalled._decode(_i1.Input input) { - return IfElseFallbackCalled( - mainError: _i3.DispatchError.codec.decode(input)); + return IfElseFallbackCalled(mainError: _i3.DispatchError.codec.decode(input)); } /// DispatchError @@ -429,8 +358,8 @@ class IfElseFallbackCalled extends Event { @override Map>> toJson() => { - 'IfElseFallbackCalled': {'mainError': mainError.toJson()} - }; + 'IfElseFallbackCalled': {'mainError': mainError.toJson()}, + }; int _sizeHint() { int size = 1; @@ -439,23 +368,13 @@ class IfElseFallbackCalled extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i3.DispatchError.codec.encodeTo( - mainError, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i3.DispatchError.codec.encodeTo(mainError, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is IfElseFallbackCalled && other.mainError == mainError; + identical(this, other) || other is IfElseFallbackCalled && other.mainError == mainError; @override int get hashCode => mainError.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/call.dart b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/call.dart index 836b69e7..dbf9a87d 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/call.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/call.dart @@ -52,17 +52,13 @@ class $CallCodec with _i1.Codec { } @override - void encodeTo( - Call value, - _i1.Output output, - ) { + void encodeTo(Call value, _i1.Output output) { switch (value.runtimeType) { case VerifyAggregatedProof: (value as VerifyAggregatedProof).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -72,8 +68,7 @@ class $CallCodec with _i1.Codec { case VerifyAggregatedProof: return (value as VerifyAggregatedProof)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -87,8 +82,7 @@ class VerifyAggregatedProof extends Call { const VerifyAggregatedProof({required this.proofBytes}); factory VerifyAggregatedProof._decode(_i1.Input input) { - return VerifyAggregatedProof( - proofBytes: _i1.U8SequenceCodec.codec.decode(input)); + return VerifyAggregatedProof(proofBytes: _i1.U8SequenceCodec.codec.decode(input)); } /// Vec @@ -96,8 +90,8 @@ class VerifyAggregatedProof extends Call { @override Map>> toJson() => { - 'verify_aggregated_proof': {'proofBytes': proofBytes} - }; + 'verify_aggregated_proof': {'proofBytes': proofBytes}, + }; int _sizeHint() { int size = 1; @@ -106,27 +100,13 @@ class VerifyAggregatedProof extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - proofBytes, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U8SequenceCodec.codec.encodeTo(proofBytes, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is VerifyAggregatedProof && - _i3.listsEqual( - other.proofBytes, - proofBytes, - ); + identical(this, other) || other is VerifyAggregatedProof && _i3.listsEqual(other.proofBytes, proofBytes); @override int get hashCode => proofBytes.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/error.dart index 9a8be941..9b11c7e9 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/error.dart @@ -9,8 +9,7 @@ enum Error { nullifierAlreadyUsed('NullifierAlreadyUsed', 1), blockNotFound('BlockNotFound', 2), aggregatedVerifierNotAvailable('AggregatedVerifierNotAvailable', 3), - aggregatedProofDeserializationFailed( - 'AggregatedProofDeserializationFailed', 4), + aggregatedProofDeserializationFailed('AggregatedProofDeserializationFailed', 4), aggregatedVerificationFailed('AggregatedVerificationFailed', 5), invalidAggregatedPublicInputs('InvalidAggregatedPublicInputs', 6), @@ -23,10 +22,7 @@ enum Error { /// Only native asset (asset_id = 0) is supported in this version nonNativeAssetNotSupported('NonNativeAssetNotSupported', 9); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -78,13 +74,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/event.dart index 4dc633e5..13a16668 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_wormhole/pallet/event.dart @@ -41,13 +41,7 @@ class $Event { required BigInt transferCount, required BigInt leafIndex, }) { - return NativeTransferred( - from: from, - to: to, - amount: amount, - transferCount: transferCount, - leafIndex: leafIndex, - ); + return NativeTransferred(from: from, to: to, amount: amount, transferCount: transferCount, leafIndex: leafIndex); } AssetTransferred assetTransferred({ @@ -68,14 +62,8 @@ class $Event { ); } - ProofVerified proofVerified({ - required BigInt exitAmount, - required List> nullifiers, - }) { - return ProofVerified( - exitAmount: exitAmount, - nullifiers: nullifiers, - ); + ProofVerified proofVerified({required BigInt exitAmount, required List> nullifiers}) { + return ProofVerified(exitAmount: exitAmount, nullifiers: nullifiers); } } @@ -98,10 +86,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case NativeTransferred: (value as NativeTransferred).encodeTo(output); @@ -113,8 +98,7 @@ class $EventCodec with _i1.Codec { (value as ProofVerified).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -128,8 +112,7 @@ class $EventCodec with _i1.Codec { case ProofVerified: return (value as ProofVerified)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -175,14 +158,14 @@ class NativeTransferred extends Event { @override Map> toJson() => { - 'NativeTransferred': { - 'from': from.toList(), - 'to': to.toList(), - 'amount': amount, - 'transferCount': transferCount, - 'leafIndex': leafIndex, - } - }; + 'NativeTransferred': { + 'from': from.toList(), + 'to': to.toList(), + 'amount': amount, + 'transferCount': transferCount, + 'leafIndex': leafIndex, + }, + }; int _sizeHint() { int size = 1; @@ -195,59 +178,26 @@ class NativeTransferred extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - from, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - to, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); - _i1.U64Codec.codec.encodeTo( - transferCount, - output, - ); - _i1.U64Codec.codec.encodeTo( - leafIndex, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(from, output); + const _i1.U8ArrayCodec(32).encodeTo(to, output); + _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U64Codec.codec.encodeTo(transferCount, output); + _i1.U64Codec.codec.encodeTo(leafIndex, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is NativeTransferred && - _i4.listsEqual( - other.from, - from, - ) && - _i4.listsEqual( - other.to, - to, - ) && + _i4.listsEqual(other.from, from) && + _i4.listsEqual(other.to, to) && other.amount == amount && other.transferCount == transferCount && other.leafIndex == leafIndex; @override - int get hashCode => Object.hash( - from, - to, - amount, - transferCount, - leafIndex, - ); + int get hashCode => Object.hash(from, to, amount, transferCount, leafIndex); } /// A non-native asset transfer was recorded. @@ -296,15 +246,15 @@ class AssetTransferred extends Event { @override Map> toJson() => { - 'AssetTransferred': { - 'assetId': assetId, - 'from': from.toList(), - 'to': to.toList(), - 'amount': amount, - 'transferCount': transferCount, - 'leafIndex': leafIndex, - } - }; + 'AssetTransferred': { + 'assetId': assetId, + 'from': from.toList(), + 'to': to.toList(), + 'amount': amount, + 'transferCount': transferCount, + 'leafIndex': leafIndex, + }, + }; int _sizeHint() { int size = 1; @@ -318,78 +268,37 @@ class AssetTransferred extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - assetId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - from, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - to, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); - _i1.U64Codec.codec.encodeTo( - transferCount, - output, - ); - _i1.U64Codec.codec.encodeTo( - leafIndex, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(assetId, output); + const _i1.U8ArrayCodec(32).encodeTo(from, output); + const _i1.U8ArrayCodec(32).encodeTo(to, output); + _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U64Codec.codec.encodeTo(transferCount, output); + _i1.U64Codec.codec.encodeTo(leafIndex, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is AssetTransferred && other.assetId == assetId && - _i4.listsEqual( - other.from, - from, - ) && - _i4.listsEqual( - other.to, - to, - ) && + _i4.listsEqual(other.from, from) && + _i4.listsEqual(other.to, to) && other.amount == amount && other.transferCount == transferCount && other.leafIndex == leafIndex; @override - int get hashCode => Object.hash( - assetId, - from, - to, - amount, - transferCount, - leafIndex, - ); + int get hashCode => Object.hash(assetId, from, to, amount, transferCount, leafIndex); } class ProofVerified extends Event { - const ProofVerified({ - required this.exitAmount, - required this.nullifiers, - }); + const ProofVerified({required this.exitAmount, required this.nullifiers}); factory ProofVerified._decode(_i1.Input input) { return ProofVerified( exitAmount: _i1.U128Codec.codec.decode(input), - nullifiers: const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)) - .decode(input), + nullifiers: const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).decode(input), ); } @@ -401,52 +310,27 @@ class ProofVerified extends Event { @override Map> toJson() => { - 'ProofVerified': { - 'exitAmount': exitAmount, - 'nullifiers': nullifiers.map((value) => value.toList()).toList(), - } - }; + 'ProofVerified': {'exitAmount': exitAmount, 'nullifiers': nullifiers.map((value) => value.toList()).toList()}, + }; int _sizeHint() { int size = 1; size = size + _i1.U128Codec.codec.sizeHint(exitAmount); - size = size + - const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)) - .sizeHint(nullifiers); + size = size + const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).sizeHint(nullifiers); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U128Codec.codec.encodeTo( - exitAmount, - output, - ); - const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).encodeTo( - nullifiers, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U128Codec.codec.encodeTo(exitAmount, output); + const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).encodeTo(nullifiers, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ProofVerified && - other.exitAmount == exitAmount && - _i4.listsEqual( - other.nullifiers, - nullifiers, - ); + identical(this, other) || + other is ProofVerified && other.exitAmount == exitAmount && _i4.listsEqual(other.nullifiers, nullifiers); @override - int get hashCode => Object.hash( - exitAmount, - nullifiers, - ); + int get hashCode => Object.hash(exitAmount, nullifiers); } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/error.dart b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/error.dart index 0dd79921..de8e32a4 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/error.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/error.dart @@ -11,10 +11,7 @@ enum Error { /// Leaf not found. leafNotFound('LeafNotFound', 1); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -50,13 +47,7 @@ class $ErrorCodec with _i1.Codec { } @override - void encodeTo( - Error value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Error value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/event.dart b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/event.dart index 1a82fc90..0f235cac 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/event.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/pallet/event.dart @@ -32,16 +32,8 @@ abstract class Event { class $Event { const $Event(); - LeafInserted leafInserted({ - required BigInt index, - required List leafHash, - required List newRoot, - }) { - return LeafInserted( - index: index, - leafHash: leafHash, - newRoot: newRoot, - ); + LeafInserted leafInserted({required BigInt index, required List leafHash, required List newRoot}) { + return LeafInserted(index: index, leafHash: leafHash, newRoot: newRoot); } TreeGrew treeGrew({required int newDepth}) { @@ -66,10 +58,7 @@ class $EventCodec with _i1.Codec { } @override - void encodeTo( - Event value, - _i1.Output output, - ) { + void encodeTo(Event value, _i1.Output output) { switch (value.runtimeType) { case LeafInserted: (value as LeafInserted).encodeTo(output); @@ -78,8 +67,7 @@ class $EventCodec with _i1.Codec { (value as TreeGrew).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -91,19 +79,14 @@ class $EventCodec with _i1.Codec { case TreeGrew: return (value as TreeGrew)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A new leaf was inserted into the tree. class LeafInserted extends Event { - const LeafInserted({ - required this.index, - required this.leafHash, - required this.newRoot, - }); + const LeafInserted({required this.index, required this.leafHash, required this.newRoot}); factory LeafInserted._decode(_i1.Input input) { return LeafInserted( @@ -124,12 +107,8 @@ class LeafInserted extends Event { @override Map> toJson() => { - 'LeafInserted': { - 'index': index, - 'leafHash': leafHash.toList(), - 'newRoot': newRoot.toList(), - } - }; + 'LeafInserted': {'index': index, 'leafHash': leafHash.toList(), 'newRoot': newRoot.toList()}, + }; int _sizeHint() { int size = 1; @@ -140,47 +119,22 @@ class LeafInserted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U64Codec.codec.encodeTo( - index, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - leafHash, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - newRoot, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U64Codec.codec.encodeTo(index, output); + const _i1.U8ArrayCodec(32).encodeTo(leafHash, output); + const _i1.U8ArrayCodec(32).encodeTo(newRoot, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is LeafInserted && other.index == index && - _i3.listsEqual( - other.leafHash, - leafHash, - ) && - _i3.listsEqual( - other.newRoot, - newRoot, - ); + _i3.listsEqual(other.leafHash, leafHash) && + _i3.listsEqual(other.newRoot, newRoot); @override - int get hashCode => Object.hash( - index, - leafHash, - newRoot, - ); + int get hashCode => Object.hash(index, leafHash, newRoot); } /// Tree depth increased. @@ -196,8 +150,8 @@ class TreeGrew extends Event { @override Map> toJson() => { - 'TreeGrew': {'newDepth': newDepth} - }; + 'TreeGrew': {'newDepth': newDepth}, + }; int _sizeHint() { int size = 1; @@ -206,23 +160,12 @@ class TreeGrew extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U8Codec.codec.encodeTo( - newDepth, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U8Codec.codec.encodeTo(newDepth, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TreeGrew && other.newDepth == newDepth; + bool operator ==(Object other) => identical(this, other) || other is TreeGrew && other.newDepth == newDepth; @override int get hashCode => newDepth.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/zk_leaf.dart b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/zk_leaf.dart index 6608662a..fa7c16c9 100644 --- a/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/zk_leaf.dart +++ b/quantus_sdk/lib/generated/planck/types/pallet_zk_tree/zk_leaf.dart @@ -7,12 +7,7 @@ import 'package:quiver/collection.dart' as _i4; import '../sp_core/crypto/account_id32.dart' as _i2; class ZkLeaf { - const ZkLeaf({ - required this.to, - required this.transferCount, - required this.assetId, - required this.amount, - }); + const ZkLeaf({required this.to, required this.transferCount, required this.assetId, required this.amount}); factory ZkLeaf.decode(_i1.Input input) { return codec.decode(input); @@ -37,60 +32,34 @@ class ZkLeaf { } Map toJson() => { - 'to': to.toList(), - 'transferCount': transferCount, - 'assetId': assetId, - 'amount': amount, - }; + 'to': to.toList(), + 'transferCount': transferCount, + 'assetId': assetId, + 'amount': amount, + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ZkLeaf && - _i4.listsEqual( - other.to, - to, - ) && + _i4.listsEqual(other.to, to) && other.transferCount == transferCount && other.assetId == assetId && other.amount == amount; @override - int get hashCode => Object.hash( - to, - transferCount, - assetId, - amount, - ); + int get hashCode => Object.hash(to, transferCount, assetId, amount); } class $ZkLeafCodec with _i1.Codec { const $ZkLeafCodec(); @override - void encodeTo( - ZkLeaf obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - obj.to, - output, - ); - _i1.U64Codec.codec.encodeTo( - obj.transferCount, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.assetId, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.amount, - output, - ); + void encodeTo(ZkLeaf obj, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(obj.to, output); + _i1.U64Codec.codec.encodeTo(obj.transferCount, output); + _i1.U32Codec.codec.encodeTo(obj.assetId, output); + _i1.U128Codec.codec.encodeTo(obj.amount, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/primitive_types/h256.dart b/quantus_sdk/lib/generated/planck/types/primitive_types/h256.dart index 4eded259..3a26f8c3 100644 --- a/quantus_sdk/lib/generated/planck/types/primitive_types/h256.dart +++ b/quantus_sdk/lib/generated/planck/types/primitive_types/h256.dart @@ -12,14 +12,8 @@ class H256Codec with _i1.Codec { } @override - void encodeTo( - H256 value, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - value, - output, - ); + void encodeTo(H256 value, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/primitive_types/u512.dart b/quantus_sdk/lib/generated/planck/types/primitive_types/u512.dart index 954a9d71..92988381 100644 --- a/quantus_sdk/lib/generated/planck/types/primitive_types/u512.dart +++ b/quantus_sdk/lib/generated/planck/types/primitive_types/u512.dart @@ -12,14 +12,8 @@ class U512Codec with _i1.Codec { } @override - void encodeTo( - U512 value, - _i1.Output output, - ) { - const _i1.U64ArrayCodec(8).encodeTo( - value, - output, - ); + void encodeTo(U512 value, _i1.Output output) { + const _i1.U64ArrayCodec(8).encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart b/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart index fac8b05c..4b323353 100644 --- a/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart +++ b/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart @@ -12,8 +12,7 @@ abstract class DilithiumSignatureScheme { return codec.decode(input); } - static const $DilithiumSignatureSchemeCodec codec = - $DilithiumSignatureSchemeCodec(); + static const $DilithiumSignatureSchemeCodec codec = $DilithiumSignatureSchemeCodec(); static const $DilithiumSignatureScheme values = $DilithiumSignatureScheme(); @@ -48,23 +47,18 @@ class $DilithiumSignatureSchemeCodec with _i1.Codec { case 0: return Dilithium._decode(input); default: - throw Exception( - 'DilithiumSignatureScheme: Invalid variant index: "$index"'); + throw Exception('DilithiumSignatureScheme: Invalid variant index: "$index"'); } } @override - void encodeTo( - DilithiumSignatureScheme value, - _i1.Output output, - ) { + void encodeTo(DilithiumSignatureScheme value, _i1.Output output) { switch (value.runtimeType) { case Dilithium: (value as Dilithium).encodeTo(output); break; default: - throw Exception( - 'DilithiumSignatureScheme: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DilithiumSignatureScheme: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -74,8 +68,7 @@ class $DilithiumSignatureSchemeCodec with _i1.Codec { case Dilithium: return (value as Dilithium)._sizeHint(); default: - throw Exception( - 'DilithiumSignatureScheme: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DilithiumSignatureScheme: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -91,8 +84,7 @@ class Dilithium extends DilithiumSignatureScheme { final _i3.DilithiumSignatureWithPublic value0; @override - Map>> toJson() => - {'Dilithium': value0.toJson()}; + Map>> toJson() => {'Dilithium': value0.toJson()}; int _sizeHint() { int size = 1; @@ -101,23 +93,12 @@ class Dilithium extends DilithiumSignatureScheme { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.DilithiumSignatureWithPublic.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.DilithiumSignatureWithPublic.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Dilithium && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Dilithium && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart b/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart index 7e22489b..b8b5fa11 100644 --- a/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart +++ b/quantus_sdk/lib/generated/planck/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart @@ -14,8 +14,7 @@ class DilithiumSignatureWithPublic { /// [u8; DilithiumSignatureWithPublic::TOTAL_LEN] final List bytes; - static const $DilithiumSignatureWithPublicCodec codec = - $DilithiumSignatureWithPublicCodec(); + static const $DilithiumSignatureWithPublicCodec codec = $DilithiumSignatureWithPublicCodec(); _i2.Uint8List encode() { return codec.encode(this); @@ -25,39 +24,23 @@ class DilithiumSignatureWithPublic { @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DilithiumSignatureWithPublic && - _i3.listsEqual( - other.bytes, - bytes, - ); + identical(this, other) || other is DilithiumSignatureWithPublic && _i3.listsEqual(other.bytes, bytes); @override int get hashCode => bytes.hashCode; } -class $DilithiumSignatureWithPublicCodec - with _i1.Codec { +class $DilithiumSignatureWithPublicCodec with _i1.Codec { const $DilithiumSignatureWithPublicCodec(); @override - void encodeTo( - DilithiumSignatureWithPublic obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(7219).encodeTo( - obj.bytes, - output, - ); + void encodeTo(DilithiumSignatureWithPublic obj, _i1.Output output) { + const _i1.U8ArrayCodec(7219).encodeTo(obj.bytes, output); } @override DilithiumSignatureWithPublic decode(_i1.Input input) { - return DilithiumSignatureWithPublic( - bytes: const _i1.U8ArrayCodec(7219).decode(input)); + return DilithiumSignatureWithPublic(bytes: const _i1.U8ArrayCodec(7219).decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/qp_scheduler/block_number_or_timestamp.dart b/quantus_sdk/lib/generated/planck/types/qp_scheduler/block_number_or_timestamp.dart index 539ae026..72570de7 100644 --- a/quantus_sdk/lib/generated/planck/types/qp_scheduler/block_number_or_timestamp.dart +++ b/quantus_sdk/lib/generated/planck/types/qp_scheduler/block_number_or_timestamp.dart @@ -10,8 +10,7 @@ abstract class BlockNumberOrTimestamp { return codec.decode(input); } - static const $BlockNumberOrTimestampCodec codec = - $BlockNumberOrTimestampCodec(); + static const $BlockNumberOrTimestampCodec codec = $BlockNumberOrTimestampCodec(); static const $BlockNumberOrTimestamp values = $BlockNumberOrTimestamp(); @@ -52,16 +51,12 @@ class $BlockNumberOrTimestampCodec with _i1.Codec { case 1: return Timestamp._decode(input); default: - throw Exception( - 'BlockNumberOrTimestamp: Invalid variant index: "$index"'); + throw Exception('BlockNumberOrTimestamp: Invalid variant index: "$index"'); } } @override - void encodeTo( - BlockNumberOrTimestamp value, - _i1.Output output, - ) { + void encodeTo(BlockNumberOrTimestamp value, _i1.Output output) { switch (value.runtimeType) { case BlockNumber: (value as BlockNumber).encodeTo(output); @@ -70,8 +65,7 @@ class $BlockNumberOrTimestampCodec with _i1.Codec { (value as Timestamp).encodeTo(output); break; default: - throw Exception( - 'BlockNumberOrTimestamp: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('BlockNumberOrTimestamp: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -83,8 +77,7 @@ class $BlockNumberOrTimestampCodec with _i1.Codec { case Timestamp: return (value as Timestamp)._sizeHint(); default: - throw Exception( - 'BlockNumberOrTimestamp: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('BlockNumberOrTimestamp: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -109,23 +102,12 @@ class BlockNumber extends BlockNumberOrTimestamp { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is BlockNumber && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is BlockNumber && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -151,23 +133,12 @@ class Timestamp extends BlockNumberOrTimestamp { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U64Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U64Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Timestamp && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Timestamp && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/qp_scheduler/dispatch_time.dart b/quantus_sdk/lib/generated/planck/types/qp_scheduler/dispatch_time.dart index 0e5ee2d9..ba19d5d2 100644 --- a/quantus_sdk/lib/generated/planck/types/qp_scheduler/dispatch_time.dart +++ b/quantus_sdk/lib/generated/planck/types/qp_scheduler/dispatch_time.dart @@ -58,10 +58,7 @@ class $DispatchTimeCodec with _i1.Codec { } @override - void encodeTo( - DispatchTime value, - _i1.Output output, - ) { + void encodeTo(DispatchTime value, _i1.Output output) { switch (value.runtimeType) { case At: (value as At).encodeTo(output); @@ -70,8 +67,7 @@ class $DispatchTimeCodec with _i1.Codec { (value as After).encodeTo(output); break; default: - throw Exception( - 'DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -83,8 +79,7 @@ class $DispatchTimeCodec with _i1.Codec { case After: return (value as After)._sizeHint(); default: - throw Exception( - 'DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -109,23 +104,12 @@ class At extends DispatchTime { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is At && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is At && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -151,23 +135,12 @@ class After extends DispatchTime { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i3.BlockNumberOrTimestamp.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i3.BlockNumberOrTimestamp.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is After && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is After && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/governance/definitions/preimage_deposit.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/governance/definitions/preimage_deposit.dart index 3b70b47f..6bbcc7ef 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/governance/definitions/preimage_deposit.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/governance/definitions/preimage_deposit.dart @@ -22,12 +22,7 @@ class PreimageDeposit { Map toJson() => {'amount': amount}; @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is PreimageDeposit && other.amount == amount; + bool operator ==(Object other) => identical(this, other) || other is PreimageDeposit && other.amount == amount; @override int get hashCode => amount.hashCode; @@ -37,14 +32,8 @@ class $PreimageDepositCodec with _i1.Codec { const $PreimageDepositCodec(); @override - void encodeTo( - PreimageDeposit obj, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - obj.amount, - output, - ); + void encodeTo(PreimageDeposit obj, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(obj.amount, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/origin_caller.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/origin_caller.dart index f2b9b2f2..44961c9d 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/origin_caller.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/origin_caller.dart @@ -52,17 +52,13 @@ class $OriginCallerCodec with _i1.Codec { } @override - void encodeTo( - OriginCaller value, - _i1.Output output, - ) { + void encodeTo(OriginCaller value, _i1.Output output) { switch (value.runtimeType) { case System: (value as System).encodeTo(output); break; default: - throw Exception( - 'OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -72,8 +68,7 @@ class $OriginCallerCodec with _i1.Codec { case System: return (value as System)._sizeHint(); default: - throw Exception( - 'OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -98,23 +93,12 @@ class System extends OriginCaller { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.RawOrigin.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.RawOrigin.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is System && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is System && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime.dart index 4c026b0a..f16a6bb0 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime.dart @@ -12,14 +12,8 @@ class RuntimeCodec with _i1.Codec { } @override - void encodeTo( - Runtime value, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(Runtime value, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_call.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_call.dart index 97a2aeba..1891db50 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_call.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_call.dart @@ -157,10 +157,7 @@ class $RuntimeCallCodec with _i1.Codec { } @override - void encodeTo( - RuntimeCall value, - _i1.Output output, - ) { + void encodeTo(RuntimeCall value, _i1.Output output) { switch (value.runtimeType) { case System: (value as System).encodeTo(output); @@ -211,8 +208,7 @@ class $RuntimeCallCodec with _i1.Codec { (value as Wormhole).encodeTo(output); break; default: - throw Exception( - 'RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -252,8 +248,7 @@ class $RuntimeCallCodec with _i1.Codec { case Wormhole: return (value as Wormhole)._sizeHint(); default: - throw Exception( - 'RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -270,8 +265,7 @@ class System extends RuntimeCall { final _i3.Call value0; @override - Map>> toJson() => - {'System': value0.toJson()}; + Map>> toJson() => {'System': value0.toJson()}; int _sizeHint() { int size = 1; @@ -280,23 +274,12 @@ class System extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is System && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is System && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -314,8 +297,7 @@ class Timestamp extends RuntimeCall { final _i4.Call value0; @override - Map>> toJson() => - {'Timestamp': value0.toJson()}; + Map>> toJson() => {'Timestamp': value0.toJson()}; int _sizeHint() { int size = 1; @@ -324,23 +306,12 @@ class Timestamp extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i4.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i4.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Timestamp && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Timestamp && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -358,8 +329,7 @@ class Balances extends RuntimeCall { final _i5.Call value0; @override - Map>> toJson() => - {'Balances': value0.toJson()}; + Map>> toJson() => {'Balances': value0.toJson()}; int _sizeHint() { int size = 1; @@ -368,23 +338,12 @@ class Balances extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i5.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i5.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Balances && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Balances && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -402,8 +361,7 @@ class Preimage extends RuntimeCall { final _i6.Call value0; @override - Map>>> toJson() => - {'Preimage': value0.toJson()}; + Map>>> toJson() => {'Preimage': value0.toJson()}; int _sizeHint() { int size = 1; @@ -412,23 +370,12 @@ class Preimage extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i6.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i6.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Preimage && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Preimage && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -446,8 +393,7 @@ class Scheduler extends RuntimeCall { final _i7.Call value0; @override - Map>> toJson() => - {'Scheduler': value0.toJson()}; + Map>> toJson() => {'Scheduler': value0.toJson()}; int _sizeHint() { int size = 1; @@ -456,23 +402,12 @@ class Scheduler extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i7.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i7.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Scheduler && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Scheduler && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -490,8 +425,7 @@ class Utility extends RuntimeCall { final _i8.Call value0; @override - Map>> toJson() => - {'Utility': value0.toJson()}; + Map>> toJson() => {'Utility': value0.toJson()}; int _sizeHint() { int size = 1; @@ -500,23 +434,12 @@ class Utility extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - _i8.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + _i8.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Utility && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Utility && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -534,8 +457,7 @@ class Referenda extends RuntimeCall { final _i9.Call value0; @override - Map>> toJson() => - {'Referenda': value0.toJson()}; + Map>> toJson() => {'Referenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -544,23 +466,12 @@ class Referenda extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); - _i9.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); + _i9.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Referenda && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Referenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -578,8 +489,7 @@ class ReversibleTransfers extends RuntimeCall { final _i10.Call value0; @override - Map>> toJson() => - {'ReversibleTransfers': value0.toJson()}; + Map>> toJson() => {'ReversibleTransfers': value0.toJson()}; int _sizeHint() { int size = 1; @@ -588,23 +498,12 @@ class ReversibleTransfers extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - _i10.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); + _i10.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ReversibleTransfers && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is ReversibleTransfers && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -622,8 +521,7 @@ class ConvictionVoting extends RuntimeCall { final _i11.Call value0; @override - Map>> toJson() => - {'ConvictionVoting': value0.toJson()}; + Map>> toJson() => {'ConvictionVoting': value0.toJson()}; int _sizeHint() { int size = 1; @@ -632,23 +530,12 @@ class ConvictionVoting extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 12, - output, - ); - _i11.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(12, output); + _i11.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ConvictionVoting && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is ConvictionVoting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -666,8 +553,7 @@ class TechCollective extends RuntimeCall { final _i12.Call value0; @override - Map>> toJson() => - {'TechCollective': value0.toJson()}; + Map>> toJson() => {'TechCollective': value0.toJson()}; int _sizeHint() { int size = 1; @@ -676,23 +562,12 @@ class TechCollective extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 13, - output, - ); - _i12.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(13, output); + _i12.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TechCollective && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TechCollective && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -710,8 +585,7 @@ class TechReferenda extends RuntimeCall { final _i13.Call value0; @override - Map>> toJson() => - {'TechReferenda': value0.toJson()}; + Map>> toJson() => {'TechReferenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -720,23 +594,12 @@ class TechReferenda extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 14, - output, - ); - _i13.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(14, output); + _i13.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TechReferenda && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TechReferenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -754,8 +617,7 @@ class TreasuryPallet extends RuntimeCall { final _i14.Call value0; @override - Map>> toJson() => - {'TreasuryPallet': value0.toJson()}; + Map>> toJson() => {'TreasuryPallet': value0.toJson()}; int _sizeHint() { int size = 1; @@ -764,23 +626,12 @@ class TreasuryPallet extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 15, - output, - ); - _i14.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(15, output); + _i14.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TreasuryPallet && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TreasuryPallet && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -807,23 +658,12 @@ class Recovery extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 16, - output, - ); - _i15.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(16, output); + _i15.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Recovery && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Recovery && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -841,8 +681,7 @@ class Assets extends RuntimeCall { final _i16.Call value0; @override - Map>> toJson() => - {'Assets': value0.toJson()}; + Map>> toJson() => {'Assets': value0.toJson()}; int _sizeHint() { int size = 1; @@ -851,23 +690,12 @@ class Assets extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 17, - output, - ); - _i16.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(17, output); + _i16.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Assets && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Assets && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -885,8 +713,7 @@ class Multisig extends RuntimeCall { final _i17.Call value0; @override - Map>> toJson() => - {'Multisig': value0.toJson()}; + Map>> toJson() => {'Multisig': value0.toJson()}; int _sizeHint() { int size = 1; @@ -895,23 +722,12 @@ class Multisig extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 19, - output, - ); - _i17.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(19, output); + _i17.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Multisig && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Multisig && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -929,8 +745,7 @@ class Wormhole extends RuntimeCall { final _i18.Call value0; @override - Map>>> toJson() => - {'Wormhole': value0.toJson()}; + Map>>> toJson() => {'Wormhole': value0.toJson()}; int _sizeHint() { int size = 1; @@ -939,23 +754,12 @@ class Wormhole extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 20, - output, - ); - _i18.Call.codec.encodeTo( - value0, - output, - ); - } - - @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Wormhole && other.value0 == value0; + _i1.U8Codec.codec.encodeTo(20, output); + _i18.Call.codec.encodeTo(value0, output); + } + + @override + bool operator ==(Object other) => identical(this, other) || other is Wormhole && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_event.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_event.dart index 59e24835..263a1cbe 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_event.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_event.dart @@ -185,10 +185,7 @@ class $RuntimeEventCodec with _i1.Codec { } @override - void encodeTo( - RuntimeEvent value, - _i1.Output output, - ) { + void encodeTo(RuntimeEvent value, _i1.Output output) { switch (value.runtimeType) { case System: (value as System).encodeTo(output); @@ -251,8 +248,7 @@ class $RuntimeEventCodec with _i1.Codec { (value as ZkTree).encodeTo(output); break; default: - throw Exception( - 'RuntimeEvent: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RuntimeEvent: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -300,8 +296,7 @@ class $RuntimeEventCodec with _i1.Codec { case ZkTree: return (value as ZkTree)._sizeHint(); default: - throw Exception( - 'RuntimeEvent: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RuntimeEvent: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -326,23 +321,12 @@ class System extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is System && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is System && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -368,23 +352,12 @@ class Balances extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i4.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i4.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Balances && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Balances && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -401,8 +374,7 @@ class TransactionPayment extends RuntimeEvent { final _i5.Event value0; @override - Map>> toJson() => - {'TransactionPayment': value0.toJson()}; + Map>> toJson() => {'TransactionPayment': value0.toJson()}; int _sizeHint() { int size = 1; @@ -411,23 +383,12 @@ class TransactionPayment extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i5.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i5.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TransactionPayment && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TransactionPayment && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -444,8 +405,7 @@ class QPoW extends RuntimeEvent { final _i6.Event value0; @override - Map>> toJson() => - {'QPoW': value0.toJson()}; + Map>> toJson() => {'QPoW': value0.toJson()}; int _sizeHint() { int size = 1; @@ -454,23 +414,12 @@ class QPoW extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i6.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i6.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is QPoW && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is QPoW && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -487,8 +436,7 @@ class MiningRewards extends RuntimeEvent { final _i7.Event value0; @override - Map>> toJson() => - {'MiningRewards': value0.toJson()}; + Map>> toJson() => {'MiningRewards': value0.toJson()}; int _sizeHint() { int size = 1; @@ -497,23 +445,12 @@ class MiningRewards extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i7.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i7.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MiningRewards && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is MiningRewards && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -530,8 +467,7 @@ class Preimage extends RuntimeEvent { final _i8.Event value0; @override - Map>>> toJson() => - {'Preimage': value0.toJson()}; + Map>>> toJson() => {'Preimage': value0.toJson()}; int _sizeHint() { int size = 1; @@ -540,23 +476,12 @@ class Preimage extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i8.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i8.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Preimage && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Preimage && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -573,8 +498,7 @@ class Scheduler extends RuntimeEvent { final _i9.Event value0; @override - Map>> toJson() => - {'Scheduler': value0.toJson()}; + Map>> toJson() => {'Scheduler': value0.toJson()}; int _sizeHint() { int size = 1; @@ -583,23 +507,12 @@ class Scheduler extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i9.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i9.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Scheduler && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Scheduler && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -625,23 +538,12 @@ class Utility extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - _i10.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + _i10.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Utility && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Utility && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -658,8 +560,7 @@ class Referenda extends RuntimeEvent { final _i11.Event value0; @override - Map>> toJson() => - {'Referenda': value0.toJson()}; + Map>> toJson() => {'Referenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -668,23 +569,12 @@ class Referenda extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); - _i11.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); + _i11.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Referenda && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Referenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -701,8 +591,7 @@ class ReversibleTransfers extends RuntimeEvent { final _i12.Event value0; @override - Map>> toJson() => - {'ReversibleTransfers': value0.toJson()}; + Map>> toJson() => {'ReversibleTransfers': value0.toJson()}; int _sizeHint() { int size = 1; @@ -711,23 +600,12 @@ class ReversibleTransfers extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - _i12.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); + _i12.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ReversibleTransfers && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is ReversibleTransfers && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -744,8 +622,7 @@ class ConvictionVoting extends RuntimeEvent { final _i13.Event value0; @override - Map> toJson() => - {'ConvictionVoting': value0.toJson()}; + Map> toJson() => {'ConvictionVoting': value0.toJson()}; int _sizeHint() { int size = 1; @@ -754,23 +631,12 @@ class ConvictionVoting extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 12, - output, - ); - _i13.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(12, output); + _i13.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ConvictionVoting && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is ConvictionVoting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -787,8 +653,7 @@ class TechCollective extends RuntimeEvent { final _i14.Event value0; @override - Map>> toJson() => - {'TechCollective': value0.toJson()}; + Map>> toJson() => {'TechCollective': value0.toJson()}; int _sizeHint() { int size = 1; @@ -797,23 +662,12 @@ class TechCollective extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 13, - output, - ); - _i14.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(13, output); + _i14.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TechCollective && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TechCollective && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -830,8 +684,7 @@ class TechReferenda extends RuntimeEvent { final _i15.Event value0; @override - Map>> toJson() => - {'TechReferenda': value0.toJson()}; + Map>> toJson() => {'TechReferenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -840,23 +693,12 @@ class TechReferenda extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 14, - output, - ); - _i15.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(14, output); + _i15.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TechReferenda && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TechReferenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -873,8 +715,7 @@ class TreasuryPallet extends RuntimeEvent { final _i16.Event value0; @override - Map>> toJson() => - {'TreasuryPallet': value0.toJson()}; + Map>> toJson() => {'TreasuryPallet': value0.toJson()}; int _sizeHint() { int size = 1; @@ -883,23 +724,12 @@ class TreasuryPallet extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 15, - output, - ); - _i16.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(15, output); + _i16.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is TreasuryPallet && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TreasuryPallet && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -916,8 +746,7 @@ class Recovery extends RuntimeEvent { final _i17.Event value0; @override - Map>> toJson() => - {'Recovery': value0.toJson()}; + Map>> toJson() => {'Recovery': value0.toJson()}; int _sizeHint() { int size = 1; @@ -926,23 +755,12 @@ class Recovery extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 16, - output, - ); - _i17.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(16, output); + _i17.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Recovery && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Recovery && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -959,8 +777,7 @@ class Assets extends RuntimeEvent { final _i18.Event value0; @override - Map>> toJson() => - {'Assets': value0.toJson()}; + Map>> toJson() => {'Assets': value0.toJson()}; int _sizeHint() { int size = 1; @@ -969,23 +786,12 @@ class Assets extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 17, - output, - ); - _i18.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(17, output); + _i18.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Assets && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Assets && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -1002,8 +808,7 @@ class AssetsHolder extends RuntimeEvent { final _i19.Event value0; @override - Map>> toJson() => - {'AssetsHolder': value0.toJson()}; + Map>> toJson() => {'AssetsHolder': value0.toJson()}; int _sizeHint() { int size = 1; @@ -1012,23 +817,12 @@ class AssetsHolder extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 18, - output, - ); - _i19.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(18, output); + _i19.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AssetsHolder && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is AssetsHolder && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -1045,8 +839,7 @@ class Multisig extends RuntimeEvent { final _i20.Event value0; @override - Map>> toJson() => - {'Multisig': value0.toJson()}; + Map>> toJson() => {'Multisig': value0.toJson()}; int _sizeHint() { int size = 1; @@ -1055,23 +848,12 @@ class Multisig extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 19, - output, - ); - _i20.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(19, output); + _i20.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Multisig && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Multisig && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -1088,8 +870,7 @@ class Wormhole extends RuntimeEvent { final _i21.Event value0; @override - Map>> toJson() => - {'Wormhole': value0.toJson()}; + Map>> toJson() => {'Wormhole': value0.toJson()}; int _sizeHint() { int size = 1; @@ -1098,23 +879,12 @@ class Wormhole extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 20, - output, - ); - _i21.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(20, output); + _i21.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Wormhole && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Wormhole && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -1131,8 +901,7 @@ class ZkTree extends RuntimeEvent { final _i22.Event value0; @override - Map>> toJson() => - {'ZkTree': value0.toJson()}; + Map>> toJson() => {'ZkTree': value0.toJson()}; int _sizeHint() { int size = 1; @@ -1141,23 +910,12 @@ class ZkTree extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 21, - output, - ); - _i22.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(21, output); + _i22.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ZkTree && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is ZkTree && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_freeze_reason.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_freeze_reason.dart index 98109e19..5e4c8b0d 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_freeze_reason.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_freeze_reason.dart @@ -12,14 +12,8 @@ class RuntimeFreezeReasonCodec with _i1.Codec { } @override - void encodeTo( - RuntimeFreezeReason value, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(RuntimeFreezeReason value, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_hold_reason.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_hold_reason.dart index f7704715..b44c860a 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_hold_reason.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/runtime_hold_reason.dart @@ -59,10 +59,7 @@ class $RuntimeHoldReasonCodec with _i1.Codec { } @override - void encodeTo( - RuntimeHoldReason value, - _i1.Output output, - ) { + void encodeTo(RuntimeHoldReason value, _i1.Output output) { switch (value.runtimeType) { case Preimage: (value as Preimage).encodeTo(output); @@ -71,8 +68,7 @@ class $RuntimeHoldReasonCodec with _i1.Codec { (value as ReversibleTransfers).encodeTo(output); break; default: - throw Exception( - 'RuntimeHoldReason: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RuntimeHoldReason: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -84,8 +80,7 @@ class $RuntimeHoldReasonCodec with _i1.Codec { case ReversibleTransfers: return (value as ReversibleTransfers)._sizeHint(); default: - throw Exception( - 'RuntimeHoldReason: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RuntimeHoldReason: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -110,23 +105,12 @@ class Preimage extends RuntimeHoldReason { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i3.HoldReason.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i3.HoldReason.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Preimage && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Preimage && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -152,23 +136,12 @@ class ReversibleTransfers extends RuntimeHoldReason { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - _i4.HoldReason.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); + _i4.HoldReason.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ReversibleTransfers && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is ReversibleTransfers && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart index fa9b3554..1f05a1bb 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart @@ -3,8 +3,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; typedef ReversibleTransactionExtension = dynamic; -class ReversibleTransactionExtensionCodec - with _i1.Codec { +class ReversibleTransactionExtensionCodec with _i1.Codec { const ReversibleTransactionExtensionCodec(); @override @@ -13,14 +12,8 @@ class ReversibleTransactionExtensionCodec } @override - void encodeTo( - ReversibleTransactionExtension value, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(ReversibleTransactionExtension value, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/wormhole_proof_recorder_extension.dart b/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/wormhole_proof_recorder_extension.dart index a68d0066..285138a4 100644 --- a/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/wormhole_proof_recorder_extension.dart +++ b/quantus_sdk/lib/generated/planck/types/quantus_runtime/transaction_extensions/wormhole_proof_recorder_extension.dart @@ -3,8 +3,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; typedef WormholeProofRecorderExtension = dynamic; -class WormholeProofRecorderExtensionCodec - with _i1.Codec { +class WormholeProofRecorderExtensionCodec with _i1.Codec { const WormholeProofRecorderExtensionCodec(); @override @@ -13,14 +12,8 @@ class WormholeProofRecorderExtensionCodec } @override - void encodeTo( - WormholeProofRecorderExtension value, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(WormholeProofRecorderExtension value, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/arithmetic_error.dart b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/arithmetic_error.dart index c09b6440..fce65c07 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/arithmetic_error.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/arithmetic_error.dart @@ -8,10 +8,7 @@ enum ArithmeticError { overflow('Overflow', 1), divisionByZero('DivisionByZero', 2); - const ArithmeticError( - this.variantName, - this.codecIndex, - ); + const ArithmeticError(this.variantName, this.codecIndex); factory ArithmeticError.decode(_i1.Input input) { return codec.decode(input); @@ -49,13 +46,7 @@ class $ArithmeticErrorCodec with _i1.Codec { } @override - void encodeTo( - ArithmeticError value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(ArithmeticError value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_i64.dart b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_i64.dart index cc36d889..e542ca16 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_i64.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_i64.dart @@ -12,14 +12,8 @@ class FixedI64Codec with _i1.Codec { } @override - void encodeTo( - FixedI64 value, - _i1.Output output, - ) { - _i1.I64Codec.codec.encodeTo( - value, - output, - ); + void encodeTo(FixedI64 value, _i1.Output output) { + _i1.I64Codec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_u128.dart b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_u128.dart index 771c1755..87a788a0 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_u128.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/fixed_point/fixed_u128.dart @@ -12,14 +12,8 @@ class FixedU128Codec with _i1.Codec { } @override - void encodeTo( - FixedU128 value, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - value, - output, - ); + void encodeTo(FixedU128 value, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/perbill.dart b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/perbill.dart index 6feb69ff..0f88314b 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/perbill.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/perbill.dart @@ -12,14 +12,8 @@ class PerbillCodec with _i1.Codec { } @override - void encodeTo( - Perbill value, - _i1.Output output, - ) { - _i1.U32Codec.codec.encodeTo( - value, - output, - ); + void encodeTo(Perbill value, _i1.Output output) { + _i1.U32Codec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/permill.dart b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/permill.dart index 9fd260c7..7411f90d 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/permill.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_arithmetic/per_things/permill.dart @@ -12,14 +12,8 @@ class PermillCodec with _i1.Codec { } @override - void encodeTo( - Permill value, - _i1.Output output, - ) { - _i1.U32Codec.codec.encodeTo( - value, - output, - ); + void encodeTo(Permill value, _i1.Output output) { + _i1.U32Codec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_core/crypto/account_id32.dart b/quantus_sdk/lib/generated/planck/types/sp_core/crypto/account_id32.dart index 81513d7f..93fbda9f 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_core/crypto/account_id32.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_core/crypto/account_id32.dart @@ -12,14 +12,8 @@ class AccountId32Codec with _i1.Codec { } @override - void encodeTo( - AccountId32 value, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - value, - output, - ); + void encodeTo(AccountId32 value, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error.dart index a5c2d18c..715b1735 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error.dart @@ -140,10 +140,7 @@ class $DispatchErrorCodec with _i1.Codec { } @override - void encodeTo( - DispatchError value, - _i1.Output output, - ) { + void encodeTo(DispatchError value, _i1.Output output) { switch (value.runtimeType) { case Other: (value as Other).encodeTo(output); @@ -191,8 +188,7 @@ class $DispatchErrorCodec with _i1.Codec { (value as Trie).encodeTo(output); break; default: - throw Exception( - 'DispatchError: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DispatchError: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -230,8 +226,7 @@ class $DispatchErrorCodec with _i1.Codec { case Trie: return (value as Trie)._sizeHint(); default: - throw Exception( - 'DispatchError: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DispatchError: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -243,10 +238,7 @@ class Other extends DispatchError { Map toJson() => {'Other': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); } @override @@ -263,10 +255,7 @@ class CannotLookup extends DispatchError { Map toJson() => {'CannotLookup': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); } @override @@ -283,10 +272,7 @@ class BadOrigin extends DispatchError { Map toJson() => {'BadOrigin': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); } @override @@ -316,23 +302,12 @@ class Module extends DispatchError { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i3.ModuleError.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i3.ModuleError.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Module && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Module && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -345,10 +320,7 @@ class ConsumerRemaining extends DispatchError { Map toJson() => {'ConsumerRemaining': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); } @override @@ -365,10 +337,7 @@ class NoProviders extends DispatchError { Map toJson() => {'NoProviders': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); } @override @@ -385,10 +354,7 @@ class TooManyConsumers extends DispatchError { Map toJson() => {'TooManyConsumers': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); } @override @@ -418,23 +384,12 @@ class Token extends DispatchError { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i4.TokenError.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i4.TokenError.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Token && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Token && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -460,23 +415,12 @@ class Arithmetic extends DispatchError { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i5.ArithmeticError.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i5.ArithmeticError.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Arithmetic && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Arithmetic && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -502,23 +446,12 @@ class Transactional extends DispatchError { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - _i6.TransactionalError.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + _i6.TransactionalError.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Transactional && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Transactional && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -531,10 +464,7 @@ class Exhausted extends DispatchError { Map toJson() => {'Exhausted': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); } @override @@ -551,10 +481,7 @@ class Corruption extends DispatchError { Map toJson() => {'Corruption': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); } @override @@ -571,10 +498,7 @@ class Unavailable extends DispatchError { Map toJson() => {'Unavailable': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 12, - output, - ); + _i1.U8Codec.codec.encodeTo(12, output); } @override @@ -591,10 +515,7 @@ class RootNotAllowed extends DispatchError { Map toJson() => {'RootNotAllowed': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 13, - output, - ); + _i1.U8Codec.codec.encodeTo(13, output); } @override @@ -624,23 +545,12 @@ class Trie extends DispatchError { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 14, - output, - ); - _i7.TrieError.codec.encodeTo( - value0, - output, - ); - } - - @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Trie && other.value0 == value0; + _i1.U8Codec.codec.encodeTo(14, output); + _i7.TrieError.codec.encodeTo(value0, output); + } + + @override + bool operator ==(Object other) => identical(this, other) || other is Trie && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error_with_post_info.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error_with_post_info.dart index 6cbbf070..cc35e8e0 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error_with_post_info.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/dispatch_error_with_post_info.dart @@ -7,10 +7,7 @@ import '../frame_support/dispatch/post_dispatch_info.dart' as _i2; import 'dispatch_error.dart' as _i3; class DispatchErrorWithPostInfo { - const DispatchErrorWithPostInfo({ - required this.postInfo, - required this.error, - }); + const DispatchErrorWithPostInfo({required this.postInfo, required this.error}); factory DispatchErrorWithPostInfo.decode(_i1.Input input) { return codec.decode(input); @@ -22,52 +19,30 @@ class DispatchErrorWithPostInfo { /// DispatchError final _i3.DispatchError error; - static const $DispatchErrorWithPostInfoCodec codec = - $DispatchErrorWithPostInfoCodec(); + static const $DispatchErrorWithPostInfoCodec codec = $DispatchErrorWithPostInfoCodec(); _i4.Uint8List encode() { return codec.encode(this); } - Map> toJson() => { - 'postInfo': postInfo.toJson(), - 'error': error.toJson(), - }; + Map> toJson() => {'postInfo': postInfo.toJson(), 'error': error.toJson()}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DispatchErrorWithPostInfo && - other.postInfo == postInfo && - other.error == error; + identical(this, other) || + other is DispatchErrorWithPostInfo && other.postInfo == postInfo && other.error == error; @override - int get hashCode => Object.hash( - postInfo, - error, - ); + int get hashCode => Object.hash(postInfo, error); } -class $DispatchErrorWithPostInfoCodec - with _i1.Codec { +class $DispatchErrorWithPostInfoCodec with _i1.Codec { const $DispatchErrorWithPostInfoCodec(); @override - void encodeTo( - DispatchErrorWithPostInfo obj, - _i1.Output output, - ) { - _i2.PostDispatchInfo.codec.encodeTo( - obj.postInfo, - output, - ); - _i3.DispatchError.codec.encodeTo( - obj.error, - output, - ); + void encodeTo(DispatchErrorWithPostInfo obj, _i1.Output output) { + _i2.PostDispatchInfo.codec.encodeTo(obj.postInfo, output); + _i3.DispatchError.codec.encodeTo(obj.error, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest.dart index 215d34e5..1aa48457 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest.dart @@ -22,20 +22,10 @@ class Digest { return codec.encode(this); } - Map>> toJson() => - {'logs': logs.map((value) => value.toJson()).toList()}; + Map>> toJson() => {'logs': logs.map((value) => value.toJson()).toList()}; @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Digest && - _i4.listsEqual( - other.logs, - logs, - ); + bool operator ==(Object other) => identical(this, other) || other is Digest && _i4.listsEqual(other.logs, logs); @override int get hashCode => logs.hashCode; @@ -45,29 +35,19 @@ class $DigestCodec with _i1.Codec { const $DigestCodec(); @override - void encodeTo( - Digest obj, - _i1.Output output, - ) { - const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec).encodeTo( - obj.logs, - output, - ); + void encodeTo(Digest obj, _i1.Output output) { + const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec).encodeTo(obj.logs, output); } @override Digest decode(_i1.Input input) { - return Digest( - logs: const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec) - .decode(input)); + return Digest(logs: const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec).decode(input)); } @override int sizeHint(Digest obj) { int size = 0; - size = size + - const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec) - .sizeHint(obj.logs); + size = size + const _i1.SequenceCodec<_i2.DigestItem>(_i2.DigestItem.codec).sizeHint(obj.logs); return size; } } diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest_item.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest_item.dart index 4c9b58a7..4ac2501d 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest_item.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/digest/digest_item.dart @@ -31,34 +31,16 @@ abstract class DigestItem { class $DigestItem { const $DigestItem(); - PreRuntime preRuntime( - List value0, - List value1, - ) { - return PreRuntime( - value0, - value1, - ); + PreRuntime preRuntime(List value0, List value1) { + return PreRuntime(value0, value1); } - Consensus consensus( - List value0, - List value1, - ) { - return Consensus( - value0, - value1, - ); + Consensus consensus(List value0, List value1) { + return Consensus(value0, value1); } - Seal seal( - List value0, - List value1, - ) { - return Seal( - value0, - value1, - ); + Seal seal(List value0, List value1) { + return Seal(value0, value1); } Other other(List value0) { @@ -93,10 +75,7 @@ class $DigestItemCodec with _i1.Codec { } @override - void encodeTo( - DigestItem value, - _i1.Output output, - ) { + void encodeTo(DigestItem value, _i1.Output output) { switch (value.runtimeType) { case PreRuntime: (value as PreRuntime).encodeTo(output); @@ -114,8 +93,7 @@ class $DigestItemCodec with _i1.Codec { (value as RuntimeEnvironmentUpdated).encodeTo(output); break; default: - throw Exception( - 'DigestItem: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DigestItem: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -133,23 +111,16 @@ class $DigestItemCodec with _i1.Codec { case RuntimeEnvironmentUpdated: return 1; default: - throw Exception( - 'DigestItem: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('DigestItem: Unsupported "$value" of type "${value.runtimeType}"'); } } } class PreRuntime extends DigestItem { - const PreRuntime( - this.value0, - this.value1, - ); + const PreRuntime(this.value0, this.value1); factory PreRuntime._decode(_i1.Input input) { - return PreRuntime( - const _i1.U8ArrayCodec(4).decode(input), - _i1.U8SequenceCodec.codec.decode(input), - ); + return PreRuntime(const _i1.U8ArrayCodec(4).decode(input), _i1.U8SequenceCodec.codec.decode(input)); } /// ConsensusEngineId @@ -160,11 +131,8 @@ class PreRuntime extends DigestItem { @override Map>> toJson() => { - 'PreRuntime': [ - value0.toList(), - value1, - ] - }; + 'PreRuntime': [value0.toList(), value1], + }; int _sizeHint() { int size = 1; @@ -174,54 +142,25 @@ class PreRuntime extends DigestItem { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - const _i1.U8ArrayCodec(4).encodeTo( - value0, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - value1, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + const _i1.U8ArrayCodec(4).encodeTo(value0, output); + _i1.U8SequenceCodec.codec.encodeTo(value1, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is PreRuntime && - _i3.listsEqual( - other.value0, - value0, - ) && - _i3.listsEqual( - other.value1, - value1, - ); + identical(this, other) || + other is PreRuntime && _i3.listsEqual(other.value0, value0) && _i3.listsEqual(other.value1, value1); @override - int get hashCode => Object.hash( - value0, - value1, - ); + int get hashCode => Object.hash(value0, value1); } class Consensus extends DigestItem { - const Consensus( - this.value0, - this.value1, - ); + const Consensus(this.value0, this.value1); factory Consensus._decode(_i1.Input input) { - return Consensus( - const _i1.U8ArrayCodec(4).decode(input), - _i1.U8SequenceCodec.codec.decode(input), - ); + return Consensus(const _i1.U8ArrayCodec(4).decode(input), _i1.U8SequenceCodec.codec.decode(input)); } /// ConsensusEngineId @@ -232,11 +171,8 @@ class Consensus extends DigestItem { @override Map>> toJson() => { - 'Consensus': [ - value0.toList(), - value1, - ] - }; + 'Consensus': [value0.toList(), value1], + }; int _sizeHint() { int size = 1; @@ -246,54 +182,25 @@ class Consensus extends DigestItem { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.U8ArrayCodec(4).encodeTo( - value0, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - value1, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.U8ArrayCodec(4).encodeTo(value0, output); + _i1.U8SequenceCodec.codec.encodeTo(value1, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Consensus && - _i3.listsEqual( - other.value0, - value0, - ) && - _i3.listsEqual( - other.value1, - value1, - ); + identical(this, other) || + other is Consensus && _i3.listsEqual(other.value0, value0) && _i3.listsEqual(other.value1, value1); @override - int get hashCode => Object.hash( - value0, - value1, - ); + int get hashCode => Object.hash(value0, value1); } class Seal extends DigestItem { - const Seal( - this.value0, - this.value1, - ); + const Seal(this.value0, this.value1); factory Seal._decode(_i1.Input input) { - return Seal( - const _i1.U8ArrayCodec(4).decode(input), - _i1.U8SequenceCodec.codec.decode(input), - ); + return Seal(const _i1.U8ArrayCodec(4).decode(input), _i1.U8SequenceCodec.codec.decode(input)); } /// ConsensusEngineId @@ -304,11 +211,8 @@ class Seal extends DigestItem { @override Map>> toJson() => { - 'Seal': [ - value0.toList(), - value1, - ] - }; + 'Seal': [value0.toList(), value1], + }; int _sizeHint() { int size = 1; @@ -318,41 +222,18 @@ class Seal extends DigestItem { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - const _i1.U8ArrayCodec(4).encodeTo( - value0, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - value1, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + const _i1.U8ArrayCodec(4).encodeTo(value0, output); + _i1.U8SequenceCodec.codec.encodeTo(value1, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Seal && - _i3.listsEqual( - other.value0, - value0, - ) && - _i3.listsEqual( - other.value1, - value1, - ); + identical(this, other) || + other is Seal && _i3.listsEqual(other.value0, value0) && _i3.listsEqual(other.value1, value1); @override - int get hashCode => Object.hash( - value0, - value1, - ); + int get hashCode => Object.hash(value0, value1); } class Other extends DigestItem { @@ -375,27 +256,12 @@ class Other extends DigestItem { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8SequenceCodec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Other && - _i3.listsEqual( - other.value0, - value0, - ); + bool operator ==(Object other) => identical(this, other) || other is Other && _i3.listsEqual(other.value0, value0); @override int get hashCode => value0.hashCode; @@ -408,10 +274,7 @@ class RuntimeEnvironmentUpdated extends DigestItem { Map toJson() => {'RuntimeEnvironmentUpdated': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/era/era.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/era/era.dart index 5133d6d7..97172381 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/era/era.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/era/era.dart @@ -1580,10 +1580,7 @@ class $EraCodec with _i1.Codec { } @override - void encodeTo( - Era value, - _i1.Output output, - ) { + void encodeTo(Era value, _i1.Output output) { switch (value.runtimeType) { case Immortal: (value as Immortal).encodeTo(output); @@ -2354,8 +2351,7 @@ class $EraCodec with _i1.Codec { (value as Mortal255).encodeTo(output); break; default: - throw Exception( - 'Era: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Era: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -2875,8 +2871,7 @@ class $EraCodec with _i1.Codec { case Mortal255: return (value as Mortal255)._sizeHint(); default: - throw Exception( - 'Era: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Era: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -2888,10 +2883,7 @@ class Immortal extends Era { Map toJson() => {'Immortal': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); } @override @@ -2920,23 +2912,12 @@ class Mortal1 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal1 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal1 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -2961,23 +2942,12 @@ class Mortal2 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal2 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal2 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3002,23 +2972,12 @@ class Mortal3 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal3 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal3 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3043,23 +3002,12 @@ class Mortal4 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal4 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal4 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3084,23 +3032,12 @@ class Mortal5 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal5 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal5 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3125,23 +3062,12 @@ class Mortal6 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal6 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal6 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3166,23 +3092,12 @@ class Mortal7 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal7 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal7 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3207,23 +3122,12 @@ class Mortal8 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal8 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal8 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3248,23 +3152,12 @@ class Mortal9 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal9 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal9 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3289,23 +3182,12 @@ class Mortal10 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal10 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal10 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3330,23 +3212,12 @@ class Mortal11 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal11 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal11 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3371,23 +3242,12 @@ class Mortal12 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 12, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(12, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal12 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal12 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3412,23 +3272,12 @@ class Mortal13 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 13, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(13, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal13 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal13 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3453,23 +3302,12 @@ class Mortal14 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 14, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(14, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal14 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal14 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3494,23 +3332,12 @@ class Mortal15 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 15, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(15, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal15 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal15 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3535,23 +3362,12 @@ class Mortal16 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 16, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(16, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal16 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal16 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3576,23 +3392,12 @@ class Mortal17 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 17, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(17, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal17 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal17 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3617,23 +3422,12 @@ class Mortal18 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 18, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(18, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal18 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal18 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3658,23 +3452,12 @@ class Mortal19 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 19, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(19, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal19 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal19 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3699,23 +3482,12 @@ class Mortal20 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 20, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(20, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal20 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal20 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3740,23 +3512,12 @@ class Mortal21 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 21, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(21, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal21 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal21 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3781,23 +3542,12 @@ class Mortal22 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 22, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(22, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal22 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal22 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3822,23 +3572,12 @@ class Mortal23 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 23, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(23, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal23 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal23 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3863,23 +3602,12 @@ class Mortal24 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 24, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(24, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal24 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal24 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3904,23 +3632,12 @@ class Mortal25 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 25, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(25, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal25 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal25 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3945,23 +3662,12 @@ class Mortal26 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 26, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(26, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal26 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal26 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -3986,23 +3692,12 @@ class Mortal27 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 27, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(27, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal27 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal27 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4027,23 +3722,12 @@ class Mortal28 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 28, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(28, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal28 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal28 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4068,23 +3752,12 @@ class Mortal29 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 29, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(29, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal29 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal29 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4109,23 +3782,12 @@ class Mortal30 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 30, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(30, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal30 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal30 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4150,23 +3812,12 @@ class Mortal31 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 31, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(31, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal31 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal31 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4191,23 +3842,12 @@ class Mortal32 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 32, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(32, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal32 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal32 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4232,23 +3872,12 @@ class Mortal33 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 33, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(33, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal33 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal33 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4273,23 +3902,12 @@ class Mortal34 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 34, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(34, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal34 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal34 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4314,23 +3932,12 @@ class Mortal35 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 35, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(35, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal35 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal35 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4355,23 +3962,12 @@ class Mortal36 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 36, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(36, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal36 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal36 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4396,23 +3992,12 @@ class Mortal37 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 37, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(37, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal37 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal37 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4437,23 +4022,12 @@ class Mortal38 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 38, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(38, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal38 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal38 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4478,23 +4052,12 @@ class Mortal39 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 39, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(39, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal39 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal39 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4519,23 +4082,12 @@ class Mortal40 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 40, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(40, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal40 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal40 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4560,23 +4112,12 @@ class Mortal41 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 41, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(41, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal41 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal41 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4601,23 +4142,12 @@ class Mortal42 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 42, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(42, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal42 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal42 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4642,23 +4172,12 @@ class Mortal43 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 43, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(43, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal43 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal43 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4683,23 +4202,12 @@ class Mortal44 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 44, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(44, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal44 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal44 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4724,23 +4232,12 @@ class Mortal45 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 45, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(45, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal45 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal45 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4765,23 +4262,12 @@ class Mortal46 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 46, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(46, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal46 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal46 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4806,23 +4292,12 @@ class Mortal47 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 47, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(47, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal47 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal47 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4847,23 +4322,12 @@ class Mortal48 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 48, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(48, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal48 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal48 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4888,23 +4352,12 @@ class Mortal49 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 49, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(49, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal49 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal49 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4929,23 +4382,12 @@ class Mortal50 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 50, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(50, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal50 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal50 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -4970,23 +4412,12 @@ class Mortal51 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 51, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(51, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal51 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal51 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5011,23 +4442,12 @@ class Mortal52 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 52, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(52, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal52 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal52 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5052,23 +4472,12 @@ class Mortal53 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 53, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(53, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal53 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal53 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5093,23 +4502,12 @@ class Mortal54 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 54, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(54, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal54 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal54 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5134,23 +4532,12 @@ class Mortal55 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 55, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(55, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal55 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal55 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5175,23 +4562,12 @@ class Mortal56 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 56, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(56, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal56 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal56 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5216,23 +4592,12 @@ class Mortal57 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 57, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(57, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal57 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal57 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5257,23 +4622,12 @@ class Mortal58 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 58, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(58, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal58 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal58 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5298,23 +4652,12 @@ class Mortal59 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 59, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(59, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal59 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal59 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5339,23 +4682,12 @@ class Mortal60 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 60, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(60, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal60 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal60 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5380,23 +4712,12 @@ class Mortal61 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 61, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(61, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal61 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal61 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5421,23 +4742,12 @@ class Mortal62 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 62, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(62, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal62 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal62 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5462,23 +4772,12 @@ class Mortal63 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 63, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(63, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal63 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal63 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5503,23 +4802,12 @@ class Mortal64 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 64, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(64, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal64 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal64 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5544,23 +4832,12 @@ class Mortal65 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 65, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(65, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal65 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal65 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5585,23 +4862,12 @@ class Mortal66 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 66, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(66, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal66 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal66 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5626,23 +4892,12 @@ class Mortal67 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 67, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(67, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal67 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal67 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5667,23 +4922,12 @@ class Mortal68 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 68, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(68, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal68 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal68 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5708,23 +4952,12 @@ class Mortal69 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 69, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(69, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal69 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal69 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5749,23 +4982,12 @@ class Mortal70 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 70, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(70, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal70 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal70 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5790,23 +5012,12 @@ class Mortal71 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 71, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(71, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal71 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal71 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5831,23 +5042,12 @@ class Mortal72 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 72, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(72, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal72 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal72 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5872,23 +5072,12 @@ class Mortal73 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 73, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(73, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal73 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal73 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5913,23 +5102,12 @@ class Mortal74 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 74, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(74, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal74 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal74 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5954,23 +5132,12 @@ class Mortal75 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 75, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(75, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal75 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal75 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -5995,23 +5162,12 @@ class Mortal76 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 76, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(76, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal76 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal76 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6036,23 +5192,12 @@ class Mortal77 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 77, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(77, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal77 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal77 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6077,23 +5222,12 @@ class Mortal78 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 78, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(78, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal78 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal78 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6118,23 +5252,12 @@ class Mortal79 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 79, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(79, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal79 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal79 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6159,23 +5282,12 @@ class Mortal80 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 80, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(80, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal80 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal80 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6200,23 +5312,12 @@ class Mortal81 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 81, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(81, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal81 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal81 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6241,23 +5342,12 @@ class Mortal82 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 82, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(82, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal82 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal82 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6282,23 +5372,12 @@ class Mortal83 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 83, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(83, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal83 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal83 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6323,23 +5402,12 @@ class Mortal84 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 84, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(84, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal84 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal84 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6364,23 +5432,12 @@ class Mortal85 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 85, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(85, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal85 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal85 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6405,23 +5462,12 @@ class Mortal86 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 86, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(86, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal86 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal86 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6446,23 +5492,12 @@ class Mortal87 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 87, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(87, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal87 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal87 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6487,23 +5522,12 @@ class Mortal88 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 88, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(88, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal88 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal88 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6528,23 +5552,12 @@ class Mortal89 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 89, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(89, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal89 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal89 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6569,23 +5582,12 @@ class Mortal90 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 90, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(90, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal90 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal90 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6610,23 +5612,12 @@ class Mortal91 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 91, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(91, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal91 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal91 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6651,23 +5642,12 @@ class Mortal92 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 92, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(92, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal92 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal92 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6692,23 +5672,12 @@ class Mortal93 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 93, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(93, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal93 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal93 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6733,23 +5702,12 @@ class Mortal94 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 94, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(94, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal94 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal94 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6774,23 +5732,12 @@ class Mortal95 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 95, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(95, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal95 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal95 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6815,23 +5762,12 @@ class Mortal96 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 96, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(96, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal96 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal96 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6856,23 +5792,12 @@ class Mortal97 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 97, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(97, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal97 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal97 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6897,23 +5822,12 @@ class Mortal98 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 98, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(98, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal98 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal98 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6938,23 +5852,12 @@ class Mortal99 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 99, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(99, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal99 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal99 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -6979,23 +5882,12 @@ class Mortal100 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 100, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(100, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal100 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal100 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7020,23 +5912,12 @@ class Mortal101 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 101, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(101, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal101 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal101 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7061,23 +5942,12 @@ class Mortal102 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 102, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(102, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal102 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal102 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7102,23 +5972,12 @@ class Mortal103 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 103, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(103, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal103 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal103 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7143,23 +6002,12 @@ class Mortal104 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 104, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(104, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal104 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal104 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7184,23 +6032,12 @@ class Mortal105 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 105, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(105, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal105 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal105 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7225,23 +6062,12 @@ class Mortal106 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 106, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(106, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal106 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal106 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7266,23 +6092,12 @@ class Mortal107 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 107, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(107, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal107 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal107 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7307,23 +6122,12 @@ class Mortal108 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 108, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(108, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal108 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal108 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7348,23 +6152,12 @@ class Mortal109 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 109, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(109, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal109 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal109 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7389,23 +6182,12 @@ class Mortal110 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 110, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(110, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal110 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal110 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7430,23 +6212,12 @@ class Mortal111 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 111, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(111, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal111 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal111 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7471,23 +6242,12 @@ class Mortal112 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 112, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(112, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal112 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal112 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7512,23 +6272,12 @@ class Mortal113 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 113, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(113, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal113 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal113 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7553,23 +6302,12 @@ class Mortal114 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 114, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(114, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal114 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal114 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7594,23 +6332,12 @@ class Mortal115 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 115, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(115, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal115 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal115 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7635,23 +6362,12 @@ class Mortal116 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 116, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(116, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal116 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal116 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7676,23 +6392,12 @@ class Mortal117 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 117, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(117, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal117 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal117 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7717,23 +6422,12 @@ class Mortal118 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 118, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(118, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal118 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal118 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7758,23 +6452,12 @@ class Mortal119 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 119, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(119, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal119 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal119 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7799,23 +6482,12 @@ class Mortal120 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 120, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(120, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal120 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal120 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7840,23 +6512,12 @@ class Mortal121 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 121, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(121, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal121 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal121 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7881,23 +6542,12 @@ class Mortal122 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 122, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(122, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal122 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal122 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7922,23 +6572,12 @@ class Mortal123 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 123, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(123, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal123 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal123 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -7963,23 +6602,12 @@ class Mortal124 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 124, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(124, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal124 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal124 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8004,23 +6632,12 @@ class Mortal125 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 125, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(125, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal125 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal125 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8045,23 +6662,12 @@ class Mortal126 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 126, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(126, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal126 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal126 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8086,23 +6692,12 @@ class Mortal127 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 127, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(127, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal127 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal127 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8127,23 +6722,12 @@ class Mortal128 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 128, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(128, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal128 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal128 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8168,23 +6752,12 @@ class Mortal129 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 129, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(129, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal129 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal129 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8209,23 +6782,12 @@ class Mortal130 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 130, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(130, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal130 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal130 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8250,23 +6812,12 @@ class Mortal131 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 131, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(131, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal131 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal131 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8291,23 +6842,12 @@ class Mortal132 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 132, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(132, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal132 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal132 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8332,23 +6872,12 @@ class Mortal133 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 133, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(133, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal133 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal133 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8373,23 +6902,12 @@ class Mortal134 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 134, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(134, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal134 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal134 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8414,23 +6932,12 @@ class Mortal135 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 135, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(135, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal135 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal135 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8455,23 +6962,12 @@ class Mortal136 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 136, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(136, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal136 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal136 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8496,23 +6992,12 @@ class Mortal137 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 137, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(137, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal137 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal137 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8537,23 +7022,12 @@ class Mortal138 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 138, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(138, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal138 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal138 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8578,23 +7052,12 @@ class Mortal139 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 139, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(139, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal139 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal139 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8619,23 +7082,12 @@ class Mortal140 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 140, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(140, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal140 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal140 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8660,23 +7112,12 @@ class Mortal141 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 141, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(141, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal141 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal141 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8701,23 +7142,12 @@ class Mortal142 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 142, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(142, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal142 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal142 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8742,23 +7172,12 @@ class Mortal143 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 143, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(143, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal143 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal143 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8783,23 +7202,12 @@ class Mortal144 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 144, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(144, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal144 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal144 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8824,23 +7232,12 @@ class Mortal145 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 145, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(145, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal145 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal145 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8865,23 +7262,12 @@ class Mortal146 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 146, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(146, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal146 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal146 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8906,23 +7292,12 @@ class Mortal147 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 147, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(147, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal147 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal147 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8947,23 +7322,12 @@ class Mortal148 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 148, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(148, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal148 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal148 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -8988,23 +7352,12 @@ class Mortal149 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 149, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(149, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal149 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal149 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9029,23 +7382,12 @@ class Mortal150 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 150, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(150, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal150 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal150 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9070,23 +7412,12 @@ class Mortal151 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 151, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(151, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal151 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal151 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9111,23 +7442,12 @@ class Mortal152 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 152, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(152, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal152 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal152 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9152,23 +7472,12 @@ class Mortal153 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 153, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(153, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal153 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal153 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9193,23 +7502,12 @@ class Mortal154 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 154, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(154, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal154 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal154 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9234,23 +7532,12 @@ class Mortal155 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 155, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(155, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal155 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal155 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9275,23 +7562,12 @@ class Mortal156 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 156, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(156, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal156 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal156 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9316,23 +7592,12 @@ class Mortal157 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 157, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(157, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal157 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal157 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9357,23 +7622,12 @@ class Mortal158 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 158, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(158, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal158 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal158 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9398,23 +7652,12 @@ class Mortal159 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 159, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(159, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal159 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal159 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9439,23 +7682,12 @@ class Mortal160 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 160, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(160, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal160 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal160 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9480,23 +7712,12 @@ class Mortal161 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 161, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(161, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal161 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal161 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9521,23 +7742,12 @@ class Mortal162 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 162, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(162, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal162 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal162 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9562,23 +7772,12 @@ class Mortal163 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 163, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(163, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal163 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal163 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9603,23 +7802,12 @@ class Mortal164 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 164, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(164, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal164 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal164 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9644,23 +7832,12 @@ class Mortal165 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 165, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(165, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal165 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal165 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9685,23 +7862,12 @@ class Mortal166 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 166, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(166, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal166 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal166 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9726,23 +7892,12 @@ class Mortal167 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 167, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(167, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal167 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal167 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9767,23 +7922,12 @@ class Mortal168 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 168, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(168, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal168 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal168 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9808,23 +7952,12 @@ class Mortal169 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 169, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(169, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal169 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal169 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9849,23 +7982,12 @@ class Mortal170 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 170, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(170, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal170 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal170 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9890,23 +8012,12 @@ class Mortal171 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 171, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(171, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal171 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal171 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9931,23 +8042,12 @@ class Mortal172 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 172, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(172, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal172 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal172 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -9972,23 +8072,12 @@ class Mortal173 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 173, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(173, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal173 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal173 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10013,23 +8102,12 @@ class Mortal174 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 174, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(174, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal174 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal174 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10054,23 +8132,12 @@ class Mortal175 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 175, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(175, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal175 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal175 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10095,23 +8162,12 @@ class Mortal176 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 176, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(176, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal176 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal176 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10136,23 +8192,12 @@ class Mortal177 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 177, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(177, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal177 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal177 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10177,23 +8222,12 @@ class Mortal178 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 178, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(178, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal178 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal178 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10218,23 +8252,12 @@ class Mortal179 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 179, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(179, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal179 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal179 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10259,23 +8282,12 @@ class Mortal180 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 180, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(180, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal180 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal180 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10300,23 +8312,12 @@ class Mortal181 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 181, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(181, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal181 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal181 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10341,23 +8342,12 @@ class Mortal182 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 182, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(182, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal182 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal182 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10382,23 +8372,12 @@ class Mortal183 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 183, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(183, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal183 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal183 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10423,23 +8402,12 @@ class Mortal184 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 184, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(184, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal184 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal184 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10464,23 +8432,12 @@ class Mortal185 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 185, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(185, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal185 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal185 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10505,23 +8462,12 @@ class Mortal186 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 186, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(186, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal186 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal186 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10546,23 +8492,12 @@ class Mortal187 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 187, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(187, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal187 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal187 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10587,23 +8522,12 @@ class Mortal188 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 188, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(188, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal188 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal188 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10628,23 +8552,12 @@ class Mortal189 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 189, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(189, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal189 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal189 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10669,23 +8582,12 @@ class Mortal190 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 190, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(190, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal190 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal190 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10710,23 +8612,12 @@ class Mortal191 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 191, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(191, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal191 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal191 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10751,23 +8642,12 @@ class Mortal192 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 192, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(192, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal192 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal192 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10792,23 +8672,12 @@ class Mortal193 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 193, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(193, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal193 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal193 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10833,23 +8702,12 @@ class Mortal194 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 194, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(194, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal194 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal194 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10874,23 +8732,12 @@ class Mortal195 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 195, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(195, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal195 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal195 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10915,23 +8762,12 @@ class Mortal196 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 196, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(196, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal196 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal196 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10956,23 +8792,12 @@ class Mortal197 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 197, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(197, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal197 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal197 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -10997,23 +8822,12 @@ class Mortal198 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 198, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(198, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal198 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal198 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11038,23 +8852,12 @@ class Mortal199 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 199, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(199, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal199 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal199 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11079,23 +8882,12 @@ class Mortal200 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 200, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(200, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal200 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal200 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11120,23 +8912,12 @@ class Mortal201 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 201, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(201, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal201 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal201 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11161,23 +8942,12 @@ class Mortal202 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 202, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(202, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal202 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal202 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11202,23 +8972,12 @@ class Mortal203 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 203, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(203, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal203 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal203 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11243,23 +9002,12 @@ class Mortal204 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 204, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(204, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal204 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal204 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11284,23 +9032,12 @@ class Mortal205 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 205, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(205, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal205 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal205 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11325,23 +9062,12 @@ class Mortal206 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 206, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(206, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal206 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal206 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11366,23 +9092,12 @@ class Mortal207 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 207, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(207, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal207 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal207 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11407,23 +9122,12 @@ class Mortal208 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 208, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(208, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal208 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal208 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11448,23 +9152,12 @@ class Mortal209 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 209, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(209, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal209 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal209 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11489,23 +9182,12 @@ class Mortal210 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 210, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(210, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal210 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal210 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11530,23 +9212,12 @@ class Mortal211 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 211, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(211, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal211 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal211 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11571,23 +9242,12 @@ class Mortal212 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 212, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(212, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal212 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal212 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11612,23 +9272,12 @@ class Mortal213 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 213, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(213, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal213 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal213 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11653,23 +9302,12 @@ class Mortal214 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 214, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(214, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal214 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal214 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11694,23 +9332,12 @@ class Mortal215 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 215, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(215, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal215 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal215 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11735,23 +9362,12 @@ class Mortal216 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 216, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(216, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal216 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal216 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11776,23 +9392,12 @@ class Mortal217 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 217, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(217, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal217 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal217 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11817,23 +9422,12 @@ class Mortal218 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 218, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(218, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal218 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal218 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11858,23 +9452,12 @@ class Mortal219 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 219, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(219, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal219 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal219 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11899,23 +9482,12 @@ class Mortal220 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 220, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(220, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal220 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal220 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11940,23 +9512,12 @@ class Mortal221 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 221, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(221, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal221 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal221 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -11981,23 +9542,12 @@ class Mortal222 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 222, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(222, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal222 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal222 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12022,23 +9572,12 @@ class Mortal223 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 223, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(223, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal223 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal223 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12063,23 +9602,12 @@ class Mortal224 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 224, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(224, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal224 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal224 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12104,23 +9632,12 @@ class Mortal225 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 225, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(225, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal225 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal225 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12145,23 +9662,12 @@ class Mortal226 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 226, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(226, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal226 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal226 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12186,23 +9692,12 @@ class Mortal227 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 227, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(227, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal227 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal227 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12227,23 +9722,12 @@ class Mortal228 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 228, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(228, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal228 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal228 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12268,23 +9752,12 @@ class Mortal229 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 229, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(229, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal229 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal229 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12309,23 +9782,12 @@ class Mortal230 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 230, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(230, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal230 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal230 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12350,23 +9812,12 @@ class Mortal231 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 231, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(231, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal231 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal231 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12391,23 +9842,12 @@ class Mortal232 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 232, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(232, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal232 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal232 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12432,23 +9872,12 @@ class Mortal233 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 233, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(233, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal233 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal233 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12473,23 +9902,12 @@ class Mortal234 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 234, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(234, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal234 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal234 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12514,23 +9932,12 @@ class Mortal235 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 235, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(235, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal235 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal235 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12555,23 +9962,12 @@ class Mortal236 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 236, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(236, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal236 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal236 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12596,23 +9992,12 @@ class Mortal237 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 237, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(237, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal237 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal237 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12637,23 +10022,12 @@ class Mortal238 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 238, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(238, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal238 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal238 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12678,23 +10052,12 @@ class Mortal239 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 239, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(239, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal239 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal239 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12719,23 +10082,12 @@ class Mortal240 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 240, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(240, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal240 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal240 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12760,23 +10112,12 @@ class Mortal241 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 241, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(241, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal241 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal241 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12801,23 +10142,12 @@ class Mortal242 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 242, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(242, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal242 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal242 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12842,23 +10172,12 @@ class Mortal243 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 243, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(243, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal243 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal243 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12883,23 +10202,12 @@ class Mortal244 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 244, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(244, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal244 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal244 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12924,23 +10232,12 @@ class Mortal245 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 245, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(245, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal245 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal245 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -12965,23 +10262,12 @@ class Mortal246 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 246, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(246, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal246 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal246 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -13006,23 +10292,12 @@ class Mortal247 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 247, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(247, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal247 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal247 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -13047,23 +10322,12 @@ class Mortal248 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 248, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(248, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal248 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal248 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -13088,23 +10352,12 @@ class Mortal249 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 249, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(249, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal249 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal249 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -13129,23 +10382,12 @@ class Mortal250 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 250, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(250, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal250 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal250 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -13170,23 +10412,12 @@ class Mortal251 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 251, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(251, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal251 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal251 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -13211,23 +10442,12 @@ class Mortal252 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 252, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(252, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal252 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal252 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -13252,23 +10472,12 @@ class Mortal253 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 253, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(253, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal253 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal253 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -13293,23 +10502,12 @@ class Mortal254 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 254, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(254, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal254 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal254 && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -13334,23 +10532,12 @@ class Mortal255 extends Era { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 255, - output, - ); - _i1.U8Codec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(255, output); + _i1.U8Codec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Mortal255 && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Mortal255 && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart index 09f50caf..23205b0a 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart @@ -12,14 +12,8 @@ class UncheckedExtrinsicCodec with _i1.Codec { } @override - void encodeTo( - UncheckedExtrinsic value, - _i1.Output output, - ) { - _i1.U8SequenceCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(UncheckedExtrinsic value, _i1.Output output) { + _i1.U8SequenceCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/module_error.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/module_error.dart index 6ed8f3d0..d1980872 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/module_error.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/module_error.dart @@ -5,10 +5,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; import 'package:quiver/collection.dart' as _i3; class ModuleError { - const ModuleError({ - required this.index, - required this.error, - }); + const ModuleError({required this.index, required this.error}); factory ModuleError.decode(_i1.Input input) { return codec.decode(input); @@ -26,55 +23,28 @@ class ModuleError { return codec.encode(this); } - Map toJson() => { - 'index': index, - 'error': error.toList(), - }; + Map toJson() => {'index': index, 'error': error.toList()}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ModuleError && - other.index == index && - _i3.listsEqual( - other.error, - error, - ); + identical(this, other) || other is ModuleError && other.index == index && _i3.listsEqual(other.error, error); @override - int get hashCode => Object.hash( - index, - error, - ); + int get hashCode => Object.hash(index, error); } class $ModuleErrorCodec with _i1.Codec { const $ModuleErrorCodec(); @override - void encodeTo( - ModuleError obj, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - obj.index, - output, - ); - const _i1.U8ArrayCodec(4).encodeTo( - obj.error, - output, - ); + void encodeTo(ModuleError obj, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(obj.index, output); + const _i1.U8ArrayCodec(4).encodeTo(obj.error, output); } @override ModuleError decode(_i1.Input input) { - return ModuleError( - index: _i1.U8Codec.codec.decode(input), - error: const _i1.U8ArrayCodec(4).decode(input), - ); + return ModuleError(index: _i1.U8Codec.codec.decode(input), error: const _i1.U8ArrayCodec(4).decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/multiaddress/multi_address.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/multiaddress/multi_address.dart index 03d9629e..0466c0f0 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/multiaddress/multi_address.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/multiaddress/multi_address.dart @@ -77,10 +77,7 @@ class $MultiAddressCodec with _i1.Codec { } @override - void encodeTo( - MultiAddress value, - _i1.Output output, - ) { + void encodeTo(MultiAddress value, _i1.Output output) { switch (value.runtimeType) { case Id: (value as Id).encodeTo(output); @@ -98,8 +95,7 @@ class $MultiAddressCodec with _i1.Codec { (value as Address20).encodeTo(output); break; default: - throw Exception( - 'MultiAddress: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('MultiAddress: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -117,8 +113,7 @@ class $MultiAddressCodec with _i1.Codec { case Address20: return (value as Address20)._sizeHint(); default: - throw Exception( - 'MultiAddress: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('MultiAddress: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -143,27 +138,12 @@ class Id extends MultiAddress { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Id && - _i4.listsEqual( - other.value0, - value0, - ); + bool operator ==(Object other) => identical(this, other) || other is Id && _i4.listsEqual(other.value0, value0); @override int get hashCode => value0.hashCode; @@ -189,23 +169,12 @@ class Index extends MultiAddress { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.CompactBigIntCodec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Index && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Index && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -231,27 +200,12 @@ class Raw extends MultiAddress { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U8SequenceCodec.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U8SequenceCodec.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Raw && - _i4.listsEqual( - other.value0, - value0, - ); + bool operator ==(Object other) => identical(this, other) || other is Raw && _i4.listsEqual(other.value0, value0); @override int get hashCode => value0.hashCode; @@ -277,27 +231,13 @@ class Address32 extends MultiAddress { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(value0, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Address32 && - _i4.listsEqual( - other.value0, - value0, - ); + identical(this, other) || other is Address32 && _i4.listsEqual(other.value0, value0); @override int get hashCode => value0.hashCode; @@ -323,27 +263,13 @@ class Address20 extends MultiAddress { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - const _i1.U8ArrayCodec(20).encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + const _i1.U8ArrayCodec(20).encodeTo(value0, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Address20 && - _i4.listsEqual( - other.value0, - value0, - ); + identical(this, other) || other is Address20 && _i4.listsEqual(other.value0, value0); @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/proving_trie/trie_error.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/proving_trie/trie_error.dart index ca47ce4a..f10fe5c0 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/proving_trie/trie_error.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/proving_trie/trie_error.dart @@ -19,10 +19,7 @@ enum TrieError { rootMismatch('RootMismatch', 12), decodeError('DecodeError', 13); - const TrieError( - this.variantName, - this.codecIndex, - ); + const TrieError(this.variantName, this.codecIndex); factory TrieError.decode(_i1.Input input) { return codec.decode(input); @@ -82,13 +79,7 @@ class $TrieErrorCodec with _i1.Codec { } @override - void encodeTo( - TrieError value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(TrieError value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/token_error.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/token_error.dart index ce20c896..38bb9f28 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/token_error.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/token_error.dart @@ -15,10 +15,7 @@ enum TokenError { notExpendable('NotExpendable', 8), blocked('Blocked', 9); - const TokenError( - this.variantName, - this.codecIndex, - ); + const TokenError(this.variantName, this.codecIndex); factory TokenError.decode(_i1.Input input) { return codec.decode(input); @@ -70,13 +67,7 @@ class $TokenErrorCodec with _i1.Codec { } @override - void encodeTo( - TokenError value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(TokenError value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/traits/blake_two256.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/traits/blake_two256.dart index 84c37e18..dfd26532 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/traits/blake_two256.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/traits/blake_two256.dart @@ -12,14 +12,8 @@ class BlakeTwo256Codec with _i1.Codec { } @override - void encodeTo( - BlakeTwo256 value, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(BlakeTwo256 value, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_runtime/transactional_error.dart b/quantus_sdk/lib/generated/planck/types/sp_runtime/transactional_error.dart index 4f46f439..f556271e 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_runtime/transactional_error.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_runtime/transactional_error.dart @@ -7,10 +7,7 @@ enum TransactionalError { limitReached('LimitReached', 0), noLayer('NoLayer', 1); - const TransactionalError( - this.variantName, - this.codecIndex, - ); + const TransactionalError(this.variantName, this.codecIndex); factory TransactionalError.decode(_i1.Input input) { return codec.decode(input); @@ -46,13 +43,7 @@ class $TransactionalErrorCodec with _i1.Codec { } @override - void encodeTo( - TransactionalError value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(TransactionalError value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/planck/types/sp_version/runtime_version.dart b/quantus_sdk/lib/generated/planck/types/sp_version/runtime_version.dart index f5a580ba..9d10f100 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_version/runtime_version.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_version/runtime_version.dart @@ -55,97 +55,57 @@ class RuntimeVersion { } Map toJson() => { - 'specName': specName, - 'implName': implName, - 'authoringVersion': authoringVersion, - 'specVersion': specVersion, - 'implVersion': implVersion, - 'apis': apis - .map((value) => [ - value.value0.toList(), - value.value1, - ]) - .toList(), - 'transactionVersion': transactionVersion, - 'systemVersion': systemVersion, - }; + 'specName': specName, + 'implName': implName, + 'authoringVersion': authoringVersion, + 'specVersion': specVersion, + 'implVersion': implVersion, + 'apis': apis.map((value) => [value.value0.toList(), value.value1]).toList(), + 'transactionVersion': transactionVersion, + 'systemVersion': systemVersion, + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is RuntimeVersion && other.specName == specName && other.implName == implName && other.authoringVersion == authoringVersion && other.specVersion == specVersion && other.implVersion == implVersion && - _i5.listsEqual( - other.apis, - apis, - ) && + _i5.listsEqual(other.apis, apis) && other.transactionVersion == transactionVersion && other.systemVersion == systemVersion; @override int get hashCode => Object.hash( - specName, - implName, - authoringVersion, - specVersion, - implVersion, - apis, - transactionVersion, - systemVersion, - ); + specName, + implName, + authoringVersion, + specVersion, + implVersion, + apis, + transactionVersion, + systemVersion, + ); } class $RuntimeVersionCodec with _i1.Codec { const $RuntimeVersionCodec(); @override - void encodeTo( - RuntimeVersion obj, - _i1.Output output, - ) { - _i1.StrCodec.codec.encodeTo( - obj.specName, - output, - ); - _i1.StrCodec.codec.encodeTo( - obj.implName, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.authoringVersion, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.specVersion, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.implVersion, - output, - ); + void encodeTo(RuntimeVersion obj, _i1.Output output) { + _i1.StrCodec.codec.encodeTo(obj.specName, output); + _i1.StrCodec.codec.encodeTo(obj.implName, output); + _i1.U32Codec.codec.encodeTo(obj.authoringVersion, output); + _i1.U32Codec.codec.encodeTo(obj.specVersion, output); + _i1.U32Codec.codec.encodeTo(obj.implVersion, output); const _i1.SequenceCodec<_i6.Tuple2, int>>( - _i6.Tuple2Codec, int>( - _i1.U8ArrayCodec(8), - _i1.U32Codec.codec, - )).encodeTo( - obj.apis, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.transactionVersion, - output, - ); - _i1.U8Codec.codec.encodeTo( - obj.systemVersion, - output, - ); + _i6.Tuple2Codec, int>(_i1.U8ArrayCodec(8), _i1.U32Codec.codec), + ).encodeTo(obj.apis, output); + _i1.U32Codec.codec.encodeTo(obj.transactionVersion, output); + _i1.U8Codec.codec.encodeTo(obj.systemVersion, output); } @override @@ -157,10 +117,8 @@ class $RuntimeVersionCodec with _i1.Codec { specVersion: _i1.U32Codec.codec.decode(input), implVersion: _i1.U32Codec.codec.decode(input), apis: const _i1.SequenceCodec<_i6.Tuple2, int>>( - _i6.Tuple2Codec, int>( - _i1.U8ArrayCodec(8), - _i1.U32Codec.codec, - )).decode(input), + _i6.Tuple2Codec, int>(_i1.U8ArrayCodec(8), _i1.U32Codec.codec), + ).decode(input), transactionVersion: _i1.U32Codec.codec.decode(input), systemVersion: _i1.U8Codec.codec.decode(input), ); diff --git a/quantus_sdk/lib/generated/planck/types/sp_weights/runtime_db_weight.dart b/quantus_sdk/lib/generated/planck/types/sp_weights/runtime_db_weight.dart index ad7cd305..aac5361b 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_weights/runtime_db_weight.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_weights/runtime_db_weight.dart @@ -4,10 +4,7 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class RuntimeDbWeight { - const RuntimeDbWeight({ - required this.read, - required this.write, - }); + const RuntimeDbWeight({required this.read, required this.write}); factory RuntimeDbWeight.decode(_i1.Input input) { return codec.decode(input); @@ -25,50 +22,28 @@ class RuntimeDbWeight { return codec.encode(this); } - Map toJson() => { - 'read': read, - 'write': write, - }; + Map toJson() => {'read': read, 'write': write}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RuntimeDbWeight && other.read == read && other.write == write; + identical(this, other) || other is RuntimeDbWeight && other.read == read && other.write == write; @override - int get hashCode => Object.hash( - read, - write, - ); + int get hashCode => Object.hash(read, write); } class $RuntimeDbWeightCodec with _i1.Codec { const $RuntimeDbWeightCodec(); @override - void encodeTo( - RuntimeDbWeight obj, - _i1.Output output, - ) { - _i1.U64Codec.codec.encodeTo( - obj.read, - output, - ); - _i1.U64Codec.codec.encodeTo( - obj.write, - output, - ); + void encodeTo(RuntimeDbWeight obj, _i1.Output output) { + _i1.U64Codec.codec.encodeTo(obj.read, output); + _i1.U64Codec.codec.encodeTo(obj.write, output); } @override RuntimeDbWeight decode(_i1.Input input) { - return RuntimeDbWeight( - read: _i1.U64Codec.codec.decode(input), - write: _i1.U64Codec.codec.decode(input), - ); + return RuntimeDbWeight(read: _i1.U64Codec.codec.decode(input), write: _i1.U64Codec.codec.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/sp_weights/weight_v2/weight.dart b/quantus_sdk/lib/generated/planck/types/sp_weights/weight_v2/weight.dart index 7d7e8599..8d9a8883 100644 --- a/quantus_sdk/lib/generated/planck/types/sp_weights/weight_v2/weight.dart +++ b/quantus_sdk/lib/generated/planck/types/sp_weights/weight_v2/weight.dart @@ -4,10 +4,7 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class Weight { - const Weight({ - required this.refTime, - required this.proofSize, - }); + const Weight({required this.refTime, required this.proofSize}); factory Weight.decode(_i1.Input input) { return codec.decode(input); @@ -25,44 +22,23 @@ class Weight { return codec.encode(this); } - Map toJson() => { - 'refTime': refTime, - 'proofSize': proofSize, - }; + Map toJson() => {'refTime': refTime, 'proofSize': proofSize}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Weight && - other.refTime == refTime && - other.proofSize == proofSize; + identical(this, other) || other is Weight && other.refTime == refTime && other.proofSize == proofSize; @override - int get hashCode => Object.hash( - refTime, - proofSize, - ); + int get hashCode => Object.hash(refTime, proofSize); } class $WeightCodec with _i1.Codec { const $WeightCodec(); @override - void encodeTo( - Weight obj, - _i1.Output output, - ) { - _i1.CompactBigIntCodec.codec.encodeTo( - obj.refTime, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - obj.proofSize, - output, - ); + void encodeTo(Weight obj, _i1.Output output) { + _i1.CompactBigIntCodec.codec.encodeTo(obj.refTime, output); + _i1.CompactBigIntCodec.codec.encodeTo(obj.proofSize, output); } @override diff --git a/quantus_sdk/lib/generated/planck/types/tuples.dart b/quantus_sdk/lib/generated/planck/types/tuples.dart index b42e59e2..2f309fdb 100644 --- a/quantus_sdk/lib/generated/planck/types/tuples.dart +++ b/quantus_sdk/lib/generated/planck/types/tuples.dart @@ -2,10 +2,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; class Tuple2 { - const Tuple2( - this.value0, - this.value1, - ); + const Tuple2(this.value0, this.value1); final T0 value0; @@ -13,30 +10,21 @@ class Tuple2 { } class Tuple2Codec with _i1.Codec> { - const Tuple2Codec( - this.codec0, - this.codec1, - ); + const Tuple2Codec(this.codec0, this.codec1); final _i1.Codec codec0; final _i1.Codec codec1; @override - void encodeTo( - Tuple2 tuple, - _i1.Output output, - ) { + void encodeTo(Tuple2 tuple, _i1.Output output) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); } @override Tuple2 decode(_i1.Input input) { - return Tuple2( - codec0.decode(input), - codec1.decode(input), - ); + return Tuple2(codec0.decode(input), codec1.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/tuples_1.dart b/quantus_sdk/lib/generated/planck/types/tuples_1.dart index b42e59e2..2f309fdb 100644 --- a/quantus_sdk/lib/generated/planck/types/tuples_1.dart +++ b/quantus_sdk/lib/generated/planck/types/tuples_1.dart @@ -2,10 +2,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; class Tuple2 { - const Tuple2( - this.value0, - this.value1, - ); + const Tuple2(this.value0, this.value1); final T0 value0; @@ -13,30 +10,21 @@ class Tuple2 { } class Tuple2Codec with _i1.Codec> { - const Tuple2Codec( - this.codec0, - this.codec1, - ); + const Tuple2Codec(this.codec0, this.codec1); final _i1.Codec codec0; final _i1.Codec codec1; @override - void encodeTo( - Tuple2 tuple, - _i1.Output output, - ) { + void encodeTo(Tuple2 tuple, _i1.Output output) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); } @override Tuple2 decode(_i1.Input input) { - return Tuple2( - codec0.decode(input), - codec1.decode(input), - ); + return Tuple2(codec0.decode(input), codec1.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/tuples_2.dart b/quantus_sdk/lib/generated/planck/types/tuples_2.dart index e56f1a7f..aa48d3ff 100644 --- a/quantus_sdk/lib/generated/planck/types/tuples_2.dart +++ b/quantus_sdk/lib/generated/planck/types/tuples_2.dart @@ -2,11 +2,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; class Tuple3 { - const Tuple3( - this.value0, - this.value1, - this.value2, - ); + const Tuple3(this.value0, this.value1, this.value2); final T0 value0; @@ -16,11 +12,7 @@ class Tuple3 { } class Tuple3Codec with _i1.Codec> { - const Tuple3Codec( - this.codec0, - this.codec1, - this.codec2, - ); + const Tuple3Codec(this.codec0, this.codec1, this.codec2); final _i1.Codec codec0; @@ -29,10 +21,7 @@ class Tuple3Codec with _i1.Codec> { final _i1.Codec codec2; @override - void encodeTo( - Tuple3 tuple, - _i1.Output output, - ) { + void encodeTo(Tuple3 tuple, _i1.Output output) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); codec2.encodeTo(tuple.value2, output); @@ -40,11 +29,7 @@ class Tuple3Codec with _i1.Codec> { @override Tuple3 decode(_i1.Input input) { - return Tuple3( - codec0.decode(input), - codec1.decode(input), - codec2.decode(input), - ); + return Tuple3(codec0.decode(input), codec1.decode(input), codec2.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/planck/types/tuples_3.dart b/quantus_sdk/lib/generated/planck/types/tuples_3.dart index 0e72ed5f..34780bfb 100644 --- a/quantus_sdk/lib/generated/planck/types/tuples_3.dart +++ b/quantus_sdk/lib/generated/planck/types/tuples_3.dart @@ -78,10 +78,7 @@ class Tuple11Codec final _i1.Codec codec10; @override - void encodeTo( - Tuple11 tuple, - _i1.Output output, - ) { + void encodeTo(Tuple11 tuple, _i1.Output output) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); codec2.encodeTo(tuple.value2, output); From ccc02ef9d00fbaf01544291968b77c81cfba44ab Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 20:09:03 +0800 Subject: [PATCH 11/18] chore: revert constants --- quantus_sdk/lib/src/constants/app_constants.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/quantus_sdk/lib/src/constants/app_constants.dart b/quantus_sdk/lib/src/constants/app_constants.dart index a1a1a3f3..7d16e38e 100644 --- a/quantus_sdk/lib/src/constants/app_constants.dart +++ b/quantus_sdk/lib/src/constants/app_constants.dart @@ -8,16 +8,16 @@ class AppConstants { static const String emailSupport = 'support@quantus.com'; static const String telegramHandle = '@quantusnetwork'; - static const List rpcEndpoints = ['http://127.0.0.1:9944']; // local testing - static const List graphQlEndpoints = ['http://127.0.0.1:4350/v1/graphql']; // local testing + // static const List rpcEndpoints = ['http://127.0.0.1:9944']; // local testing + // static const List graphQlEndpoints = ['http://127.0.0.1:4350/v1/graphql']; // local testing static const stillOnTestnet = true; - // static const List rpcEndpoints = [ - // 'https://a1-planck.quantus.cat', - // 'https://a2-planck.quantus.cat', - // 'https://matcha-latte.quantus.com', - // ]; - // static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; + static const List rpcEndpoints = [ + 'https://a1-planck.quantus.cat', + 'https://a2-planck.quantus.cat', + 'https://matcha-latte.quantus.com', + ]; + static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; // local test android use special ip // static const String taskMasterEndpoint = 'http://10.0.2.2:3000/api'; From e80035083d7b643ef9c34ab1593f5762f15c9e97 Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 22:49:03 +0800 Subject: [PATCH 12/18] feat: show activity in executor --- mobile-app/lib/l10n/app_en.arb | 12 ++ mobile-app/lib/l10n/app_id.arb | 3 + mobile-app/lib/l10n/app_localizations.dart | 18 +++ mobile-app/lib/l10n/app_localizations_en.dart | 9 ++ mobile-app/lib/l10n/app_localizations_id.dart | 9 ++ .../models/combined_transactions_list.dart | 5 + .../providers/all_transactions_provider.dart | 3 + .../filtered_all_transactions_provider.dart | 6 + .../pending_multisig_executions_provider.dart | 8 + .../lib/providers/wallet_providers.dart | 18 ++- .../multisig_execution_polling_service.dart | 33 +++- .../multisig_execution_reconciliation.dart | 20 ++- ...ng_transaction_reconciliation_service.dart | 1 + .../lib/services/transaction_service.dart | 16 ++ .../transaction_submission_service.dart | 8 +- .../transaction_event_extension.dart | 4 + .../v2/screens/activity/activity_screen.dart | 1 + .../activity/transaction_detail_sheet.dart | 92 ++++++++++- .../lib/v2/screens/activity/tx_item.dart | 38 +++++ .../lib/v2/screens/home/activity_section.dart | 1 + .../multisig/multisig_activity_section.dart | 2 + .../multisig_execute_confirm_sheet.dart | 9 +- .../test/unit/transaction_service_test.dart | 86 ++++++++++ quantus_sdk/lib/quantus_sdk.dart | 1 + .../lib/src/constants/app_constants.dart | 16 +- .../multisig_proposal_executed_event.dart | 151 ++++++++++++++++++ .../pending_multisig_execution_event.dart | 73 +++++++-- .../src/services/chain_history_service.dart | 75 ++++++++- .../lib/src/services/multisig_graphql.dart | 22 +++ .../test/chain_history_service_test.dart | 63 ++++++++ 30 files changed, 759 insertions(+), 44 deletions(-) create mode 100644 quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart diff --git a/mobile-app/lib/l10n/app_en.arb b/mobile-app/lib/l10n/app_en.arb index 0772253a..03367e45 100644 --- a/mobile-app/lib/l10n/app_en.arb +++ b/mobile-app/lib/l10n/app_en.arb @@ -703,6 +703,10 @@ "@activityTxProposalApproved": { "description": "Activity row label for a confirmed multisig proposal approval on the approver account" }, + "activityTxProposalExecuted": "Proposal executed", + "@activityTxProposalExecuted": { + "description": "Activity row label for a confirmed multisig proposal execution on the executor account" + }, "multisigApproveButton": "Approve", "@multisigApproveButton": { "description": "Approve button on proposal detail" @@ -1356,6 +1360,14 @@ "@activityDetailTitleProposalApproved": { "description": "Detail sheet title for a confirmed multisig proposal approval" }, + "activityDetailTitleProposalExecuted": "Proposal executed", + "@activityDetailTitleProposalExecuted": { + "description": "Detail sheet title for a confirmed multisig proposal execution" + }, + "activityDetailTitleExecuting": "Executing proposal", + "@activityDetailTitleExecuting": { + "description": "Detail sheet title while a multisig proposal execution is confirming on-chain" + }, "activityDetailTitleProposing": "Proposing", "@activityDetailTitleProposing": { "description": "Detail sheet title while a multisig proposal is confirming on-chain" diff --git a/mobile-app/lib/l10n/app_id.arb b/mobile-app/lib/l10n/app_id.arb index 1f5e2a60..98e0b49a 100644 --- a/mobile-app/lib/l10n/app_id.arb +++ b/mobile-app/lib/l10n/app_id.arb @@ -161,6 +161,7 @@ "activityTxProposing": "Mengajukan", "activityTxProposalCreated": "Proposal dibuat", "activityTxProposalApproved": "Proposal disetujui", + "activityTxProposalExecuted": "Proposal dieksekusi", "multisigApproveButton": "Setujui", "multisigAlreadyApproved": "Sudah Disetujui", "multisigCancelProposalButton": "Batalkan Proposal", @@ -314,6 +315,8 @@ "activityDetailTitleMultisigCreating": "Membuat multisig", "activityDetailTitleProposalCreated": "Proposal dibuat", "activityDetailTitleProposalApproved": "Proposal disetujui", + "activityDetailTitleProposalExecuted": "Proposal dieksekusi", + "activityDetailTitleExecuting": "Mengeksekusi proposal", "activityDetailTitleProposing": "Mengajukan", "activityDetailProposalTransferAmount": "JUMLAH TRANSFER", "activityDetailStatusInProcess": "Diproses", diff --git a/mobile-app/lib/l10n/app_localizations.dart b/mobile-app/lib/l10n/app_localizations.dart index 1d5c94c0..baf4b710 100644 --- a/mobile-app/lib/l10n/app_localizations.dart +++ b/mobile-app/lib/l10n/app_localizations.dart @@ -998,6 +998,12 @@ abstract class AppLocalizations { /// **'Proposal approved'** String get activityTxProposalApproved; + /// Activity row label for a confirmed multisig proposal execution on the executor account + /// + /// In en, this message translates to: + /// **'Proposal executed'** + String get activityTxProposalExecuted; + /// Approve button on proposal detail /// /// In en, this message translates to: @@ -1832,6 +1838,18 @@ abstract class AppLocalizations { /// **'Proposal approved'** String get activityDetailTitleProposalApproved; + /// Detail sheet title for a confirmed multisig proposal execution + /// + /// In en, this message translates to: + /// **'Proposal executed'** + String get activityDetailTitleProposalExecuted; + + /// Detail sheet title while a multisig proposal execution is confirming on-chain + /// + /// In en, this message translates to: + /// **'Executing proposal'** + String get activityDetailTitleExecuting; + /// Detail sheet title while a multisig proposal is confirming on-chain /// /// In en, this message translates to: diff --git a/mobile-app/lib/l10n/app_localizations_en.dart b/mobile-app/lib/l10n/app_localizations_en.dart index 641ec054..25109ea2 100644 --- a/mobile-app/lib/l10n/app_localizations_en.dart +++ b/mobile-app/lib/l10n/app_localizations_en.dart @@ -499,6 +499,9 @@ class AppLocalizationsEn extends AppLocalizations { @override String get activityTxProposalApproved => 'Proposal approved'; + @override + String get activityTxProposalExecuted => 'Proposal executed'; + @override String get multisigApproveButton => 'Approve'; @@ -945,6 +948,12 @@ class AppLocalizationsEn extends AppLocalizations { @override String get activityDetailTitleProposalApproved => 'Proposal approved'; + @override + String get activityDetailTitleProposalExecuted => 'Proposal executed'; + + @override + String get activityDetailTitleExecuting => 'Executing proposal'; + @override String get activityDetailTitleProposing => 'Proposing'; diff --git a/mobile-app/lib/l10n/app_localizations_id.dart b/mobile-app/lib/l10n/app_localizations_id.dart index 6cef539f..b3ae815a 100644 --- a/mobile-app/lib/l10n/app_localizations_id.dart +++ b/mobile-app/lib/l10n/app_localizations_id.dart @@ -501,6 +501,9 @@ class AppLocalizationsId extends AppLocalizations { @override String get activityTxProposalApproved => 'Proposal disetujui'; + @override + String get activityTxProposalExecuted => 'Proposal dieksekusi'; + @override String get multisigApproveButton => 'Setujui'; @@ -947,6 +950,12 @@ class AppLocalizationsId extends AppLocalizations { @override String get activityDetailTitleProposalApproved => 'Proposal disetujui'; + @override + String get activityDetailTitleProposalExecuted => 'Proposal dieksekusi'; + + @override + String get activityDetailTitleExecuting => 'Mengeksekusi proposal'; + @override String get activityDetailTitleProposing => 'Mengajukan'; diff --git a/mobile-app/lib/models/combined_transactions_list.dart b/mobile-app/lib/models/combined_transactions_list.dart index d733eda4..bb92f533 100644 --- a/mobile-app/lib/models/combined_transactions_list.dart +++ b/mobile-app/lib/models/combined_transactions_list.dart @@ -5,6 +5,7 @@ class CombinedTransactionsList { final List pendingTransactions; final List pendingMultisigCreations; final List pendingMultisigProposals; + final List pendingMultisigExecutions; final List scheduledReversibleTransfers; final List otherTransfers; @@ -13,6 +14,7 @@ class CombinedTransactionsList { required this.pendingTransactions, required this.pendingMultisigCreations, required this.pendingMultisigProposals, + required this.pendingMultisigExecutions, required this.scheduledReversibleTransfers, required this.otherTransfers, }); @@ -22,6 +24,7 @@ class CombinedTransactionsList { List? pendingTransactions, List? pendingMultisigCreations, List? pendingMultisigProposals, + List? pendingMultisigExecutions, List? scheduledReversibleTransfers, List? otherTransfers, }) { @@ -30,6 +33,7 @@ class CombinedTransactionsList { pendingTransactions: pendingTransactions ?? this.pendingTransactions, pendingMultisigCreations: pendingMultisigCreations ?? this.pendingMultisigCreations, pendingMultisigProposals: pendingMultisigProposals ?? this.pendingMultisigProposals, + pendingMultisigExecutions: pendingMultisigExecutions ?? this.pendingMultisigExecutions, scheduledReversibleTransfers: scheduledReversibleTransfers ?? this.scheduledReversibleTransfers, otherTransfers: otherTransfers ?? this.otherTransfers, ); @@ -40,6 +44,7 @@ class CombinedTransactionsList { pendingTransactions: [], pendingMultisigCreations: [], pendingMultisigProposals: [], + pendingMultisigExecutions: [], scheduledReversibleTransfers: [], otherTransfers: [], ); diff --git a/mobile-app/lib/providers/all_transactions_provider.dart b/mobile-app/lib/providers/all_transactions_provider.dart index 479050a4..c8ab3301 100644 --- a/mobile-app/lib/providers/all_transactions_provider.dart +++ b/mobile-app/lib/providers/all_transactions_provider.dart @@ -5,6 +5,7 @@ import 'package:resonance_network_wallet/models/pagination_state.dart'; import 'package:resonance_network_wallet/providers/controllers/unified_pagination_controller.dart'; import 'package:resonance_network_wallet/providers/pending_cancellations_provider.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_creations_provider.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_executions_provider.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_proposals_provider.dart'; import 'package:resonance_network_wallet/providers/pending_transactions_provider.dart'; import 'package:resonance_network_wallet/shared/utils/print.dart'; @@ -19,6 +20,7 @@ final allTransactionsProvider = Provider>(( final pending = ref.watch(pendingTransactionsProvider); final pendingMultisigCreations = ref.watch(pendingMultisigCreationsProvider); final pendingMultisigProposals = ref.watch(pendingMultisigProposalsProvider); + final pendingMultisigExecutions = ref.watch(pendingMultisigExecutionsProvider); final pagination = ref.watch(paginationControllerProvider); if (pagination.error != null && !pagination.hasLoadedChainData) { @@ -38,6 +40,7 @@ final allTransactionsProvider = Provider>(( pendingTransactions: pending, pendingMultisigCreations: pendingMultisigCreations, pendingMultisigProposals: pendingMultisigProposals, + pendingMultisigExecutions: pendingMultisigExecutions, scheduledReversibleTransfers: pagination.scheduledReversibleTransfers, otherTransfers: pagination.otherTransfers, ), diff --git a/mobile-app/lib/providers/filtered_all_transactions_provider.dart b/mobile-app/lib/providers/filtered_all_transactions_provider.dart index bd1914ba..80d0d0bb 100644 --- a/mobile-app/lib/providers/filtered_all_transactions_provider.dart +++ b/mobile-app/lib/providers/filtered_all_transactions_provider.dart @@ -8,6 +8,7 @@ import 'package:resonance_network_wallet/providers/account_id_list_cache.dart'; import 'package:resonance_network_wallet/providers/controllers/unified_pagination_controller.dart'; import 'package:resonance_network_wallet/providers/pending_cancellations_provider.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_creations_provider.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_executions_provider.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_proposals_provider.dart'; import 'package:resonance_network_wallet/providers/pending_transactions_provider.dart'; import 'package:resonance_network_wallet/shared/utils/print.dart'; @@ -34,6 +35,7 @@ final filteredTransactionsProviderFamily = final pending = ref.watch(pendingTransactionsProvider); final pendingMultisigCreations = ref.watch(pendingMultisigCreationsProvider); final pendingMultisigProposals = ref.watch(pendingMultisigProposalsProvider); + final pendingMultisigExecutions = ref.watch(pendingMultisigExecutionsProvider); final pagination = ref.watch(filteredPaginationControllerProviderFamily(normalizedParams)); if (pagination.error != null && !pagination.hasLoadedChainData) { @@ -61,6 +63,9 @@ final filteredTransactionsProviderFamily = final filteredPendingProposals = pendingMultisigProposals .where((tx) => normalizedParams.filter != TransactionFilter.receive && accountIds.contains(tx.proposerId)) .toList(); + final filteredPendingExecutions = pendingMultisigExecutions + .where((tx) => normalizedParams.filter != TransactionFilter.receive && accountIds.contains(tx.executorId)) + .toList(); return AsyncValue.data( CombinedTransactionsList( @@ -68,6 +73,7 @@ final filteredTransactionsProviderFamily = pendingTransactions: filteredPending, pendingMultisigCreations: filteredPendingMultisig, pendingMultisigProposals: filteredPendingProposals, + pendingMultisigExecutions: filteredPendingExecutions, scheduledReversibleTransfers: pagination.scheduledReversibleTransfers, otherTransfers: pagination.otherTransfers, ), diff --git a/mobile-app/lib/providers/pending_multisig_executions_provider.dart b/mobile-app/lib/providers/pending_multisig_executions_provider.dart index 2397a518..7c1a0afb 100644 --- a/mobile-app/lib/providers/pending_multisig_executions_provider.dart +++ b/mobile-app/lib/providers/pending_multisig_executions_provider.dart @@ -18,6 +18,14 @@ final pendingMultisigExecutionsProvider = PendingMultisigExecutionsNotifier.new, ); +/// Pending executions excluded from the multisig activity feed below. +List pendingExecutionsExcludingMultisig( + List all, + String multisigAddress, +) { + return all.where((e) => e.multisigAddress != multisigAddress).toList(); +} + PendingMultisigExecutionEvent? findPendingExecutionForProposal( List all, String multisigAddress, diff --git a/mobile-app/lib/providers/wallet_providers.dart b/mobile-app/lib/providers/wallet_providers.dart index 31de0ef6..13a67bc0 100644 --- a/mobile-app/lib/providers/wallet_providers.dart +++ b/mobile-app/lib/providers/wallet_providers.dart @@ -3,6 +3,7 @@ import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/account_providers.dart'; import 'package:resonance_network_wallet/providers/l10n_provider.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_executions_provider.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_proposals_provider.dart'; import 'package:resonance_network_wallet/providers/pending_transactions_provider.dart'; import 'package:resonance_network_wallet/shared/utils/print.dart'; @@ -78,10 +79,16 @@ final effectiveBalanceProviderFamily = Provider.family, Strin final balanceAsync = ref.watch(balanceProviderFamily(accountId)); final pendingTransactions = ref.watch(pendingTransactionsProvider); final pendingMultisigProposals = ref.watch(pendingMultisigProposalsProvider); + final pendingMultisigExecutions = ref.watch(pendingMultisigExecutionsProvider); return balanceAsync.when( data: (blockchainBalance) { - final pendingOutgoing = _calculatePendingOutgoing(pendingTransactions, pendingMultisigProposals, accountId); + final pendingOutgoing = _calculatePendingOutgoing( + pendingTransactions, + pendingMultisigProposals, + pendingMultisigExecutions, + accountId, + ); final effectiveBalance = blockchainBalance - pendingOutgoing; final result = effectiveBalance >= BigInt.zero ? effectiveBalance : BigInt.zero; return AsyncValue.data(result); @@ -115,6 +122,7 @@ final balanceProvider = Provider>((ref) { final balanceAsync = ref.watch(balanceProviderRaw); final pendingTransactions = ref.watch(pendingTransactionsProvider); final pendingMultisigProposals = ref.watch(pendingMultisigProposalsProvider); + final pendingMultisigExecutions = ref.watch(pendingMultisigExecutionsProvider); final activeAccountAsync = ref.watch(activeAccountProvider); return balanceAsync.when( @@ -128,6 +136,7 @@ final balanceProvider = Provider>((ref) { final pendingOutgoing = _calculatePendingOutgoing( pendingTransactions, pendingMultisigProposals, + pendingMultisigExecutions, activeAccount.account.accountId, ); final effectiveBalance = blockchainBalance - pendingOutgoing; @@ -148,6 +157,7 @@ final balanceProvider = Provider>((ref) { BigInt _calculatePendingOutgoing( List pendingTransactions, List pendingMultisigProposals, + List pendingMultisigExecutions, String accountId, ) { BigInt totalOutgoing = BigInt.zero; @@ -170,6 +180,12 @@ BigInt _calculatePendingOutgoing( } } + for (final execution in pendingMultisigExecutions) { + if (execution.executorId == accountId) { + totalOutgoing += execution.memberCost; + } + } + return totalOutgoing; } diff --git a/mobile-app/lib/services/multisig_execution_polling_service.dart b/mobile-app/lib/services/multisig_execution_polling_service.dart index 5dd9ebca..e5040442 100644 --- a/mobile-app/lib/services/multisig_execution_polling_service.dart +++ b/mobile-app/lib/services/multisig_execution_polling_service.dart @@ -3,24 +3,34 @@ import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/multisig_execution_toast_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_executions_provider.dart'; +import 'package:resonance_network_wallet/providers/wallet_providers.dart'; import 'package:resonance_network_wallet/services/extrinsic_indexer_polling_service.dart'; import 'package:resonance_network_wallet/services/multisig_execution_reconciliation.dart'; +import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; +import 'package:resonance_network_wallet/shared/utils/print.dart'; typedef MultisigExecutionPollingService = ExtrinsicIndexerPollingService; Future _confirmIndexedExecution(Ref ref, MultisigAccount msig, PendingMultisigExecutionEvent pending) async { + final hash = pending.extrinsicHash; + if (hash == null) return false; + final multisigService = ref.read(multisigServiceProvider); final proposal = await multisigService.getProposal(msig, pending.proposalId); if (proposal == null || proposal.status != MultisigProposalStatus.executed) return false; + final historyService = ref.read(chainHistoryServiceProvider); + final indexed = await historyService.searchExecutedByExtrinsicHash(extrinsicHash: hash); + if (indexed == null) return false; + removePendingMultisigExecution(ref, pending.id); - await reconcileIndexedExecution(ref, msig, pending); + await reconcileIndexedExecution(ref, msig, indexed); return true; } -/// When the indexer lags but the proposal already shows as executed, clear -/// pending state and refresh without a timeout toast. +/// When the indexer account event lags but the proposal already shows as +/// executed, clear pending state and refresh without a timeout toast. Future _tryResolveExecutionTimeout(Ref ref, MultisigAccount msig, PendingMultisigExecutionEvent pending) async { final multisigService = ref.read(multisigServiceProvider); final proposal = await multisigService.getProposal(msig, pending.proposalId); @@ -29,7 +39,22 @@ Future _tryResolveExecutionTimeout(Ref ref, MultisigAccount msig, PendingM } removePendingMultisigExecution(ref, pending.id); - await reconcileIndexedExecution(ref, msig, pending); + invalidateMultisigProposals(ref, msig); + + final hash = pending.extrinsicHash; + if (hash != null) { + try { + final indexed = await ref.read(chainHistoryServiceProvider).searchExecutedByExtrinsicHash(extrinsicHash: hash); + if (indexed != null) { + await reconcileIndexedExecution(ref, msig, indexed); + return true; + } + } catch (e) { + quantusDebugPrint('[MultisigExecutionPoller] soft timeout reconcile error: $e'); + } + } + + invalidateAccountBalances(ref, {pending.executorId, msig.accountId}); return true; } diff --git a/mobile-app/lib/services/multisig_execution_reconciliation.dart b/mobile-app/lib/services/multisig_execution_reconciliation.dart index 50ec235d..0c61f01c 100644 --- a/mobile-app/lib/services/multisig_execution_reconciliation.dart +++ b/mobile-app/lib/services/multisig_execution_reconciliation.dart @@ -1,10 +1,24 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; +import 'package:resonance_network_wallet/services/account_activity_reconciliation.dart'; import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; -/// Refreshes proposal state and balances after an execution is indexed. -Future reconcileIndexedExecution(Ref ref, MultisigAccount msig, PendingMultisigExecutionEvent pending) async { +/// Refreshes proposal state and appends the execution to the executor's activity. +Future reconcileIndexedExecution( + Ref ref, + MultisigAccount msig, + MultisigProposalExecutedEvent indexed, +) async { invalidateMultisigProposals(ref, msig); - invalidateAccountBalances(ref, {pending.executorId, msig.accountId}); + + await appendConfirmedEventToHistory( + ref: ref, + accountId: indexed.executorId, + event: indexed, + includeForFilter: (filter) => filter != TransactionFilter.receive, + isDuplicate: (tx) => tx is MultisigProposalExecutedEvent && tx.isSameExecutionAs(indexed), + ); + + invalidateAccountBalances(ref, {indexed.executorId, msig.accountId}); } diff --git a/mobile-app/lib/services/pending_transaction_reconciliation_service.dart b/mobile-app/lib/services/pending_transaction_reconciliation_service.dart index 2eb065fb..f8ea0161 100644 --- a/mobile-app/lib/services/pending_transaction_reconciliation_service.dart +++ b/mobile-app/lib/services/pending_transaction_reconciliation_service.dart @@ -105,6 +105,7 @@ class PendingTransactionReconciliationService { pendingTransactions: [], pendingMultisigCreations: [], pendingMultisigProposals: const [], + pendingMultisigExecutions: const [], scheduledReversibleTransfers: pagination.scheduledReversibleTransfers, otherTransfers: pagination.otherTransfers, ); diff --git a/mobile-app/lib/services/transaction_service.dart b/mobile-app/lib/services/transaction_service.dart index 0face89c..aeb06353 100644 --- a/mobile-app/lib/services/transaction_service.dart +++ b/mobile-app/lib/services/transaction_service.dart @@ -34,11 +34,13 @@ class TransactionService { required List pendingTransactions, required List pendingMultisigCreations, required List pendingMultisigProposals, + required List pendingMultisigExecutions, required List scheduledReversibleTransfers, required List otherTransfers, }) { final seenIds = {}; final seenProposalKeys = {}; + final seenExecutionKeys = {}; final List result = []; for (final creation in pendingMultisigCreations) { @@ -54,6 +56,13 @@ class TransactionService { } } + for (final execution in pendingMultisigExecutions) { + final key = execution.activityDedupKey; + if (seenExecutionKeys.add(key) && seenIds.add(execution.id)) { + result.add(execution); + } + } + // Add pending transactions that haven't not failed first (highest priority) for (final transaction in pendingTransactions) { if (transaction.transactionState == TransactionState.failed) { @@ -90,6 +99,13 @@ class TransactionService { } seenProposalKeys.add(key); } + if (transaction is MultisigProposalExecutedEvent) { + final key = transaction.activityDedupKey; + if (seenExecutionKeys.contains(key)) { + result.removeWhere((e) => e is PendingMultisigExecutionEvent && e.activityDedupKey == key); + } + seenExecutionKeys.add(key); + } if (seenIds.add(transaction.id)) { result.add(transaction); } diff --git a/mobile-app/lib/services/transaction_submission_service.dart b/mobile-app/lib/services/transaction_submission_service.dart index fdb17959..afc652d0 100644 --- a/mobile-app/lib/services/transaction_submission_service.dart +++ b/mobile-app/lib/services/transaction_submission_service.dart @@ -222,11 +222,13 @@ class TransactionSubmissionService { required MultisigAccount msig, required Account signer, required MultisigProposal proposal, + BigInt? fee, }) async { - final pending = PendingMultisigExecutionEvent.create( - multisigAddress: msig.accountId, - proposalId: proposal.id, + final pending = PendingMultisigExecutionEvent.fromProposal( + msig: msig, + proposal: proposal, executorId: signer.accountId, + fee: fee, ); addPendingMultisigExecution(_ref, pending); diff --git a/mobile-app/lib/shared/extensions/transaction_event_extension.dart b/mobile-app/lib/shared/extensions/transaction_event_extension.dart index 96024cfc..0df935c0 100644 --- a/mobile-app/lib/shared/extensions/transaction_event_extension.dart +++ b/mobile-app/lib/shared/extensions/transaction_event_extension.dart @@ -31,7 +31,11 @@ extension TransactionEventExtension on TransactionEvent { bool get isMultisigProposalApproved => this is MultisigProposalApprovedEvent; + bool get isMultisigProposalExecuted => this is MultisigProposalExecutedEvent; + bool get isPendingMultisigProposal => this is PendingMultisigProposalEvent; + bool get isPendingMultisigExecution => this is PendingMultisigExecutionEvent; + bool get isProposalCreation => this is MultisigProposalCreatedEvent || this is PendingMultisigProposalEvent; } diff --git a/mobile-app/lib/v2/screens/activity/activity_screen.dart b/mobile-app/lib/v2/screens/activity/activity_screen.dart index 9c17c7dd..f1f82897 100644 --- a/mobile-app/lib/v2/screens/activity/activity_screen.dart +++ b/mobile-app/lib/v2/screens/activity/activity_screen.dart @@ -110,6 +110,7 @@ class _ActivityScreenState extends ConsumerState { pendingTransactions: data.pendingTransactions, pendingMultisigCreations: data.pendingMultisigCreations, pendingMultisigProposals: data.pendingMultisigProposals, + pendingMultisigExecutions: data.pendingMultisigExecutions, scheduledReversibleTransfers: data.scheduledReversibleTransfers, otherTransfers: data.otherTransfers, ); diff --git a/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart b/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart index 034f225a..9f2f541e 100644 --- a/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart +++ b/mobile-app/lib/v2/screens/activity/transaction_detail_sheet.dart @@ -33,8 +33,10 @@ class _TransactionDetailSheet extends ConsumerWidget { bool get _isSend { if (_isPendingMultisigProposal || + _isPendingMultisigExecution || _isMultisigProposalCreated || tx.isMultisigProposalApproved || + tx.isMultisigProposalExecuted || tx is MultisigProposalEvent) { return true; } @@ -46,12 +48,16 @@ class _TransactionDetailSheet extends ConsumerWidget { bool get _isPendingMultisigCreation => tx.isPendingMultisigCreation; bool get _isMultisigProposalCreated => tx.isMultisigProposalCreated; bool get _isMultisigProposalApproved => tx.isMultisigProposalApproved; + bool get _isMultisigProposalExecuted => tx.isMultisigProposalExecuted; bool get _isPendingMultisigProposal => tx.isPendingMultisigProposal; + bool get _isPendingMultisigExecution => tx.isPendingMultisigExecution; String _title(AppLocalizations l10n) { if (_isPendingMultisigProposal) return l10n.activityDetailTitleProposing; + if (_isPendingMultisigExecution) return l10n.activityDetailTitleExecuting; if (_isMultisigProposalCreated) return l10n.activityDetailTitleProposalCreated; if (_isMultisigProposalApproved) return l10n.activityDetailTitleProposalApproved; + if (_isMultisigProposalExecuted) return l10n.activityDetailTitleProposalExecuted; if (_isPendingMultisigCreation) return l10n.activityDetailTitleMultisigCreating; if (_isMultisigCreated) return l10n.activityDetailTitleMultisigCreated; if (_isPending) return l10n.activityDetailTitleSending; @@ -62,7 +68,7 @@ class _TransactionDetailSheet extends ConsumerWidget { } String _statusLabel(AppLocalizations l10n) { - if (_isPending || _isPendingMultisigCreation || _isPendingMultisigProposal) { + if (_isPending || _isPendingMultisigCreation || _isPendingMultisigProposal || _isPendingMultisigExecution) { return l10n.activityDetailStatusInProcess; } if (tx.isReversibleScheduled) return l10n.activityDetailStatusScheduled; @@ -70,7 +76,11 @@ class _TransactionDetailSheet extends ConsumerWidget { } Color _statusColor(AppColorsV2 colors) { - if (_isPending || _isPendingMultisigCreation || _isPendingMultisigProposal || tx.isReversibleScheduled) { + if (_isPending || + _isPendingMultisigCreation || + _isPendingMultisigProposal || + _isPendingMultisigExecution || + tx.isReversibleScheduled) { return colors.checksum; } return colors.success; @@ -139,6 +149,10 @@ class _AmountSection extends ConsumerWidget { MultisigCreatedEvent(:final totalCost) => (totalCost, colors.textPrimary), MultisigProposalApprovedEvent(:final fee) when fee == null || fee == BigInt.zero => (null, null), MultisigProposalApprovedEvent(:final fee) => (fee!, colors.textPrimary), + MultisigProposalExecutedEvent(:final fee) when fee == null || fee == BigInt.zero => (null, null), + MultisigProposalExecutedEvent(:final fee) => (fee!, colors.textPrimary), + PendingMultisigExecutionEvent(:final fee) when fee == null || fee == BigInt.zero => (null, colors.checksum), + PendingMultisigExecutionEvent(:final fee) => (fee!, colors.checksum), _ => (tx.amount, isSend ? colors.textPrimary : colors.success), }; @@ -194,6 +208,14 @@ class _DetailsSection extends ConsumerWidget { return _proposalApprovedDetails(tx as MultisigProposalApprovedEvent, l10n, formattingService); } + if (pendingMultisig is PendingMultisigExecutionEvent) { + return _pendingExecutionDetails(pendingMultisig, l10n, formattingService); + } + + if (tx is MultisigProposalExecutedEvent) { + return _proposalExecutedDetails(tx as MultisigProposalExecutedEvent, l10n, formattingService); + } + if (pendingMultisig is PendingMultisigCreationEvent) { return _pendingMultisigDetails(pendingMultisig, l10n, formattingService); } @@ -279,6 +301,62 @@ class _DetailsSection extends ConsumerWidget { ); } + Widget _pendingExecutionDetails( + PendingMultisigExecutionEvent event, + AppLocalizations l10n, + NumberFormattingService formattingService, + ) { + final multisig = AddressFormattingService.formatActivityDetailAddress(event.multisigAddress); + final recipientAddress = AddressFormattingService.formatActivityDetailAddress(event.recipient); + final transferAmount = _formatBalance(l10n, formattingService, event.amount); + final networkFeeValue = event.fee != null && event.fee != BigInt.zero + ? _formatBalance(l10n, formattingService, event.fee!) + : null; + final txHash = event.extrinsicHash != null + ? AddressFormattingService.formatActivityDetailExtrinsicHash(event.extrinsicHash!) + : null; + + return Column( + children: [ + _DetailRow(label: l10n.activityDetailMultisigAddress, value: multisig, colors: colors), + _DetailRow(label: l10n.activityDetailTo, value: recipientAddress, colors: colors), + _DetailRow(label: l10n.activityDetailProposalTransferAmount, value: transferAmount, colors: colors), + if (networkFeeValue != null) + _DetailRow(label: l10n.activityDetailNetworkFee, value: networkFeeValue, colors: colors), + if (txHash != null) _DetailRow(label: l10n.activityDetailTxHash, value: txHash, colors: colors), + ], + ); + } + + Widget _proposalExecutedDetails( + MultisigProposalExecutedEvent event, + AppLocalizations l10n, + NumberFormattingService formattingService, + ) { + final multisig = AddressFormattingService.formatActivityDetailAddress(event.multisigAddress); + final recipientAddress = AddressFormattingService.formatActivityDetailAddress(event.recipient); + final dateTime = DatetimeFormattingService.formatTxDateTime(event.timestamp); + final transferAmount = _formatBalance(l10n, formattingService, event.amount); + final networkFeeValue = event.networkFee != BigInt.zero + ? _formatBalance(l10n, formattingService, event.networkFee) + : null; + final txHash = event.extrinsicHash != null + ? AddressFormattingService.formatActivityDetailExtrinsicHash(event.extrinsicHash!) + : null; + + return Column( + children: [ + _DetailRow(label: l10n.activityDetailMultisigAddress, value: multisig, colors: colors), + _DetailRow(label: l10n.activityDetailTo, value: recipientAddress, colors: colors), + _DetailRow(label: l10n.activityDetailProposalTransferAmount, value: transferAmount, colors: colors), + if (networkFeeValue != null) + _DetailRow(label: l10n.activityDetailNetworkFee, value: networkFeeValue, colors: colors), + _DetailRow(label: l10n.activityDetailDate, value: dateTime, colors: colors), + if (txHash != null) _DetailRow(label: l10n.activityDetailTxHash, value: txHash, colors: colors), + ], + ); + } + Widget _proposalCreatedDetails( MultisigProposalCreatedEvent event, AppLocalizations l10n, @@ -449,7 +527,10 @@ class _ExplorerLink extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final l10n = ref.watch(l10nProvider); final isPending = - tx is PendingTransactionEvent || tx is PendingMultisigCreationEvent || tx is PendingMultisigProposalEvent; + tx is PendingTransactionEvent || + tx is PendingMultisigCreationEvent || + tx is PendingMultisigProposalEvent || + tx is PendingMultisigExecutionEvent; final color = isPending ? colors.accentOrange.withValues(alpha: 0.3) : colors.accentOrange; return GestureDetector( @@ -472,9 +553,12 @@ class _ExplorerLink extends ConsumerWidget { final isMultisigCreated = tx.isMultisigCreated; final isProposalCreated = tx.isProposalCreation; final isProposalApproved = tx.isMultisigProposalApproved; + final isProposalExecuted = tx.isMultisigProposalExecuted; String transactionType; - if (isProposalApproved) { + if (isProposalExecuted) { + transactionType = 'multisig-proposal-executed'; + } else if (isProposalApproved) { transactionType = 'multisig-signer-approved'; } else if (isProposalCreated) { transactionType = 'multisig-proposal-created'; diff --git a/mobile-app/lib/v2/screens/activity/tx_item.dart b/mobile-app/lib/v2/screens/activity/tx_item.dart index e1fbfada..b0431e0f 100644 --- a/mobile-app/lib/v2/screens/activity/tx_item.dart +++ b/mobile-app/lib/v2/screens/activity/tx_item.dart @@ -90,6 +90,44 @@ class TxItemData { ); } + if (tx is PendingMultisigExecutionEvent) { + final recipient = AddressFormattingService.formatAddress(tx.recipient, prefix: 5, postFix: 3); + final fee = tx.memberCost; + return TxItemData( + label: l10n.activityTxExecuting, + timeLabel: l10n.activityTxTimeNow, + iconBg: colors.txItemOutgoingHighlightBg, + iconColor: colors.checksum, + labelColor: colors.checksum, + amountColor: colors.checksum, + borderColor: colors.txItemOutgoingHighlightBorder, + isSend: true, + amount: fee, + hideAmount: fee == BigInt.zero, + counterpartyAddr: recipient, + customIcon: Icons.how_to_vote_outlined, + ); + } + + if (tx is MultisigProposalExecutedEvent) { + final recipient = AddressFormattingService.formatAddress(tx.recipient, prefix: 5, postFix: 3); + final fee = tx.networkFee; + return TxItemData( + label: l10n.activityTxProposalExecuted, + timeLabel: _timeAgo(tx.timestamp, l10n), + iconBg: Colors.transparent, + iconColor: colors.txItemIconDefault, + labelColor: colors.textPrimary, + amountColor: colors.textPrimary, + borderColor: colors.txItemBorderDefault, + isSend: true, + amount: fee, + hideAmount: fee == BigInt.zero, + counterpartyAddr: recipient, + customIcon: Icons.how_to_vote_outlined, + ); + } + if (tx is MultisigProposalEvent) { return TxItemData( label: l10n.activityTxProposal, diff --git a/mobile-app/lib/v2/screens/home/activity_section.dart b/mobile-app/lib/v2/screens/home/activity_section.dart index 22d6b4ac..875e9a50 100644 --- a/mobile-app/lib/v2/screens/home/activity_section.dart +++ b/mobile-app/lib/v2/screens/home/activity_section.dart @@ -42,6 +42,7 @@ class _ActivitySectionState extends ConsumerState { pendingTransactions: data.pendingTransactions, pendingMultisigCreations: data.pendingMultisigCreations, pendingMultisigProposals: data.pendingMultisigProposals, + pendingMultisigExecutions: data.pendingMultisigExecutions, scheduledReversibleTransfers: data.scheduledReversibleTransfers, otherTransfers: data.otherTransfers, ); diff --git a/mobile-app/lib/v2/screens/multisig/multisig_activity_section.dart b/mobile-app/lib/v2/screens/multisig/multisig_activity_section.dart index 5489f0de..04fd3470 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_activity_section.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_activity_section.dart @@ -7,6 +7,7 @@ import 'package:resonance_network_wallet/models/combined_transactions_list.dart' import 'package:resonance_network_wallet/providers/currency_display_provider.dart'; import 'package:resonance_network_wallet/providers/l10n_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; +import 'package:resonance_network_wallet/providers/pending_multisig_executions_provider.dart'; import 'package:resonance_network_wallet/providers/pending_multisig_proposals_provider.dart'; import 'package:resonance_network_wallet/services/transaction_service.dart'; import 'package:resonance_network_wallet/v2/components/loader.dart'; @@ -184,6 +185,7 @@ class MultisigActivitySection extends ConsumerWidget { pendingTransactions: data.pendingTransactions, pendingMultisigCreations: data.pendingMultisigCreations, pendingMultisigProposals: pendingProposalsExcludingMultisig(data.pendingMultisigProposals, msig.accountId), + pendingMultisigExecutions: pendingExecutionsExcludingMultisig(data.pendingMultisigExecutions, msig.accountId), scheduledReversibleTransfers: data.scheduledReversibleTransfers, otherTransfers: data.otherTransfers, ); diff --git a/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart index bf246270..57e94f15 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart @@ -108,9 +108,12 @@ class _MultisigExecuteConfirmSheetState extends ConsumerState<_MultisigExecuteCo print('msig: ${widget.msig.accountId}'); print('signer: ${signer.accountId}'); - await ref - .read(transactionSubmissionServiceProvider) - .executeProposal(msig: widget.msig, signer: signer, proposal: widget.proposal); + await ref.read(transactionSubmissionServiceProvider).executeProposal( + msig: widget.msig, + signer: signer, + proposal: widget.proposal, + fee: _networkFee, + ); if (!mounted) return; ref.invalidate(multisigOpenProposalsProvider(widget.msig)); diff --git a/mobile-app/test/unit/transaction_service_test.dart b/mobile-app/test/unit/transaction_service_test.dart index 441f25b7..c643fd9a 100644 --- a/mobile-app/test/unit/transaction_service_test.dart +++ b/mobile-app/test/unit/transaction_service_test.dart @@ -132,6 +132,7 @@ void main() { pendingTransactions: [], pendingMultisigCreations: [], pendingMultisigProposals: [pending], + pendingMultisigExecutions: [], scheduledReversibleTransfers: [], otherTransfers: [], ); @@ -151,6 +152,7 @@ void main() { pendingTransactions: [], pendingMultisigCreations: [], pendingMultisigProposals: [pending], + pendingMultisigExecutions: [], scheduledReversibleTransfers: [], otherTransfers: [indexed], ); @@ -183,6 +185,7 @@ void main() { pendingTransactions: [], pendingMultisigCreations: [], pendingMultisigProposals: [pending], + pendingMultisigExecutions: [], scheduledReversibleTransfers: [], otherTransfers: [indexedWithHash], ); @@ -190,5 +193,88 @@ void main() { expect(result, hasLength(1)); expect(result.first, same(indexedWithHash)); }); + + PendingMultisigExecutionEvent pendingExecution({ + String id = 'pending_execution_1', + String executorId = 'executor', + String multisigAddress = 'multisig', + String recipient = 'recipient', + BigInt? amount, + BigInt? fee, + String? extrinsicHash, + }) { + return PendingMultisigExecutionEvent( + tempId: id, + multisigAddress: multisigAddress, + proposalId: 5, + executorId: executorId, + recipient: recipient, + amount: amount ?? BigInt.from(2000), + fee: fee ?? BigInt.from(18), + extrinsicHash: extrinsicHash, + ); + } + + MultisigProposalExecutedEvent indexedExecution({ + String executorId = 'executor', + String multisigAddress = 'multisig', + String recipient = 'recipient', + BigInt? amount, + String? extrinsicHash, + }) { + return MultisigProposalExecutedEvent( + id: 'ae-ms-exec-1', + executorId: executorId, + multisigAddress: multisigAddress, + recipient: recipient, + amount: amount ?? BigInt.from(2000), + proposalId: 5, + approvers: const ['signer1', 'signer2'], + result: 'Ok', + fee: BigInt.from(18), + timestamp: DateTime.utc(2026, 6, 3), + blockNumber: 1, + blockHash: '0xabc', + extrinsicHash: extrinsicHash, + ); + } + + test('includes pending execution for executor feed', () { + final service = container.read(transactionServiceProvider); + final pending = pendingExecution(); + + final result = service.combineAndDeduplicateTransactions( + pendingCancellationIds: {}, + pendingTransactions: [], + pendingMultisigCreations: [], + pendingMultisigProposals: [], + pendingMultisigExecutions: [pending], + scheduledReversibleTransfers: [], + otherTransfers: [], + ); + + expect(result, hasLength(1)); + expect(result.first, same(pending)); + }); + + test('replaces pending execution with indexed event for same activity key', () { + final service = container.read(transactionServiceProvider); + const hash = '0xexec-hash'; + final pending = pendingExecution(extrinsicHash: hash); + final indexed = indexedExecution(extrinsicHash: hash); + + final result = service.combineAndDeduplicateTransactions( + pendingCancellationIds: {}, + pendingTransactions: [], + pendingMultisigCreations: [], + pendingMultisigProposals: [], + pendingMultisigExecutions: [pending], + scheduledReversibleTransfers: [], + otherTransfers: [indexed], + ); + + expect(result, hasLength(1)); + expect(result.first, isA()); + }); }); } diff --git a/quantus_sdk/lib/quantus_sdk.dart b/quantus_sdk/lib/quantus_sdk.dart index 615e7311..00d48811 100644 --- a/quantus_sdk/lib/quantus_sdk.dart +++ b/quantus_sdk/lib/quantus_sdk.dart @@ -81,6 +81,7 @@ export 'src/models/multisig_proposal.dart'; export 'src/models/multisig_proposal_event.dart'; export 'src/models/multisig_proposal_created_event.dart'; export 'src/models/multisig_proposal_approved_event.dart'; +export 'src/models/multisig_proposal_executed_event.dart'; export 'src/models/pending_multisig_approval_event.dart'; export 'src/models/pending_multisig_execution_event.dart'; export 'src/models/propose_fee_breakdown.dart'; diff --git a/quantus_sdk/lib/src/constants/app_constants.dart b/quantus_sdk/lib/src/constants/app_constants.dart index 7d16e38e..a1a1a3f3 100644 --- a/quantus_sdk/lib/src/constants/app_constants.dart +++ b/quantus_sdk/lib/src/constants/app_constants.dart @@ -8,16 +8,16 @@ class AppConstants { static const String emailSupport = 'support@quantus.com'; static const String telegramHandle = '@quantusnetwork'; - // static const List rpcEndpoints = ['http://127.0.0.1:9944']; // local testing - // static const List graphQlEndpoints = ['http://127.0.0.1:4350/v1/graphql']; // local testing + static const List rpcEndpoints = ['http://127.0.0.1:9944']; // local testing + static const List graphQlEndpoints = ['http://127.0.0.1:4350/v1/graphql']; // local testing static const stillOnTestnet = true; - static const List rpcEndpoints = [ - 'https://a1-planck.quantus.cat', - 'https://a2-planck.quantus.cat', - 'https://matcha-latte.quantus.com', - ]; - static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; + // static const List rpcEndpoints = [ + // 'https://a1-planck.quantus.cat', + // 'https://a2-planck.quantus.cat', + // 'https://matcha-latte.quantus.com', + // ]; + // static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; // local test android use special ip // static const String taskMasterEndpoint = 'http://10.0.2.2:3000/api'; diff --git a/quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart b/quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart new file mode 100644 index 00000000..839ac101 --- /dev/null +++ b/quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart @@ -0,0 +1,151 @@ +import 'package:quantus_sdk/src/models/json_dynamic_parse.dart'; +import 'package:quantus_sdk/src/models/multisig_account.dart'; +import 'package:quantus_sdk/src/models/multisig_proposal.dart'; +import 'package:quantus_sdk/src/models/transaction_event.dart'; + +/// On-chain multisig proposal execution shown in the executor's activity history. +/// +/// [amount] is the proposed transfer amount (context). [fee] is the extrinsic +/// network fee paid by the executor. +class MultisigProposalExecutedEvent extends TransactionEvent { + final String executorId; + final String multisigAddress; + final String recipient; + final BigInt? fee; + final int proposalId; + final List approvers; + final String result; + final MultisigProposal? proposal; + + MultisigProposalExecutedEvent({ + required super.id, + required this.executorId, + required this.multisigAddress, + required this.recipient, + required super.amount, + required this.proposalId, + required this.approvers, + required this.result, + required super.timestamp, + required super.blockNumber, + required super.blockHash, + this.fee, + this.proposal, + super.extrinsicHash, + }) : super(from: executorId, to: recipient); + + /// Network fee paid by the executor; zero when indexer did not record one. + BigInt get networkFee => fee ?? BigInt.zero; + + /// Stable key for swapping a pending execution row with this indexed event. + String get activityDedupKey { + if (extrinsicHash != null) return 'hash:$extrinsicHash'; + final indexed = proposal; + if (indexed != null) { + return 'proposal:${indexed.multisigAddress}|${indexed.id}'; + } + return 'event:$id'; + } + + /// Whether [other] describes the same execution as this event. + bool isSameExecutionAs(MultisigProposalExecutedEvent other) { + if (extrinsicHash != null && + other.extrinsicHash != null && + extrinsicHash == other.extrinsicHash) { + return true; + } + return id == other.id; + } + + factory MultisigProposalExecutedEvent.fromAccountEvent(Map event) { + final executed = jsonMapRequired(event['executedMultisigProposal'], 'executedMultisigProposal'); + final eventTimestamp = event['timestamp']; + return MultisigProposalExecutedEvent.fromExecutedGraphql( + executed: executed, + accountEventId: stringFromJson(event['id']), + accountEventTimestamp: eventTimestamp != null ? dateTimeFromJson(eventTimestamp) : null, + ); + } + + factory MultisigProposalExecutedEvent.fromExecutedGraphql({ + required Map executed, + String? accountEventId, + DateTime? accountEventTimestamp, + }) { + final proposalJson = jsonMapOrNull(executed['proposal']); + MultisigProposal? proposal; + String executorId = nestedAccountId(executed['executedBy'] ?? executed['executed_by']); + String multisigAddress = ''; + String recipient = ''; + BigInt amount = BigInt.zero; + var proposalId = 0; + + if (proposalJson != null) { + final msig = _minimalMultisigFromProposalJson(proposalJson, executorId); + multisigAddress = msig.accountId; + proposal = MultisigProposal.fromIndexerJson(proposalJson, msig: msig); + recipient = proposal.recipient; + amount = proposal.amount; + proposalId = proposal.id; + } + + final approversRaw = executed['approvers']; + final approvers = approversRaw is List ? approversRaw.map((e) => e.toString()).toList() : []; + + final block = jsonMapOrNull(executed['block']); + final feeRaw = executed['fee']; + final result = executed['result']?.toString() ?? ''; + + return MultisigProposalExecutedEvent( + id: accountEventId ?? stringFromJson(executed['id']), + executorId: executorId, + multisigAddress: multisigAddress, + recipient: recipient, + amount: amount, + proposalId: proposalId, + approvers: approvers, + result: result, + fee: feeRaw != null ? bigIntFromJson(feeRaw) : null, + timestamp: accountEventTimestamp ?? dateTimeFromJson(executed['timestamp']), + blockNumber: blockHeightFromJsonMap(block), + blockHash: blockHashFromJsonMap(block), + extrinsicHash: optionalExtrinsicHash(executed), + proposal: proposal, + ); + } + + static MultisigAccount _minimalMultisigFromProposalJson( + Map proposalJson, + String myMemberAccountId, + ) { + final multisigJson = jsonMapOrNull(proposalJson['multisig']); + final address = nestedAccountId(multisigJson ?? proposalJson['multisig_id']); + final signersRaw = multisigJson?['signers']; + final signers = signersRaw is List ? signersRaw.map((e) => e.toString()).toList() : []; + final threshold = _thresholdFromMultisigJson(multisigJson, signers); + + final nonceRaw = multisigJson?['nonce']; + return MultisigAccount( + name: '', + accountId: address, + signers: signers, + threshold: threshold, + nonce: nonceRaw != null ? bigIntFromJson(nonceRaw) : BigInt.zero, + myMemberAccountId: myMemberAccountId, + ); + } + + static int _thresholdFromMultisigJson(Map? multisigJson, List signers) { + if (signers.isNotEmpty && multisigJson?['threshold'] != null) { + return multisigThresholdFromJson(multisigJson!['threshold'], signerCount: signers.length); + } + if (signers.isNotEmpty) return signers.length; + return 1; + } + + @override + String toString() { + return 'MultisigProposalExecuted{id: $id, executor: $executorId, ' + 'multisig: $multisigAddress, proposalId: $proposalId, fee: $fee}'; + } +} diff --git a/quantus_sdk/lib/src/models/pending_multisig_execution_event.dart b/quantus_sdk/lib/src/models/pending_multisig_execution_event.dart index 9a0d8207..b9896ae1 100644 --- a/quantus_sdk/lib/src/models/pending_multisig_execution_event.dart +++ b/quantus_sdk/lib/src/models/pending_multisig_execution_event.dart @@ -1,32 +1,52 @@ -import 'package:flutter/foundation.dart'; +import 'package:quantus_sdk/src/models/multisig_account.dart'; +import 'package:quantus_sdk/src/models/multisig_proposal.dart'; +import 'package:quantus_sdk/src/models/transaction_event.dart'; /// An execution submitted on-chain but not yet reflected in the indexer. -@immutable -class PendingMultisigExecutionEvent { - final String id; +class PendingMultisigExecutionEvent extends TransactionEvent { final String multisigAddress; final int proposalId; final String executorId; - final String? extrinsicHash; - final DateTime submittedAt; + final String recipient; + final BigInt? fee; - const PendingMultisigExecutionEvent({ - required this.id, + PendingMultisigExecutionEvent({ + required String tempId, required this.multisigAddress, required this.proposalId, required this.executorId, - this.extrinsicHash, - required this.submittedAt, - }); + required this.recipient, + required super.amount, + this.fee, + super.extrinsicHash, + DateTime? timestamp, + }) : super( + id: tempId, + from: executorId, + to: recipient, + timestamp: timestamp ?? DateTime.now(), + blockNumber: 0, + ); - PendingMultisigExecutionEvent copyWith({String? extrinsicHash}) { + DateTime get submittedAt => timestamp; + + /// Estimated network fee for the executor at submit time. + BigInt get memberCost => fee ?? BigInt.zero; + + /// Stable key for swapping this pending row with an indexed execution event. + String get activityDedupKey => extrinsicHash != null ? 'hash:$extrinsicHash' : 'pending:$id'; + + PendingMultisigExecutionEvent copyWith({String? extrinsicHash, BigInt? fee}) { return PendingMultisigExecutionEvent( - id: id, + tempId: id, multisigAddress: multisigAddress, proposalId: proposalId, executorId: executorId, + recipient: recipient, + amount: amount, + fee: fee ?? this.fee, extrinsicHash: extrinsicHash ?? this.extrinsicHash, - submittedAt: submittedAt, + timestamp: timestamp, ); } @@ -34,13 +54,34 @@ class PendingMultisigExecutionEvent { required String multisigAddress, required int proposalId, required String executorId, + required String recipient, + required BigInt amount, + BigInt? fee, }) { return PendingMultisigExecutionEvent( - id: 'pending_execution_${DateTime.now().millisecondsSinceEpoch}', + tempId: 'pending_execution_${DateTime.now().millisecondsSinceEpoch}', multisigAddress: multisigAddress, proposalId: proposalId, executorId: executorId, - submittedAt: DateTime.now(), + recipient: recipient, + amount: amount, + fee: fee, + ); + } + + factory PendingMultisigExecutionEvent.fromProposal({ + required MultisigAccount msig, + required MultisigProposal proposal, + required String executorId, + BigInt? fee, + }) { + return PendingMultisigExecutionEvent.create( + multisigAddress: msig.accountId, + proposalId: proposal.id, + executorId: executorId, + recipient: proposal.recipient, + amount: proposal.amount, + fee: fee, ); } diff --git a/quantus_sdk/lib/src/services/chain_history_service.dart b/quantus_sdk/lib/src/services/chain_history_service.dart index d675f7a8..55697ad6 100644 --- a/quantus_sdk/lib/src/services/chain_history_service.dart +++ b/quantus_sdk/lib/src/services/chain_history_service.dart @@ -122,9 +122,10 @@ query ScheduledReversibleTransfersByAccounts(\$accounts: [String!]!, \$limit: In final String multisigField = MultisigGraphql.accountEventSelection; final String proposalCreatedField = MultisigGraphql.proposalCreatedAccountEventSelection; final String signerApprovedField = MultisigGraphql.signerApprovedAccountEventSelection; + final String executedProposalField = MultisigGraphql.executedMultisigProposalAccountEventSelection; const String multisigSendClause = - ', {multisig_id: {_is_null: false}}, {multisig_proposal_created_id: {_is_null: false}}, {multisig_signer_approved_id: {_is_null: false}}'; + ', {multisig_id: {_is_null: false}}, {multisig_proposal_created_id: {_is_null: false}}, {multisig_signer_approved_id: {_is_null: false}}, {executed_multisig_proposal_id: {_is_null: false}}'; final String whereClause; @@ -209,7 +210,7 @@ query AccountEvents(\$accounts: [String!]!, \$limit: Int!, \$offset: Int!) { } scheduledAt: scheduled_at } - }$minerRewardField$multisigField$proposalCreatedField$signerApprovedField + }$minerRewardField$multisigField$proposalCreatedField$signerApprovedField$executedProposalField } } '''; @@ -412,6 +413,21 @@ query SearchSignerApprovedByExtrinsicHash(\$extrinsicHash: String!) { ${MultisigGraphql.signerApprovedAccountEventSelection} } } +'''; + + final String _searchExecutedByExtrinsicHashQuery = + ''' +query SearchExecutedByExtrinsicHash(\$extrinsicHash: String!) { + accountEvents: account_event( + limit: 1 + where: {executedMultisigProposal: {extrinsic: {id: {_eq: \$extrinsicHash}}}} + order_by: {timestamp: desc} + ) { + id + timestamp +${MultisigGraphql.executedMultisigProposalAccountEventSelection} + } +} '''; void printTiming(String label, int milliseconds) { @@ -495,6 +511,18 @@ ${MultisigGraphql.signerApprovedAccountEventSelection} return null; } } + if (eventMap['executedMultisigProposal'] != null) { + try { + return MultisigProposalExecutedEvent.fromAccountEvent(eventMap); + } catch (e, stackTrace) { + _log( + 'WARNING: failed to parse executedMultisigProposal, id: ${eventMap['id']}, error: $e', + error: e, + stackTrace: stackTrace, + ); + return null; + } + } final id = eventMap['id'] as String?; if (id != null && _isSkippedMultisigAccountEventId(id)) { // Known multisig-related rows we don't render in activity yet. @@ -511,6 +539,7 @@ ${MultisigGraphql.signerApprovedAccountEventSelection} static bool _isSkippedMultisigAccountEventId(String id) { if (id.startsWith('ae-ms-proposal-created-')) return false; if (id.startsWith('ae-ms-signer-approved-')) return false; + if (id.startsWith('ae-ms-exec-')) return false; return id.startsWith('ae-multisig-') || id.startsWith('ae-ms-'); } @@ -754,6 +783,48 @@ ${MultisigGraphql.signerApprovedAccountEventSelection} } } + /// Searches for a confirmed multisig proposal execution by extrinsic hash. + Future searchExecutedByExtrinsicHash({required String extrinsicHash}) async { + _log('Searching proposal executed by extrinsic hash: $extrinsicHash'); + final Map requestBody = { + 'query': _searchExecutedByExtrinsicHashQuery, + 'variables': {'extrinsicHash': extrinsicHash}, + }; + + try { + final http.Response response = await _graphQlEndpointService.post(body: jsonEncode(requestBody)); + + if (response.statusCode != 200) { + throw Exception('GraphQL request failed with status: ${response.statusCode}. Body: ${response.body}'); + } + + final Map responseBody = jsonDecode(response.body); + + if (responseBody['errors'] != null) { + _log('GraphQL errors in response: ${responseBody['errors']}'); + throw Exception('GraphQL errors: ${responseBody['errors'].toString()}'); + } + + final List? events = responseBody['data']?['accountEvents']; + if (events == null || events.isEmpty) { + _log('No matching proposal execution found for hash $extrinsicHash'); + return null; + } + + final parsed = tryParseOtherTransferEvent(events.first); + if (parsed is MultisigProposalExecutedEvent) { + _log('Found proposal execution at block ${parsed.blockNumber}'); + return parsed; + } + + _log('Extrinsic hash matched account_event but payload was not MultisigProposalExecutedEvent'); + return null; + } catch (e, stackTrace) { + _log('Error searching proposal executed by hash: $e', error: e, stackTrace: stackTrace); + rethrow; + } + } + /// Searches for a confirmed multisig proposal creation by extrinsic hash. Future searchProposalCreatedByExtrinsicHash({required String extrinsicHash}) async { _log('Searching proposal created by extrinsic hash: $extrinsicHash'); diff --git a/quantus_sdk/lib/src/services/multisig_graphql.dart b/quantus_sdk/lib/src/services/multisig_graphql.dart index a2062e2c..40674617 100644 --- a/quantus_sdk/lib/src/services/multisig_graphql.dart +++ b/quantus_sdk/lib/src/services/multisig_graphql.dart @@ -82,6 +82,28 @@ ${MultisigProposalGraphql.fields} } ${MultisigProposalGraphql.fields} } }'''; + /// Nested selection for `account_event.executedMultisigProposal`. + static const String executedMultisigProposalAccountEventSelection = + ''' executedMultisigProposal { + id + fee + result + approvers + timestamp + block { + height + hash + } + extrinsic { + id + } + executedBy { + id + } + proposal { +${MultisigProposalGraphql.fields} } + }'''; + static const String byPkQuery = r''' query MultisigByPk($id: String!) { diff --git a/quantus_sdk/test/chain_history_service_test.dart b/quantus_sdk/test/chain_history_service_test.dart index 1997d3b6..fa68859f 100644 --- a/quantus_sdk/test/chain_history_service_test.dart +++ b/quantus_sdk/test/chain_history_service_test.dart @@ -135,11 +135,74 @@ void main() { }, }; + const executedMultisigProposalAccountEventFixture = { + 'id': 'ae-ms-exec-0000000256-c9dc5-000005-qzk2', + 'timestamp': '2026-06-03T12:00:00.000+00:00', + 'executedMultisigProposal': { + 'id': 'ms-exec-256', + 'fee': '18000000000', + 'result': 'Ok', + 'approvers': [ + 'qzk1Nxai3dZD9Cn5kwGcgL6mKxsfxwqdis7kDQJ52aJS2vSn7', + 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y', + ], + 'timestamp': '2026-06-03T12:00:00.000+00:00', + 'block': {'height': 258, 'hash': '0xexec'}, + 'extrinsic': {'id': '0xexecutehash'}, + 'executedBy': {'id': 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y'}, + 'proposal': { + 'id': 'proposal-entity-1', + 'proposal_id': 5, + 'created_at': '2026-06-03T10:00:00.000+00:00', + 'updated_at': '2026-06-03T12:00:00.000+00:00', + 'pallet': 'Balances', + 'call': 'transfer_allow_death', + 'call_raw': '0x', + 'transfer_amount': '2000000000000', + 'status': 'EXECUTED', + 'expiry_block': 1000, + 'deposit': '10000000000000', + 'approvals': [ + 'qzk1Nxai3dZD9Cn5kwGcgL6mKxsfxwqdis7kDQJ52aJS2vSn7', + 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y', + ], + 'proposer': {'id': 'qzk1Nxai3dZD9Cn5kwGcgL6mKxsfxwqdis7kDQJ52aJS2vSn7'}, + 'transferTo': {'id': 'qzpyxSr48YN9EQe2ito734iCReTXjnungmNCSY4Yph1YznEda'}, + 'multisig': { + 'id': 'qzo4qS1Lw6J66JuXcxLEWgzBLX2sBe3Ak3kmN1oA17pXLKCFH', + 'threshold': 2, + 'nonce': '0', + 'signers': [ + 'qzk1Nxai3dZD9Cn5kwGcgL6mKxsfxwqdis7kDQJ52aJS2vSn7', + 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y', + ], + }, + }, + }, + }; + group('ChainHistoryService.tryParseOtherTransferEvent', () { test('returns null for unhandled multisig indexer account events', () { expect(service.tryParseOtherTransferEvent({'id': 'ae-ms-proposal-ready-0000000256-qzk1'}), isNull); }); + test('parses multisig proposal executed account events', () { + final result = service.tryParseOtherTransferEvent(executedMultisigProposalAccountEventFixture); + expect(result, isA()); + + final event = result! as MultisigProposalExecutedEvent; + expect(event.executorId, 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y'); + expect(event.multisigAddress, 'qzo4qS1Lw6J66JuXcxLEWgzBLX2sBe3Ak3kmN1oA17pXLKCFH'); + expect(event.recipient, 'qzpyxSr48YN9EQe2ito734iCReTXjnungmNCSY4Yph1YznEda'); + expect(event.amount, BigInt.parse('2000000000000')); + expect(event.fee, BigInt.parse('18000000000')); + expect(event.proposalId, 5); + expect(event.approvers, hasLength(2)); + expect(event.result, 'Ok'); + expect(event.extrinsicHash, '0xexecutehash'); + expect(event.proposal, isNotNull); + }); + test('parses multisig signer approved account events', () { final result = service.tryParseOtherTransferEvent(signerApprovedAccountEventFixture); expect(result, isA()); From 489f8170cf705b0c87b2b87455bb1e85e13ca2c5 Mon Sep 17 00:00:00 2001 From: Beast Date: Tue, 9 Jun 2026 22:50:05 +0800 Subject: [PATCH 13/18] chore: formatting --- .../multisig_execution_reconciliation.dart | 6 +----- .../multisig/multisig_execute_confirm_sheet.dart | 9 +++------ quantus_sdk/lib/src/constants/app_constants.dart | 16 ++++++++-------- .../models/multisig_proposal_executed_event.dart | 9 ++------- .../models/pending_multisig_execution_event.dart | 8 +------- 5 files changed, 15 insertions(+), 33 deletions(-) diff --git a/mobile-app/lib/services/multisig_execution_reconciliation.dart b/mobile-app/lib/services/multisig_execution_reconciliation.dart index 0c61f01c..19621ea2 100644 --- a/mobile-app/lib/services/multisig_execution_reconciliation.dart +++ b/mobile-app/lib/services/multisig_execution_reconciliation.dart @@ -5,11 +5,7 @@ import 'package:resonance_network_wallet/services/account_activity_reconciliatio import 'package:resonance_network_wallet/shared/utils/polling_refresh_scope.dart'; /// Refreshes proposal state and appends the execution to the executor's activity. -Future reconcileIndexedExecution( - Ref ref, - MultisigAccount msig, - MultisigProposalExecutedEvent indexed, -) async { +Future reconcileIndexedExecution(Ref ref, MultisigAccount msig, MultisigProposalExecutedEvent indexed) async { invalidateMultisigProposals(ref, msig); await appendConfirmedEventToHistory( diff --git a/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart index 57e94f15..241a89c5 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart @@ -108,12 +108,9 @@ class _MultisigExecuteConfirmSheetState extends ConsumerState<_MultisigExecuteCo print('msig: ${widget.msig.accountId}'); print('signer: ${signer.accountId}'); - await ref.read(transactionSubmissionServiceProvider).executeProposal( - msig: widget.msig, - signer: signer, - proposal: widget.proposal, - fee: _networkFee, - ); + await ref + .read(transactionSubmissionServiceProvider) + .executeProposal(msig: widget.msig, signer: signer, proposal: widget.proposal, fee: _networkFee); if (!mounted) return; ref.invalidate(multisigOpenProposalsProvider(widget.msig)); diff --git a/quantus_sdk/lib/src/constants/app_constants.dart b/quantus_sdk/lib/src/constants/app_constants.dart index a1a1a3f3..7d16e38e 100644 --- a/quantus_sdk/lib/src/constants/app_constants.dart +++ b/quantus_sdk/lib/src/constants/app_constants.dart @@ -8,16 +8,16 @@ class AppConstants { static const String emailSupport = 'support@quantus.com'; static const String telegramHandle = '@quantusnetwork'; - static const List rpcEndpoints = ['http://127.0.0.1:9944']; // local testing - static const List graphQlEndpoints = ['http://127.0.0.1:4350/v1/graphql']; // local testing + // static const List rpcEndpoints = ['http://127.0.0.1:9944']; // local testing + // static const List graphQlEndpoints = ['http://127.0.0.1:4350/v1/graphql']; // local testing static const stillOnTestnet = true; - // static const List rpcEndpoints = [ - // 'https://a1-planck.quantus.cat', - // 'https://a2-planck.quantus.cat', - // 'https://matcha-latte.quantus.com', - // ]; - // static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; + static const List rpcEndpoints = [ + 'https://a1-planck.quantus.cat', + 'https://a2-planck.quantus.cat', + 'https://matcha-latte.quantus.com', + ]; + static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; // local test android use special ip // static const String taskMasterEndpoint = 'http://10.0.2.2:3000/api'; diff --git a/quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart b/quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart index 839ac101..4e230262 100644 --- a/quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart +++ b/quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart @@ -49,9 +49,7 @@ class MultisigProposalExecutedEvent extends TransactionEvent { /// Whether [other] describes the same execution as this event. bool isSameExecutionAs(MultisigProposalExecutedEvent other) { - if (extrinsicHash != null && - other.extrinsicHash != null && - extrinsicHash == other.extrinsicHash) { + if (extrinsicHash != null && other.extrinsicHash != null && extrinsicHash == other.extrinsicHash) { return true; } return id == other.id; @@ -114,10 +112,7 @@ class MultisigProposalExecutedEvent extends TransactionEvent { ); } - static MultisigAccount _minimalMultisigFromProposalJson( - Map proposalJson, - String myMemberAccountId, - ) { + static MultisigAccount _minimalMultisigFromProposalJson(Map proposalJson, String myMemberAccountId) { final multisigJson = jsonMapOrNull(proposalJson['multisig']); final address = nestedAccountId(multisigJson ?? proposalJson['multisig_id']); final signersRaw = multisigJson?['signers']; diff --git a/quantus_sdk/lib/src/models/pending_multisig_execution_event.dart b/quantus_sdk/lib/src/models/pending_multisig_execution_event.dart index b9896ae1..5cdd82ad 100644 --- a/quantus_sdk/lib/src/models/pending_multisig_execution_event.dart +++ b/quantus_sdk/lib/src/models/pending_multisig_execution_event.dart @@ -20,13 +20,7 @@ class PendingMultisigExecutionEvent extends TransactionEvent { this.fee, super.extrinsicHash, DateTime? timestamp, - }) : super( - id: tempId, - from: executorId, - to: recipient, - timestamp: timestamp ?? DateTime.now(), - blockNumber: 0, - ); + }) : super(id: tempId, from: executorId, to: recipient, timestamp: timestamp ?? DateTime.now(), blockNumber: 0); DateTime get submittedAt => timestamp; From db57a10f395ec2308bd6b7226a8a0f65aba76283 Mon Sep 17 00:00:00 2001 From: Beast Date: Thu, 11 Jun 2026 15:16:00 +0800 Subject: [PATCH 14/18] chore: revert back chain url --- quantus_sdk/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantus_sdk/pubspec.yaml b/quantus_sdk/pubspec.yaml index 72ba1ef3..175722fb 100644 --- a/quantus_sdk/pubspec.yaml +++ b/quantus_sdk/pubspec.yaml @@ -55,4 +55,4 @@ dev_dependencies: polkadart: output_dir: lib/generated chains: - planck: ws://127.0.0.1:9944 + planck: wss://a1-planck.quantus.cat From 05ced328f5727001b66ad0594d10d32c1ebc9e05 Mon Sep 17 00:00:00 2001 From: Beast Date: Thu, 11 Jun 2026 15:30:51 +0800 Subject: [PATCH 15/18] fix: code reviews --- mobile-app/lib/l10n/app_en.arb | 8 + mobile-app/lib/l10n/app_id.arb | 2 + mobile-app/lib/l10n/app_localizations.dart | 12 + mobile-app/lib/l10n/app_localizations_en.dart | 6 + mobile-app/lib/l10n/app_localizations_id.dart | 6 + .../multisig_execution_toast_provider.dart | 2 +- .../multisig_execution_polling_service.dart | 9 + .../multisig_approval_toast_listener.dart | 13 +- .../multisig_action_confirm_sheet.dart | 219 ++++++++++++++++++ .../multisig_approve_confirm_sheet.dart | 190 ++------------- .../multisig_execute_confirm_sheet.dart | 197 ++-------------- .../multisig_proposal_detail_sheet.dart | 6 +- quantus_sdk/test/multisig_service_test.dart | 70 ++---- 13 files changed, 332 insertions(+), 408 deletions(-) create mode 100644 mobile-app/lib/v2/screens/multisig/multisig_action_confirm_sheet.dart diff --git a/mobile-app/lib/l10n/app_en.arb b/mobile-app/lib/l10n/app_en.arb index 906f97da..597f6406 100644 --- a/mobile-app/lib/l10n/app_en.arb +++ b/mobile-app/lib/l10n/app_en.arb @@ -859,6 +859,14 @@ "@multisigExecutionTimeoutToast": { "description": "Toast when execution indexer polling times out" }, + "multisigExecutedByOtherToast": "Proposal was executed by another signer.", + "@multisigExecutedByOtherToast": { + "description": "Toast when a proposal is executed but not by this user's extrinsic" + }, + "multisigFeeEstimateUnavailable": "Network fee estimate is unavailable.", + "@multisigFeeEstimateUnavailable": { + "description": "Inline note on confirm sheet when fee estimation fails" + }, "multisigCancelConfirmTitle": "Cancel Proposal?", "@multisigCancelConfirmTitle": { "description": "Title on cancel confirmation sheet" diff --git a/mobile-app/lib/l10n/app_id.arb b/mobile-app/lib/l10n/app_id.arb index f4c6e864..fe329fac 100644 --- a/mobile-app/lib/l10n/app_id.arb +++ b/mobile-app/lib/l10n/app_id.arb @@ -196,6 +196,8 @@ "multisigProposalExecutingNote": "Eksekusi Anda sedang dikonfirmasi di chain.", "activityTxExecuting": "Mengeksekusi…", "multisigExecutionTimeoutToast": "Konfirmasi eksekusi membutuhkan waktu lebih lama. Periksa chain atau coba lagi.", + "multisigExecutedByOtherToast": "Proposal telah dieksekusi oleh penandatangan lain.", + "multisigFeeEstimateUnavailable": "Estimasi biaya jaringan tidak tersedia.", "multisigCancelConfirmTitle": "Batalkan Proposal?", "multisigCancelConfirmBody": "Pembatalan mengembalikan deposit proposal Anda. Penandatangan lain tidak dapat lagi menyetujui.", "multisigCancelConfirmYes": "Ya, Batalkan Proposal", diff --git a/mobile-app/lib/l10n/app_localizations.dart b/mobile-app/lib/l10n/app_localizations.dart index 065baa77..0b2b42a9 100644 --- a/mobile-app/lib/l10n/app_localizations.dart +++ b/mobile-app/lib/l10n/app_localizations.dart @@ -1208,6 +1208,18 @@ abstract class AppLocalizations { /// **'Execution confirmation is taking longer than expected. Check the chain or try again.'** String get multisigExecutionTimeoutToast; + /// Toast when a proposal is executed but not by this user's extrinsic + /// + /// In en, this message translates to: + /// **'Proposal was executed by another signer.'** + String get multisigExecutedByOtherToast; + + /// Inline note on confirm sheet when fee estimation fails + /// + /// In en, this message translates to: + /// **'Network fee estimate is unavailable.'** + String get multisigFeeEstimateUnavailable; + /// Title on cancel confirmation sheet /// /// In en, this message translates to: diff --git a/mobile-app/lib/l10n/app_localizations_en.dart b/mobile-app/lib/l10n/app_localizations_en.dart index c32c21fe..1f7a1a0b 100644 --- a/mobile-app/lib/l10n/app_localizations_en.dart +++ b/mobile-app/lib/l10n/app_localizations_en.dart @@ -609,6 +609,12 @@ class AppLocalizationsEn extends AppLocalizations { String get multisigExecutionTimeoutToast => 'Execution confirmation is taking longer than expected. Check the chain or try again.'; + @override + String get multisigExecutedByOtherToast => 'Proposal was executed by another signer.'; + + @override + String get multisigFeeEstimateUnavailable => 'Network fee estimate is unavailable.'; + @override String get multisigCancelConfirmTitle => 'Cancel Proposal?'; diff --git a/mobile-app/lib/l10n/app_localizations_id.dart b/mobile-app/lib/l10n/app_localizations_id.dart index 3bd796fc..be7df7e0 100644 --- a/mobile-app/lib/l10n/app_localizations_id.dart +++ b/mobile-app/lib/l10n/app_localizations_id.dart @@ -611,6 +611,12 @@ class AppLocalizationsId extends AppLocalizations { String get multisigExecutionTimeoutToast => 'Konfirmasi eksekusi membutuhkan waktu lebih lama. Periksa chain atau coba lagi.'; + @override + String get multisigExecutedByOtherToast => 'Proposal telah dieksekusi oleh penandatangan lain.'; + + @override + String get multisigFeeEstimateUnavailable => 'Estimasi biaya jaringan tidak tersedia.'; + @override String get multisigCancelConfirmTitle => 'Batalkan Proposal?'; diff --git a/mobile-app/lib/providers/multisig_execution_toast_provider.dart b/mobile-app/lib/providers/multisig_execution_toast_provider.dart index d07ae999..9a3b565d 100644 --- a/mobile-app/lib/providers/multisig_execution_toast_provider.dart +++ b/mobile-app/lib/providers/multisig_execution_toast_provider.dart @@ -1,6 +1,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; -enum MultisigExecutionToastKind { timeout, submitFailed } +enum MultisigExecutionToastKind { timeout, submitFailed, executedByOther } class MultisigExecutionToastEvent { const MultisigExecutionToastEvent(this.kind); diff --git a/mobile-app/lib/services/multisig_execution_polling_service.dart b/mobile-app/lib/services/multisig_execution_polling_service.dart index e5040442..000573de 100644 --- a/mobile-app/lib/services/multisig_execution_polling_service.dart +++ b/mobile-app/lib/services/multisig_execution_polling_service.dart @@ -54,6 +54,15 @@ Future _tryResolveExecutionTimeout(Ref ref, MultisigAccount msig, PendingM } } + // The proposal is executed but this user's own extrinsic was never indexed: + // another signer most likely executed first and this user's submission + // failed on-chain. Surface that instead of resolving silently. + quantusDebugPrint( + '[MultisigExecutionPoller] proposal ${pending.proposalId} executed but extrinsic ' + '${hash ?? '(no hash)'} not indexed; likely executed by another signer', + ); + ref.read(multisigExecutionToastProvider.notifier).show(MultisigExecutionToastKind.executedByOther); + invalidateAccountBalances(ref, {pending.executorId, msig.accountId}); return true; } diff --git a/mobile-app/lib/v2/components/multisig_approval_toast_listener.dart b/mobile-app/lib/v2/components/multisig_approval_toast_listener.dart index 34dd2bb5..f29d496a 100644 --- a/mobile-app/lib/v2/components/multisig_approval_toast_listener.dart +++ b/mobile-app/lib/v2/components/multisig_approval_toast_listener.dart @@ -27,11 +27,14 @@ class MultisigApprovalToastListener extends ConsumerWidget { ref.listen(multisigExecutionToastProvider, (previous, next) { if (next == null) return; final l10n = ref.read(l10nProvider); - final message = switch (next.kind) { - MultisigExecutionToastKind.timeout => l10n.multisigExecutionTimeoutToast, - MultisigExecutionToastKind.submitFailed => l10n.multisigExecuteFailed, - }; - context.showErrorToaster(message: message); + switch (next.kind) { + case MultisigExecutionToastKind.timeout: + context.showErrorToaster(message: l10n.multisigExecutionTimeoutToast); + case MultisigExecutionToastKind.submitFailed: + context.showErrorToaster(message: l10n.multisigExecuteFailed); + case MultisigExecutionToastKind.executedByOther: + context.showInfoToaster(message: l10n.multisigExecutedByOtherToast); + } ref.read(multisigExecutionToastProvider.notifier).clear(); }); diff --git a/mobile-app/lib/v2/screens/multisig/multisig_action_confirm_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_action_confirm_sheet.dart new file mode 100644 index 00000000..de46dd5b --- /dev/null +++ b/mobile-app/lib/v2/screens/multisig/multisig_action_confirm_sheet.dart @@ -0,0 +1,219 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/l10n/app_localizations.dart'; +import 'package:resonance_network_wallet/providers/account_providers.dart'; +import 'package:resonance_network_wallet/providers/l10n_provider.dart'; +import 'package:resonance_network_wallet/providers/multisig_providers.dart'; +import 'package:resonance_network_wallet/providers/wallet_providers.dart'; +import 'package:resonance_network_wallet/services/local_auth_service.dart'; +import 'package:resonance_network_wallet/shared/utils/print.dart'; +import 'package:resonance_network_wallet/v2/components/bottom_sheet_container.dart'; +import 'package:resonance_network_wallet/v2/components/detail_summary_row.dart'; +import 'package:resonance_network_wallet/v2/components/quantus_button.dart'; +import 'package:resonance_network_wallet/v2/theme/app_colors.dart'; +import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart'; + +/// Estimates the network fee for the action being confirmed. +typedef MultisigConfirmFeeEstimator = Future Function(WidgetRef ref, Account signer); + +/// Submits the action being confirmed. +typedef MultisigConfirmSubmitter = Future Function(WidgetRef ref, Account signer, BigInt? fee); + +/// Localized labels for a multisig confirmation sheet. +/// +/// Resolved lazily against the current [AppLocalizations] so the sheet stays +/// correct if the locale changes while it is open. +class MultisigConfirmSheetLabels { + final String Function(AppLocalizations) title; + final String Function(AppLocalizations) body; + final String Function(AppLocalizations) confirmLabel; + final String Function(AppLocalizations) authReason; + final String Function(AppLocalizations) failedMessage; + + const MultisigConfirmSheetLabels({ + required this.title, + required this.body, + required this.confirmLabel, + required this.authReason, + required this.failedMessage, + }); +} + +/// Shared confirmation sheet for multisig proposal actions (approve, execute). +/// +/// Handles signer lookup, fee estimation, local authentication, and submission; +/// callers supply only labels and the action-specific callbacks. +class MultisigActionConfirmSheet extends ConsumerStatefulWidget { + final MultisigAccount msig; + final MultisigProposal proposal; + final MultisigConfirmSheetLabels labels; + final MultisigConfirmFeeEstimator estimateFee; + final MultisigConfirmSubmitter submit; + + /// Prefix for debug log messages, e.g. `[MultisigApprove]`. + final String logPrefix; + + const MultisigActionConfirmSheet({ + super.key, + required this.msig, + required this.proposal, + required this.labels, + required this.estimateFee, + required this.submit, + required this.logPrefix, + }); + + @override + ConsumerState createState() => _MultisigActionConfirmSheetState(); +} + +class _MultisigActionConfirmSheetState extends ConsumerState { + bool _submitting = false; + String? _errorMessage; + BigInt? _networkFee; + bool _loadingFee = true; + bool _feeEstimateFailed = false; + + @override + void initState() { + super.initState(); + unawaited(_loadNetworkFee()); + } + + Account _requireSigner() { + final signer = ref + .read(accountsProvider) + .value + ?.firstWhere( + (a) => a.accountId == widget.msig.myMemberAccountId, + orElse: () => throw Exception('Member account not found in local wallet'), + ); + if (signer == null) throw Exception('No signer account available'); + return signer; + } + + Future _loadNetworkFee() async { + try { + final fee = await widget.estimateFee(ref, _requireSigner()); + + if (!mounted) return; + setState(() { + _networkFee = fee; + _loadingFee = false; + }); + } catch (e, st) { + quantusDebugPrint('${widget.logPrefix} fee estimate error: $e $st'); + if (!mounted) return; + setState(() { + _loadingFee = false; + _feeEstimateFailed = true; + }); + } + } + + Future _confirm() async { + setState(() { + _submitting = true; + _errorMessage = null; + }); + + final l10n = ref.read(l10nProvider); + final authed = await LocalAuthService().authenticate(localizedReason: widget.labels.authReason(l10n)); + if (!mounted) return; + if (!authed) { + setState(() { + _submitting = false; + _errorMessage = l10n.multisigApproveAuthRequired; + }); + return; + } + + try { + await widget.submit(ref, _requireSigner(), _networkFee); + + if (!mounted) return; + ref.invalidate(multisigOpenProposalsProvider(widget.msig)); + ref.invalidate(multisigCurrentBlockProvider); + Navigator.pop(context); + } catch (e, st) { + quantusDebugPrint('${widget.logPrefix} submit error: $e $st'); + if (!mounted) return; + setState(() { + _submitting = false; + _errorMessage = widget.labels.failedMessage(l10n); + }); + } + } + + String? _networkFeeLabel(AppLocalizations l10n, NumberFormattingService fmt) { + if (_loadingFee) return '…'; + if (_networkFee == null) return null; + return l10n.commonAmountBalance( + fmt.formatBalance(_networkFee!, maxDecimals: AppConstants.decimals), + AppConstants.tokenSymbol, + ); + } + + @override + Widget build(BuildContext context) { + final l10n = ref.watch(l10nProvider); + final colors = context.colors; + final text = context.themeText; + final fmt = ref.watch(numberFormattingServiceProvider); + final valueStyle = text.transactionDetailRowLabel; + final amountText = l10n.commonAmountBalance( + fmt.formatBalance(widget.proposal.amount, maxDecimals: AppConstants.decimals), + AppConstants.tokenSymbol, + ); + final recipient = AddressFormattingService.formatActivityDetailAddress(widget.proposal.recipient); + final networkFeeLabel = _networkFeeLabel(l10n, fmt); + + return BottomSheetContainer( + title: widget.labels.title(l10n), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisSize: MainAxisSize.min, + children: [ + const SizedBox(height: 16), + Text(widget.labels.body(l10n), style: text.paragraph?.copyWith(color: colors.textPrimary)), + const SizedBox(height: 8), + Text(amountText, style: text.smallTitle?.copyWith(color: colors.textPrimary)), + const SizedBox(height: 8), + Text( + l10n.multisigApproveConfirmTo(recipient), + style: text.smallParagraph?.copyWith(color: colors.textTertiary), + ), + if (networkFeeLabel != null) ...[ + const SizedBox(height: 16), + DetailSummaryRow.review(label: l10n.sendReviewNetworkFee, value: networkFeeLabel, valueStyle: valueStyle), + ], + if (_feeEstimateFailed) ...[ + const SizedBox(height: 16), + Text(l10n.multisigFeeEstimateUnavailable, style: text.detail?.copyWith(color: colors.textTertiary)), + ], + if (_errorMessage != null) ...[ + const SizedBox(height: 16), + Text(_errorMessage!, style: text.detail?.copyWith(color: colors.textError)), + ], + const SizedBox(height: 24), + QuantusButton.simple( + label: widget.labels.confirmLabel(l10n), + isDisabled: _submitting, + onTap: _submitting ? null : _confirm, + ), + const SizedBox(height: 12), + QuantusButton.simple( + label: l10n.multisigApproveConfirmNo, + variant: ButtonVariant.secondary, + isDisabled: _submitting, + onTap: _submitting ? null : () => Navigator.pop(context), + ), + const SizedBox(height: 8), + ], + ), + ); + } +} diff --git a/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart index 16fcd9ab..f40a0b48 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart @@ -1,21 +1,11 @@ -import 'dart:async'; - import 'package:flutter/material.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; -import 'package:resonance_network_wallet/l10n/app_localizations.dart'; -import 'package:resonance_network_wallet/providers/account_providers.dart'; -import 'package:resonance_network_wallet/providers/wallet_providers.dart'; -import 'package:resonance_network_wallet/providers/l10n_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; -import 'package:resonance_network_wallet/services/local_auth_service.dart'; import 'package:resonance_network_wallet/services/transaction_submission_service.dart'; import 'package:resonance_network_wallet/v2/components/bottom_sheet_container.dart'; -import 'package:resonance_network_wallet/v2/components/detail_summary_row.dart'; -import 'package:resonance_network_wallet/v2/components/quantus_button.dart'; -import 'package:resonance_network_wallet/v2/theme/app_colors.dart'; -import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart'; +import 'package:resonance_network_wallet/v2/screens/multisig/multisig_action_confirm_sheet.dart'; +/// Shows the confirmation sheet for approving a multisig proposal. void showMultisigApproveConfirmSheet( BuildContext context, { required MultisigAccount msig, @@ -23,165 +13,21 @@ void showMultisigApproveConfirmSheet( }) { BottomSheetContainer.show( context, - builder: (_) => _MultisigApproveConfirmSheet(msig: msig, proposal: proposal), - ); -} - -class _MultisigApproveConfirmSheet extends ConsumerStatefulWidget { - final MultisigAccount msig; - final MultisigProposal proposal; - - const _MultisigApproveConfirmSheet({required this.msig, required this.proposal}); - - @override - ConsumerState<_MultisigApproveConfirmSheet> createState() => _MultisigApproveConfirmSheetState(); -} - -class _MultisigApproveConfirmSheetState extends ConsumerState<_MultisigApproveConfirmSheet> { - bool _submitting = false; - String? _errorMessage; - BigInt? _networkFee; - bool _loadingFee = true; - - @override - void initState() { - super.initState(); - unawaited(_loadNetworkFee()); - } - - Future _loadNetworkFee() async { - try { - final signer = ref - .read(accountsProvider) - .value - ?.firstWhere( - (a) => a.accountId == widget.msig.myMemberAccountId, - orElse: () => throw Exception('Member account not found in local wallet'), - ); - if (signer == null) throw Exception('No signer account available'); - - final fee = await ref - .read(multisigServiceProvider) - .estimateApproveFee(msig: widget.msig, signer: signer, proposalId: widget.proposal.id); - - if (!mounted) return; - setState(() { - _networkFee = fee; - _loadingFee = false; - }); - } catch (e, st) { - debugPrint('Approve fee estimate error: $e $st'); - if (!mounted) return; - setState(() => _loadingFee = false); - } - } - - Future _confirm() async { - setState(() { - _submitting = true; - _errorMessage = null; - }); - - final l10n = ref.read(l10nProvider); - final authed = await LocalAuthService().authenticate(localizedReason: l10n.multisigApproveAuthReason); - if (!authed || !mounted) { - setState(() { - _submitting = false; - _errorMessage = l10n.multisigApproveAuthRequired; - }); - return; - } - - try { - final signer = ref - .read(accountsProvider) - .value - ?.firstWhere( - (a) => a.accountId == widget.msig.myMemberAccountId, - orElse: () => throw Exception('Member account not found in local wallet'), - ); - if (signer == null) throw Exception('No signer account available'); - - await ref - .read(transactionSubmissionServiceProvider) - .approveProposal(msig: widget.msig, signer: signer, proposal: widget.proposal); - - if (!mounted) return; - ref.invalidate(multisigOpenProposalsProvider(widget.msig)); - ref.invalidate(multisigCurrentBlockProvider); - Navigator.pop(context); - } catch (e, st) { - debugPrint('Approve submit error: $e $st'); - if (!mounted) return; - setState(() { - _submitting = false; - _errorMessage = l10n.multisigApproveFailed; - }); - } - } - - String? _networkFeeLabel(AppLocalizations l10n, NumberFormattingService fmt) { - if (_loadingFee) return '…'; - if (_networkFee == null) return null; - return l10n.commonAmountBalance( - fmt.formatBalance(_networkFee!, maxDecimals: AppConstants.decimals), - AppConstants.tokenSymbol, - ); - } - - @override - Widget build(BuildContext context) { - final l10n = ref.watch(l10nProvider); - final colors = context.colors; - final text = context.themeText; - final fmt = ref.watch(numberFormattingServiceProvider); - final valueStyle = text.transactionDetailRowLabel; - final amountText = l10n.commonAmountBalance( - fmt.formatBalance(widget.proposal.amount, maxDecimals: AppConstants.decimals), - AppConstants.tokenSymbol, - ); - final recipient = AddressFormattingService.formatActivityDetailAddress(widget.proposal.recipient); - final networkFeeLabel = _networkFeeLabel(l10n, fmt); - - return BottomSheetContainer( - title: l10n.multisigApproveConfirmTitle, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - mainAxisSize: MainAxisSize.min, - children: [ - const SizedBox(height: 16), - Text(l10n.multisigApproveConfirmBody, style: text.paragraph?.copyWith(color: colors.textPrimary)), - const SizedBox(height: 8), - Text(amountText, style: text.smallTitle?.copyWith(color: colors.textPrimary)), - const SizedBox(height: 8), - Text( - l10n.multisigApproveConfirmTo(recipient), - style: text.smallParagraph?.copyWith(color: colors.textTertiary), - ), - if (networkFeeLabel != null) ...[ - const SizedBox(height: 16), - DetailSummaryRow.review(label: l10n.sendReviewNetworkFee, value: networkFeeLabel, valueStyle: valueStyle), - ], - if (_errorMessage != null) ...[ - const SizedBox(height: 16), - Text(_errorMessage!, style: text.detail?.copyWith(color: colors.textError)), - ], - const SizedBox(height: 24), - QuantusButton.simple( - label: l10n.multisigApproveConfirmYes, - isDisabled: _submitting, - onTap: _submitting ? null : _confirm, - ), - const SizedBox(height: 12), - QuantusButton.simple( - label: l10n.multisigApproveConfirmNo, - variant: ButtonVariant.secondary, - isDisabled: _submitting, - onTap: _submitting ? null : () => Navigator.pop(context), - ), - const SizedBox(height: 8), - ], + builder: (_) => MultisigActionConfirmSheet( + msig: msig, + proposal: proposal, + logPrefix: '[MultisigApprove]', + labels: MultisigConfirmSheetLabels( + title: (l10n) => l10n.multisigApproveConfirmTitle, + body: (l10n) => l10n.multisigApproveConfirmBody, + confirmLabel: (l10n) => l10n.multisigApproveConfirmYes, + authReason: (l10n) => l10n.multisigApproveAuthReason, + failedMessage: (l10n) => l10n.multisigApproveFailed, ), - ); - } + estimateFee: (ref, signer) => + ref.read(multisigServiceProvider).estimateApproveFee(msig: msig, signer: signer, proposalId: proposal.id), + submit: (ref, signer, fee) => + ref.read(transactionSubmissionServiceProvider).approveProposal(msig: msig, signer: signer, proposal: proposal), + ), + ); } diff --git a/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart index 241a89c5..548c8060 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_execute_confirm_sheet.dart @@ -1,21 +1,11 @@ -import 'dart:async'; - import 'package:flutter/material.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; -import 'package:resonance_network_wallet/l10n/app_localizations.dart'; -import 'package:resonance_network_wallet/providers/account_providers.dart'; -import 'package:resonance_network_wallet/providers/l10n_provider.dart'; import 'package:resonance_network_wallet/providers/multisig_providers.dart'; -import 'package:resonance_network_wallet/providers/wallet_providers.dart'; -import 'package:resonance_network_wallet/services/local_auth_service.dart'; import 'package:resonance_network_wallet/services/transaction_submission_service.dart'; import 'package:resonance_network_wallet/v2/components/bottom_sheet_container.dart'; -import 'package:resonance_network_wallet/v2/components/detail_summary_row.dart'; -import 'package:resonance_network_wallet/v2/components/quantus_button.dart'; -import 'package:resonance_network_wallet/v2/theme/app_colors.dart'; -import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart'; +import 'package:resonance_network_wallet/v2/screens/multisig/multisig_action_confirm_sheet.dart'; +/// Shows the confirmation sheet for executing an approved multisig proposal. void showMultisigExecuteConfirmSheet( BuildContext context, { required MultisigAccount msig, @@ -23,171 +13,22 @@ void showMultisigExecuteConfirmSheet( }) { BottomSheetContainer.show( context, - builder: (_) => _MultisigExecuteConfirmSheet(msig: msig, proposal: proposal), - ); -} - -class _MultisigExecuteConfirmSheet extends ConsumerStatefulWidget { - final MultisigAccount msig; - final MultisigProposal proposal; - - const _MultisigExecuteConfirmSheet({required this.msig, required this.proposal}); - - @override - ConsumerState<_MultisigExecuteConfirmSheet> createState() => _MultisigExecuteConfirmSheetState(); -} - -class _MultisigExecuteConfirmSheetState extends ConsumerState<_MultisigExecuteConfirmSheet> { - bool _submitting = false; - String? _errorMessage; - BigInt? _networkFee; - bool _loadingFee = true; - - @override - void initState() { - super.initState(); - unawaited(_loadNetworkFee()); - } - - Future _loadNetworkFee() async { - print('loading network fee proposal id: ${widget.proposal.id}'); - - try { - final signer = ref - .read(accountsProvider) - .value - ?.firstWhere( - (a) => a.accountId == widget.msig.myMemberAccountId, - orElse: () => throw Exception('Member account not found in local wallet'), - ); - if (signer == null) throw Exception('No signer account available'); - - final fee = await ref - .read(multisigServiceProvider) - .estimateExecuteFee(msig: widget.msig, signer: signer, proposalId: widget.proposal.id); - - if (!mounted) return; - setState(() { - _networkFee = fee; - _loadingFee = false; - }); - } catch (e, st) { - debugPrint('Execute fee estimate error: $e $st'); - if (!mounted) return; - setState(() => _loadingFee = false); - } - } - - Future _confirm() async { - setState(() { - _submitting = true; - _errorMessage = null; - }); - - final l10n = ref.read(l10nProvider); - final authed = await LocalAuthService().authenticate(localizedReason: l10n.multisigExecuteAuthReason); - if (!authed || !mounted) { - setState(() { - _submitting = false; - _errorMessage = l10n.multisigApproveAuthRequired; - }); - return; - } - - try { - final signer = ref - .read(accountsProvider) - .value - ?.firstWhere( - (a) => a.accountId == widget.msig.myMemberAccountId, - orElse: () => throw Exception('Member account not found in local wallet'), - ); - if (signer == null) throw Exception('No signer account available'); - - print('executing proposal id: ${widget.proposal.id}'); - print('msig: ${widget.msig.accountId}'); - print('signer: ${signer.accountId}'); - - await ref - .read(transactionSubmissionServiceProvider) - .executeProposal(msig: widget.msig, signer: signer, proposal: widget.proposal, fee: _networkFee); - - if (!mounted) return; - ref.invalidate(multisigOpenProposalsProvider(widget.msig)); - ref.invalidate(multisigCurrentBlockProvider); - Navigator.pop(context); - } catch (e, st) { - debugPrint('Execute submit error: $e $st'); - if (!mounted) return; - setState(() { - _submitting = false; - _errorMessage = l10n.multisigExecuteFailed; - }); - } - } - - String? _networkFeeLabel(AppLocalizations l10n, NumberFormattingService fmt) { - if (_loadingFee) return '…'; - if (_networkFee == null) return null; - return l10n.commonAmountBalance( - fmt.formatBalance(_networkFee!, maxDecimals: AppConstants.decimals), - AppConstants.tokenSymbol, - ); - } - - @override - Widget build(BuildContext context) { - final l10n = ref.watch(l10nProvider); - final colors = context.colors; - final text = context.themeText; - final fmt = ref.watch(numberFormattingServiceProvider); - final valueStyle = text.transactionDetailRowLabel; - final amountText = l10n.commonAmountBalance( - fmt.formatBalance(widget.proposal.amount, maxDecimals: AppConstants.decimals), - AppConstants.tokenSymbol, - ); - final recipient = AddressFormattingService.formatActivityDetailAddress(widget.proposal.recipient); - final networkFeeLabel = _networkFeeLabel(l10n, fmt); - - return BottomSheetContainer( - title: l10n.multisigExecuteConfirmTitle, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - mainAxisSize: MainAxisSize.min, - children: [ - const SizedBox(height: 16), - Text(l10n.multisigExecuteConfirmBody, style: text.paragraph?.copyWith(color: colors.textPrimary)), - const SizedBox(height: 8), - Text(amountText, style: text.smallTitle?.copyWith(color: colors.textPrimary)), - const SizedBox(height: 8), - Text( - l10n.multisigApproveConfirmTo(recipient), - style: text.smallParagraph?.copyWith(color: colors.textTertiary), - ), - if (networkFeeLabel != null) ...[ - const SizedBox(height: 16), - DetailSummaryRow.review(label: l10n.sendReviewNetworkFee, value: networkFeeLabel, valueStyle: valueStyle), - ], - if (_errorMessage != null) ...[ - const SizedBox(height: 16), - Text(_errorMessage!, style: text.detail?.copyWith(color: colors.textError)), - ], - const SizedBox(height: 24), - QuantusButton.simple( - label: l10n.multisigExecuteConfirmYes, - isDisabled: _submitting, - onTap: _submitting ? null : _confirm, - ), - const SizedBox(height: 12), - QuantusButton.simple( - label: l10n.multisigApproveConfirmNo, - variant: ButtonVariant.secondary, - isDisabled: _submitting, - onTap: _submitting ? null : () => Navigator.pop(context), - ), - const SizedBox(height: 8), - ], + builder: (_) => MultisigActionConfirmSheet( + msig: msig, + proposal: proposal, + logPrefix: '[MultisigExecute]', + labels: MultisigConfirmSheetLabels( + title: (l10n) => l10n.multisigExecuteConfirmTitle, + body: (l10n) => l10n.multisigExecuteConfirmBody, + confirmLabel: (l10n) => l10n.multisigExecuteConfirmYes, + authReason: (l10n) => l10n.multisigExecuteAuthReason, + failedMessage: (l10n) => l10n.multisigExecuteFailed, ), - ); - } + estimateFee: (ref, signer) => + ref.read(multisigServiceProvider).estimateExecuteFee(msig: msig, signer: signer, proposalId: proposal.id), + submit: (ref, signer, fee) => ref + .read(transactionSubmissionServiceProvider) + .executeProposal(msig: msig, signer: signer, proposal: proposal, fee: fee), + ), + ); } diff --git a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart index dd16b56d..6f0077aa 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_proposal_detail_sheet.dart @@ -350,8 +350,7 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { final note = switch ((didApprove, isPending, isActionable, hasLocalSigner)) { (true, _, _, _) => l10n.multisigProposalAlreadySignedNote, (_, true, _, _) => l10n.multisigProposalApprovingNote, - (_, _, false, _) => l10n.multisigApproveUnavailableNote, - (_, _, _, false) => l10n.multisigApproveUnavailableNote, + (_, _, false, _) || (_, _, _, false) => l10n.multisigApproveUnavailableNote, _ => '', }; @@ -383,8 +382,7 @@ class _MultisigProposalDetailSheet extends ConsumerWidget { final note = switch ((isPending, isActionable, hasLocalSigner)) { (true, _, _) => l10n.multisigProposalExecutingNote, - (_, false, _) => l10n.multisigExecuteUnavailableNote, - (_, _, false) => l10n.multisigExecuteUnavailableNote, + (_, false, _) || (_, _, false) => l10n.multisigExecuteUnavailableNote, _ => '', }; diff --git a/quantus_sdk/test/multisig_service_test.dart b/quantus_sdk/test/multisig_service_test.dart index 9e1941bc..9f0678bf 100644 --- a/quantus_sdk/test/multisig_service_test.dart +++ b/quantus_sdk/test/multisig_service_test.dart @@ -332,6 +332,7 @@ void main() { 'id': '5Multisig-1', 'proposal_id': 1, 'created_at': '2026-06-04T10:00:00.000Z', + 'updated_at': '2026-06-04T10:00:00.000Z', 'pallet': 'Balances', 'call': 'transfer_allow_death', 'call_raw': '0x0500', @@ -360,6 +361,7 @@ void main() { 'id': '5Multisig-9', 'proposal_id': 9, 'created_at': '2026-06-04T10:00:00.000Z', + 'updated_at': '2026-06-04T10:00:00.000Z', 'pallet': 'Balances', 'call': 'transfer_allow_death', 'call_raw': '0x0500', @@ -381,6 +383,7 @@ void main() { 'id': '5Multisig-3', 'proposal_id': 3, 'created_at': '2026-06-04T10:00:00.000Z', + 'updated_at': '2026-06-04T10:00:00.000Z', 'pallet': 'Balances', 'call': 'transfer_allow_death', 'call_raw': '0x0500', @@ -402,6 +405,7 @@ void main() { 'id': '5Multisig-2', 'proposal_id': 2, 'created_at': '2026-06-04T10:00:00.000Z', + 'updated_at': '2026-06-04T10:00:00.000Z', 'pallet': 'Balances', 'call': 'transfer_allow_death', 'call_raw': '0x0500', @@ -476,61 +480,15 @@ void main() { }); group('MultisigService.buildApproveCall', () { - const signerA = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'; - const signerB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty'; - const multisigAddress = '5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy'; - - final msig = MultisigAccount( - name: 'Team', - accountId: multisigAddress, - signers: [signerA, signerB], - threshold: 2, - nonce: BigInt.zero, - myMemberAccountId: signerB, - ); - test('returns a Multisig runtime call for valid params', () { - final call = MultisigService().buildApproveCall(msig: msig, proposalId: 3); + final call = MultisigService().buildApproveCall(msig: _buildTestMsig(), proposalId: 3); expect(call.encode().isNotEmpty, isTrue); }); }); group('MultisigService.buildExecuteCall', () { - const signerA = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'; - const signerB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty'; - const multisigAddress = '5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy'; - - final msig = MultisigAccount( - name: 'Team', - accountId: multisigAddress, - signers: [signerA, signerB], - threshold: 2, - nonce: BigInt.zero, - myMemberAccountId: signerB, - ); - test('returns a Multisig runtime call for valid params', () { - final call = MultisigService().buildExecuteCall(msig: msig, proposalId: 3); - expect(call.encode().isNotEmpty, isTrue); - }); - }); - - group('MultisigService.buildApproveCall', () { - const signerA = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'; - const signerB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty'; - const multisigAddress = '5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy'; - - final msig = MultisigAccount( - name: 'Team', - accountId: multisigAddress, - signers: [signerA, signerB], - threshold: 2, - nonce: BigInt.zero, - myMemberAccountId: signerB, - ); - - test('returns a Multisig runtime call for valid params', () { - final call = MultisigService().buildApproveCall(msig: msig, proposalId: 3); + final call = MultisigService().buildExecuteCall(msig: _buildTestMsig(), proposalId: 3); expect(call.encode().isNotEmpty, isTrue); }); }); @@ -591,3 +549,19 @@ void main() { }); }); } + +/// Two-signer multisig fixture shared by the call-building test groups. +MultisigAccount _buildTestMsig() { + const signerA = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'; + const signerB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty'; + const multisigAddress = '5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy'; + + return MultisigAccount( + name: 'Team', + accountId: multisigAddress, + signers: [signerA, signerB], + threshold: 2, + nonce: BigInt.zero, + myMemberAccountId: signerB, + ); +} From 85179c611126120f433afadf3d0b5f4da7ccb739 Mon Sep 17 00:00:00 2001 From: Beast Date: Thu, 11 Jun 2026 15:55:04 +0800 Subject: [PATCH 16/18] fix: execute event query and data model --- mobile-app/lib/generated/version.g.dart | 4 ++-- quantus_sdk/lib/src/constants/app_constants.dart | 16 ++++++++-------- .../models/multisig_proposal_executed_event.dart | 2 +- .../lib/src/services/multisig_graphql.dart | 6 +++--- quantus_sdk/test/chain_history_service_test.dart | 6 ++++-- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/mobile-app/lib/generated/version.g.dart b/mobile-app/lib/generated/version.g.dart index fb378784..0018d332 100644 --- a/mobile-app/lib/generated/version.g.dart +++ b/mobile-app/lib/generated/version.g.dart @@ -1,2 +1,2 @@ -const appVersion = '1.5.1'; -const appBuildNumber = '109'; +const appVersion = '1.5.2'; +const appBuildNumber = '110'; diff --git a/quantus_sdk/lib/src/constants/app_constants.dart b/quantus_sdk/lib/src/constants/app_constants.dart index fb540687..34a3935e 100644 --- a/quantus_sdk/lib/src/constants/app_constants.dart +++ b/quantus_sdk/lib/src/constants/app_constants.dart @@ -8,16 +8,16 @@ class AppConstants { static const String emailSupport = 'support@quantus.com'; static const String telegramHandle = '@quantusnetwork'; - // static const List rpcEndpoints = ['http://127.0.0.1:9944']; // local testing - // static const List graphQlEndpoints = ['http://127.0.0.1:4350/v1/graphql']; // local testing + static const List rpcEndpoints = ['http://127.0.0.1:9944']; // local testing + static const List graphQlEndpoints = ['http://127.0.0.1:4350/v1/graphql']; // local testing static const stillOnTestnet = true; - static const List rpcEndpoints = [ - 'https://a1-planck.quantus.cat', - 'https://a2-planck.quantus.cat', - 'https://matcha-latte.quantus.com', - ]; - static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; + // static const List rpcEndpoints = [ + // 'https://a1-planck.quantus.cat', + // 'https://a2-planck.quantus.cat', + // 'https://matcha-latte.quantus.com', + // ]; + // static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; // local test android use special ip // static const String taskMasterEndpoint = 'http://10.0.2.2:3000/api'; diff --git a/quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart b/quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart index 4e230262..328f33ad 100644 --- a/quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart +++ b/quantus_sdk/lib/src/models/multisig_proposal_executed_event.dart @@ -72,7 +72,7 @@ class MultisigProposalExecutedEvent extends TransactionEvent { }) { final proposalJson = jsonMapOrNull(executed['proposal']); MultisigProposal? proposal; - String executorId = nestedAccountId(executed['executedBy'] ?? executed['executed_by']); + String executorId = jsonMapOrNull(executed['extrinsic'])?['signer']?['id']; String multisigAddress = ''; String recipient = ''; BigInt amount = BigInt.zero; diff --git a/quantus_sdk/lib/src/services/multisig_graphql.dart b/quantus_sdk/lib/src/services/multisig_graphql.dart index 40674617..308872c4 100644 --- a/quantus_sdk/lib/src/services/multisig_graphql.dart +++ b/quantus_sdk/lib/src/services/multisig_graphql.dart @@ -96,9 +96,9 @@ ${MultisigProposalGraphql.fields} } } extrinsic { id - } - executedBy { - id + signer { + id + } } proposal { ${MultisigProposalGraphql.fields} } diff --git a/quantus_sdk/test/chain_history_service_test.dart b/quantus_sdk/test/chain_history_service_test.dart index fa68859f..f0f3467c 100644 --- a/quantus_sdk/test/chain_history_service_test.dart +++ b/quantus_sdk/test/chain_history_service_test.dart @@ -148,8 +148,10 @@ void main() { ], 'timestamp': '2026-06-03T12:00:00.000+00:00', 'block': {'height': 258, 'hash': '0xexec'}, - 'extrinsic': {'id': '0xexecutehash'}, - 'executedBy': {'id': 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y'}, + 'extrinsic': { + 'id': '0xexecutehash', + 'signer': {'id': 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y'}, + }, 'proposal': { 'id': 'proposal-entity-1', 'proposal_id': 5, From d1acbb53e2e3bf65491d90561ee38d901aa3b382 Mon Sep 17 00:00:00 2001 From: Beast Date: Thu, 11 Jun 2026 15:55:44 +0800 Subject: [PATCH 17/18] chore: revert constants --- quantus_sdk/lib/src/constants/app_constants.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/quantus_sdk/lib/src/constants/app_constants.dart b/quantus_sdk/lib/src/constants/app_constants.dart index 34a3935e..fb540687 100644 --- a/quantus_sdk/lib/src/constants/app_constants.dart +++ b/quantus_sdk/lib/src/constants/app_constants.dart @@ -8,16 +8,16 @@ class AppConstants { static const String emailSupport = 'support@quantus.com'; static const String telegramHandle = '@quantusnetwork'; - static const List rpcEndpoints = ['http://127.0.0.1:9944']; // local testing - static const List graphQlEndpoints = ['http://127.0.0.1:4350/v1/graphql']; // local testing + // static const List rpcEndpoints = ['http://127.0.0.1:9944']; // local testing + // static const List graphQlEndpoints = ['http://127.0.0.1:4350/v1/graphql']; // local testing static const stillOnTestnet = true; - // static const List rpcEndpoints = [ - // 'https://a1-planck.quantus.cat', - // 'https://a2-planck.quantus.cat', - // 'https://matcha-latte.quantus.com', - // ]; - // static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; + static const List rpcEndpoints = [ + 'https://a1-planck.quantus.cat', + 'https://a2-planck.quantus.cat', + 'https://matcha-latte.quantus.com', + ]; + static const List graphQlEndpoints = ['https://sub2.quantus.com/v1/graphql']; // local test android use special ip // static const String taskMasterEndpoint = 'http://10.0.2.2:3000/api'; From 02fb52333bb3a51fa16996c3e3906d6b84b479c8 Mon Sep 17 00:00:00 2001 From: Beast Date: Thu, 11 Jun 2026 15:56:23 +0800 Subject: [PATCH 18/18] chore: formatting --- .../v2/screens/multisig/multisig_approve_confirm_sheet.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart b/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart index f40a0b48..4e4c3d93 100644 --- a/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart +++ b/mobile-app/lib/v2/screens/multisig/multisig_approve_confirm_sheet.dart @@ -26,8 +26,9 @@ void showMultisigApproveConfirmSheet( ), estimateFee: (ref, signer) => ref.read(multisigServiceProvider).estimateApproveFee(msig: msig, signer: signer, proposalId: proposal.id), - submit: (ref, signer, fee) => - ref.read(transactionSubmissionServiceProvider).approveProposal(msig: msig, signer: signer, proposal: proposal), + submit: (ref, signer, fee) => ref + .read(transactionSubmissionServiceProvider) + .approveProposal(msig: msig, signer: signer, proposal: proposal), ), ); }