From 4734af8fe45fcc13a880cdcf67ada139b5efd617 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Mon, 12 Jan 2026 20:01:16 +0800 Subject: [PATCH 01/36] account settings has high security also added theme colors for the tags --- .../lib/features/components/account_tag.dart | 39 +++++++++++ .../main/screens/account_settings_screen.dart | 69 +++++++++++++++---- .../main/screens/accounts_screen.dart | 30 ++------ .../lib/features/styles/app_colors_theme.dart | 22 ++++++ .../lib/shared/extensions/svg_extensions.dart | 13 ++++ mobile-app/lib/utils/feature_flags.dart | 2 +- 6 files changed, 137 insertions(+), 38 deletions(-) create mode 100644 mobile-app/lib/features/components/account_tag.dart create mode 100644 mobile-app/lib/shared/extensions/svg_extensions.dart diff --git a/mobile-app/lib/features/components/account_tag.dart b/mobile-app/lib/features/components/account_tag.dart new file mode 100644 index 00000000..d8712d12 --- /dev/null +++ b/mobile-app/lib/features/components/account_tag.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; +import 'package:resonance_network_wallet/features/styles/app_text_theme.dart'; + +class AccountTag extends StatelessWidget { + final String text; + final Color color; + final double? width; + + const AccountTag({super.key, required this.text, required this.color, this.width}); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + width: width, + padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), + decoration: ShapeDecoration( + color: color, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2)), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + spacing: 10, + children: [ + Text( + text, + textAlign: TextAlign.center, + style: context.themeText.tiny?.copyWith(color: Colors.black), + ), + ], + ), + ), + ], + ); + } +} diff --git a/mobile-app/lib/features/main/screens/account_settings_screen.dart b/mobile-app/lib/features/main/screens/account_settings_screen.dart index 14f3fa69..d8f819c9 100644 --- a/mobile-app/lib/features/main/screens/account_settings_screen.dart +++ b/mobile-app/lib/features/main/screens/account_settings_screen.dart @@ -2,10 +2,10 @@ import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:resonance_network_wallet/features/components/account_tag.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/account_associations_providers.dart'; -import 'package:flutter_svg/flutter_svg.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/features/components/account_gradient_image.dart'; import 'package:resonance_network_wallet/features/components/app_modal_bottom_sheet.dart'; @@ -22,14 +22,21 @@ import 'package:resonance_network_wallet/features/styles/app_colors_theme.dart'; import 'package:resonance_network_wallet/features/styles/app_text_theme.dart'; import 'package:resonance_network_wallet/shared/extensions/clipboard_extensions.dart'; import 'package:resonance_network_wallet/shared/extensions/media_query_data_extension.dart'; +import 'package:resonance_network_wallet/shared/extensions/svg_extensions.dart'; import 'package:resonance_network_wallet/utils/feature_flags.dart'; class AccountSettingsScreen extends ConsumerStatefulWidget { final Account account; final String balance; final String checksumName; - - const AccountSettingsScreen({super.key, required this.account, required this.balance, required this.checksumName}); + final bool isHighSecurity; + const AccountSettingsScreen({ + super.key, + required this.account, + required this.balance, + required this.checksumName, + this.isHighSecurity = true, + }); @override ConsumerState createState() => _AccountSettingsScreenState(); @@ -167,7 +174,7 @@ class _AccountSettingsScreenState extends ConsumerState { _buildShareSection(), const SizedBox(height: 20), _buildAddressSection(), - if (FeatureFlags.enableHighSecurity) ...[const SizedBox(height: 20), _buildSecuritySection()], + if (FeatureFlags.enableHighSecurity) ...[const SizedBox(height: 20), _buildHighSecuritySection(context)], if (widget.account.accountType == AccountType.keystone) ...[ const SizedBox(height: 20), _buildDisconnectWalletButton(), @@ -180,14 +187,14 @@ class _AccountSettingsScreenState extends ConsumerState { ); } - Widget _buildSettingCard({required Widget child}) { + Widget _buildSettingCard({required Widget child, Color? color}) { return ClipRRect( borderRadius: BorderRadius.circular(4), child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 25, sigmaY: 25), child: Container( decoration: ShapeDecoration( - color: context.themeColors.settingCard, + color: color ?? context.themeColors.settingCard, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)), ), child: child, @@ -197,6 +204,7 @@ class _AccountSettingsScreenState extends ConsumerState { } Widget _buildAccountHeader() { + final isHighSecurity = widget.isHighSecurity && FeatureFlags.enableHighSecurity; return _buildSettingCard( child: Padding( padding: const EdgeInsets.symmetric(horizontal: 15.0, vertical: 10.0), @@ -214,7 +222,11 @@ class _AccountSettingsScreenState extends ConsumerState { ], ), ), - const SizedBox(height: 5), + if (isHighSecurity) ...[ + const SizedBox(height: 10), + AccountTag(text: 'High-Security', color: context.themeColors.accountTagHighSecurity, width: 177.0), + ], + const SizedBox(height: 10), Text( widget.checksumName, style: context.themeText.smallParagraph?.copyWith(color: context.themeColors.checksum), @@ -277,22 +289,53 @@ class _AccountSettingsScreenState extends ConsumerState { ); } - Widget _buildSecuritySection() { + Widget _buildHighSecuritySection(BuildContext context) { + final isHighSecurity = widget.isHighSecurity && FeatureFlags.enableHighSecurity; + final textColor = isHighSecurity ? context.themeColors.textSecondary : context.themeColors.textPrimary; + final secondRowTextColor = isHighSecurity ? context.themeColors.darkGray : context.themeColors.textPrimary; + final iconColor = isHighSecurity ? context.themeColors.textSecondary : context.themeColors.checksum; + final buttonBackgroundColor = isHighSecurity ? context.themeColors.checksum : context.themeColors.settingCard; + final subtitle = 'VIEW SETTINGS'; + return _buildSettingCard( + color: buttonBackgroundColor, child: InkWell( onTap: () { Navigator.push(context, MaterialPageRoute(builder: (context) => const HighSecurityGetStartedScreen())); }, - child: Padding( - padding: const EdgeInsets.only(top: 12.0, left: 12.0, bottom: 12.0, right: 26.0), + child: Container( + width: double.infinity, + padding: const EdgeInsets.only(top: 12, left: 12, right: 26, bottom: 12), + child: Row( + mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + spacing: 60, children: [ Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + spacing: 12, children: [ - SvgPicture.asset('assets/high_security_icon.svg', width: context.isTablet ? 28 : 20), - const SizedBox(width: 12), - Text('High Security', style: context.themeText.largeTag), + SvgPictureExtensions.assetWithColor( + 'assets/high_security_icon.svg', + width: context.isTablet ? 28 : 20, + color: iconColor, + ), + Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + spacing: 4, + children: [ + Text('High Security', style: context.themeText.largeTag?.copyWith(color: textColor)), + if (isHighSecurity) ...[ + Text(subtitle, style: context.themeText.tag?.copyWith(color: secondRowTextColor)), + ], + ], + ), ], ), ], diff --git a/mobile-app/lib/features/main/screens/accounts_screen.dart b/mobile-app/lib/features/main/screens/accounts_screen.dart index 26a8356c..b4ef4f46 100644 --- a/mobile-app/lib/features/main/screens/accounts_screen.dart +++ b/mobile-app/lib/features/main/screens/accounts_screen.dart @@ -3,6 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/features/components/account_gradient_image.dart'; +import 'package:resonance_network_wallet/features/components/account_tag.dart'; import 'package:resonance_network_wallet/features/components/button.dart'; import 'package:resonance_network_wallet/features/components/scaffold_base.dart'; import 'package:resonance_network_wallet/features/components/select.dart'; @@ -326,7 +327,10 @@ class _AccountsScreenState extends ConsumerState { ), ), if (entrustedNodes.isNotEmpty) - const AccountTag('Guardian', color: Color(0xFF9747FF)), + AccountTag( + text: 'Guardian', + color: context.themeColors.accountTagGuardian, + ), ], ), Text( @@ -468,7 +472,7 @@ class _AccountsScreenState extends ConsumerState { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(entrusted.name, style: context.themeText.smallParagraph), - const AccountTag('Entrusted'), + AccountTag(text: 'Entrusted', color: context.themeColors.accountTagEntrusted), ], ), ), @@ -528,25 +532,3 @@ class _AccountsScreenState extends ConsumerState { ); } } - -class AccountTag extends StatelessWidget { - final String label; - final Color? color; - - const AccountTag(this.label, {super.key, this.color}); - - @override - Widget build(BuildContext context) { - return Container( - padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2), - decoration: BoxDecoration( - color: color ?? const Color(0xFFFFD541), // Default to Entrusted color (Yellow-ish) - borderRadius: BorderRadius.circular(4), - ), - child: Text( - label, - style: context.themeText.tiny?.copyWith(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 10), - ), - ); - } -} diff --git a/mobile-app/lib/features/styles/app_colors_theme.dart b/mobile-app/lib/features/styles/app_colors_theme.dart index f5dab625..f3e9970e 100644 --- a/mobile-app/lib/features/styles/app_colors_theme.dart +++ b/mobile-app/lib/features/styles/app_colors_theme.dart @@ -39,6 +39,9 @@ class AppColorsTheme extends ThemeExtension { final List buttonPrimary; final Color skeletonBase; final Color skeletonHighlight; + final Color accountTagGuardian; + final Color accountTagEntrusted; + final Color accountTagHighSecurity; const AppColorsTheme({ required this.primary, @@ -75,6 +78,9 @@ class AppColorsTheme extends ThemeExtension { required this.buttonPrimary, required this.skeletonBase, required this.skeletonHighlight, + required this.accountTagGuardian, + required this.accountTagEntrusted, + required this.accountTagHighSecurity, }); const AppColorsTheme.light() @@ -113,6 +119,9 @@ class AppColorsTheme extends ThemeExtension { buttonPrimary: const [Color(0xFF0000FF), Color(0xFFED4CCE)], skeletonBase: const Color(0xFF3D3C44), skeletonHighlight: const Color(0xFF5A5A5A), + accountTagGuardian: const Color(0xFF9747FF), + accountTagEntrusted: const Color(0xFFFFD541), + accountTagHighSecurity: const Color(0xFF4CEDE7), ); const AppColorsTheme.dark() @@ -151,6 +160,9 @@ class AppColorsTheme extends ThemeExtension { buttonPrimary: const [Color(0xFF0000FF), Color(0xFFED4CCE)], skeletonBase: const Color(0xFF3D3C44), skeletonHighlight: const Color(0xFF5A5A5A), + accountTagGuardian: const Color(0xFF9747FF), + accountTagEntrusted: const Color(0xFFFFD541), + accountTagHighSecurity: const Color(0xFF4CEDE7), ); @override @@ -189,6 +201,9 @@ class AppColorsTheme extends ThemeExtension { Color? buttonSuccess, Color? skeletonBase, Color? skeletonHighlight, + Color? accountTagGuardian, + Color? accountTagEntrusted, + Color? accountTagHighSecurity, }) { return AppColorsTheme( primary: primary ?? this.primary, @@ -224,6 +239,9 @@ class AppColorsTheme extends ThemeExtension { buttonSuccess: buttonSuccess ?? this.buttonSuccess, skeletonBase: skeletonBase ?? this.skeletonBase, skeletonHighlight: skeletonHighlight ?? this.skeletonHighlight, + accountTagGuardian: accountTagGuardian ?? this.accountTagGuardian, + accountTagEntrusted: accountTagEntrusted ?? this.accountTagEntrusted, + accountTagHighSecurity: accountTagHighSecurity ?? this.accountTagHighSecurity, ); } @@ -264,6 +282,10 @@ class AppColorsTheme extends ThemeExtension { buttonPrimary: other.buttonPrimary, skeletonBase: Color.lerp(skeletonBase, other.skeletonBase, t) ?? skeletonBase, skeletonHighlight: Color.lerp(skeletonHighlight, other.skeletonHighlight, t) ?? skeletonHighlight, + accountTagGuardian: Color.lerp(accountTagGuardian, other.accountTagGuardian, t) ?? accountTagGuardian, + accountTagEntrusted: Color.lerp(accountTagEntrusted, other.accountTagEntrusted, t) ?? accountTagEntrusted, + accountTagHighSecurity: + Color.lerp(accountTagHighSecurity, other.accountTagHighSecurity, t) ?? accountTagHighSecurity, ); } } diff --git a/mobile-app/lib/shared/extensions/svg_extensions.dart b/mobile-app/lib/shared/extensions/svg_extensions.dart new file mode 100644 index 00000000..196e90d0 --- /dev/null +++ b/mobile-app/lib/shared/extensions/svg_extensions.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +extension SvgPictureExtensions on SvgPicture { + static SvgPicture assetWithColor(String assetName, {double? width, double? height, Color? color}) { + return SvgPicture.asset( + assetName, + width: width, + height: height, + colorFilter: color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null, + ); + } +} diff --git a/mobile-app/lib/utils/feature_flags.dart b/mobile-app/lib/utils/feature_flags.dart index 07623f6d..a0241c15 100644 --- a/mobile-app/lib/utils/feature_flags.dart +++ b/mobile-app/lib/utils/feature_flags.dart @@ -2,5 +2,5 @@ class FeatureFlags { static const bool enableTestButtons = false; // Only show in debug mode static const bool enableKeystoneHardwareWallet = false; // turn keystone hw wallet on and off - static const bool enableHighSecurity = false; // turn keystone hw wallet on and off + static const bool enableHighSecurity = true; // turn keystone hw wallet on and off } From 4e523bcde37f8a2af4d34be96a5535d05d002c09 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Mon, 12 Jan 2026 20:11:17 +0800 Subject: [PATCH 02/36] high security provider, service stub, account tag --- .../main/screens/accounts_screen.dart | 24 +++++++++++++++---- .../lib/providers/wallet_providers.dart | 9 +++++++ .../src/services/high_security_service.dart | 6 +++-- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/mobile-app/lib/features/main/screens/accounts_screen.dart b/mobile-app/lib/features/main/screens/accounts_screen.dart index b4ef4f46..bf9ee4c6 100644 --- a/mobile-app/lib/features/main/screens/accounts_screen.dart +++ b/mobile-app/lib/features/main/screens/accounts_screen.dart @@ -308,11 +308,13 @@ class _AccountsScreenState extends ConsumerState { child: Consumer( builder: (context, ref, child) { final balanceAsync = ref.watch(balanceProviderFamily(account.accountId)); + final isHighSecurityAsync = ref.watch(isHighSecurityProvider(account)); return FutureBuilder( future: _checksumService.getHumanReadableName(account.accountId), builder: (context, checksumSnapshot) { final humanChecksum = checksumSnapshot.data ?? ''; + final isHighSecurity = isHighSecurityAsync.value ?? false; return Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -326,11 +328,23 @@ class _AccountsScreenState extends ConsumerState { color: isActive ? Colors.black : Colors.white, ), ), - if (entrustedNodes.isNotEmpty) - AccountTag( - text: 'Guardian', - color: context.themeColors.accountTagGuardian, - ), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + if (isHighSecurity) + AccountTag( + text: 'High Security', + color: context.themeColors.accountTagEntrusted, + ), + if (isHighSecurity && entrustedNodes.isNotEmpty) + const SizedBox(width: 6), + if (entrustedNodes.isNotEmpty) + AccountTag( + text: 'Guardian', + color: context.themeColors.accountTagGuardian, + ), + ], + ), ], ), Text( diff --git a/mobile-app/lib/providers/wallet_providers.dart b/mobile-app/lib/providers/wallet_providers.dart index f181fd7f..8e447a66 100644 --- a/mobile-app/lib/providers/wallet_providers.dart +++ b/mobile-app/lib/providers/wallet_providers.dart @@ -35,6 +35,15 @@ final balancesServiceProvider = Provider((ref) { return BalancesService(); }); +final highSecurityServiceProvider = Provider((ref) { + return HighSecurityService(); +}); + +final isHighSecurityProvider = FutureProvider.family((ref, account) async { + final highSecurityService = ref.watch(highSecurityServiceProvider); + return await highSecurityService.isHighSecurity(account); +}); + final balanceProviderFamily = FutureProvider.family((ref, accountId) async { final substrateService = ref.watch(substrateServiceProvider); print('query balance for $accountId'); diff --git a/quantus_sdk/lib/src/services/high_security_service.dart b/quantus_sdk/lib/src/services/high_security_service.dart index c8caa1ea..772b3e27 100644 --- a/quantus_sdk/lib/src/services/high_security_service.dart +++ b/quantus_sdk/lib/src/services/high_security_service.dart @@ -40,7 +40,9 @@ class HighSecurityService { } } - void getHighSecuritySetupCall(HighSecurityData formData) { - throw Exception('No Implementation'); + Future isHighSecurity(Account account) async { + await Future.delayed(const Duration(seconds: 1)); + // just for testing + return account.name.startsWith('High'); } } From 64e074289a4ebf5714f393d256d54a47179dab04 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Mon, 12 Jan 2026 20:15:45 +0800 Subject: [PATCH 03/36] high sec flag for detail screens --- mobile-app/lib/features/main/screens/accounts_screen.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mobile-app/lib/features/main/screens/accounts_screen.dart b/mobile-app/lib/features/main/screens/accounts_screen.dart index bf9ee4c6..36950e1e 100644 --- a/mobile-app/lib/features/main/screens/accounts_screen.dart +++ b/mobile-app/lib/features/main/screens/accounts_screen.dart @@ -278,6 +278,9 @@ class _AccountsScreenState extends ConsumerState { final double constraintMaxHeight = min(entrustedNodes.length * 52, 104); + final isHighSecurityAsync = ref.read(isHighSecurityProvider(account)); + final isHighSecurity = isHighSecurityAsync.value ?? false; + return InkWell( onTap: () async { await ref.read(activeAccountProvider.notifier).setActiveAccount(account); @@ -308,13 +311,11 @@ class _AccountsScreenState extends ConsumerState { child: Consumer( builder: (context, ref, child) { final balanceAsync = ref.watch(balanceProviderFamily(account.accountId)); - final isHighSecurityAsync = ref.watch(isHighSecurityProvider(account)); return FutureBuilder( future: _checksumService.getHumanReadableName(account.accountId), builder: (context, checksumSnapshot) { final humanChecksum = checksumSnapshot.data ?? ''; - final isHighSecurity = isHighSecurityAsync.value ?? false; return Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -452,6 +453,7 @@ class _AccountsScreenState extends ConsumerState { account: account, balance: _formattingService.formatBalance(balance, addSymbol: true), checksumName: checksumName, + isHighSecurity: isHighSecurity, ), ), ); @@ -517,6 +519,7 @@ class _AccountsScreenState extends ConsumerState { account: entrusted, balance: _formattingService.formatBalance(balance, addSymbol: true), checksumName: checksumName, + isHighSecurity: isHighSecurity, ), ), ); From c2321915f67623f857ebb2dd7999efad70169d0a Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 12:47:04 +0800 Subject: [PATCH 04/36] implement high security set fix data types and names which were wrong in the mock implementation --- .../high_security_confirmation_sheet.dart | 9 +++++++- .../high_security_guardian_wizard.dart | 2 +- ...high_security_safeguard_window_wizard.dart | 2 +- .../high_security_summary_wizard.dart | 4 ++-- .../widget/send_screen_widget_test.mocks.dart | 22 +++++++++---------- .../src/extensions/duration_extension.dart | 5 +++++ .../lib/src/models/high_security_data.dart | 12 +++++----- .../src/services/high_security_service.dart | 18 +++++++-------- .../reversible_transfers_service.dart | 8 +++---- 9 files changed, 46 insertions(+), 36 deletions(-) create mode 100644 quantus_sdk/lib/src/extensions/duration_extension.dart diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart index f4ffceda..662d7fad 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart @@ -32,9 +32,16 @@ class _HighSecurityConfirmationSheetState extends ConsumerState setHighSecurity({ - required _i4.Account? account, - required _i4.Account? guardian, - required _i7.BlockNumberOrTimestamp? delay, - }) => - (super.noSuchMethod( - Invocation.method(#setHighSecurity, [], {#account: account, #guardian: guardian, #delay: delay}), - returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), - ) - as _i3.Future<_i6.Uint8List>); + // @override + // _i3.Future<_i6.Uint8List> setHighSecurity({ + // required _i4.Account? account, + // required _i4.Account? guardian, + // required _i7.BlockNumberOrTimestamp? delay, + // }) => + // (super.noSuchMethod( + // Invocation.method(#setHighSecurity, [], {#account: account, #guardian: guardian, #delay: delay}), + // returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), + // ) + // as _i3.Future<_i6.Uint8List>); @override _i3.Future<_i6.Uint8List> scheduleReversibleTransfer({ diff --git a/quantus_sdk/lib/src/extensions/duration_extension.dart b/quantus_sdk/lib/src/extensions/duration_extension.dart new file mode 100644 index 00000000..d051415e --- /dev/null +++ b/quantus_sdk/lib/src/extensions/duration_extension.dart @@ -0,0 +1,5 @@ +import 'package:quantus_sdk/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart' as qp; + +extension DurationToTimestampExtension on Duration { + qp.Timestamp get qpTimestamp => qp.Timestamp(BigInt.from(inMilliseconds)); +} diff --git a/quantus_sdk/lib/src/models/high_security_data.dart b/quantus_sdk/lib/src/models/high_security_data.dart index 16020882..0168c297 100644 --- a/quantus_sdk/lib/src/models/high_security_data.dart +++ b/quantus_sdk/lib/src/models/high_security_data.dart @@ -1,16 +1,16 @@ class HighSecurityData { - final String guardianAddress; - final int safeguardWindow; + final String guardianAccountId; + final int safeguardWindowSeconds; const HighSecurityData({ - this.guardianAddress = '', - this.safeguardWindow = 10 * 60 * 60, // 10 hours in seconds + this.guardianAccountId = '', + this.safeguardWindowSeconds = 10 * 60 * 60, // 10 hours in seconds }); HighSecurityData copyWith({String? guardianAddress, int? safeguardWindow}) { return HighSecurityData( - guardianAddress: guardianAddress ?? this.guardianAddress, - safeguardWindow: safeguardWindow ?? this.safeguardWindow, + guardianAccountId: guardianAddress ?? guardianAccountId, + safeguardWindowSeconds: safeguardWindow ?? safeguardWindowSeconds, ); } } diff --git a/quantus_sdk/lib/src/services/high_security_service.dart b/quantus_sdk/lib/src/services/high_security_service.dart index 772b3e27..37551666 100644 --- a/quantus_sdk/lib/src/services/high_security_service.dart +++ b/quantus_sdk/lib/src/services/high_security_service.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:quantus_sdk/src/extensions/duration_extension.dart'; class HighSecurityService { static final HighSecurityService _instance = HighSecurityService._internal(); @@ -9,17 +10,14 @@ class HighSecurityService { // ignore: unused_field final SubstrateService _substrateService = SubstrateService(); + final ReversibleTransfersService _reversibleTransfersService = ReversibleTransfersService(); - Future setupHighSecurityAccount(Account account, HighSecurityData formData) async { - try { - await Future.delayed(const Duration(seconds: 2)); - // Submit the extrinsic and return its result - // return await _substrateService.submitExtrinsic(account, runtimeCall); - } catch (e, stackTrace) { - print('Failed to setup: $e'); - print('Failed to setup: $stackTrace'); - throw Exception('Failed to setup: $e'); - } + Future setupHighSecurityAccount(Account account, String guardianAccountId, Duration safeguardDuration) async { + _reversibleTransfersService.setHighSecurity( + account: account, + guardianAccountId: guardianAccountId, + delay: safeguardDuration.qpTimestamp, + ); } // TODO replace with actual fee calculation diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index e8c919fe..40bd3e60 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -9,6 +9,7 @@ import 'package:quantus_sdk/generated/schrodinger/types/primitive_types/h256.dar import 'package:quantus_sdk/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart' as qp; import 'package:quantus_sdk/generated/schrodinger/types/quantus_runtime/runtime_call.dart'; import 'package:quantus_sdk/generated/schrodinger/types/sp_runtime/multiaddress/multi_address.dart' as multi_address; +import 'package:quantus_sdk/src/extensions/duration_extension.dart'; import 'package:quantus_sdk/src/models/account.dart'; import 'package:quantus_sdk/src/models/extrinsic_fee_data.dart'; import 'package:quantus_sdk/src/rust/api/crypto.dart' as crypto; @@ -27,7 +28,7 @@ class ReversibleTransfersService { /// Used for theft deterrence - enables all future transfers to be reversible Future setHighSecurity({ required Account account, - required Account guardian, + required String guardianAccountId, required qp.BlockNumberOrTimestamp delay, }) async { print('Not implemented - add reverser to params'); @@ -37,7 +38,7 @@ class ReversibleTransfersService { // Create the call final call = resonanceApi.tx.reversibleTransfers.setHighSecurity( delay: delay, - interceptor: crypto.ss58ToAccountId(s: guardian.accountId), + interceptor: crypto.ss58ToAccountId(s: guardianAccountId), ); // Submit the transaction using substrate service @@ -119,8 +120,7 @@ class ReversibleTransfersService { required int delaySeconds, void Function(ExtrinsicStatus)? onStatus, }) { - // convert seconds to milliseconds for runtime - final delay = qp.Timestamp(BigInt.from(delaySeconds) * BigInt.from(1000)); + final delay = Duration(seconds: delaySeconds).qpTimestamp; return scheduleReversibleTransferWithDelay( account: account, recipientAddress: recipientAddress, From ef5335fe50ddd8eebcb6f27909d0266b26a04ddc Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 12:53:04 +0800 Subject: [PATCH 05/36] high security get fee implemented --- .../high_security_confirmation_sheet.dart | 16 +++++++++----- .../src/services/high_security_service.dart | 22 +++++-------------- .../reversible_transfers_service.dart | 14 ++++++++++++ 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart index 662d7fad..d4dfa74b 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart @@ -31,16 +31,16 @@ class _HighSecurityConfirmationSheetState extends ConsumerState getHighSecuritySetupFee(Account account, HighSecurityData formData) async { - try { - await Future.delayed(const Duration(seconds: 2)); - - // Mock fetch - return ExtrinsicFeeData( - fee: BigInt.from(1000000000000000000), // 1.0 - blockHash: '0x0', - blockNumber: 0, - ); - } catch (e, stackTrace) { - print('Failed to get setup fee: $e'); - print('Failed to get setup fee: $stackTrace'); - throw Exception('Failed to get setup fee: $e'); - } + Future getHighSecuritySetupFee( + Account account, + String guardianAccountId, + Duration safeguardDuration, + ) async { + return _reversibleTransfersService.getHighSecuritySetupFee(account, guardianAccountId, safeguardDuration); } Future isHighSecurity(Account account) async { diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index 40bd3e60..74ae30bb 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -253,4 +253,18 @@ class ReversibleTransfersService { throw Exception('Failed to get reversible transfers constants: $e'); } } + + Future getHighSecuritySetupFee( + Account account, + String guardianAccountId, + Duration safeguardDuration, + ) async { + final delay = safeguardDuration.qpTimestamp; + final resonanceApi = Schrodinger(_substrateService.provider!); + final call = resonanceApi.tx.reversibleTransfers.setHighSecurity( + delay: delay, + interceptor: crypto.ss58ToAccountId(s: guardianAccountId), + ); + return _substrateService.getFeeForCall(account, call); + } } From ace76b3023ed313726f525bff4f283ed0071697b Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 13:36:31 +0800 Subject: [PATCH 06/36] get high security info sanitized data types even more --- .../high_security_confirmation_sheet.dart | 6 +-- ...high_security_safeguard_window_wizard.dart | 2 +- .../high_security_form_provider.dart | 2 +- .../widget/send_screen_widget_test.mocks.dart | 2 +- .../lib/src/extensions/address_extension.dart | 4 ++ .../src/extensions/duration_extension.dart | 2 + .../lib/src/models/high_security_data.dart | 8 +-- .../src/services/high_security_service.dart | 23 +++++++-- .../reversible_transfers_service.dart | 50 ++++++++++++------- 9 files changed, 68 insertions(+), 31 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart index d4dfa74b..f0e04fdc 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart @@ -33,14 +33,14 @@ class _HighSecurityConfirmationSheetState extends ConsumerState { } void updateSafeguardWindow(int window) { - state = state.copyWith(safeguardWindow: window); + state = state.copyWith(safeguardWindow: Duration(seconds: window)); } void resetState() { diff --git a/mobile-app/test/widget/send_screen_widget_test.mocks.dart b/mobile-app/test/widget/send_screen_widget_test.mocks.dart index 14026d06..963d835b 100644 --- a/mobile-app/test/widget/send_screen_widget_test.mocks.dart +++ b/mobile-app/test/widget/send_screen_widget_test.mocks.dart @@ -685,7 +685,7 @@ class MockReversibleTransfersService extends _i1.Mock implements _i2.ReversibleT as _i3.Future<_i6.Uint8List>); @override - _i3.Future<_i9.HighSecurityAccountData?> getAccountReversibilityConfig(String? address) => + _i3.Future<_i9.HighSecurityAccountData?> getHighSecurityConfig(String? address) => (super.noSuchMethod( Invocation.method(#getAccountReversibilityConfig, [address]), returnValue: _i3.Future<_i9.HighSecurityAccountData?>.value(), diff --git a/quantus_sdk/lib/src/extensions/address_extension.dart b/quantus_sdk/lib/src/extensions/address_extension.dart index f0761fa7..8a2d7af0 100644 --- a/quantus_sdk/lib/src/extensions/address_extension.dart +++ b/quantus_sdk/lib/src/extensions/address_extension.dart @@ -1,4 +1,5 @@ import 'package:flutter/foundation.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:ss58/ss58.dart'; extension AddressExtension on Address { @@ -10,4 +11,7 @@ extension AddressExtension on Address { // Just to explain why this field is named pubkey - it's not a pub key in our signature scheme. // However, we can still use this class to convert between ss58 Strings and AccountID32 bytes. Uint8List get addressBytes => pubkey; + + static String ss58AddressFromBytes(Uint8List bytes) => + Address(prefix: AppConstants.ss58prefix, pubkey: bytes).encode(); } diff --git a/quantus_sdk/lib/src/extensions/duration_extension.dart b/quantus_sdk/lib/src/extensions/duration_extension.dart index d051415e..9e88bfc4 100644 --- a/quantus_sdk/lib/src/extensions/duration_extension.dart +++ b/quantus_sdk/lib/src/extensions/duration_extension.dart @@ -2,4 +2,6 @@ import 'package:quantus_sdk/generated/schrodinger/types/qp_scheduler/block_numbe extension DurationToTimestampExtension on Duration { qp.Timestamp get qpTimestamp => qp.Timestamp(BigInt.from(inMilliseconds)); + + static Duration fromQpTimestamp(qp.Timestamp timestamp) => Duration(milliseconds: timestamp.value0.toInt()); } diff --git a/quantus_sdk/lib/src/models/high_security_data.dart b/quantus_sdk/lib/src/models/high_security_data.dart index 0168c297..e08275c2 100644 --- a/quantus_sdk/lib/src/models/high_security_data.dart +++ b/quantus_sdk/lib/src/models/high_security_data.dart @@ -1,16 +1,16 @@ class HighSecurityData { final String guardianAccountId; - final int safeguardWindowSeconds; + final Duration safeguardWindow; const HighSecurityData({ this.guardianAccountId = '', - this.safeguardWindowSeconds = 10 * 60 * 60, // 10 hours in seconds + this.safeguardWindow = const Duration(hours: 10), // 10 hours in seconds }); - HighSecurityData copyWith({String? guardianAddress, int? safeguardWindow}) { + HighSecurityData copyWith({String? guardianAddress, Duration? safeguardWindow}) { return HighSecurityData( guardianAccountId: guardianAddress ?? guardianAccountId, - safeguardWindowSeconds: safeguardWindow ?? safeguardWindowSeconds, + safeguardWindow: safeguardWindow ?? this.safeguardWindow, ); } } diff --git a/quantus_sdk/lib/src/services/high_security_service.dart b/quantus_sdk/lib/src/services/high_security_service.dart index 9962be3c..51e13a3a 100644 --- a/quantus_sdk/lib/src/services/high_security_service.dart +++ b/quantus_sdk/lib/src/services/high_security_service.dart @@ -1,6 +1,9 @@ import 'dart:async'; +import 'dart:typed_data'; +import 'package:quantus_sdk/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart' as qp; import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:quantus_sdk/src/extensions/address_extension.dart'; import 'package:quantus_sdk/src/extensions/duration_extension.dart'; class HighSecurityService { @@ -29,8 +32,22 @@ class HighSecurityService { } Future isHighSecurity(Account account) async { - await Future.delayed(const Duration(seconds: 1)); - // just for testing - return account.name.startsWith('High'); + return await getHighSecurityConfig(account.accountId) != null; + } + + Future getHighSecurityConfig(String address) async { + final hsData = await _reversibleTransfersService.getHighSecurityConfig(address); + + if (hsData != null) { + final accountId = AddressExtension.ss58AddressFromBytes(Uint8List.fromList(hsData.interceptor)); + if (hsData.delay is! qp.Timestamp) { + throw ArgumentError('Expected timestamp delay, got block number'); + } + final safeguardWindow = DurationToTimestampExtension.fromQpTimestamp(hsData.delay as qp.Timestamp); + return HighSecurityData(guardianAccountId: accountId, safeguardWindow: safeguardWindow); + } else { + // not a high security account + return null; + } } } diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index 74ae30bb..6a0ec7f8 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -9,10 +9,12 @@ import 'package:quantus_sdk/generated/schrodinger/types/primitive_types/h256.dar import 'package:quantus_sdk/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart' as qp; import 'package:quantus_sdk/generated/schrodinger/types/quantus_runtime/runtime_call.dart'; import 'package:quantus_sdk/generated/schrodinger/types/sp_runtime/multiaddress/multi_address.dart' as multi_address; +import 'package:quantus_sdk/src/constants/app_constants.dart'; import 'package:quantus_sdk/src/extensions/duration_extension.dart'; import 'package:quantus_sdk/src/models/account.dart'; import 'package:quantus_sdk/src/models/extrinsic_fee_data.dart'; import 'package:quantus_sdk/src/rust/api/crypto.dart' as crypto; +import 'package:ss58/ss58.dart'; import 'substrate_service.dart'; @@ -145,23 +147,8 @@ class ReversibleTransfersService { } } - /// Execute a scheduled transfer (typically called by the scheduler) - Future executeTransfer({required Account account, required H256 transactionId}) async { - try { - final resonanceApi = Schrodinger(_substrateService.provider!); - - // Create the call - final call = resonanceApi.tx.reversibleTransfers.executeTransfer(txId: transactionId); - - // Submit the transaction using substrate service - return _substrateService.submitExtrinsic(account, call); - } catch (e) { - throw Exception('Failed to execute transfer: $e'); - } - } - /// Query account's reversibility configuration - Future getAccountReversibilityConfig(String address) async { + Future getHighSecurityConfig(String address) async { try { final resonanceApi = Schrodinger(_substrateService.provider!); final accountId = crypto.ss58ToAccountId(s: address); @@ -196,15 +183,42 @@ class ReversibleTransfersService { } /// Check if account has reversibility enabled - Future isReversibilityEnabled(String address) async { + Future isHighSecurity(String address) async { try { - final config = await getAccountReversibilityConfig(address); + final config = await getHighSecurityConfig(address); return config != null; } catch (e) { throw Exception('Failed to check reversibility status: $e'); } } + /// Check if account is a guardian (interceptor) for any accounts + Future isGuardian(String address) async { + try { + final resonanceApi = Schrodinger(_substrateService.provider!); + final accountId = crypto.ss58ToAccountId(s: address); + final interceptedAccounts = await resonanceApi.query.reversibleTransfers.interceptorIndex(accountId); + return interceptedAccounts.isNotEmpty; + } catch (e) { + throw Exception('Failed to check guardian status: $e'); + } + } + + /// Get list of accounts that the given account is a guardian (interceptor) for + Future> getInterceptedAccounts(String guardianAddress) async { + try { + final resonanceApi = Schrodinger(_substrateService.provider!); + final accountId = crypto.ss58ToAccountId(s: guardianAddress); + final interceptedAccounts = await resonanceApi.query.reversibleTransfers.interceptorIndex(accountId); + return interceptedAccounts.map((id) { + final address = Address(prefix: AppConstants.ss58prefix, pubkey: Uint8List.fromList(id)); + return address.encode(); + }).toList(); + } catch (e) { + throw Exception('Failed to get intercepted accounts: $e'); + } + } + /// Get all pending transfers for an account by querying storage Future> getAccountPendingTransfers(String address) async { try { From 08ce903b3ada4f37c82f8e7bfbc4add773901a01 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 14:10:17 +0800 Subject: [PATCH 07/36] more renames --- .../screens/high_security/high_security_confirmation_sheet.dart | 2 +- quantus_sdk/lib/src/services/high_security_service.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart index f0e04fdc..14e8958e 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart @@ -37,7 +37,7 @@ class _HighSecurityConfirmationSheetState extends ConsumerState setupHighSecurityAccount(Account account, String guardianAccountId, Duration safeguardDuration) async { + Future setHighSecurity(Account account, String guardianAccountId, Duration safeguardDuration) async { _reversibleTransfersService.setHighSecurity( account: account, guardianAccountId: guardianAccountId, From 3ae9eee4754cba2bb53c9557b8f43a46711e0d90 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 14:20:28 +0800 Subject: [PATCH 08/36] implement is high security and entrusted accounts providers --- .../providers/entrusted_account_provider.dart | 30 +++---------------- quantus_sdk/lib/src/models/account.dart | 12 +++++++- .../src/services/high_security_service.dart | 10 +++++++ .../reversible_transfers_service.dart | 15 ++++------ 4 files changed, 30 insertions(+), 37 deletions(-) diff --git a/mobile-app/lib/providers/entrusted_account_provider.dart b/mobile-app/lib/providers/entrusted_account_provider.dart index cf9f4651..e0a9a88e 100644 --- a/mobile-app/lib/providers/entrusted_account_provider.dart +++ b/mobile-app/lib/providers/entrusted_account_provider.dart @@ -2,30 +2,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; final entrustedAccountsProvider = FutureProvider.family, Account>((ref, account) async { - // TODO: Implement actual fetching of entrusted accounts from SDK/API - // For now we simulate the delay and return empty list or dummy data - - await Future.delayed(const Duration(milliseconds: 500)); - - // Dummy data logic for demonstration/development - // If you want to see the UI, you can uncomment this or use a specific account ID - if (account.name.startsWith('G')) { - // arbitrary condition for testing - return [ - const Account( - walletIndex: 0, - index: 0, - name: 'Entrusted Account 1', - accountId: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY', - ), - const Account( - walletIndex: 0, - index: 0, - name: 'Zander Sky', - accountId: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty', - ), - ]; - } - - return []; + final highSecurityService = HighSecurityService(); + final interceptedAccounts = await highSecurityService.getEntrustedAccounts(account); + print('intercepted accounts: ${interceptedAccounts.map((account) => account.accountId).join(', ')}'); + return interceptedAccounts; }); diff --git a/quantus_sdk/lib/src/models/account.dart b/quantus_sdk/lib/src/models/account.dart index c702b7e4..76985c5f 100644 --- a/quantus_sdk/lib/src/models/account.dart +++ b/quantus_sdk/lib/src/models/account.dart @@ -1,6 +1,6 @@ import 'package:flutter/foundation.dart'; -enum AccountType { local, keystone } +enum AccountType { local, keystone, external } @immutable class Account { @@ -27,6 +27,16 @@ class Account { ); } + factory Account.fromSs58Address(String ss58Address) { + return Account( + walletIndex: -1, + index: -2, + accountId: ss58Address, + name: 'External Account', + accountType: AccountType.external, + ); + } + Map toJson() { return { 'walletIndex': walletIndex, diff --git a/quantus_sdk/lib/src/services/high_security_service.dart b/quantus_sdk/lib/src/services/high_security_service.dart index cabb31e8..7ad95496 100644 --- a/quantus_sdk/lib/src/services/high_security_service.dart +++ b/quantus_sdk/lib/src/services/high_security_service.dart @@ -35,6 +35,16 @@ class HighSecurityService { return await getHighSecurityConfig(account.accountId) != null; } + Future isGuardian(Account account) async { + return await _reversibleTransfersService.isGuardian(account.accountId); + } + + Future> getEntrustedAccounts(Account account) async { + return (await _reversibleTransfersService.getInterceptedAccounts( + account.accountId, + )).map((account) => Account.fromSs58Address(account)).toList(); + } + Future getHighSecurityConfig(String address) async { final hsData = await _reversibleTransfersService.getHighSecurityConfig(address); diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index 6a0ec7f8..bd9dfa18 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -10,6 +10,7 @@ import 'package:quantus_sdk/generated/schrodinger/types/qp_scheduler/block_numbe import 'package:quantus_sdk/generated/schrodinger/types/quantus_runtime/runtime_call.dart'; import 'package:quantus_sdk/generated/schrodinger/types/sp_runtime/multiaddress/multi_address.dart' as multi_address; import 'package:quantus_sdk/src/constants/app_constants.dart'; +import 'package:quantus_sdk/src/extensions/address_extension.dart'; import 'package:quantus_sdk/src/extensions/duration_extension.dart'; import 'package:quantus_sdk/src/models/account.dart'; import 'package:quantus_sdk/src/models/extrinsic_fee_data.dart'; @@ -194,14 +195,7 @@ class ReversibleTransfersService { /// Check if account is a guardian (interceptor) for any accounts Future isGuardian(String address) async { - try { - final resonanceApi = Schrodinger(_substrateService.provider!); - final accountId = crypto.ss58ToAccountId(s: address); - final interceptedAccounts = await resonanceApi.query.reversibleTransfers.interceptorIndex(accountId); - return interceptedAccounts.isNotEmpty; - } catch (e) { - throw Exception('Failed to check guardian status: $e'); - } + return (await getInterceptedAccounts(address)).isNotEmpty; } /// Get list of accounts that the given account is a guardian (interceptor) for @@ -211,8 +205,9 @@ class ReversibleTransfersService { final accountId = crypto.ss58ToAccountId(s: guardianAddress); final interceptedAccounts = await resonanceApi.query.reversibleTransfers.interceptorIndex(accountId); return interceptedAccounts.map((id) { - final address = Address(prefix: AppConstants.ss58prefix, pubkey: Uint8List.fromList(id)); - return address.encode(); + final address = AddressExtension.ss58AddressFromBytes(Uint8List.fromList(id)); + print('intercepted account: $address'); + return address; }).toList(); } catch (e) { throw Exception('Failed to get intercepted accounts: $e'); From eb9aca8f319c1a0023058d4ae65aba655c373b8a Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 14:45:55 +0800 Subject: [PATCH 09/36] move high sec in its own section --- .../reversible_transfers_service.dart | 116 +++++++++--------- 1 file changed, 61 insertions(+), 55 deletions(-) diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index bd9dfa18..45656065 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -27,30 +27,6 @@ class ReversibleTransfersService { final SubstrateService _substrateService = SubstrateService(); - /// Enable reversibility for the calling account with specified delay and policy - /// Used for theft deterrence - enables all future transfers to be reversible - Future setHighSecurity({ - required Account account, - required String guardianAccountId, - required qp.BlockNumberOrTimestamp delay, - }) async { - print('Not implemented - add reverser to params'); - try { - final resonanceApi = Schrodinger(_substrateService.provider!); - - // Create the call - final call = resonanceApi.tx.reversibleTransfers.setHighSecurity( - delay: delay, - interceptor: crypto.ss58ToAccountId(s: guardianAccountId), - ); - - // Submit the transaction using substrate service - return _substrateService.submitExtrinsic(account, call); - } catch (e) { - throw Exception('Failed to enable reversibility: $e'); - } - } - /// Schedule a reversible transfer using account's default settings Future scheduleReversibleTransfer({ required Account account, @@ -183,37 +159,6 @@ class ReversibleTransfersService { } } - /// Check if account has reversibility enabled - Future isHighSecurity(String address) async { - try { - final config = await getHighSecurityConfig(address); - return config != null; - } catch (e) { - throw Exception('Failed to check reversibility status: $e'); - } - } - - /// Check if account is a guardian (interceptor) for any accounts - Future isGuardian(String address) async { - return (await getInterceptedAccounts(address)).isNotEmpty; - } - - /// Get list of accounts that the given account is a guardian (interceptor) for - Future> getInterceptedAccounts(String guardianAddress) async { - try { - final resonanceApi = Schrodinger(_substrateService.provider!); - final accountId = crypto.ss58ToAccountId(s: guardianAddress); - final interceptedAccounts = await resonanceApi.query.reversibleTransfers.interceptorIndex(accountId); - return interceptedAccounts.map((id) { - final address = AddressExtension.ss58AddressFromBytes(Uint8List.fromList(id)); - print('intercepted account: $address'); - return address; - }).toList(); - } catch (e) { - throw Exception('Failed to get intercepted accounts: $e'); - } - } - /// Get all pending transfers for an account by querying storage Future> getAccountPendingTransfers(String address) async { try { @@ -263,6 +208,67 @@ class ReversibleTransfersService { } } + // ============================================================================== + // High security accounts + // ============================================================================== + + // Set the account has a high security account with a guardian + Future setHighSecurity({ + required Account account, + required String guardianAccountId, + required qp.BlockNumberOrTimestamp delay, + }) async { + print('setHighSecurity: $account, $guardianAccountId, $delay'); + try { + final resonanceApi = Schrodinger(_substrateService.provider!); + + // Create the call + final call = resonanceApi.tx.reversibleTransfers.setHighSecurity( + delay: delay, + interceptor: crypto.ss58ToAccountId(s: guardianAccountId), + ); + + // Submit the transaction using substrate service + return _substrateService.submitExtrinsic(account, call); + } catch (e) { + throw Exception('Failed to enable reversibility: $e'); + } + } + + Future isHighSecurity(String address) async { + print('isHighSecurity: $address'); + try { + final config = await getHighSecurityConfig(address); + return config != null; + } catch (e) { + throw Exception('Failed to check reversibility status: $e'); + } + } + + /// Check if account is a guardian (interceptor) for any accounts + Future isGuardian(String address) async { + print('isGuardian: $address'); + return (await getInterceptedAccounts(address)).isNotEmpty; + } + + /// Get list of accounts that the given account is a guardian (interceptor) for + Future> getInterceptedAccounts(String guardianAddress) async { + print('getInterceptedAccounts: $guardianAddress'); + + try { + final resonanceApi = Schrodinger(_substrateService.provider!); + final accountId = crypto.ss58ToAccountId(s: guardianAddress); + final interceptedAccounts = await resonanceApi.query.reversibleTransfers.interceptorIndex(accountId); + return interceptedAccounts.map((id) { + final address = AddressExtension.ss58AddressFromBytes(Uint8List.fromList(id)); + print('intercepted account: $address'); + return address; + }).toList(); + } catch (e) { + throw Exception('Failed to get intercepted accounts: $e'); + } + } + Future getHighSecuritySetupFee( Account account, String guardianAccountId, From ea05aec6354615337c117ae29aaa445cfbeb684e Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 15:17:40 +0800 Subject: [PATCH 10/36] Fix gradient text and high sec input field --- .../features/components/custom_text_field.dart | 5 ++--- .../lib/features/components/gradient_text.dart | 15 ++++++++++++++- .../high_security_guardian_wizard.dart | 11 +++++++++-- .../high_security_safeguard_window_wizard.dart | 2 +- .../high_security_summary_wizard.dart | 2 +- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/mobile-app/lib/features/components/custom_text_field.dart b/mobile-app/lib/features/components/custom_text_field.dart index 02e360e8..b1472e95 100644 --- a/mobile-app/lib/features/components/custom_text_field.dart +++ b/mobile-app/lib/features/components/custom_text_field.dart @@ -74,7 +74,7 @@ class CustomTextField extends StatelessWidget { style: textStyle ?? effectiveTextStyle, decoration: InputDecoration( fillColor: fillColor, - isDense: true, // Reduces vertical padding + isDense: true, enabledBorder: errorMsg != null ? const OutlineInputBorder(borderSide: BorderSide(color: Colors.red, width: 1)) : InputBorder.none, @@ -86,9 +86,8 @@ class CustomTextField extends StatelessWidget { bottom: 10, left: leftPadding ?? 11, right: (trailing != null || icon != null) ? 40 : 11, - ), // Removes default padding + ), hintText: hintText, - // Style for the hint text when the field is empty hintStyle: hintStyle ?? effectiveHintStyle, ), ), diff --git a/mobile-app/lib/features/components/gradient_text.dart b/mobile-app/lib/features/components/gradient_text.dart index eead202e..849d9135 100644 --- a/mobile-app/lib/features/components/gradient_text.dart +++ b/mobile-app/lib/features/components/gradient_text.dart @@ -1,17 +1,30 @@ import 'package:flutter/material.dart'; +import 'package:resonance_network_wallet/features/styles/app_colors_theme.dart'; +import 'package:resonance_network_wallet/features/styles/app_text_theme.dart'; class GradientText extends StatelessWidget { final String text; final List colors; + final List? stops; final TextStyle? style; - const GradientText(this.text, {super.key, required this.colors, required this.style}); + const GradientText(this.text, {super.key, required this.colors, this.stops, required this.style}); + + factory GradientText.highSecurity(String text, BuildContext context) { + return GradientText( + 'THEFT DETERRENCE', + colors: context.themeColors.aquaBlue, + stops: const [0.45, 1], // This means the gradient starts at 45% and ends at 100% + style: context.themeText.largeTitle, + ); + } @override Widget build(BuildContext context) { return ShaderMask( shaderCallback: (bounds) => LinearGradient( colors: colors, + stops: stops, begin: const Alignment(0.00, -1.00), end: const Alignment(0, 1), ).createShader(bounds), diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart b/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart index 22c2b9a9..1cc53cbf 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart @@ -25,6 +25,8 @@ class HighSecurityGuardianWizard extends ConsumerStatefulWidget { } class _HighSecurityGuardianWizardState extends ConsumerState { + late final TextEditingController _guardianController; + Future _scanQRCode() async { final formNotifier = ref.read(highSecurityFormProvider.notifier); @@ -35,16 +37,19 @@ class _HighSecurityGuardianWizardState extends ConsumerState Date: Tue, 13 Jan 2026 15:39:50 +0800 Subject: [PATCH 11/36] some updates for the forms remove a lot of text, add human checkphrase --- .../guardian_account_info_sheet.dart | 10 ++-- .../high_security_confirmation_sheet.dart | 2 +- .../high_security_guardian_wizard.dart | 48 +++++++++++++++++-- .../reversible_transfers_service.dart | 6 +-- 4 files changed, 52 insertions(+), 14 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/guardian_account_info_sheet.dart b/mobile-app/lib/features/main/screens/high_security/guardian_account_info_sheet.dart index ab41e26b..a4433dbc 100644 --- a/mobile-app/lib/features/main/screens/high_security/guardian_account_info_sheet.dart +++ b/mobile-app/lib/features/main/screens/high_security/guardian_account_info_sheet.dart @@ -78,11 +78,11 @@ class _GuardianAccountInfoSheetState extends State { 'The Guardian account should not be in the same wallet as the Entrusted account as in the case of theft both would be exposed.', style: context.themeText.smallParagraph, ), - const SizedBox(height: 16), - Text( - 'The harder the Guardian account is to access, the higher the security. An account on a cold storage wallet is the most secure.', - style: context.themeText.smallParagraph, - ), + // const SizedBox(height: 16), + // Text( + // 'The harder the Guardian account is to access, the higher the security. An account on a cold storage wallet is the most secure.', + // style: context.themeText.smallParagraph, + // ), const SizedBox(height: 40), Button( variant: ButtonVariant.primary, diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart index 14e8958e..3b6d23e1 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart @@ -139,7 +139,7 @@ class _HighSecurityConfirmationSheetState extends ConsumerState { late final TextEditingController _guardianController; + Future _getHumanCheckphrase(String address) async { + try { + Address.decode(address); + return await _checksumService.getHumanReadableName(address); + } catch (e) { + return null; + } + } + Future _scanQRCode() async { final formNotifier = ref.read(highSecurityFormProvider.notifier); @@ -129,11 +141,37 @@ class _HighSecurityGuardianWizardState extends ConsumerState( + key: ValueKey(guardianAddress), + future: _getHumanCheckphrase(guardianAddress), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const SizedBox.shrink(); + } + if (snapshot.hasError || !snapshot.hasData || snapshot.data == null || snapshot.data!.isEmpty) { + return Padding( + padding: const EdgeInsets.only(top: 8), + child: Text( + 'invalid address', + style: context.themeText.smallParagraph?.copyWith(color: context.themeColors.textError), + ), + ); + } + return Padding( + padding: const EdgeInsets.only(top: 8), + child: Text( + snapshot.data!, + style: context.themeText.smallParagraph?.copyWith(color: context.themeColors.checksum), + ), + ); + }, + ), + // const SizedBox(height: 13), + // Text( + // 'The harder the Guardian account is to access the higher the security. An address on a cold storage wallet is the most secure.', + // style: context.themeText.smallParagraph?.copyWith(color: context.themeColors.textMuted), + // ), const Expanded(child: SizedBox()), Row( spacing: 36, diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index 45656065..5a9f058f 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -9,13 +9,11 @@ import 'package:quantus_sdk/generated/schrodinger/types/primitive_types/h256.dar import 'package:quantus_sdk/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart' as qp; import 'package:quantus_sdk/generated/schrodinger/types/quantus_runtime/runtime_call.dart'; import 'package:quantus_sdk/generated/schrodinger/types/sp_runtime/multiaddress/multi_address.dart' as multi_address; -import 'package:quantus_sdk/src/constants/app_constants.dart'; import 'package:quantus_sdk/src/extensions/address_extension.dart'; import 'package:quantus_sdk/src/extensions/duration_extension.dart'; import 'package:quantus_sdk/src/models/account.dart'; import 'package:quantus_sdk/src/models/extrinsic_fee_data.dart'; import 'package:quantus_sdk/src/rust/api/crypto.dart' as crypto; -import 'package:ss58/ss58.dart'; import 'substrate_service.dart'; @@ -218,7 +216,9 @@ class ReversibleTransfersService { required String guardianAccountId, required qp.BlockNumberOrTimestamp delay, }) async { - print('setHighSecurity: $account, $guardianAccountId, $delay'); + print( + 'setHighSecurity: $account, $guardianAccountId, ${(delay as Timestamp).value0} ms -> ${DurationToTimestampExtension.fromQpTimestamp(delay as qp.Timestamp)}', + ); try { final resonanceApi = Schrodinger(_substrateService.provider!); From 21c10dfdcd574450e8dcf2ebdb91459791151952 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 16:37:28 +0800 Subject: [PATCH 12/36] remove dummy data, pass account along the high sec settings screens --- .../main/screens/account_settings_screen.dart | 5 ++- .../main/screens/accounts_screen.dart | 44 ++++++++++++++----- .../high_security_confirmation_sheet.dart | 35 +++++++++++---- .../high_security_get_started_screen.dart | 9 +++- .../high_security_guardian_wizard.dart | 7 ++- ...high_security_safeguard_window_wizard.dart | 8 +++- .../high_security_summary_wizard.dart | 21 ++++++--- .../lib/src/models/high_security_data.dart | 4 +- .../src/services/high_security_service.dart | 2 +- .../reversible_transfers_service.dart | 16 +++---- .../lib/src/services/substrate_service.dart | 1 + 11 files changed, 108 insertions(+), 44 deletions(-) diff --git a/mobile-app/lib/features/main/screens/account_settings_screen.dart b/mobile-app/lib/features/main/screens/account_settings_screen.dart index d8f819c9..d251bd85 100644 --- a/mobile-app/lib/features/main/screens/account_settings_screen.dart +++ b/mobile-app/lib/features/main/screens/account_settings_screen.dart @@ -301,7 +301,10 @@ class _AccountSettingsScreenState extends ConsumerState { color: buttonBackgroundColor, child: InkWell( onTap: () { - Navigator.push(context, MaterialPageRoute(builder: (context) => const HighSecurityGetStartedScreen())); + Navigator.push( + context, + MaterialPageRoute(builder: (context) => HighSecurityGetStartedScreen(account: widget.account)), + ); }, child: Container( width: double.infinity, diff --git a/mobile-app/lib/features/main/screens/accounts_screen.dart b/mobile-app/lib/features/main/screens/accounts_screen.dart index 36950e1e..5a1fd109 100644 --- a/mobile-app/lib/features/main/screens/accounts_screen.dart +++ b/mobile-app/lib/features/main/screens/accounts_screen.dart @@ -145,6 +145,22 @@ class _AccountsScreenState extends ConsumerState { }); } + Future _refreshAccounts() async { + // Invalidate main accounts provider + ref.invalidate(accountsProvider); + + // Invalidate per-account providers + final accounts = ref.read(accountsProvider).valueOrNull ?? []; + for (final account in accounts) { + ref.invalidate(isHighSecurityProvider(account)); + ref.invalidate(entrustedAccountsProvider(account)); + ref.invalidate(balanceProviderFamily(account.accountId)); + } + + // Wait for accounts to reload + await ref.read(accountsProvider.notifier).stream.firstWhere((state) => !state.isLoading); + } + @override Widget build(BuildContext context) { return ScaffoldBase( @@ -220,15 +236,18 @@ class _AccountsScreenState extends ConsumerState { final grouped = _groupByWallet(accounts); if (grouped.length <= 1) { final walletAccounts = grouped.values.first; - return ListView.separated( - padding: const EdgeInsets.symmetric(vertical: 16.0), - itemCount: walletAccounts.length, - separatorBuilder: (context, index) => const SizedBox(height: 25), - itemBuilder: (context, index) { - final account = walletAccounts[index]; - final bool isActive = account.accountId == activeAccount?.accountId; - return _buildAccountListItem(account, isActive, index); - }, + return RefreshIndicator( + onRefresh: _refreshAccounts, + child: ListView.separated( + padding: const EdgeInsets.symmetric(vertical: 16.0), + itemCount: walletAccounts.length, + separatorBuilder: (context, index) => const SizedBox(height: 25), + itemBuilder: (context, index) { + final account = walletAccounts[index]; + final bool isActive = account.accountId == activeAccount?.accountId; + return _buildAccountListItem(account, isActive, index); + }, + ), ); } @@ -263,7 +282,10 @@ class _AccountsScreenState extends ConsumerState { sectionIndex++; } - return ListView(padding: const EdgeInsets.symmetric(vertical: 16.0), children: children); + return RefreshIndicator( + onRefresh: _refreshAccounts, + child: ListView(padding: const EdgeInsets.symmetric(vertical: 16.0), children: children), + ); }, ); }, @@ -278,7 +300,7 @@ class _AccountsScreenState extends ConsumerState { final double constraintMaxHeight = min(entrustedNodes.length * 52, 104); - final isHighSecurityAsync = ref.read(isHighSecurityProvider(account)); + final isHighSecurityAsync = ref.watch(isHighSecurityProvider(account)); final isHighSecurity = isHighSecurityAsync.value ?? false; return InkWell( diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart index 3b6d23e1..c06590ed 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart @@ -9,11 +9,15 @@ import 'package:resonance_network_wallet/features/main/screens/high_security/hig import 'package:resonance_network_wallet/features/styles/app_colors_theme.dart'; import 'package:resonance_network_wallet/features/styles/app_size_theme.dart'; import 'package:resonance_network_wallet/features/styles/app_text_theme.dart'; +import 'package:resonance_network_wallet/providers/account_providers.dart'; +import 'package:resonance_network_wallet/providers/entrusted_account_provider.dart'; import 'package:resonance_network_wallet/providers/high_security_form_provider.dart'; +import 'package:resonance_network_wallet/providers/wallet_providers.dart'; import 'package:resonance_network_wallet/shared/extensions/media_query_data_extension.dart'; class HighSecurityConfirmationSheet extends ConsumerStatefulWidget { - const HighSecurityConfirmationSheet({super.key}); + final Account account; + const HighSecurityConfirmationSheet({super.key, required this.account}); @override ConsumerState createState() => _HighSecurityConfirmationSheetState(); @@ -21,7 +25,6 @@ class HighSecurityConfirmationSheet extends ConsumerStatefulWidget { class _HighSecurityConfirmationSheetState extends ConsumerState { final HighSecurityService _highSecurityService = HighSecurityService(); - final SettingsService _settingsService = SettingsService(); BigInt? _networkFee; bool _isSubmitting = false; @@ -35,14 +38,26 @@ class _HighSecurityConfirmationSheetState extends ConsumerState const HighSecurityGuardianWizard())); + Navigator.push( + context, + MaterialPageRoute(builder: (context) => HighSecurityGuardianWizard(account: account)), + ); }, ), SizedBox(height: context.themeSize.bottomButtonSpacing), diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart b/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart index 6e429c9e..c3023c1a 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart @@ -21,7 +21,8 @@ import 'package:resonance_network_wallet/providers/high_security_form_provider.d final HumanReadableChecksumService _checksumService = HumanReadableChecksumService(); class HighSecurityGuardianWizard extends ConsumerStatefulWidget { - const HighSecurityGuardianWizard({super.key}); + final Account account; + const HighSecurityGuardianWizard({super.key, required this.account}); @override ConsumerState createState() => _HighSecurityGuardianWizardState(); @@ -192,7 +193,9 @@ class _HighSecurityGuardianWizardState extends ConsumerState const HighSecuritySafeguardWindowWizard()), + MaterialPageRoute( + builder: (context) => HighSecuritySafeguardWindowWizard(account: widget.account), + ), ); }, ), diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_safeguard_window_wizard.dart b/mobile-app/lib/features/main/screens/high_security/high_security_safeguard_window_wizard.dart index bebcbcf8..3600ab79 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_safeguard_window_wizard.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_safeguard_window_wizard.dart @@ -15,7 +15,8 @@ import 'package:resonance_network_wallet/providers/high_security_form_provider.d import 'package:resonance_network_wallet/shared/extensions/media_query_data_extension.dart'; class HighSecuritySafeguardWindowWizard extends ConsumerStatefulWidget { - const HighSecuritySafeguardWindowWizard({super.key}); + final Account account; + const HighSecuritySafeguardWindowWizard({super.key, required this.account}); @override ConsumerState createState() => _HighSecuritySafeguardWindowWizardState(); @@ -127,7 +128,10 @@ class _HighSecuritySafeguardWindowWizardState extends ConsumerState const HighSecuritySummaryWizard())); + Navigator.push( + context, + MaterialPageRoute(builder: (context) => HighSecuritySummaryWizard(account: widget.account)), + ); }, ), ), diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_summary_wizard.dart b/mobile-app/lib/features/main/screens/high_security/high_security_summary_wizard.dart index 76b7b60f..9828c749 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_summary_wizard.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_summary_wizard.dart @@ -13,7 +13,8 @@ import 'package:resonance_network_wallet/features/styles/app_text_theme.dart'; import 'package:resonance_network_wallet/providers/high_security_form_provider.dart'; class HighSecuritySummaryWizard extends ConsumerStatefulWidget { - const HighSecuritySummaryWizard({super.key}); + final Account account; + const HighSecuritySummaryWizard({super.key, required this.account}); @override ConsumerState createState() => _HighSecuritySummaryWizardState(); @@ -27,6 +28,7 @@ class _HighSecuritySummaryWizardState extends ConsumerState( + future: accountChecksumFuture, + builder: (context, snapshot) { + return Text( + snapshot.data ?? 'Loading...', + style: context.themeText.smallParagraph?.copyWith(color: context.themeColors.checksumDarker), + ); + }, ), SizedBox( width: 220, child: Text( - '5FEUm MJ6w5 36upW fhFcK n61jN UniW3 norvT ULjwj MhbfN cs4N', + AddressFormattingService.splitIntoChunks(widget.account.accountId).join(' '), style: context.themeText.detail?.copyWith(color: Colors.white.useOpacity(0.6000000238418579)), ), ), @@ -88,7 +95,7 @@ class _HighSecuritySummaryWizardState extends ConsumerState getHighSecurityConfig(String address) async { final hsData = await _reversibleTransfersService.getHighSecurityConfig(address); - + print('getHighSecurityConfig: $address -> $hsData'); if (hsData != null) { final accountId = AddressExtension.ss58AddressFromBytes(Uint8List.fromList(hsData.interceptor)); if (hsData.delay is! qp.Timestamp) { diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index 5a9f058f..dfa06f09 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -124,6 +124,7 @@ class ReversibleTransfersService { /// Query account's reversibility configuration Future getHighSecurityConfig(String address) async { + print('getHighSecurityConfig: $address'); try { final resonanceApi = Schrodinger(_substrateService.provider!); final accountId = crypto.ss58ToAccountId(s: address); @@ -214,24 +215,23 @@ class ReversibleTransfersService { Future setHighSecurity({ required Account account, required String guardianAccountId, - required qp.BlockNumberOrTimestamp delay, + required qp.Timestamp delay, }) async { print( - 'setHighSecurity: $account, $guardianAccountId, ${(delay as Timestamp).value0} ms -> ${DurationToTimestampExtension.fromQpTimestamp(delay as qp.Timestamp)}', + 'setHighSecurity: $account, $guardianAccountId, ${delay.value0} ms -> ${DurationToTimestampExtension.fromQpTimestamp(delay)}', ); try { final resonanceApi = Schrodinger(_substrateService.provider!); + final accountId = crypto.ss58ToAccountId(s: account.accountId); // Create the call - final call = resonanceApi.tx.reversibleTransfers.setHighSecurity( - delay: delay, - interceptor: crypto.ss58ToAccountId(s: guardianAccountId), - ); + final call = resonanceApi.tx.reversibleTransfers.setHighSecurity(delay: delay, interceptor: accountId); // Submit the transaction using substrate service return _substrateService.submitExtrinsic(account, call); } catch (e) { - throw Exception('Failed to enable reversibility: $e'); + print('Failed to enable high security: $e'); + throw Exception('Failed to enable high security: $e'); } } @@ -241,7 +241,7 @@ class ReversibleTransfersService { final config = await getHighSecurityConfig(address); return config != null; } catch (e) { - throw Exception('Failed to check reversibility status: $e'); + throw Exception('Failed to check high security status: $e'); } } diff --git a/quantus_sdk/lib/src/services/substrate_service.dart b/quantus_sdk/lib/src/services/substrate_service.dart index c0f3327c..e209a5d2 100644 --- a/quantus_sdk/lib/src/services/substrate_service.dart +++ b/quantus_sdk/lib/src/services/substrate_service.dart @@ -112,6 +112,7 @@ class SubstrateService { final params = ['0x${hex.encode(extrinsic)}']; final response = await _rpcEndpointService.rpcTask((uri) async { + print('submitExtrinsic to $uri'); final provider = Provider.fromUri(uri); return await provider.send('author_submitExtrinsic', params); }); From d2a42eef9089d40f3ecd96a84876faf1397156f4 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 16:50:25 +0800 Subject: [PATCH 13/36] fix high security await --- .../high_security/high_security_confirmation_sheet.dart | 6 ++++-- quantus_sdk/lib/src/services/high_security_service.dart | 4 ++-- .../lib/src/services/reversible_transfers_service.dart | 4 ++-- quantus_sdk/lib/src/services/substrate_service.dart | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart index c06590ed..e2356f7a 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart @@ -38,11 +38,12 @@ class _HighSecurityConfirmationSheetState extends ConsumerState setHighSecurity(Account account, String guardianAccountId, Duration safeguardDuration) async { - _reversibleTransfersService.setHighSecurity( + Future setHighSecurity(Account account, String guardianAccountId, Duration safeguardDuration) async { + return await _reversibleTransfersService.setHighSecurity( account: account, guardianAccountId: guardianAccountId, delay: safeguardDuration.qpTimestamp, diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index dfa06f09..9258ea2d 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -218,7 +218,7 @@ class ReversibleTransfersService { required qp.Timestamp delay, }) async { print( - 'setHighSecurity: $account, $guardianAccountId, ${delay.value0} ms -> ${DurationToTimestampExtension.fromQpTimestamp(delay)}', + 'setHighSecurity: ${account.accountId}, $guardianAccountId, ${delay.value0} ms -> ${DurationToTimestampExtension.fromQpTimestamp(delay)}', ); try { final resonanceApi = Schrodinger(_substrateService.provider!); @@ -228,7 +228,7 @@ class ReversibleTransfersService { final call = resonanceApi.tx.reversibleTransfers.setHighSecurity(delay: delay, interceptor: accountId); // Submit the transaction using substrate service - return _substrateService.submitExtrinsic(account, call); + return await _substrateService.submitExtrinsic(account, call); } catch (e) { print('Failed to enable high security: $e'); throw Exception('Failed to enable high security: $e'); diff --git a/quantus_sdk/lib/src/services/substrate_service.dart b/quantus_sdk/lib/src/services/substrate_service.dart index e209a5d2..f4fc479e 100644 --- a/quantus_sdk/lib/src/services/substrate_service.dart +++ b/quantus_sdk/lib/src/services/substrate_service.dart @@ -145,6 +145,7 @@ class SubstrateService { print('Failed to submit extrinsic after $maxRetries retries: $e'); rethrow; } + print('Failed to submit extrinsic, retrying... $retryCount'); await Future.delayed(Duration(milliseconds: 500 * retryCount)); } } From 0793451834f79d37c226980feb31f2ac1f45d15f Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 17:02:44 +0800 Subject: [PATCH 14/36] update generated types from metadata dirac didn't rename since we don't support multiple chains anyway --- .../high_security_confirmation_sheet.dart | 1 - .../generated/resonance/pallets/assets.dart | 867 -- .../generated/resonance/pallets/balances.dart | 541 - .../resonance/pallets/conviction_voting.dart | 260 - .../resonance/pallets/merkle_airdrop.dart | 211 - .../resonance/pallets/mining_rewards.dart | 85 - .../generated/resonance/pallets/preimage.dart | 181 - .../generated/resonance/pallets/q_po_w.dart | 280 - .../generated/resonance/pallets/recovery.dart | 311 - .../resonance/pallets/referenda.dart | 436 - .../pallets/reversible_transfers.dart | 372 - .../resonance/pallets/scheduler.dart | 358 - .../lib/generated/resonance/pallets/sudo.dart | 78 - .../generated/resonance/pallets/system.dart | 738 -- .../resonance/pallets/tech_collective.dart | 315 - .../resonance/pallets/tech_referenda.dart | 366 - .../resonance/pallets/timestamp.dart | 101 - .../pallets/transaction_payment.dart | 83 - .../resonance/pallets/treasury_pallet.dart | 397 - .../generated/resonance/pallets/utility.dart | 109 - .../generated/resonance/pallets/vesting.dart | 198 - .../generated/resonance/pallets/wormhole.dart | 101 - .../lib/generated/resonance/resonance.dart | 230 - .../lib/generated/resonance/types/cow_1.dart | 23 - .../lib/generated/resonance/types/cow_2.dart | 31 - .../types/dilithium_signature_scheme.dart | 105 - .../dilithium_signature_with_public.dart | 52 - .../check_metadata_hash.dart | 52 - .../frame_metadata_hash_extension/mode.dart | 48 - .../dispatch/dispatch_class.dart | 51 - .../types/frame_support/dispatch/pays.dart | 48 - .../dispatch/per_dispatch_class_1.dart | 75 - .../dispatch/per_dispatch_class_2.dart | 75 - .../dispatch/per_dispatch_class_3.dart | 69 - .../dispatch/post_dispatch_info.dart | 63 - .../frame_support/dispatch/raw_origin.dart | 162 - .../types/frame_support/pallet_id.dart | 23 - .../traits/preimages/bounded.dart | 200 - .../traits/schedule/dispatch_time.dart | 145 - .../traits/tokens/misc/balance_status.dart | 48 - .../traits/tokens/misc/id_amount_1.dart | 58 - .../traits/tokens/misc/id_amount_2.dart | 58 - .../types/frame_system/account_info.dart | 97 - .../code_upgrade_authorization.dart | 65 - .../frame_system/dispatch_event_info.dart | 70 - .../types/frame_system/event_record.dart | 75 - .../check_genesis/check_genesis.dart | 23 - .../check_mortality/check_mortality.dart | 25 - .../check_non_zero_sender.dart | 23 - .../extensions/check_nonce/check_nonce.dart | 23 - .../check_spec_version.dart | 23 - .../check_tx_version/check_tx_version.dart | 23 - .../extensions/check_weight/check_weight.dart | 23 - .../last_runtime_upgrade_info.dart | 62 - .../frame_system/limits/block_length.dart | 52 - .../frame_system/limits/block_weights.dart | 73 - .../limits/weights_per_class.dart | 83 - .../types/frame_system/pallet/call.dart | 610 - .../types/frame_system/pallet/error.dart | 91 - .../types/frame_system/pallet/event.dart | 400 - .../resonance/types/frame_system/phase.dart | 159 - .../types/pallet_assets/pallet/call.dart | 2429 ---- .../types/pallet_assets/pallet/error.dart | 150 - .../types/pallet_assets/pallet/event.dart | 1668 --- .../pallet_assets/types/account_status.dart | 51 - .../types/pallet_assets/types/approval.dart | 56 - .../pallet_assets/types/asset_account.dart | 84 - .../pallet_assets/types/asset_details.dart | 175 - .../pallet_assets/types/asset_metadata.dart | 96 - .../pallet_assets/types/asset_status.dart | 51 - .../pallet_assets/types/existence_reason.dart | 240 - .../types/pallet_balances/pallet/call.dart | 598 - .../types/pallet_balances/pallet/error.dart | 102 - .../types/pallet_balances/pallet/event.dart | 1218 -- .../pallet_balances/types/account_data.dart | 78 - .../types/adjustment_direction.dart | 48 - .../pallet_balances/types/balance_lock.dart | 69 - .../pallet_balances/types/extra_flags.dart | 23 - .../types/pallet_balances/types/reasons.dart | 51 - .../pallet_balances/types/reserve_data.dart | 57 - .../conviction/conviction.dart | 63 - .../pallet_conviction_voting/pallet/call.dart | 498 - .../pallet/error.dart | 103 - .../pallet/event.dart | 264 - .../types/delegations.dart | 56 - .../pallet_conviction_voting/types/tally.dart | 65 - .../vote/account_vote.dart | 222 - .../vote/casting.dart | 87 - .../vote/delegating.dart | 101 - .../vote/prior_lock.dart | 56 - .../pallet_conviction_voting/vote/vote.dart | 23 - .../pallet_conviction_voting/vote/voting.dart | 148 - .../airdrop_metadata.dart | 98 - .../pallet_merkle_airdrop/pallet/call.dart | 361 - .../pallet_merkle_airdrop/pallet/error.dart | 67 - .../pallet_merkle_airdrop/pallet/event.dart | 297 - .../pallet_mining_rewards/pallet/event.dart | 217 - .../pallet_preimage/old_request_status.dart | 200 - .../types/pallet_preimage/pallet/call.dart | 310 - .../types/pallet_preimage/pallet/error.dart | 82 - .../types/pallet_preimage/pallet/event.dart | 200 - .../pallet_preimage/pallet/hold_reason.dart | 45 - .../types/pallet_preimage/request_status.dart | 208 - .../types/pallet_qpow/pallet/error.dart | 49 - .../types/pallet_qpow/pallet/event.dart | 189 - .../member_record.dart | 50 - .../pallet_ranked_collective/pallet/call.dart | 447 - .../pallet/error.dart | 97 - .../pallet/event.dart | 346 - .../types/pallet_ranked_collective/tally.dart | 66 - .../pallet_ranked_collective/vote_record.dart | 145 - .../pallet_recovery/active_recovery.dart | 76 - .../types/pallet_recovery/pallet/call.dart | 585 - .../types/pallet_recovery/pallet/error.dart | 122 - .../types/pallet_recovery/pallet/event.dart | 400 - .../pallet_recovery/recovery_config.dart | 89 - .../types/pallet_referenda/pallet/call_1.dart | 562 - .../types/pallet_referenda/pallet/call_2.dart | 562 - .../pallet_referenda/pallet/error_1.dart | 112 - .../pallet_referenda/pallet/error_2.dart | 112 - .../pallet_referenda/pallet/event_1.dart | 985 -- .../pallet_referenda/pallet/event_2.dart | 985 -- .../types/pallet_referenda/types/curve.dart | 263 - .../types/deciding_status.dart | 59 - .../types/pallet_referenda/types/deposit.dart | 59 - .../types/referendum_info_1.dart | 389 - .../types/referendum_info_2.dart | 389 - .../types/referendum_status_1.dart | 191 - .../types/referendum_status_2.dart | 191 - .../pallet_referenda/types/track_info.dart | 143 - .../high_security_account_data.dart | 77 - .../pallet/call.dart | 358 - .../pallet/error.dart | 122 - .../pallet/event.dart | 392 - .../pallet/hold_reason.dart | 45 - .../pending_transfer.dart | 99 - .../types/pallet_scheduler/pallet/call.dart | 821 -- .../types/pallet_scheduler/pallet/error.dart | 72 - .../types/pallet_scheduler/pallet/event.dart | 690 - .../types/pallet_scheduler/retry_config.dart | 71 - .../types/pallet_scheduler/scheduled.dart | 102 - .../types/pallet_sudo/pallet/call.dart | 296 - .../types/pallet_sudo/pallet/error.dart | 47 - .../types/pallet_sudo/pallet/event.dart | 269 - .../types/pallet_timestamp/pallet/call.dart | 125 - .../charge_transaction_payment.dart | 23 - .../pallet/event.dart | 131 - .../pallet_transaction_payment/releases.dart | 48 - .../types/pallet_treasury/pallet/call.dart | 486 - .../types/pallet_treasury/pallet/error.dart | 98 - .../types/pallet_treasury/pallet/event.dart | 740 -- .../types/pallet_treasury/payment_state.dart | 161 - .../types/pallet_treasury/proposal.dart | 84 - .../types/pallet_treasury/spend_status.dart | 108 - .../types/pallet_utility/pallet/call.dart | 418 - .../types/pallet_utility/pallet/error.dart | 47 - .../types/pallet_utility/pallet/event.dart | 306 - .../types/pallet_vesting/pallet/call.dart | 436 - .../types/pallet_vesting/pallet/error.dart | 68 - .../types/pallet_vesting/pallet/event.dart | 167 - .../types/pallet_vesting/releases.dart | 48 - .../vesting_info/vesting_info.dart | 69 - .../types/pallet_wormhole/pallet/call.dart | 117 - .../types/pallet_wormhole/pallet/error.dart | 73 - .../types/pallet_wormhole/pallet/event.dart | 106 - .../poseidon_resonance/poseidon_hasher.dart | 23 - .../resonance/types/primitive_types/h256.dart | 23 - .../resonance/types/primitive_types/u512.dart | 23 - .../block_number_or_timestamp.dart | 145 - .../types/qp_scheduler/dispatch_time.dart | 147 - .../definitions/preimage_deposit.dart | 50 - .../origins/pallet_custom_origins/origin.dart | 54 - .../types/quantus_runtime/origin_caller.dart | 148 - .../types/quantus_runtime/runtime.dart | 23 - .../types/quantus_runtime/runtime_call.dart | 854 -- .../types/quantus_runtime/runtime_event.dart | 922 -- .../runtime_freeze_reason.dart | 23 - .../quantus_runtime/runtime_hold_reason.dart | 148 - .../reversible_transaction_extension.dart | 23 - .../types/sp_arithmetic/arithmetic_error.dart | 51 - .../sp_arithmetic/fixed_point/fixed_i64.dart | 23 - .../sp_arithmetic/fixed_point/fixed_u128.dart | 23 - .../sp_arithmetic/per_things/perbill.dart | 23 - .../sp_arithmetic/per_things/permill.dart | 23 - .../types/sp_core/crypto/account_id32.dart | 23 - .../types/sp_runtime/dispatch_error.dart | 557 - .../dispatch_error_with_post_info.dart | 63 - .../sp_runtime/generic/digest/digest.dart | 53 - .../generic/digest/digest_item.dart | 285 - .../types/sp_runtime/generic/era/era.dart | 10544 ---------------- .../unchecked_extrinsic.dart | 23 - .../types/sp_runtime/module_error.dart | 57 - .../multiaddress/multi_address.dart | 276 - .../sp_runtime/proving_trie/trie_error.dart | 84 - .../types/sp_runtime/token_error.dart | 72 - .../types/sp_runtime/transactional_error.dart | 48 - .../types/sp_version/runtime_version.dart | 140 - .../types/sp_weights/runtime_db_weight.dart | 56 - .../types/sp_weights/weight_v2/weight.dart | 59 - .../lib/generated/resonance/types/tuples.dart | 37 - .../generated/resonance/types/tuples_1.dart | 37 - .../generated/resonance/types/tuples_2.dart | 49 - .../generated/resonance/types/tuples_3.dart | 43 - .../generated/resonance/types/tuples_4.dart | 119 - .../generated/schrodinger/pallets/assets.dart | 431 +- .../schrodinger/pallets/assets_holder.dart | 76 +- .../schrodinger/pallets/balances.dart | 351 +- .../pallets/conviction_voting.dart | 147 +- .../schrodinger/pallets/merkle_airdrop.dart | 117 +- .../schrodinger/pallets/mining_rewards.dart | 21 +- .../schrodinger/pallets/preimage.dart | 111 +- .../generated/schrodinger/pallets/q_po_w.dart | 171 +- .../schrodinger/pallets/recovery.dart | 143 +- .../schrodinger/pallets/referenda.dart | 231 +- .../pallets/reversible_transfers.dart | 272 +- .../schrodinger/pallets/scheduler.dart | 216 +- .../generated/schrodinger/pallets/sudo.dart | 28 +- .../generated/schrodinger/pallets/system.dart | 576 +- .../schrodinger/pallets/tech_collective.dart | 247 +- .../schrodinger/pallets/tech_referenda.dart | 173 +- .../schrodinger/pallets/timestamp.dart | 10 +- .../pallets/transaction_payment.dart | 21 +- .../schrodinger/pallets/treasury_pallet.dart | 118 +- .../schrodinger/pallets/utility.dart | 50 +- .../schrodinger/pallets/vesting.dart | 78 +- .../generated/schrodinger/schrodinger.dart | 82 +- .../generated/schrodinger/types/cow_1.dart | 10 +- .../generated/schrodinger/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 +- .../types/frame_support/pallet_id.dart | 10 +- .../traits/preimages/bounded.dart | 115 +- .../traits/schedule/dispatch_time.dart | 45 +- .../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 +- .../schrodinger/types/frame_system/phase.dart | 38 +- .../types/pallet_assets/pallet/call.dart | 1631 ++- .../types/pallet_assets/pallet/error.dart | 15 +- .../types/pallet_assets/pallet/event.dart | 1421 ++- .../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 | 1264 +- .../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 | 267 +- .../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 +- .../airdrop_metadata.dart | 79 +- .../pallet_merkle_airdrop/pallet/call.dart | 243 +- .../pallet_merkle_airdrop/pallet/error.dart | 15 +- .../pallet_merkle_airdrop/pallet/event.dart | 200 +- .../pallet_mining_rewards/pallet/event.dart | 143 +- .../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/error.dart | 49 - .../types/pallet_qpow/pallet/event.dart | 194 +- .../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 | 337 +- .../pallet/error.dart | 18 +- .../pallet/event.dart | 288 +- .../pallet/hold_reason.dart | 15 +- .../pending_transfer.dart | 70 +- .../types/pallet_scheduler/pallet/call.dart | 656 +- .../types/pallet_scheduler/pallet/error.dart | 15 +- .../types/pallet_scheduler/pallet/event.dart | 563 +- .../types/pallet_scheduler/retry_config.dart | 43 +- .../types/pallet_scheduler/scheduled.dart | 95 +- .../types/pallet_sudo/pallet/call.dart | 167 +- .../types/pallet_sudo/pallet/error.dart | 15 +- .../types/pallet_sudo/pallet/event.dart | 145 +- .../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 | 211 +- .../types/pallet_treasury/pallet/error.dart | 15 +- .../types/pallet_treasury/pallet/event.dart | 488 +- .../types/pallet_treasury/payment_state.dart | 42 +- .../types/pallet_treasury/proposal.dart | 64 +- .../types/pallet_treasury/spend_status.dart | 68 +- .../types/pallet_utility/pallet/call.dart | 375 +- .../types/pallet_utility/pallet/error.dart | 15 +- .../types/pallet_utility/pallet/event.dart | 167 +- .../types/pallet_vesting/pallet/call.dart | 245 +- .../types/pallet_vesting/pallet/error.dart | 15 +- .../types/pallet_vesting/pallet/event.dart | 143 +- .../types/pallet_vesting/releases.dart | 15 +- .../vesting_info/vesting_info.dart | 43 +- .../types/primitive_types/h256.dart | 10 +- .../types/primitive_types/u512.dart | 10 +- .../types/dilithium_signature_scheme.dart | 37 +- .../dilithium_signature_with_public.dart | 29 +- .../types/qp_poseidon/poseidon_hasher.dart | 10 +- .../block_number_or_timestamp.dart | 51 +- .../types/qp_scheduler/dispatch_time.dart | 45 +- .../definitions/preimage_deposit.dart | 17 +- .../origins/pallet_custom_origins/origin.dart | 15 +- .../types/quantus_runtime/origin_caller.dart | 45 +- .../types/quantus_runtime/runtime.dart | 10 +- .../types/quantus_runtime/runtime_call.dart | 348 +- .../types/quantus_runtime/runtime_event.dart | 402 +- .../runtime_freeze_reason.dart | 10 +- .../quantus_runtime/runtime_hold_reason.dart | 45 +- .../reversible_transaction_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 +- .../types/sp_runtime/module_error.dart | 46 +- .../multiaddress/multi_address.dart | 110 +- .../sp_runtime/proving_trie/trie_error.dart | 15 +- .../types/sp_runtime/token_error.dart | 15 +- .../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 +- .../generated/schrodinger/types/tuples.dart | 20 +- .../generated/schrodinger/types/tuples_1.dart | 20 +- .../generated/schrodinger/types/tuples_2.dart | 26 +- .../generated/schrodinger/types/tuples_3.dart | 23 +- .../generated/schrodinger/types/tuples_4.dart | 5 +- quantus_sdk/pubspec.yaml | 5 +- 408 files changed, 23176 insertions(+), 57947 deletions(-) delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/assets.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/balances.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/conviction_voting.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/merkle_airdrop.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/mining_rewards.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/preimage.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/q_po_w.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/recovery.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/referenda.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/reversible_transfers.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/scheduler.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/sudo.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/system.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/tech_collective.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/tech_referenda.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/timestamp.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/transaction_payment.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/treasury_pallet.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/utility.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/vesting.dart delete mode 100644 quantus_sdk/lib/generated/resonance/pallets/wormhole.dart delete mode 100644 quantus_sdk/lib/generated/resonance/resonance.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/cow_1.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/cow_2.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/dilithium_crypto/types/dilithium_signature_scheme.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/dilithium_crypto/types/dilithium_signature_with_public.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_metadata_hash_extension/check_metadata_hash.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_metadata_hash_extension/mode.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/dispatch_class.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/pays.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_1.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_2.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_3.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/post_dispatch_info.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/raw_origin.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/pallet_id.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/traits/preimages/bounded.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/traits/schedule/dispatch_time.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/balance_status.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/id_amount_1.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/id_amount_2.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/account_info.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/code_upgrade_authorization.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/dispatch_event_info.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/event_record.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_genesis/check_genesis.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_mortality/check_mortality.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_nonce/check_nonce.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_spec_version/check_spec_version.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_tx_version/check_tx_version.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_weight/check_weight.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/last_runtime_upgrade_info.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/limits/block_length.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/limits/block_weights.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/limits/weights_per_class.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/frame_system/phase.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_assets/types/account_status.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_assets/types/approval.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_account.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_details.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_metadata.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_status.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_assets/types/existence_reason.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_balances/types/account_data.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_balances/types/adjustment_direction.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_balances/types/balance_lock.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_balances/types/extra_flags.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_balances/types/reasons.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_balances/types/reserve_data.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/conviction/conviction.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/types/delegations.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/types/tally.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/account_vote.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/casting.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/delegating.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/prior_lock.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/vote.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/voting.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/airdrop_metadata.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_mining_rewards/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_preimage/old_request_status.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/hold_reason.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_preimage/request_status.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_qpow/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_qpow/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/member_record.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/tally.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/vote_record.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_recovery/active_recovery.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_recovery/recovery_config.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/call_1.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/call_2.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/error_1.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/error_2.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/event_1.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/event_2.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/curve.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/deciding_status.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/deposit.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_info_1.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_info_2.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_status_1.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_status_2.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/track_info.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/high_security_account_data.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/hold_reason.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pending_transfer.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_scheduler/retry_config.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_scheduler/scheduled.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_timestamp/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/charge_transaction_payment.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/releases.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_treasury/payment_state.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_treasury/proposal.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_treasury/spend_status.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_vesting/releases.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_vesting/vesting_info/vesting_info.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/poseidon_resonance/poseidon_hasher.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/primitive_types/h256.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/primitive_types/u512.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/qp_scheduler/block_number_or_timestamp.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/qp_scheduler/dispatch_time.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/quantus_runtime/governance/definitions/preimage_deposit.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/quantus_runtime/origin_caller.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_call.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_event.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_freeze_reason.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_hold_reason.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_arithmetic/arithmetic_error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_arithmetic/fixed_point/fixed_i64.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_arithmetic/fixed_point/fixed_u128.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_arithmetic/per_things/perbill.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_arithmetic/per_things/permill.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_core/crypto/account_id32.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_runtime/dispatch_error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_runtime/dispatch_error_with_post_info.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/digest/digest.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/digest/digest_item.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/era/era.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_runtime/module_error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_runtime/multiaddress/multi_address.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_runtime/proving_trie/trie_error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_runtime/token_error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_runtime/transactional_error.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_version/runtime_version.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_weights/runtime_db_weight.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/sp_weights/weight_v2/weight.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/tuples.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/tuples_1.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/tuples_2.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/tuples_3.dart delete mode 100644 quantus_sdk/lib/generated/resonance/types/tuples_4.dart delete mode 100644 quantus_sdk/lib/generated/schrodinger/types/pallet_qpow/pallet/error.dart diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart index e2356f7a..6f73e39f 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/features/components/button.dart'; -import 'package:resonance_network_wallet/features/main/screens/high_security/high_security_cancel_warning_sheet.dart'; import 'package:resonance_network_wallet/features/main/screens/high_security/high_security_created_sheet.dart'; import 'package:resonance_network_wallet/features/styles/app_colors_theme.dart'; import 'package:resonance_network_wallet/features/styles/app_size_theme.dart'; diff --git a/quantus_sdk/lib/generated/resonance/pallets/assets.dart b/quantus_sdk/lib/generated/resonance/pallets/assets.dart deleted file mode 100644 index 0b83f9ab..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/assets.dart +++ /dev/null @@ -1,867 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i8; -import 'dart:typed_data' as _i9; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i3; - -import '../types/pallet_assets/pallet/call.dart' as _i12; -import '../types/pallet_assets/types/approval.dart' as _i6; -import '../types/pallet_assets/types/asset_account.dart' as _i5; -import '../types/pallet_assets/types/asset_details.dart' as _i2; -import '../types/pallet_assets/types/asset_metadata.dart' as _i7; -import '../types/quantus_runtime/runtime_call.dart' as _i10; -import '../types/sp_core/crypto/account_id32.dart' as _i4; -import '../types/sp_runtime/multiaddress/multi_address.dart' as _i11; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageMap _asset = const _i1.StorageMap( - prefix: 'Assets', - storage: 'Asset', - valueCodec: _i2.AssetDetails.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), - ); - - 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: 'Metadata', - valueCodec: _i7.AssetMetadata.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), - ); - - final _i1.StorageValue _nextAssetId = const _i1.StorageValue( - prefix: 'Assets', - storage: 'NextAssetId', - valueCodec: _i3.U32Codec.codec, - ); - - /// Details of an asset. - _i8.Future<_i2.AssetDetails?> asset(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _asset.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _asset.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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); - if (bytes != null) { - return _account.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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); - if (bytes != null) { - return _approvals.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// Metadata of an asset. - _i8.Future<_i7.AssetMetadata> metadata(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _metadata.hashedKeyFor(key1); - 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), - decimals: 0, - isFrozen: false, - ); /* Default */ - } - - /// The asset ID enforced for the next asset creation, if any present. Otherwise, this storage - /// item has no effect. - /// - /// This can be useful for setting up constraints for IDs of the new assets. For example, by - /// providing an initial [`NextAssetId`] and using the [`crate::AutoIncAssetId`] callback, an - /// auto-increment model can be applied to all new asset IDs. - /// - /// The initial next asset ID can be set using the [`GenesisConfig`] or the - /// [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); - if (bytes != null) { - return _nextAssetId.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// Details of an asset. - _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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _asset.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Metadata of an asset. - _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); - if (bytes.isNotEmpty) { - 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, - ), - ) - .toList() - as List<_i7.AssetMetadata>); /* Default */ - } - - /// Returns the storage key for `asset`. - _i9.Uint8List assetKey(int key1) { - final hashedKey = _asset.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `account`. - _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); - return hashedKey; - } - - /// Returns the storage key for `metadata`. - _i9.Uint8List metadataKey(int key1) { - final hashedKey = _metadata.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `nextAssetId`. - _i9.Uint8List nextAssetIdKey() { - final hashedKey = _nextAssetId.hashedKey(); - return hashedKey; - } - - /// Returns the storage map key prefix for `asset`. - _i9.Uint8List assetMapPrefix() { - final hashedKey = _asset.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `account`. - _i9.Uint8List accountMapPrefix(int key1) { - final hashedKey = _account.mapPrefix(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `metadata`. - _i9.Uint8List metadataMapPrefix() { - final hashedKey = _metadata.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Issue a new class of fungible assets from a public origin. - /// - /// This new asset class has no assets initially and its owner is the origin. - /// - /// The origin must conform to the configured `CreateOrigin` and have sufficient funds free. - /// - /// Funds of sender are reserved by `AssetDeposit`. - /// - /// Parameters: - /// - `id`: The identifier of the new asset. This must not be currently in use to identify - /// an existing asset. If [`NextAssetId`] is set, then this must be equal to it. - /// - `admin`: The admin of this class of assets. The admin is the initial address of each - /// member of the asset class's admin team. - /// - `min_balance`: The minimum balance of this new asset that any single account must - /// have. If an account's balance is reduced below this, then it collapses to zero. - /// - /// 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)); - } - - /// Issue a new class of fungible assets from a privileged origin. - /// - /// This new asset class has no assets initially. - /// - /// The origin must conform to `ForceOrigin`. - /// - /// Unlike `create`, no funds are reserved. - /// - /// - `id`: The identifier of the new asset. This must not be currently in use to identify - /// an existing asset. If [`NextAssetId`] is set, then this must be equal to it. - /// - `owner`: The owner of this class of assets. The owner has full superuser permissions - /// over this asset, but may later change and configure the permissions using - /// `transfer_ownership` and `set_team`. - /// - `min_balance`: The minimum balance of this new asset that any single account must - /// have. If an account's balance is reduced below this, then it collapses to zero. - /// - /// Emits `ForceCreated` event when successful. - /// - /// Weight: `O(1)` - _i10.Assets forceCreate({ - required BigInt id, - required _i11.MultiAddress owner, - required bool isSufficient, - required BigInt minBalance, - }) { - return _i10.Assets(_i12.ForceCreate(id: id, owner: owner, isSufficient: isSufficient, minBalance: minBalance)); - } - - /// Start the process of destroying a fungible asset class. - /// - /// `start_destroy` is the first in a series of extrinsics that should be called, to allow - /// destruction of an asset class. - /// - /// The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`. - /// - /// - `id`: The identifier of the asset to be destroyed. This must identify an existing - /// asset. - _i10.Assets startDestroy({required BigInt id}) { - return _i10.Assets(_i12.StartDestroy(id: id)); - } - - /// Destroy all accounts associated with a given asset. - /// - /// `destroy_accounts` should only be called after `start_destroy` has been called, and the - /// asset is in a `Destroying` state. - /// - /// Due to weight restrictions, this function may need to be called multiple times to fully - /// destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time. - /// - /// - `id`: The identifier of the asset to be destroyed. This must identify an existing - /// asset. - /// - /// Each call emits the `Event::DestroyedAccounts` event. - _i10.Assets destroyAccounts({required BigInt id}) { - return _i10.Assets(_i12.DestroyAccounts(id: id)); - } - - /// Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit). - /// - /// `destroy_approvals` should only be called after `start_destroy` has been called, and the - /// asset is in a `Destroying` state. - /// - /// Due to weight restrictions, this function may need to be called multiple times to fully - /// destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time. - /// - /// - `id`: The identifier of the asset to be destroyed. This must identify an existing - /// asset. - /// - /// Each call emits the `Event::DestroyedApprovals` event. - _i10.Assets destroyApprovals({required BigInt id}) { - return _i10.Assets(_i12.DestroyApprovals(id: id)); - } - - /// Complete destroying asset and unreserve currency. - /// - /// `finish_destroy` should only be called after `start_destroy` has been called, and the - /// asset is in a `Destroying` state. All accounts or approvals should be destroyed before - /// hand. - /// - /// - `id`: The identifier of the asset to be destroyed. This must identify an existing - /// asset. - /// - /// Each successful call emits the `Event::Destroyed` event. - _i10.Assets finishDestroy({required BigInt id}) { - return _i10.Assets(_i12.FinishDestroy(id: id)); - } - - /// Mint assets of a particular class. - /// - /// The origin must be Signed and the sender must be the Issuer of the asset `id`. - /// - /// - `id`: The identifier of the asset to have some amount minted. - /// - `beneficiary`: The account to be credited with the minted assets. - /// - `amount`: The amount of the asset to be minted. - /// - /// Emits `Issued` event when successful. - /// - /// 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)); - } - - /// Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. - /// - /// Origin must be Signed and the sender should be the Manager of the asset `id`. - /// - /// Bails with `NoAccount` if the `who` is already dead. - /// - /// - `id`: The identifier of the asset to have some amount burned. - /// - `who`: The account to be debited from. - /// - `amount`: The maximum amount by which `who`'s balance should be reduced. - /// - /// Emits `Burned` with the actual amount burned. If this takes the balance to below the - /// minimum for the asset, then the amount burned is increased to take it to zero. - /// - /// 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)); - } - - /// Move some assets from the sender account to another. - /// - /// Origin must be Signed. - /// - /// - `id`: The identifier of the asset to have some amount transferred. - /// - `target`: The account to be credited. - /// - `amount`: The amount by which the sender's balance of assets should be reduced and - /// `target`'s balance increased. The amount actually transferred may be slightly greater in - /// the case that the transfer would otherwise take the sender balance above zero but below - /// the minimum balance. Must be greater than zero. - /// - /// Emits `Transferred` with the actual amount transferred. If this takes the source balance - /// to below the minimum for the asset, then the amount transferred is increased to take it - /// to zero. - /// - /// 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)); - } - - /// Move some assets from the sender account to another, keeping the sender account alive. - /// - /// Origin must be Signed. - /// - /// - `id`: The identifier of the asset to have some amount transferred. - /// - `target`: The account to be credited. - /// - `amount`: The amount by which the sender's balance of assets should be reduced and - /// `target`'s balance increased. The amount actually transferred may be slightly greater in - /// the case that the transfer would otherwise take the sender balance above zero but below - /// the minimum balance. Must be greater than zero. - /// - /// Emits `Transferred` with the actual amount transferred. If this takes the source balance - /// to below the minimum for the asset, then the amount transferred is increased to take it - /// to zero. - /// - /// 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)); - } - - /// Move some assets from one account to another. - /// - /// Origin must be Signed and the sender should be the Admin of the asset `id`. - /// - /// - `id`: The identifier of the asset to have some amount transferred. - /// - `source`: The account to be debited. - /// - `dest`: The account to be credited. - /// - `amount`: The amount by which the `source`'s balance of assets should be reduced and - /// `dest`'s balance increased. The amount actually transferred may be slightly greater in - /// the case that the transfer would otherwise take the `source` balance above zero but - /// below the minimum balance. Must be greater than zero. - /// - /// Emits `Transferred` with the actual amount transferred. If this takes the source balance - /// to below the minimum for the asset, then the amount transferred is increased to take it - /// to zero. - /// - /// Weight: `O(1)` - /// Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of - /// `dest`. - _i10.Assets forceTransfer({ - required BigInt id, - required _i11.MultiAddress source, - required _i11.MultiAddress dest, - required BigInt 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` - /// must already exist as an entry in `Account`s of the asset. If you want to freeze an - /// account that does not have an entry, use `touch_other` first. - /// - /// Origin must be Signed and the sender should be the Freezer of the asset `id`. - /// - /// - `id`: The identifier of the asset to be frozen. - /// - `who`: The account to be frozen. - /// - /// Emits `Frozen`. - /// - /// Weight: `O(1)` - _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. - /// - /// Origin must be Signed and the sender should be the Admin of the asset `id`. - /// - /// - `id`: The identifier of the asset to be frozen. - /// - `who`: The account to be unfrozen. - /// - /// Emits `Thawed`. - /// - /// Weight: `O(1)` - _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. - /// - /// Origin must be Signed and the sender should be the Freezer of the asset `id`. - /// - /// - `id`: The identifier of the asset to be frozen. - /// - /// Emits `Frozen`. - /// - /// Weight: `O(1)` - _i10.Assets freezeAsset({required BigInt id}) { - return _i10.Assets(_i12.FreezeAsset(id: id)); - } - - /// Allow unprivileged transfers for the asset again. - /// - /// Origin must be Signed and the sender should be the Admin of the asset `id`. - /// - /// - `id`: The identifier of the asset to be thawed. - /// - /// Emits `Thawed`. - /// - /// Weight: `O(1)` - _i10.Assets thawAsset({required BigInt id}) { - return _i10.Assets(_i12.ThawAsset(id: id)); - } - - /// Change the Owner of an asset. - /// - /// Origin must be Signed and the sender should be the Owner of the asset `id`. - /// - /// - `id`: The identifier of the asset. - /// - `owner`: The new Owner of this asset. - /// - /// Emits `OwnerChanged`. - /// - /// Weight: `O(1)` - _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. - /// - /// Origin must be Signed and the sender should be the Owner of the asset `id`. - /// - /// - `id`: The identifier of the asset to be frozen. - /// - `issuer`: The new Issuer of this asset. - /// - `admin`: The new Admin of this asset. - /// - `freezer`: The new Freezer of this asset. - /// - /// Emits `TeamChanged`. - /// - /// Weight: `O(1)` - _i10.Assets setTeam({ - required BigInt id, - required _i11.MultiAddress issuer, - required _i11.MultiAddress admin, - required _i11.MultiAddress freezer, - }) { - return _i10.Assets(_i12.SetTeam(id: id, issuer: issuer, admin: admin, freezer: freezer)); - } - - /// Set the metadata for an asset. - /// - /// Origin must be Signed and the sender should be the Owner of the asset `id`. - /// - /// Funds of sender are reserved according to the formula: - /// `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into - /// account any already reserved funds. - /// - /// - `id`: The identifier of the asset to update. - /// - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. - /// - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. - /// - `decimals`: The number of decimals this asset uses to represent one unit. - /// - /// Emits `MetadataSet`. - /// - /// Weight: `O(1)` - _i10.Assets setMetadata({ - required BigInt id, - required List name, - required List symbol, - required int decimals, - }) { - return _i10.Assets(_i12.SetMetadata(id: id, name: name, symbol: symbol, decimals: decimals)); - } - - /// Clear the metadata for an asset. - /// - /// Origin must be Signed and the sender should be the Owner of the asset `id`. - /// - /// Any deposit is freed for the asset owner. - /// - /// - `id`: The identifier of the asset to clear. - /// - /// Emits `MetadataCleared`. - /// - /// Weight: `O(1)` - _i10.Assets clearMetadata({required BigInt id}) { - return _i10.Assets(_i12.ClearMetadata(id: id)); - } - - /// Force the metadata for an asset to some value. - /// - /// Origin must be ForceOrigin. - /// - /// Any deposit is left alone. - /// - /// - `id`: The identifier of the asset to update. - /// - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. - /// - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. - /// - `decimals`: The number of decimals this asset uses to represent one unit. - /// - /// Emits `MetadataSet`. - /// - /// Weight: `O(N + S)` where N and S are the length of the name and symbol respectively. - _i10.Assets forceSetMetadata({ - required BigInt id, - required List name, - required List symbol, - required int decimals, - required bool isFrozen, - }) { - return _i10.Assets( - _i12.ForceSetMetadata(id: id, name: name, symbol: symbol, decimals: decimals, isFrozen: isFrozen), - ); - } - - /// Clear the metadata for an asset. - /// - /// Origin must be ForceOrigin. - /// - /// Any deposit is returned. - /// - /// - `id`: The identifier of the asset to clear. - /// - /// Emits `MetadataCleared`. - /// - /// Weight: `O(1)` - _i10.Assets forceClearMetadata({required BigInt id}) { - return _i10.Assets(_i12.ForceClearMetadata(id: id)); - } - - /// Alter the attributes of a given asset. - /// - /// Origin must be `ForceOrigin`. - /// - /// - `id`: The identifier of the asset. - /// - `owner`: The new Owner of this asset. - /// - `issuer`: The new Issuer of this asset. - /// - `admin`: The new Admin of this asset. - /// - `freezer`: The new Freezer of this asset. - /// - `min_balance`: The minimum balance of this new asset that any single account must - /// have. If an account's balance is reduced below this, then it collapses to zero. - /// - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient - /// value to account for the state bloat associated with its balance storage. If set to - /// `true`, then non-zero balances may be stored without a `consumer` reference (and thus - /// an ED in the Balances pallet or whatever else is used to control user-account state - /// growth). - /// - `is_frozen`: Whether this asset class is frozen except for permissioned/admin - /// instructions. - /// - /// Emits `AssetStatusChanged` with the identity of the asset. - /// - /// Weight: `O(1)` - _i10.Assets forceAssetStatus({ - required BigInt id, - required _i11.MultiAddress owner, - required _i11.MultiAddress issuer, - required _i11.MultiAddress admin, - required _i11.MultiAddress freezer, - required BigInt minBalance, - 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, - ), - ); - } - - /// Approve an amount of asset for transfer by a delegated third-party account. - /// - /// Origin must be Signed. - /// - /// Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account - /// for the purpose of holding the approval. If some non-zero amount of assets is already - /// approved from signing account to `delegate`, then it is topped up or unreserved to - /// meet the right value. - /// - /// NOTE: The signing account does not need to own `amount` of assets at the point of - /// making this call. - /// - /// - `id`: The identifier of the asset. - /// - `delegate`: The account to delegate permission to transfer asset. - /// - `amount`: The amount of asset that may be transferred by `delegate`. If there is - /// already an approval in place, then this acts additively. - /// - /// 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)); - } - - /// Cancel all of some asset approved for delegated transfer by a third-party account. - /// - /// Origin must be Signed and there must be an approval in place between signer and - /// `delegate`. - /// - /// Unreserves any deposit previously reserved by `approve_transfer` for the approval. - /// - /// - `id`: The identifier of the asset. - /// - `delegate`: The account delegated permission to transfer asset. - /// - /// 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)); - } - - /// Cancel all of some asset approved for delegated transfer by a third-party account. - /// - /// Origin must be either ForceOrigin or Signed origin with the signer being the Admin - /// account of the asset `id`. - /// - /// Unreserves any deposit previously reserved by `approve_transfer` for the approval. - /// - /// - `id`: The identifier of the asset. - /// - `delegate`: The account delegated permission to transfer asset. - /// - /// Emits `ApprovalCancelled` on success. - /// - /// Weight: `O(1)` - _i10.Assets forceCancelApproval({ - required BigInt id, - required _i11.MultiAddress owner, - required _i11.MultiAddress 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 - /// account. - /// - /// Origin must be Signed and there must be an approval in place by the `owner` to the - /// signer. - /// - /// If the entire amount approved for transfer is transferred, then any deposit previously - /// reserved by `approve_transfer` is unreserved. - /// - /// - `id`: The identifier of the asset. - /// - `owner`: The account which previously approved for a transfer of at least `amount` and - /// from which the asset balance will be withdrawn. - /// - `destination`: The account to which the asset balance of `amount` will be transferred. - /// - `amount`: The amount of assets to transfer. - /// - /// Emits `TransferredApproved` on success. - /// - /// Weight: `O(1)` - _i10.Assets transferApproved({ - required BigInt id, - required _i11.MultiAddress owner, - required _i11.MultiAddress destination, - required BigInt amount, - }) { - return _i10.Assets(_i12.TransferApproved(id: id, owner: owner, destination: destination, amount: amount)); - } - - /// Create an asset account for non-provider assets. - /// - /// A deposit will be taken from the signer account. - /// - /// - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit - /// to be taken. - /// - `id`: The identifier of the asset for the account to be created. - /// - /// Emits `Touched` event when successful. - _i10.Assets touch({required BigInt id}) { - return _i10.Assets(_i12.Touch(id: id)); - } - - /// Return the deposit (if any) of an asset account or a consumer reference (if any) of an - /// account. - /// - /// The origin must be Signed. - /// - /// - `id`: The identifier of the asset for which the caller would like the deposit - /// refunded. - /// - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund. - /// - /// Emits `Refunded` event when successful. - _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. - /// - /// Only works if there aren't any accounts that are holding the asset or if - /// the new value of `min_balance` is less than the old one. - /// - /// Origin must be Signed and the sender has to be the Owner of the - /// asset `id`. - /// - /// - `id`: The identifier of the asset. - /// - `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)); - } - - /// Create an asset account for `who`. - /// - /// A deposit will be taken from the signer account. - /// - /// - `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account - /// must have sufficient funds for a deposit to be taken. - /// - `id`: The identifier of the asset for the account to be created. - /// - `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)); - } - - /// Return the deposit (if any) of a target asset account. Useful if you are the depositor. - /// - /// The origin must be Signed and either the account owner, depositor, or asset `Admin`. In - /// order to burn a non-zero balance of the asset, the caller must be the account and should - /// use `refund`. - /// - /// - `id`: The identifier of the asset for the account holding a deposit. - /// - `who`: The account to refund. - /// - /// Emits `Refunded` event when successful. - _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`. - /// - /// Origin must be Signed and the sender should be the Freezer of the asset `id`. - /// - /// - `id`: The identifier of the account's asset. - /// - `who`: The account to be unblocked. - /// - /// Emits `Blocked`. - /// - /// Weight: `O(1)` - _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. - /// - /// NOTE: This function only attempts to transfer _transferable_ balances. This means that - /// any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be - /// transferred by this function. To ensure that this function results in a killed account, - /// you might need to prepare the account by removing any reference counters, storage - /// deposits, etc... - /// - /// The dispatch origin of this call must be Signed. - /// - /// - `id`: The identifier of the asset for the account holding a deposit. - /// - `dest`: The recipient of the transfer. - /// - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all - /// 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)); - } -} - -class Constants { - Constants(); - - /// Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call. - /// - /// Must be configured to result in a weight that makes each call fit in a block. - final int removeItemsLimit = 1000; - - /// The basic amount of funds that must be reserved for an asset. - final BigInt assetDeposit = BigInt.from(1000000000); - - /// The amount of funds that must be reserved for a non-provider asset account to be - /// maintained. - final BigInt assetAccountDeposit = BigInt.from(1000000000); - - /// The basic amount of funds that must be reserved when adding metadata to your asset. - final BigInt metadataDepositBase = BigInt.from(1000000000); - - /// The additional funds that must be reserved for the number of bytes you store in your - /// metadata. - final BigInt metadataDepositPerByte = BigInt.from(1000000000); - - /// The amount of funds that must be reserved when creating a new approval. - final BigInt approvalDeposit = BigInt.from(1000000000); - - /// The maximum length of a name or symbol stored on-chain. - final int stringLimit = 50; -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/balances.dart b/quantus_sdk/lib/generated/resonance/pallets/balances.dart deleted file mode 100644 index 4e5a442d..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/balances.dart +++ /dev/null @@ -1,541 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i10; -import 'dart:typed_data' as _i11; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i2; - -import '../types/frame_support/traits/tokens/misc/id_amount_1.dart' as _i7; -import '../types/frame_support/traits/tokens/misc/id_amount_2.dart' as _i8; -import '../types/pallet_balances/pallet/call.dart' as _i14; -import '../types/pallet_balances/types/account_data.dart' as _i4; -import '../types/pallet_balances/types/adjustment_direction.dart' as _i15; -import '../types/pallet_balances/types/balance_lock.dart' as _i5; -import '../types/pallet_balances/types/reserve_data.dart' as _i6; -import '../types/quantus_runtime/runtime_call.dart' as _i12; -import '../types/sp_core/crypto/account_id32.dart' as _i3; -import '../types/sp_runtime/multiaddress/multi_address.dart' as _i13; -import '../types/tuples_2.dart' as _i9; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageValue _totalIssuance = const _i1.StorageValue( - prefix: 'Balances', - storage: 'TotalIssuance', - valueCodec: _i2.U128Codec.codec, - ); - - final _i1.StorageValue _inactiveIssuance = const _i1.StorageValue( - prefix: 'Balances', - storage: 'InactiveIssuance', - valueCodec: _i2.U128Codec.codec, - ); - - 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()), - ); - - 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()), - ); - - 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()), - ); - - 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()), - ); - - 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()), - ); - - final _i1.StorageMap<_i9.Tuple4, dynamic> _transferProof = - const _i1.StorageMap<_i9.Tuple4, dynamic>( - prefix: 'Balances', - storage: 'TransferProof', - valueCodec: _i2.NullCodec.codec, - hasher: _i1.StorageHasher.identity( - _i9.Tuple4Codec( - _i2.U64Codec.codec, - _i3.AccountId32Codec(), - _i3.AccountId32Codec(), - _i2.U128Codec.codec, - ), - ), - ); - - final _i1.StorageValue _transferCount = const _i1.StorageValue( - prefix: 'Balances', - storage: 'TransferCount', - valueCodec: _i2.U64Codec.codec, - ); - - /// The total units issued in the system. - _i10.Future totalIssuance({_i1.BlockHash? at}) async { - final hashedKey = _totalIssuance.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _totalIssuance.decodeValue(bytes); - } - return BigInt.zero; /* Default */ - } - - /// The total units of outstanding deactivated balance in the system. - _i10.Future inactiveIssuance({_i1.BlockHash? at}) async { - final hashedKey = _inactiveIssuance.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _inactiveIssuance.decodeValue(bytes); - } - return BigInt.zero; /* Default */ - } - - /// The Balances pallet example of storing the balance of an account. - /// - /// # Example - /// - /// ```nocompile - /// impl pallet_balances::Config for Runtime { - /// type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData> - /// } - /// ``` - /// - /// You can also store the balance of an account in the `System` pallet. - /// - /// # Example - /// - /// ```nocompile - /// impl pallet_balances::Config for Runtime { - /// type AccountStore = System - /// } - /// ``` - /// - /// But this comes with tradeoffs, storing account balances in the system pallet stores - /// `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. - _i10.Future<_i4.AccountData> account(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _account.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _account.decodeValue(bytes); - } - return _i4.AccountData( - free: BigInt.zero, - reserved: BigInt.zero, - frozen: BigInt.zero, - flags: BigInt.parse('170141183460469231731687303715884105728', radix: 10), - ); /* 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/` - _i10.Future> locks(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _locks.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _locks.decodeValue(bytes); - } - return []; /* Default */ - } - - /// Named reserves on some account balances. - /// - /// Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` - _i10.Future> reserves(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _reserves.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _reserves.decodeValue(bytes); - } - return []; /* Default */ - } - - /// Holds on account balances. - _i10.Future> holds(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _holds.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _holds.decodeValue(bytes); - } - return []; /* Default */ - } - - /// Freeze locks on account balances. - _i10.Future> freezes(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _freezes.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _freezes.decodeValue(bytes); - } - return []; /* Default */ - } - - /// Transfer proofs for a wormhole transfers - _i10.Future transferProof( - _i9.Tuple4 key1, { - _i1.BlockHash? at, - }) async { - final hashedKey = _transferProof.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _transferProof.decodeValue(bytes); - } - return null; /* Nullable */ - } - - _i10.Future transferCount({_i1.BlockHash? at}) async { - final hashedKey = _transferCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _transferCount.decodeValue(bytes); - } - return BigInt.zero; /* Default */ - } - - /// The Balances pallet example of storing the balance of an account. - /// - /// # Example - /// - /// ```nocompile - /// impl pallet_balances::Config for Runtime { - /// type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData> - /// } - /// ``` - /// - /// You can also store the balance of an account in the `System` pallet. - /// - /// # Example - /// - /// ```nocompile - /// impl pallet_balances::Config for Runtime { - /// type AccountStore = System - /// } - /// ``` - /// - /// But this comes with tradeoffs, storing account balances in the system pallet stores - /// `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. - _i10.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); - if (bytes.isNotEmpty) { - 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), - ), - ) - .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/` - _i10.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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _locks.decodeValue(v.key)).toList(); - } - 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/` - _i10.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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _reserves.decodeValue(v.key)).toList(); - } - return (keys.map((key) => []).toList() as List>); /* Default */ - } - - /// Holds on account balances. - _i10.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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _holds.decodeValue(v.key)).toList(); - } - return (keys.map((key) => []).toList() as List>); /* Default */ - } - - /// Freeze locks on account balances. - _i10.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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _freezes.decodeValue(v.key)).toList(); - } - return (keys.map((key) => []).toList() as List>); /* Default */ - } - - /// Transfer proofs for a wormhole transfers - _i10.Future> multiTransferProof( - List<_i9.Tuple4> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = keys.map((key) => _transferProof.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _transferProof.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Returns the storage key for `totalIssuance`. - _i11.Uint8List totalIssuanceKey() { - final hashedKey = _totalIssuance.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `inactiveIssuance`. - _i11.Uint8List inactiveIssuanceKey() { - final hashedKey = _inactiveIssuance.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `account`. - _i11.Uint8List accountKey(_i3.AccountId32 key1) { - final hashedKey = _account.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `locks`. - _i11.Uint8List locksKey(_i3.AccountId32 key1) { - final hashedKey = _locks.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `reserves`. - _i11.Uint8List reservesKey(_i3.AccountId32 key1) { - final hashedKey = _reserves.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `holds`. - _i11.Uint8List holdsKey(_i3.AccountId32 key1) { - final hashedKey = _holds.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `freezes`. - _i11.Uint8List freezesKey(_i3.AccountId32 key1) { - final hashedKey = _freezes.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `transferProof`. - _i11.Uint8List transferProofKey(_i9.Tuple4 key1) { - final hashedKey = _transferProof.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `transferCount`. - _i11.Uint8List transferCountKey() { - final hashedKey = _transferCount.hashedKey(); - return hashedKey; - } - - /// Returns the storage map key prefix for `account`. - _i11.Uint8List accountMapPrefix() { - final hashedKey = _account.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `locks`. - _i11.Uint8List locksMapPrefix() { - final hashedKey = _locks.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `reserves`. - _i11.Uint8List reservesMapPrefix() { - final hashedKey = _reserves.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `holds`. - _i11.Uint8List holdsMapPrefix() { - final hashedKey = _holds.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `freezes`. - _i11.Uint8List freezesMapPrefix() { - final hashedKey = _freezes.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `transferProof`. - _i11.Uint8List transferProofMapPrefix() { - final hashedKey = _transferProof.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Transfer some liquid free balance to another account. - /// - /// `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. - /// If the sender's account is below the existential deposit as a result - /// of the transfer, the account will be reaped. - /// - /// The dispatch origin for this call must be `Signed` by the transactor. - _i12.Balances transferAllowDeath({required _i13.MultiAddress dest, required BigInt value}) { - return _i12.Balances(_i14.TransferAllowDeath(dest: dest, value: value)); - } - - /// Exactly as `transfer_allow_death`, except the origin must be root and the source account - /// may be specified. - _i12.Balances forceTransfer({ - required _i13.MultiAddress source, - required _i13.MultiAddress dest, - required BigInt value, - }) { - return _i12.Balances(_i14.ForceTransfer(source: source, dest: dest, value: value)); - } - - /// Same as the [`transfer_allow_death`] call, but with a check that the transfer will not - /// kill the origin account. - /// - /// 99% of the time you want [`transfer_allow_death`] instead. - /// - /// [`transfer_allow_death`]: struct.Pallet.html#method.transfer - _i12.Balances transferKeepAlive({required _i13.MultiAddress dest, required BigInt value}) { - return _i12.Balances(_i14.TransferKeepAlive(dest: dest, value: value)); - } - - /// Transfer the entire transferable balance from the caller account. - /// - /// NOTE: This function only attempts to transfer _transferable_ balances. This means that - /// any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be - /// transferred by this function. To ensure that this function results in a killed account, - /// you might need to prepare the account by removing any reference counters, storage - /// deposits, etc... - /// - /// The dispatch origin of this call must be Signed. - /// - /// - `dest`: The recipient of the transfer. - /// - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all - /// 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). - _i12.Balances transferAll({required _i13.MultiAddress dest, required bool keepAlive}) { - return _i12.Balances(_i14.TransferAll(dest: dest, keepAlive: keepAlive)); - } - - /// Unreserve some balance from a user by force. - /// - /// Can only be called by ROOT. - _i12.Balances forceUnreserve({required _i13.MultiAddress who, required BigInt amount}) { - return _i12.Balances(_i14.ForceUnreserve(who: who, amount: amount)); - } - - /// Upgrade a specified account. - /// - /// - `origin`: Must be `Signed`. - /// - `who`: The account to be upgraded. - /// - /// This will waive the transaction fee if at least all but 10% of the accounts needed to - /// be upgraded. (We let some not have to be upgraded just in order to allow for the - /// possibility of churn). - _i12.Balances upgradeAccounts({required List<_i3.AccountId32> who}) { - return _i12.Balances(_i14.UpgradeAccounts(who: who)); - } - - /// Set the regular balance of a given account. - /// - /// The dispatch origin for this call is `root`. - _i12.Balances forceSetBalance({required _i13.MultiAddress who, required BigInt newFree}) { - return _i12.Balances(_i14.ForceSetBalance(who: who, newFree: newFree)); - } - - /// Adjust the total issuance in a saturating way. - /// - /// Can only be called by root and always needs a positive `delta`. - /// - /// # Example - _i12.Balances forceAdjustTotalIssuance({required _i15.AdjustmentDirection direction, required BigInt delta}) { - return _i12.Balances(_i14.ForceAdjustTotalIssuance(direction: direction, delta: delta)); - } - - /// Burn the specified liquid free balance from the origin account. - /// - /// If the origin's account ends up below the existential deposit as a result - /// of the burn and `keep_alive` is false, the account will be reaped. - /// - /// Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, - /// this `burn` operation will reduce total issuance by the amount _burned_. - _i12.Balances burn({required BigInt value, required bool keepAlive}) { - return _i12.Balances(_i14.Burn(value: value, keepAlive: keepAlive)); - } -} - -class Constants { - Constants(); - - /// The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO! - /// - /// If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for - /// this pallet. However, you do so at your own risk: this will open up a major DoS vector. - /// In case you have multiple sources of provider references, you may also get unexpected - /// behaviour if you set this to zero. - /// - /// Bottom line: Do yourself a favour and make it at least one! - final BigInt existentialDeposit = BigInt.from(1000000000); - - /// The maximum number of locks that should exist on an account. - /// Not strictly enforced, but used for weight estimation. - /// - /// Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` - final int maxLocks = 50; - - /// The maximum number of named reserves that can exist on an account. - /// - /// Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` - final int maxReserves = 0; - - /// The maximum number of individual freeze locks that can exist on an account at any time. - final int maxFreezes = 0; -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/conviction_voting.dart b/quantus_sdk/lib/generated/resonance/pallets/conviction_voting.dart deleted file mode 100644 index 647e58d6..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/conviction_voting.dart +++ /dev/null @@ -1,260 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:typed_data' as _i10; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i4; - -import '../types/pallet_conviction_voting/conviction/conviction.dart' as _i15; -import '../types/pallet_conviction_voting/pallet/call.dart' as _i13; -import '../types/pallet_conviction_voting/types/delegations.dart' as _i8; -import '../types/pallet_conviction_voting/vote/account_vote.dart' as _i12; -import '../types/pallet_conviction_voting/vote/casting.dart' as _i7; -import '../types/pallet_conviction_voting/vote/prior_lock.dart' as _i9; -import '../types/pallet_conviction_voting/vote/voting.dart' as _i3; -import '../types/quantus_runtime/runtime_call.dart' as _i11; -import '../types/sp_core/crypto/account_id32.dart' as _i2; -import '../types/sp_runtime/multiaddress/multi_address.dart' as _i14; -import '../types/tuples.dart' as _i5; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - 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), - ); - - 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()), - ); - - /// 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); - 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), - ), - ); /* 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 { - final hashedKey = _classLocksFor.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _classLocksFor.decodeValue(bytes); - } - return []; /* 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>>> multiClassLocksFor( - 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _classLocksFor.decodeValue(v.key)).toList(); - } - 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); - return hashedKey; - } - - /// Returns the storage key for `classLocksFor`. - _i10.Uint8List classLocksForKey(_i2.AccountId32 key1) { - final hashedKey = _classLocksFor.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `votingFor`. - _i10.Uint8List votingForMapPrefix(_i2.AccountId32 key1) { - final hashedKey = _votingFor.mapPrefix(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `classLocksFor`. - _i10.Uint8List classLocksForMapPrefix() { - final hashedKey = _classLocksFor.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; - /// otherwise it is a vote to keep the status quo. - /// - /// The dispatch origin of this call must be _Signed_. - /// - /// - `poll_index`: The index of the poll to vote for. - /// - `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)); - } - - /// Delegate the voting power (with some given conviction) of the sending account for a - /// particular class of polls. - /// - /// The balance delegated is locked for as long as it's delegated, and thereafter for the - /// time appropriate for the conviction's lock period. - /// - /// The dispatch origin of this call must be _Signed_, and the signing account must either: - /// - be delegating already; or - /// - have no voting activity (if there is, then it will need to be removed through - /// `remove_vote`). - /// - /// - `to`: The account whose voting the `target` account's voting power will follow. - /// - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls - /// to this function are required. - /// - `conviction`: The conviction that will be attached to the delegated votes. When the - /// account is undelegated, the funds will be locked for the corresponding period. - /// - `balance`: The amount of the account's balance to be used in delegating. This must not - /// be more than the account's current balance. - /// - /// Emits `Delegated`. - /// - /// 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. - _i11.ConvictionVoting delegate({ - required int class_, - required _i14.MultiAddress to, - required _i15.Conviction conviction, - required BigInt 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. - /// - /// Tokens may be unlocked following once an amount of time consistent with the lock period - /// of the conviction with which the delegation was issued has passed. - /// - /// The dispatch origin of this call must be _Signed_ and the signing account must be - /// currently delegating. - /// - /// - `class`: The class of polls to remove the delegation from. - /// - /// Emits `Undelegated`. - /// - /// 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. - _i11.ConvictionVoting undelegate({required int class_}) { - return _i11.ConvictionVoting(_i13.Undelegate(class_: class_)); - } - - /// Remove the lock caused by prior voting/delegating which has expired within a particular - /// class. - /// - /// The dispatch origin of this call must be _Signed_. - /// - /// - `class`: The class of polls to unlock. - /// - `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)); - } - - /// Remove a vote for a poll. - /// - /// If: - /// - the poll was cancelled, or - /// - the poll is ongoing, or - /// - the poll has ended such that - /// - the vote of the account was in opposition to the result; or - /// - there was no conviction to the account's vote; or - /// - the account made a split vote - /// ...then the vote is removed cleanly and a following call to `unlock` may result in more - /// funds being available. - /// - /// If, however, the poll has ended and: - /// - it finished corresponding to the vote of the account, and - /// - the account made a standard vote with conviction, and - /// - the lock period of the conviction is not over - /// ...then the lock will be aggregated into the overall account's lock, which may involve - /// *overlocking* (where the two locks are combined into a single lock that is the maximum - /// of both the amount locked and the time is it locked for). - /// - /// The dispatch origin of this call must be _Signed_, and the signer must have a vote - /// registered for poll `index`. - /// - /// - `index`: The index of poll of the vote to be removed. - /// - `class`: Optional parameter, if given it indicates the class of the poll. For polls - /// which have finished or are cancelled, this must be `Some`. - /// - /// 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)); - } - - /// Remove a vote for a poll. - /// - /// If the `target` is equal to the signer, then this function is exactly equivalent to - /// `remove_vote`. If not equal to the signer, then the vote must have expired, - /// either because the poll was cancelled, because the voter lost the poll or - /// because the conviction period is over. - /// - /// The dispatch origin of this call must be _Signed_. - /// - /// - `target`: The account of the vote to be removed; this account must have voted for poll - /// `index`. - /// - `index`: The index of poll of the vote to be removed. - /// - `class`: The class of the poll. - /// - /// 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)); - } -} - -class Constants { - Constants(); - - /// The maximum number of concurrent votes an account may have. - /// - /// Also used to compute weight, an overly large value can lead to extrinsics with large - /// weight estimation: see `delegate` for instance. - final int maxVotes = 4096; - - /// The minimum period of vote locking. - /// - /// It should be no shorter than enactment period to ensure that in the case of an approval, - /// those successful voters are locked into the consequences that their votes entail. - final int voteLockingPeriod = 604800; -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/merkle_airdrop.dart b/quantus_sdk/lib/generated/resonance/pallets/merkle_airdrop.dart deleted file mode 100644 index 9ca0a23f..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/merkle_airdrop.dart +++ /dev/null @@ -1,211 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; -import 'dart:typed_data' as _i6; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i3; - -import '../types/frame_support/pallet_id.dart' as _i9; -import '../types/pallet_merkle_airdrop/airdrop_metadata.dart' as _i2; -import '../types/pallet_merkle_airdrop/pallet/call.dart' as _i8; -import '../types/quantus_runtime/runtime_call.dart' as _i7; -import '../types/sp_core/crypto/account_id32.dart' as _i4; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageMap _airdropInfo = const _i1.StorageMap( - prefix: 'MerkleAirdrop', - storage: 'AirdropInfo', - valueCodec: _i2.AirdropMetadata.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), - ); - - final _i1.StorageDoubleMap _claimed = - const _i1.StorageDoubleMap( - prefix: 'MerkleAirdrop', - storage: 'Claimed', - valueCodec: _i3.NullCodec.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), - hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), - ); - - final _i1.StorageValue _nextAirdropId = const _i1.StorageValue( - prefix: 'MerkleAirdrop', - storage: 'NextAirdropId', - valueCodec: _i3.U32Codec.codec, - ); - - /// Stores general info about an airdrop - _i5.Future<_i2.AirdropMetadata?> airdropInfo(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _airdropInfo.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _airdropInfo.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// Storage for claimed status - _i5.Future claimed(int key1, _i4.AccountId32 key2, {_i1.BlockHash? at}) async { - final hashedKey = _claimed.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _claimed.decodeValue(bytes); - } - return null; /* Default */ - } - - /// Counter for airdrop IDs - _i5.Future nextAirdropId({_i1.BlockHash? at}) async { - final hashedKey = _nextAirdropId.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _nextAirdropId.decodeValue(bytes); - } - return 0; /* Default */ - } - - /// Stores general info about an airdrop - _i5.Future> multiAirdropInfo(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _airdropInfo.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _airdropInfo.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Returns the storage key for `airdropInfo`. - _i6.Uint8List airdropInfoKey(int key1) { - final hashedKey = _airdropInfo.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `claimed`. - _i6.Uint8List claimedKey(int key1, _i4.AccountId32 key2) { - final hashedKey = _claimed.hashedKeyFor(key1, key2); - return hashedKey; - } - - /// Returns the storage key for `nextAirdropId`. - _i6.Uint8List nextAirdropIdKey() { - final hashedKey = _nextAirdropId.hashedKey(); - return hashedKey; - } - - /// Returns the storage map key prefix for `airdropInfo`. - _i6.Uint8List airdropInfoMapPrefix() { - final hashedKey = _airdropInfo.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `claimed`. - _i6.Uint8List claimedMapPrefix(int key1) { - final hashedKey = _claimed.mapPrefix(key1); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Create a new airdrop with a Merkle root. - /// - /// The Merkle root is a cryptographic hash that represents all valid claims - /// for this airdrop. Users will later provide Merkle proofs to verify their - /// eligibility to claim tokens. - /// - /// # Parameters - /// - /// * `origin` - The origin of the call (must be signed) - /// * `merkle_root` - The Merkle root hash representing all valid claims - /// * `vesting_period` - Optional vesting period for the airdrop - /// * `vesting_delay` - Optional delay before vesting starts - _i7.MerkleAirdrop createAirdrop({required List merkleRoot, int? vestingPeriod, int? vestingDelay}) { - return _i7.MerkleAirdrop( - _i8.CreateAirdrop(merkleRoot: merkleRoot, vestingPeriod: vestingPeriod, vestingDelay: vestingDelay), - ); - } - - /// Fund an existing airdrop with tokens. - /// - /// This function transfers tokens from the caller to the airdrop's account, - /// making them available for users to claim. - /// - /// # Parameters - /// - /// * `origin` - The origin of the call (must be signed) - /// * `airdrop_id` - The ID of the airdrop to fund - /// * `amount` - The amount of tokens to add to the airdrop - /// - /// # Errors - /// - /// * `AirdropNotFound` - If the specified airdrop does not exist - _i7.MerkleAirdrop fundAirdrop({required int airdropId, required BigInt amount}) { - return _i7.MerkleAirdrop(_i8.FundAirdrop(airdropId: airdropId, amount: amount)); - } - - /// Claim tokens from an airdrop by providing a Merkle proof. - /// - /// Users can claim their tokens by providing a proof of their eligibility. - /// The proof is verified against the airdrop's Merkle root. - /// Anyone can trigger a claim for any eligible recipient. - /// - /// # Parameters - /// - /// * `origin` - The origin of the call - /// * `airdrop_id` - The ID of the airdrop to claim from - /// * `amount` - The amount of tokens to claim - /// * `merkle_proof` - The Merkle proof verifying eligibility - /// - /// # Errors - /// - /// * `AirdropNotFound` - If the specified airdrop does not exist - /// * `AlreadyClaimed` - If the recipient has already claimed from this airdrop - /// * `InvalidProof` - If the provided Merkle proof is invalid - /// * `InsufficientAirdropBalance` - If the airdrop doesn't have enough tokens - _i7.MerkleAirdrop claim({ - required int airdropId, - required _i4.AccountId32 recipient, - required BigInt amount, - required List> merkleProof, - }) { - return _i7.MerkleAirdrop( - _i8.Claim(airdropId: airdropId, recipient: recipient, amount: amount, merkleProof: merkleProof), - ); - } - - /// Delete an airdrop and reclaim any remaining funds. - /// - /// This function allows the creator of an airdrop to delete it and reclaim - /// any remaining tokens that haven't been claimed. - /// - /// # Parameters - /// - /// * `origin` - The origin of the call (must be the airdrop creator) - /// * `airdrop_id` - The ID of the airdrop to delete - /// - /// # Errors - /// - /// * `AirdropNotFound` - If the specified airdrop does not exist - /// * `NotAirdropCreator` - If the caller is not the creator of the airdrop - _i7.MerkleAirdrop deleteAirdrop({required int airdropId}) { - return _i7.MerkleAirdrop(_i8.DeleteAirdrop(airdropId: airdropId)); - } -} - -class Constants { - Constants(); - - /// The maximum number of proof elements allowed in a Merkle proof. - final int maxProofs = 4096; - - /// The pallet id, used for deriving its sovereign account ID. - final _i9.PalletId palletId = const [97, 105, 114, 100, 114, 111, 112, 33]; - - /// Priority for unsigned claim transactions. - final BigInt unsignedClaimPriority = BigInt.from(100); -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/mining_rewards.dart b/quantus_sdk/lib/generated/resonance/pallets/mining_rewards.dart deleted file mode 100644 index 2c4d2909..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/mining_rewards.dart +++ /dev/null @@ -1,85 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i3; -import 'dart:typed_data' as _i4; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i2; - -import '../types/frame_support/pallet_id.dart' as _i5; -import '../types/sp_core/crypto/account_id32.dart' as _i6; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageValue _collectedFees = const _i1.StorageValue( - prefix: 'MiningRewards', - storage: 'CollectedFees', - valueCodec: _i2.U128Codec.codec, - ); - - _i3.Future collectedFees({_i1.BlockHash? at}) async { - final hashedKey = _collectedFees.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _collectedFees.decodeValue(bytes); - } - return BigInt.zero; /* Default */ - } - - /// Returns the storage key for `collectedFees`. - _i4.Uint8List collectedFeesKey() { - final hashedKey = _collectedFees.hashedKey(); - return hashedKey; - } -} - -class Constants { - Constants(); - - /// The base block reward given to miners - final BigInt minerBlockReward = BigInt.from(10000000000000); - - /// The base block reward given to treasury - final BigInt treasuryBlockReward = BigInt.from(1000000000000); - - /// The treasury pallet ID - final _i5.PalletId treasuryPalletId = const [112, 121, 47, 116, 114, 115, 114, 121]; - - /// Account ID used as the "from" account when creating transfer proofs for minted tokens - final _i6.AccountId32 mintingAccount = const [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - ]; -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/preimage.dart b/quantus_sdk/lib/generated/resonance/pallets/preimage.dart deleted file mode 100644 index ee097d5f..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/preimage.dart +++ /dev/null @@ -1,181 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:typed_data' as _i8; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i6; - -import '../types/pallet_preimage/old_request_status.dart' as _i3; -import '../types/pallet_preimage/pallet/call.dart' as _i10; -import '../types/pallet_preimage/request_status.dart' as _i4; -import '../types/primitive_types/h256.dart' as _i2; -import '../types/quantus_runtime/runtime_call.dart' as _i9; -import '../types/tuples.dart' as _i5; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - 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()), - ); - - 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()), - ); - - 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)), - ); - - /// The request status of a given hash. - _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); - if (bytes != null) { - return _statusFor.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// The request status of a given hash. - _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); - if (bytes != null) { - return _requestStatusFor.decodeValue(bytes); - } - return null; /* Nullable */ - } - - _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); - if (bytes != null) { - return _preimageFor.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// The request status of a given hash. - _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); - if (bytes.isNotEmpty) { - 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); - if (bytes.isNotEmpty) { - 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _preimageFor.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Returns the storage key for `statusFor`. - _i8.Uint8List statusForKey(_i2.H256 key1) { - final hashedKey = _statusFor.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `requestStatusFor`. - _i8.Uint8List requestStatusForKey(_i2.H256 key1) { - final hashedKey = _requestStatusFor.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `preimageFor`. - _i8.Uint8List preimageForKey(_i5.Tuple2<_i2.H256, int> key1) { - final hashedKey = _preimageFor.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `statusFor`. - _i8.Uint8List statusForMapPrefix() { - final hashedKey = _statusFor.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `requestStatusFor`. - _i8.Uint8List requestStatusForMapPrefix() { - final hashedKey = _requestStatusFor.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `preimageFor`. - _i8.Uint8List preimageForMapPrefix() { - final hashedKey = _preimageFor.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Register a preimage on-chain. - /// - /// If the preimage was previously requested, no fees or deposits are taken for providing - /// the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. - _i9.Preimage notePreimage({required List bytes}) { - return _i9.Preimage(_i10.NotePreimage(bytes: bytes)); - } - - /// Clear an unrequested preimage from the runtime storage. - /// - /// If `len` is provided, then it will be a much cheaper operation. - /// - /// - `hash`: The hash of the preimage to be removed from the store. - /// - `len`: The length of the preimage of `hash`. - _i9.Preimage unnotePreimage({required _i2.H256 hash}) { - return _i9.Preimage(_i10.UnnotePreimage(hash: hash)); - } - - /// Request a preimage be uploaded to the chain without paying any fees or deposits. - /// - /// If the preimage requests has already been provided on-chain, we unreserve any deposit - /// a user may have paid, and take the control of the preimage out of their hands. - _i9.Preimage requestPreimage({required _i2.H256 hash}) { - return _i9.Preimage(_i10.RequestPreimage(hash: hash)); - } - - /// Clear a previously made request for a preimage. - /// - /// NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. - _i9.Preimage unrequestPreimage({required _i2.H256 hash}) { - return _i9.Preimage(_i10.UnrequestPreimage(hash: hash)); - } - - /// Ensure that the a bulk of pre-images is upgraded. - /// - /// The caller pays no fee if at least 90% of pre-images were successfully updated. - _i9.Preimage ensureUpdated({required List<_i2.H256> hashes}) { - return _i9.Preimage(_i10.EnsureUpdated(hashes: hashes)); - } -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/q_po_w.dart b/quantus_sdk/lib/generated/resonance/pallets/q_po_w.dart deleted file mode 100644 index 92a11fb8..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/q_po_w.dart +++ /dev/null @@ -1,280 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i4; -import 'dart:typed_data' as _i5; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i3; - -import '../types/primitive_types/u512.dart' as _i2; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageMap _blockDistanceThresholds = const _i1.StorageMap( - prefix: 'QPoW', - storage: 'BlockDistanceThresholds', - valueCodec: _i2.U512Codec(), - hasher: _i1.StorageHasher.twoxx64Concat(_i3.U32Codec.codec), - ); - - final _i1.StorageValue> _latestNonce = const _i1.StorageValue>( - prefix: 'QPoW', - storage: 'LatestNonce', - valueCodec: _i3.U8ArrayCodec(64), - ); - - final _i1.StorageValue _lastBlockTime = const _i1.StorageValue( - prefix: 'QPoW', - storage: 'LastBlockTime', - valueCodec: _i3.U64Codec.codec, - ); - - final _i1.StorageValue _lastBlockDuration = const _i1.StorageValue( - prefix: 'QPoW', - storage: 'LastBlockDuration', - valueCodec: _i3.U64Codec.codec, - ); - - final _i1.StorageValue<_i2.U512> _currentDistanceThreshold = const _i1.StorageValue<_i2.U512>( - prefix: 'QPoW', - storage: 'CurrentDistanceThreshold', - valueCodec: _i2.U512Codec(), - ); - - final _i1.StorageValue<_i2.U512> _totalWork = const _i1.StorageValue<_i2.U512>( - prefix: 'QPoW', - storage: 'TotalWork', - valueCodec: _i2.U512Codec(), - ); - - final _i1.StorageValue _blocksInPeriod = const _i1.StorageValue( - prefix: 'QPoW', - storage: 'BlocksInPeriod', - valueCodec: _i3.U32Codec.codec, - ); - - final _i1.StorageMap _blockTimeHistory = const _i1.StorageMap( - prefix: 'QPoW', - storage: 'BlockTimeHistory', - valueCodec: _i3.U64Codec.codec, - hasher: _i1.StorageHasher.twoxx64Concat(_i3.U32Codec.codec), - ); - - final _i1.StorageValue _historyIndex = const _i1.StorageValue( - prefix: 'QPoW', - storage: 'HistoryIndex', - valueCodec: _i3.U32Codec.codec, - ); - - final _i1.StorageValue _historySize = const _i1.StorageValue( - prefix: 'QPoW', - storage: 'HistorySize', - valueCodec: _i3.U32Codec.codec, - ); - - _i4.Future<_i2.U512> blockDistanceThresholds(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _blockDistanceThresholds.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _blockDistanceThresholds.decodeValue(bytes); - } - return List.filled(8, BigInt.zero, growable: false); /* Default */ - } - - _i4.Future?> latestNonce({_i1.BlockHash? at}) async { - final hashedKey = _latestNonce.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _latestNonce.decodeValue(bytes); - } - return null; /* Nullable */ - } - - _i4.Future lastBlockTime({_i1.BlockHash? at}) async { - final hashedKey = _lastBlockTime.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _lastBlockTime.decodeValue(bytes); - } - return BigInt.zero; /* Default */ - } - - _i4.Future lastBlockDuration({_i1.BlockHash? at}) async { - final hashedKey = _lastBlockDuration.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _lastBlockDuration.decodeValue(bytes); - } - return BigInt.zero; /* Default */ - } - - _i4.Future<_i2.U512> currentDistanceThreshold({_i1.BlockHash? at}) async { - final hashedKey = _currentDistanceThreshold.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _currentDistanceThreshold.decodeValue(bytes); - } - return List.filled(8, BigInt.zero, growable: false); /* Default */ - } - - _i4.Future<_i2.U512> totalWork({_i1.BlockHash? at}) async { - final hashedKey = _totalWork.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _totalWork.decodeValue(bytes); - } - return List.filled(8, BigInt.zero, growable: false); /* Default */ - } - - _i4.Future blocksInPeriod({_i1.BlockHash? at}) async { - final hashedKey = _blocksInPeriod.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _blocksInPeriod.decodeValue(bytes); - } - return 0; /* Default */ - } - - _i4.Future blockTimeHistory(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _blockTimeHistory.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _blockTimeHistory.decodeValue(bytes); - } - return BigInt.zero; /* Default */ - } - - _i4.Future historyIndex({_i1.BlockHash? at}) async { - final hashedKey = _historyIndex.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _historyIndex.decodeValue(bytes); - } - return 0; /* Default */ - } - - _i4.Future historySize({_i1.BlockHash? at}) async { - final hashedKey = _historySize.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _historySize.decodeValue(bytes); - } - return 0; /* Default */ - } - - _i4.Future> multiBlockDistanceThresholds(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _blockDistanceThresholds.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _blockDistanceThresholds.decodeValue(v.key)).toList(); - } - return (keys.map((key) => List.filled(8, BigInt.zero, growable: false)).toList() - as List<_i2.U512>); /* Default */ - } - - _i4.Future> multiBlockTimeHistory(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _blockTimeHistory.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _blockTimeHistory.decodeValue(v.key)).toList(); - } - return (keys.map((key) => BigInt.zero).toList() as List); /* Default */ - } - - /// Returns the storage key for `blockDistanceThresholds`. - _i5.Uint8List blockDistanceThresholdsKey(int key1) { - final hashedKey = _blockDistanceThresholds.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `latestNonce`. - _i5.Uint8List latestNonceKey() { - final hashedKey = _latestNonce.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `lastBlockTime`. - _i5.Uint8List lastBlockTimeKey() { - final hashedKey = _lastBlockTime.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `lastBlockDuration`. - _i5.Uint8List lastBlockDurationKey() { - final hashedKey = _lastBlockDuration.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `currentDistanceThreshold`. - _i5.Uint8List currentDistanceThresholdKey() { - final hashedKey = _currentDistanceThreshold.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `totalWork`. - _i5.Uint8List totalWorkKey() { - final hashedKey = _totalWork.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `blocksInPeriod`. - _i5.Uint8List blocksInPeriodKey() { - final hashedKey = _blocksInPeriod.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `blockTimeHistory`. - _i5.Uint8List blockTimeHistoryKey(int key1) { - final hashedKey = _blockTimeHistory.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `historyIndex`. - _i5.Uint8List historyIndexKey() { - final hashedKey = _historyIndex.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `historySize`. - _i5.Uint8List historySizeKey() { - final hashedKey = _historySize.hashedKey(); - return hashedKey; - } - - /// Returns the storage map key prefix for `blockDistanceThresholds`. - _i5.Uint8List blockDistanceThresholdsMapPrefix() { - final hashedKey = _blockDistanceThresholds.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `blockTimeHistory`. - _i5.Uint8List blockTimeHistoryMapPrefix() { - final hashedKey = _blockTimeHistory.mapPrefix(); - return hashedKey; - } -} - -class Constants { - Constants(); - - /// Pallet's weight info - final int initialDistanceThresholdExponent = 502; - - final int difficultyAdjustPercentClamp = 10; - - final BigInt targetBlockTime = BigInt.from(20000); - - final int adjustmentPeriod = 1; - - final int blockTimeHistorySize = 10; - - final int maxReorgDepth = 180; - - /// Fixed point scale for calculations (default: 10^18) - final BigInt fixedU128Scale = BigInt.parse('1000000000000000000', radix: 10); - - /// Maximum distance threshold multiplier (default: 4) - final int maxDistanceMultiplier = 2; -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/recovery.dart b/quantus_sdk/lib/generated/resonance/pallets/recovery.dart deleted file mode 100644 index d74c052e..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/recovery.dart +++ /dev/null @@ -1,311 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; -import 'dart:typed_data' as _i6; - -import 'package:polkadart/polkadart.dart' as _i1; - -import '../types/pallet_recovery/active_recovery.dart' as _i4; -import '../types/pallet_recovery/pallet/call.dart' as _i9; -import '../types/pallet_recovery/recovery_config.dart' as _i3; -import '../types/quantus_runtime/runtime_call.dart' as _i7; -import '../types/sp_core/crypto/account_id32.dart' as _i2; -import '../types/sp_runtime/multiaddress/multi_address.dart' as _i8; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - 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()), - ); - - 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()), - ); - - /// The set of recoverable accounts and their recovery configuration. - _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); - if (bytes != null) { - return _recoverable.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// Active recovery attempts. - /// - /// First account is the account to be recovered, and the second account - /// is the user trying to recover the account. - _i5.Future<_i4.ActiveRecovery?> activeRecoveries( - _i2.AccountId32 key1, - _i2.AccountId32 key2, { - _i1.BlockHash? at, - }) async { - final hashedKey = _activeRecoveries.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _activeRecoveries.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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 { - final hashedKey = _proxy.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _proxy.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _recoverable.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// 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 { - final hashedKeys = keys.map((key) => _proxy.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _proxy.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Returns the storage key for `recoverable`. - _i6.Uint8List recoverableKey(_i2.AccountId32 key1) { - final hashedKey = _recoverable.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `activeRecoveries`. - _i6.Uint8List activeRecoveriesKey(_i2.AccountId32 key1, _i2.AccountId32 key2) { - final hashedKey = _activeRecoveries.hashedKeyFor(key1, key2); - return hashedKey; - } - - /// Returns the storage key for `proxy`. - _i6.Uint8List proxyKey(_i2.AccountId32 key1) { - final hashedKey = _proxy.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `recoverable`. - _i6.Uint8List recoverableMapPrefix() { - final hashedKey = _recoverable.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `activeRecoveries`. - _i6.Uint8List activeRecoveriesMapPrefix(_i2.AccountId32 key1) { - final hashedKey = _activeRecoveries.mapPrefix(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `proxy`. - _i6.Uint8List proxyMapPrefix() { - final hashedKey = _proxy.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Send a call through a recovered account. - /// - /// The dispatch origin for this call must be _Signed_ and registered to - /// be able to make calls on behalf of the recovered account. - /// - /// 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)); - } - - /// Allow ROOT to bypass the recovery process and set an a rescuer account - /// for a lost account directly. - /// - /// The dispatch origin for this call must be _ROOT_. - /// - /// 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)); - } - - /// Create a recovery configuration for your account. This makes your account recoverable. - /// - /// Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance - /// will be reserved for storing the recovery configuration. This deposit is returned - /// in full when the user calls `remove_recovery`. - /// - /// The dispatch origin for this call must be _Signed_. - /// - /// Parameters: - /// - `friends`: A list of friends you trust to vouch for recovery attempts. Should be - /// ordered and contain no duplicate values. - /// - `threshold`: The number of friends that must vouch for a recovery attempt before the - /// account can be recovered. Should be less than or equal to the length of the list of - /// friends. - /// - `delay_period`: The number of blocks after a recovery attempt is initialized that - /// needs to pass before the account can be recovered. - _i7.Recovery createRecovery({ - required List<_i2.AccountId32> friends, - required int threshold, - required int delayPeriod, - }) { - return _i7.Recovery(_i9.CreateRecovery(friends: friends, threshold: threshold, delayPeriod: delayPeriod)); - } - - /// Initiate the process for recovering a recoverable account. - /// - /// Payment: `RecoveryDeposit` balance will be reserved for initiating the - /// recovery process. This deposit will always be repatriated to the account - /// trying to be recovered. See `close_recovery`. - /// - /// The dispatch origin for this call must be _Signed_. - /// - /// Parameters: - /// - `account`: The lost account that you want to recover. This account needs to be - /// recoverable (i.e. have a recovery configuration). - _i7.Recovery initiateRecovery({required _i8.MultiAddress account}) { - return _i7.Recovery(_i9.InitiateRecovery(account: account)); - } - - /// Allow a "friend" of a recoverable account to vouch for an active recovery - /// process for that account. - /// - /// The dispatch origin for this call must be _Signed_ and must be a "friend" - /// for the recoverable account. - /// - /// Parameters: - /// - `lost`: The lost account that you want to recover. - /// - `rescuer`: The account trying to rescue the lost account that you want to vouch for. - /// - /// 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)); - } - - /// Allow a successful rescuer to claim their recovered account. - /// - /// The dispatch origin for this call must be _Signed_ and must be a "rescuer" - /// who has successfully completed the account recovery process: collected - /// `threshold` or more vouches, waited `delay_period` blocks since initiation. - /// - /// Parameters: - /// - `account`: The lost account that you want to claim has been successfully recovered by - /// you. - _i7.Recovery claimRecovery({required _i8.MultiAddress account}) { - return _i7.Recovery(_i9.ClaimRecovery(account: account)); - } - - /// As the controller of a recoverable account, close an active recovery - /// process for your account. - /// - /// Payment: By calling this function, the recoverable account will receive - /// the recovery deposit `RecoveryDeposit` placed by the rescuer. - /// - /// The dispatch origin for this call must be _Signed_ and must be a - /// recoverable account with an active recovery process for it. - /// - /// Parameters: - /// - `rescuer`: The account trying to rescue this recoverable account. - _i7.Recovery closeRecovery({required _i8.MultiAddress rescuer}) { - return _i7.Recovery(_i9.CloseRecovery(rescuer: rescuer)); - } - - /// Remove the recovery process for your account. Recovered accounts are still accessible. - /// - /// NOTE: The user must make sure to call `close_recovery` on all active - /// recovery attempts before calling this function else it will fail. - /// - /// Payment: By calling this function the recoverable account will unreserve - /// their recovery configuration deposit. - /// (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) - /// - /// The dispatch origin for this call must be _Signed_ and must be a - /// recoverable account (i.e. has a recovery configuration). - _i7.Recovery removeRecovery() { - return _i7.Recovery(_i9.RemoveRecovery()); - } - - /// Cancel the ability to use `as_recovered` for `account`. - /// - /// The dispatch origin for this call must be _Signed_ and registered to - /// be able to make calls on behalf of the recovered account. - /// - /// Parameters: - /// - `account`: The recovered account you are able to call on-behalf-of. - _i7.Recovery cancelRecovered({required _i8.MultiAddress account}) { - return _i7.Recovery(_i9.CancelRecovered(account: account)); - } -} - -class Constants { - Constants(); - - /// The base amount of currency needed to reserve for creating a recovery configuration. - /// - /// This is held for an additional storage item whose value size is - /// `2 + sizeof(BlockNumber, Balance)` bytes. - final BigInt configDepositBase = BigInt.from(10000000000000); - - /// The amount of currency needed per additional user when creating a recovery - /// configuration. - /// - /// This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage - /// value. - final BigInt friendDepositFactor = BigInt.from(1000000000000); - - /// The maximum amount of friends allowed in a recovery configuration. - /// - /// NOTE: The threshold programmed in this Pallet uses u16, so it does - /// not really make sense to have a limit here greater than u16::MAX. - /// But also, that is a lot more than you should probably set this value - /// to anyway... - final int maxFriends = 9; - - /// The base amount of currency needed to reserve for starting a recovery. - /// - /// This is primarily held for deterring malicious recovery attempts, and should - /// have a value large enough that a bad actor would choose not to place this - /// deposit. It also acts to fund additional storage item whose value size is - /// `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable - /// threshold. - final BigInt recoveryDeposit = BigInt.from(10000000000000); -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/referenda.dart b/quantus_sdk/lib/generated/resonance/pallets/referenda.dart deleted file mode 100644 index c96fa653..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/referenda.dart +++ /dev/null @@ -1,436 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:typed_data' as _i7; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i2; - -import '../types/frame_support/traits/preimages/bounded.dart' as _i10; -import '../types/frame_support/traits/schedule/dispatch_time.dart' as _i11; -import '../types/pallet_referenda/pallet/call_1.dart' as _i12; -import '../types/pallet_referenda/types/curve.dart' as _i14; -import '../types/pallet_referenda/types/referendum_info_1.dart' as _i3; -import '../types/pallet_referenda/types/track_info.dart' as _i13; -import '../types/primitive_types/h256.dart' as _i5; -import '../types/quantus_runtime/origin_caller.dart' as _i9; -import '../types/quantus_runtime/runtime_call.dart' as _i8; -import '../types/tuples.dart' as _i4; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageValue _referendumCount = const _i1.StorageValue( - prefix: 'Referenda', - storage: 'ReferendumCount', - valueCodec: _i2.U32Codec.codec, - ); - - final _i1.StorageMap _referendumInfoFor = const _i1.StorageMap( - prefix: 'Referenda', - storage: 'ReferendumInfoFor', - valueCodec: _i3.ReferendumInfo.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i2.U32Codec.codec), - ); - - 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), - ); - - 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( - prefix: 'Referenda', - storage: 'MetadataOf', - valueCodec: _i5.H256Codec(), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.U32Codec.codec), - ); - - /// 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); - if (bytes != null) { - return _referendumCount.decodeValue(bytes); - } - return 0; /* Default */ - } - - /// Information concerning any given referendum. - _i6.Future<_i3.ReferendumInfo?> referendumInfoFor(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _referendumInfoFor.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _referendumInfoFor.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// The sorted list of referenda ready to be decided but not yet being decided, ordered by - /// conviction-weighted approvals. - /// - /// This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. - _i6.Future>> trackQueue(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _trackQueue.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _trackQueue.decodeValue(bytes); - } - return []; /* Default */ - } - - /// The number of referenda being decided currently. - _i6.Future decidingCount(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _decidingCount.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _decidingCount.decodeValue(bytes); - } - return 0; /* Default */ - } - - /// The metadata is a general information concerning the referendum. - /// The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON - /// dump or IPFS hash of a JSON file. - /// - /// 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 { - final hashedKey = _metadataOf.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _metadataOf.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _referendumInfoFor.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// The sorted list of referenda ready to be decided but not yet being decided, ordered by - /// 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _trackQueue.decodeValue(v.key)).toList(); - } - 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _decidingCount.decodeValue(v.key)).toList(); - } - return (keys.map((key) => 0).toList() as List); /* Default */ - } - - /// The metadata is a general information concerning the referendum. - /// The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON - /// dump or IPFS hash of a JSON file. - /// - /// 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _metadataOf.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Returns the storage key for `referendumCount`. - _i7.Uint8List referendumCountKey() { - final hashedKey = _referendumCount.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `referendumInfoFor`. - _i7.Uint8List referendumInfoForKey(int key1) { - final hashedKey = _referendumInfoFor.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `trackQueue`. - _i7.Uint8List trackQueueKey(int key1) { - final hashedKey = _trackQueue.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `decidingCount`. - _i7.Uint8List decidingCountKey(int key1) { - final hashedKey = _decidingCount.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `metadataOf`. - _i7.Uint8List metadataOfKey(int key1) { - final hashedKey = _metadataOf.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `referendumInfoFor`. - _i7.Uint8List referendumInfoForMapPrefix() { - final hashedKey = _referendumInfoFor.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `trackQueue`. - _i7.Uint8List trackQueueMapPrefix() { - final hashedKey = _trackQueue.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `decidingCount`. - _i7.Uint8List decidingCountMapPrefix() { - final hashedKey = _decidingCount.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `metadataOf`. - _i7.Uint8List metadataOfMapPrefix() { - final hashedKey = _metadataOf.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Propose a referendum on a privileged action. - /// - /// - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds - /// available. - /// - `proposal_origin`: The origin from which the proposal should be executed. - /// - `proposal`: The proposal. - /// - `enactment_moment`: The moment that the proposal should be enacted. - /// - /// Emits `Submitted`. - _i8.Referenda submit({ - required _i9.OriginCaller proposalOrigin, - required _i10.Bounded proposal, - required _i11.DispatchTime enactmentMoment, - }) { - return _i8.Referenda( - _i12.Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment), - ); - } - - /// Post the Decision Deposit for a referendum. - /// - /// - `origin`: must be `Signed` and the account must have funds available for the - /// referendum's track's Decision Deposit. - /// - `index`: The index of the submitted referendum whose Decision Deposit is yet to be - /// posted. - /// - /// Emits `DecisionDepositPlaced`. - _i8.Referenda placeDecisionDeposit({required int index}) { - return _i8.Referenda(_i12.PlaceDecisionDeposit(index: index)); - } - - /// Refund the Decision Deposit for a closed referendum back to the depositor. - /// - /// - `origin`: must be `Signed` or `Root`. - /// - `index`: The index of a closed referendum whose Decision Deposit has not yet been - /// refunded. - /// - /// Emits `DecisionDepositRefunded`. - _i8.Referenda refundDecisionDeposit({required int index}) { - return _i8.Referenda(_i12.RefundDecisionDeposit(index: index)); - } - - /// Cancel an ongoing referendum. - /// - /// - `origin`: must be the `CancelOrigin`. - /// - `index`: The index of the referendum to be cancelled. - /// - /// Emits `Cancelled`. - _i8.Referenda cancel({required int index}) { - return _i8.Referenda(_i12.Cancel(index: index)); - } - - /// Cancel an ongoing referendum and slash the deposits. - /// - /// - `origin`: must be the `KillOrigin`. - /// - `index`: The index of the referendum to be cancelled. - /// - /// Emits `Killed` and `DepositSlashed`. - _i8.Referenda kill({required int index}) { - return _i8.Referenda(_i12.Kill(index: index)); - } - - /// Advance a referendum onto its next logical state. Only used internally. - /// - /// - `origin`: must be `Root`. - /// - `index`: the referendum to be advanced. - _i8.Referenda nudgeReferendum({required int index}) { - return _i8.Referenda(_i12.NudgeReferendum(index: index)); - } - - /// Advance a track onto its next logical state. Only used internally. - /// - /// - `origin`: must be `Root`. - /// - `track`: the track to be advanced. - /// - /// Action item for when there is now one fewer referendum in the deciding phase and the - /// `DecidingCount` is not yet updated. This means that we should either: - /// - begin deciding another referendum (and leave `DecidingCount` alone); or - /// - decrement `DecidingCount`. - _i8.Referenda oneFewerDeciding({required int track}) { - return _i8.Referenda(_i12.OneFewerDeciding(track: track)); - } - - /// Refund the Submission Deposit for a closed referendum back to the depositor. - /// - /// - `origin`: must be `Signed` or `Root`. - /// - `index`: The index of a closed referendum whose Submission Deposit has not yet been - /// refunded. - /// - /// Emits `SubmissionDepositRefunded`. - _i8.Referenda refundSubmissionDeposit({required int index}) { - return _i8.Referenda(_i12.RefundSubmissionDeposit(index: index)); - } - - /// Set or clear metadata of a referendum. - /// - /// Parameters: - /// - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a - /// 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)); - } -} - -class Constants { - Constants(); - - /// The minimum amount to be used as a deposit for a public referendum proposal. - final BigInt submissionDeposit = BigInt.from(100000000000000); - - /// Maximum size of the referendum queue for a single track. - final int maxQueued = 100; - - /// The number of blocks after submission that a referendum must begin being decided by. - /// Once this passes, then anyone may cancel the referendum. - final int undecidingTimeout = 3888000; - - /// Quantization level for the referendum wakeup scheduler. A higher number will result in - /// fewer storage reads/writes needed for smaller voters, but also result in delays to the - /// automatic referendum status changes. Explicit servicing instructions are unaffected. - final int alarmInterval = 1; - - /// Information concerning the different referendum tracks. - final List<_i4.Tuple2> tracks = [ - _i4.Tuple2( - 0, - _i13.TrackInfo( - name: 'signed', - maxDeciding: 5, - decisionDeposit: BigInt.from(500000000000000), - preparePeriod: 43200, - decisionPeriod: 604800, - confirmPeriod: 43200, - minEnactmentPeriod: 86400, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 550000000, ceil: 700000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 50000000, ceil: 250000000), - ), - ), - _i4.Tuple2( - 1, - _i13.TrackInfo( - name: 'signaling', - maxDeciding: 20, - decisionDeposit: BigInt.from(100000000000000), - preparePeriod: 21600, - decisionPeriod: 432000, - confirmPeriod: 10800, - minEnactmentPeriod: 1, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 500000000, ceil: 600000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 10000000, ceil: 100000000), - ), - ), - _i4.Tuple2( - 2, - _i13.TrackInfo( - name: 'treasury_small_spender', - maxDeciding: 5, - decisionDeposit: BigInt.from(100000000000000), - preparePeriod: 86400, - decisionPeriod: 259200, - confirmPeriod: 86400, - minEnactmentPeriod: 43200, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 250000000, ceil: 500000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 10000000, ceil: 100000000), - ), - ), - _i4.Tuple2( - 3, - _i13.TrackInfo( - name: 'treasury_medium_spender', - maxDeciding: 2, - decisionDeposit: BigInt.from(250000000000000), - preparePeriod: 21600, - decisionPeriod: 432000, - confirmPeriod: 86400, - minEnactmentPeriod: 43200, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 500000000, ceil: 750000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 20000000, ceil: 100000000), - ), - ), - _i4.Tuple2( - 4, - _i13.TrackInfo( - name: 'treasury_big_spender', - maxDeciding: 2, - decisionDeposit: BigInt.from(500000000000000), - preparePeriod: 86400, - decisionPeriod: 604800, - confirmPeriod: 172800, - minEnactmentPeriod: 43200, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 650000000, ceil: 850000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 50000000, ceil: 150000000), - ), - ), - _i4.Tuple2( - 5, - _i13.TrackInfo( - name: 'treasury_treasurer', - maxDeciding: 1, - decisionDeposit: BigInt.from(1000000000000000), - preparePeriod: 172800, - decisionPeriod: 1209600, - confirmPeriod: 345600, - minEnactmentPeriod: 86400, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 750000000, ceil: 1000000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 100000000, ceil: 250000000), - ), - ), - ]; -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/reversible_transfers.dart b/quantus_sdk/lib/generated/resonance/pallets/reversible_transfers.dart deleted file mode 100644 index e9f11f4d..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/reversible_transfers.dart +++ /dev/null @@ -1,372 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -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/pallet/call.dart' as _i11; -import '../types/pallet_reversible_transfers/pending_transfer.dart' as _i5; -import '../types/primitive_types/h256.dart' as _i4; -import '../types/qp_scheduler/block_number_or_timestamp.dart' as _i10; -import '../types/quantus_runtime/runtime_call.dart' as _i9; -import '../types/sp_core/crypto/account_id32.dart' as _i2; -import '../types/sp_runtime/multiaddress/multi_address.dart' as _i12; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - 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()), - ); - - 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()), - ); - - final _i1.StorageMap<_i2.AccountId32, int> _accountPendingIndex = const _i1.StorageMap<_i2.AccountId32, int>( - prefix: 'ReversibleTransfers', - storage: 'AccountPendingIndex', - valueCodec: _i6.U32Codec.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); - - 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()), - ); - - final _i1.StorageMap<_i2.AccountId32, List<_i4.H256>> _pendingTransfersByRecipient = - const _i1.StorageMap<_i2.AccountId32, List<_i4.H256>>( - prefix: 'ReversibleTransfers', - storage: 'PendingTransfersByRecipient', - valueCodec: _i6.SequenceCodec<_i4.H256>(_i4.H256Codec()), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); - - final _i1.StorageMap<_i2.AccountId32, List<_i2.AccountId32>> _interceptorIndex = - 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()), - ); - - final _i1.StorageValue _globalNonce = const _i1.StorageValue( - prefix: 'ReversibleTransfers', - storage: 'GlobalNonce', - 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 { - final hashedKey = _highSecurityAccounts.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _highSecurityAccounts.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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 { - final hashedKey = _pendingTransfers.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _pendingTransfers.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// Indexes pending transaction IDs per account for efficient lookup and cancellation. - /// Also enforces the maximum pending transactions limit per account. - _i7.Future accountPendingIndex(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _accountPendingIndex.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _accountPendingIndex.decodeValue(bytes); - } - return 0; /* Default */ - } - - /// Maps sender accounts to their list of pending transaction IDs. - /// This allows users to query all their outgoing pending transfers. - _i7.Future> pendingTransfersBySender(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _pendingTransfersBySender.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _pendingTransfersBySender.decodeValue(bytes); - } - return []; /* Default */ - } - - /// Maps recipient accounts to their list of pending incoming transaction IDs. - /// This allows users to query all their incoming pending transfers. - _i7.Future> pendingTransfersByRecipient(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _pendingTransfersByRecipient.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _pendingTransfersByRecipient.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); - if (bytes != null) { - return _interceptorIndex.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); - if (bytes != null) { - return _globalNonce.decodeValue(bytes); - } - return BigInt.zero; /* Default */ - } - - /// Maps accounts to their chosen reversibility delay period (in milliseconds). - /// Accounts present in this map have reversibility enabled. - _i7.Future> multiHighSecurityAccounts( - 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); - if (bytes.isNotEmpty) { - 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _pendingTransfers.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Indexes pending transaction IDs per account for efficient lookup and cancellation. - /// Also enforces the maximum pending transactions limit per account. - _i7.Future> multiAccountPendingIndex(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _accountPendingIndex.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _accountPendingIndex.decodeValue(v.key)).toList(); - } - return (keys.map((key) => 0).toList() as List); /* Default */ - } - - /// Maps sender accounts to their list of pending transaction IDs. - /// This allows users to query all their outgoing pending transfers. - _i7.Future>> multiPendingTransfersBySender( - 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _pendingTransfersBySender.decodeValue(v.key)).toList(); - } - return (keys.map((key) => []).toList() as List>); /* Default */ - } - - /// Maps recipient accounts to their list of pending incoming transaction IDs. - /// This allows users to query all their incoming pending transfers. - _i7.Future>> multiPendingTransfersByRecipient( - List<_i2.AccountId32> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = keys.map((key) => _pendingTransfersByRecipient.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _pendingTransfersByRecipient.decodeValue(v.key)).toList(); - } - 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _interceptorIndex.decodeValue(v.key)).toList(); - } - return (keys.map((key) => []).toList() as List>); /* Default */ - } - - /// Returns the storage key for `highSecurityAccounts`. - _i8.Uint8List highSecurityAccountsKey(_i2.AccountId32 key1) { - final hashedKey = _highSecurityAccounts.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `pendingTransfers`. - _i8.Uint8List pendingTransfersKey(_i4.H256 key1) { - final hashedKey = _pendingTransfers.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `accountPendingIndex`. - _i8.Uint8List accountPendingIndexKey(_i2.AccountId32 key1) { - final hashedKey = _accountPendingIndex.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `pendingTransfersBySender`. - _i8.Uint8List pendingTransfersBySenderKey(_i2.AccountId32 key1) { - final hashedKey = _pendingTransfersBySender.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `pendingTransfersByRecipient`. - _i8.Uint8List pendingTransfersByRecipientKey(_i2.AccountId32 key1) { - final hashedKey = _pendingTransfersByRecipient.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `interceptorIndex`. - _i8.Uint8List interceptorIndexKey(_i2.AccountId32 key1) { - final hashedKey = _interceptorIndex.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `globalNonce`. - _i8.Uint8List globalNonceKey() { - final hashedKey = _globalNonce.hashedKey(); - return hashedKey; - } - - /// Returns the storage map key prefix for `highSecurityAccounts`. - _i8.Uint8List highSecurityAccountsMapPrefix() { - final hashedKey = _highSecurityAccounts.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `pendingTransfers`. - _i8.Uint8List pendingTransfersMapPrefix() { - final hashedKey = _pendingTransfers.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `accountPendingIndex`. - _i8.Uint8List accountPendingIndexMapPrefix() { - final hashedKey = _accountPendingIndex.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `pendingTransfersBySender`. - _i8.Uint8List pendingTransfersBySenderMapPrefix() { - final hashedKey = _pendingTransfersBySender.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `pendingTransfersByRecipient`. - _i8.Uint8List pendingTransfersByRecipientMapPrefix() { - final hashedKey = _pendingTransfersByRecipient.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `interceptorIndex`. - _i8.Uint8List interceptorIndexMapPrefix() { - final hashedKey = _interceptorIndex.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Enable high-security for the calling account with a specified delay - /// - /// - `delay`: The time (in milliseconds) after submission before the transaction executes. - _i9.ReversibleTransfers setHighSecurity({ - required _i10.BlockNumberOrTimestamp delay, - required _i2.AccountId32 interceptor, - required _i2.AccountId32 recoverer, - }) { - return _i9.ReversibleTransfers(_i11.SetHighSecurity(delay: delay, interceptor: interceptor, recoverer: recoverer)); - } - - /// Cancel a pending reversible transaction scheduled by the caller. - /// - /// - `tx_id`: The unique identifier of the transaction to cancel. - _i9.ReversibleTransfers cancel({required _i4.H256 txId}) { - return _i9.ReversibleTransfers(_i11.Cancel(txId: txId)); - } - - /// Called by the Scheduler to finalize the scheduled task/call - /// - /// - `tx_id`: The unique id of the transaction to finalize and dispatch. - _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)); - } - - /// Schedule a transaction for delayed execution with a custom, one-time delay. - /// - /// This can only be used by accounts that have *not* set up a persistent - /// reversibility configuration with `set_reversibility`. - /// - /// - `delay`: The time (in blocks or milliseconds) before the transaction executes. - _i9.ReversibleTransfers scheduleTransferWithDelay({ - required _i12.MultiAddress dest, - required BigInt amount, - required _i10.BlockNumberOrTimestamp delay, - }) { - return _i9.ReversibleTransfers(_i11.ScheduleTransferWithDelay(dest: dest, amount: amount, delay: delay)); - } -} - -class Constants { - Constants(); - - /// Maximum pending reversible transactions allowed per account. Used for BoundedVec. - final int maxPendingPerAccount = 10; - - /// Maximum number of accounts an interceptor can intercept for. Used for BoundedVec. - final int maxInterceptorAccounts = 32; - - /// The default delay period for reversible transactions if none is specified. - /// - /// NOTE: default delay is always in blocks. - final _i10.BlockNumberOrTimestamp defaultDelay = const _i10.BlockNumber(86400); - - /// The minimum delay period allowed for reversible transactions, in blocks. - final int minDelayPeriodBlocks = 2; - - /// The minimum delay period allowed for reversible transactions, in milliseconds. - final BigInt minDelayPeriodMoment = BigInt.from(20000); -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/scheduler.dart b/quantus_sdk/lib/generated/resonance/pallets/scheduler.dart deleted file mode 100644 index 2f001ee1..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/scheduler.dart +++ /dev/null @@ -1,358 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:typed_data' as _i8; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i2; - -import '../types/pallet_scheduler/pallet/call.dart' as _i10; -import '../types/pallet_scheduler/retry_config.dart' as _i6; -import '../types/pallet_scheduler/scheduled.dart' as _i4; -import '../types/qp_scheduler/block_number_or_timestamp.dart' as _i3; -import '../types/quantus_runtime/runtime_call.dart' as _i9; -import '../types/sp_weights/weight_v2/weight.dart' as _i11; -import '../types/tuples_1.dart' as _i5; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageValue _incompleteBlockSince = const _i1.StorageValue( - prefix: 'Scheduler', - storage: 'IncompleteBlockSince', - valueCodec: _i2.U32Codec.codec, - ); - - final _i1.StorageValue _incompleteTimestampSince = const _i1.StorageValue( - prefix: 'Scheduler', - storage: 'IncompleteTimestampSince', - valueCodec: _i2.U64Codec.codec, - ); - - final _i1.StorageValue _lastProcessedTimestamp = const _i1.StorageValue( - prefix: 'Scheduler', - storage: 'LastProcessedTimestamp', - valueCodec: _i2.U64Codec.codec, - ); - - 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)), - ); - - /// 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); - if (bytes != null) { - return _incompleteBlockSince.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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); - if (bytes != null) { - return _incompleteTimestampSince.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// Tracks the last timestamp bucket that was fully processed. - /// 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); - if (bytes != null) { - return _lastProcessedTimestamp.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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 { - final hashedKey = _agenda.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _agenda.decodeValue(bytes); - } - return []; /* Default */ - } - - /// 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 { - final hashedKey = _retries.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _retries.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// Lookup from a name to the block number and index of the task. - /// - /// For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4 - /// identities. - _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); - if (bytes != null) { - return _lookup.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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 { - final hashedKeys = keys.map((key) => _agenda.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _agenda.decodeValue(v.key)).toList(); - } - return (keys.map((key) => []).toList() as List>); /* Default */ - } - - /// Retry configurations for items to be executed, indexed by task address. - _i7.Future> multiRetries( - List<_i5.Tuple2<_i3.BlockNumberOrTimestamp, int>> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = keys.map((key) => _retries.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _retries.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Lookup from a name to the block number and index of the task. - /// - /// For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4 - /// identities. - _i7.Future?>> multiLookup( - List> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = keys.map((key) => _lookup.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _lookup.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Returns the storage key for `incompleteBlockSince`. - _i8.Uint8List incompleteBlockSinceKey() { - final hashedKey = _incompleteBlockSince.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `incompleteTimestampSince`. - _i8.Uint8List incompleteTimestampSinceKey() { - final hashedKey = _incompleteTimestampSince.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `lastProcessedTimestamp`. - _i8.Uint8List lastProcessedTimestampKey() { - final hashedKey = _lastProcessedTimestamp.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `agenda`. - _i8.Uint8List agendaKey(_i3.BlockNumberOrTimestamp key1) { - final hashedKey = _agenda.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `retries`. - _i8.Uint8List retriesKey(_i5.Tuple2<_i3.BlockNumberOrTimestamp, int> key1) { - final hashedKey = _retries.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `lookup`. - _i8.Uint8List lookupKey(List key1) { - final hashedKey = _lookup.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `agenda`. - _i8.Uint8List agendaMapPrefix() { - final hashedKey = _agenda.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `retries`. - _i8.Uint8List retriesMapPrefix() { - final hashedKey = _retries.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `lookup`. - _i8.Uint8List lookupMapPrefix() { - final hashedKey = _lookup.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Anonymously schedule a task. - _i9.Scheduler schedule({ - required int when, - _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>? maybePeriodic, - required int priority, - required _i9.RuntimeCall call, - }) { - return _i9.Scheduler(_i10.Schedule(when: when, maybePeriodic: maybePeriodic, 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)); - } - - /// Schedule a named task. - _i9.Scheduler scheduleNamed({ - required List id, - required int when, - _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>? maybePeriodic, - required int priority, - required _i9.RuntimeCall call, - }) { - return _i9.Scheduler( - _i10.ScheduleNamed(id: id, when: when, maybePeriodic: maybePeriodic, priority: priority, call: call), - ); - } - - /// Cancel a named scheduled task. - _i9.Scheduler cancelNamed({required List id}) { - return _i9.Scheduler(_i10.CancelNamed(id: id)); - } - - /// Anonymously schedule a task after a delay. - _i9.Scheduler scheduleAfter({ - required _i3.BlockNumberOrTimestamp after, - _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>? maybePeriodic, - required int priority, - required _i9.RuntimeCall call, - }) { - return _i9.Scheduler( - _i10.ScheduleAfter(after: after, maybePeriodic: maybePeriodic, priority: priority, call: call), - ); - } - - /// Schedule a named task after a delay. - _i9.Scheduler scheduleNamedAfter({ - required List id, - required _i3.BlockNumberOrTimestamp after, - _i5.Tuple2<_i3.BlockNumberOrTimestamp, int>? maybePeriodic, - required int priority, - required _i9.RuntimeCall call, - }) { - return _i9.Scheduler( - _i10.ScheduleNamedAfter(id: id, after: after, maybePeriodic: maybePeriodic, priority: priority, call: call), - ); - } - - /// Set a retry configuration for a task so that, in case its scheduled run fails, it will - /// be retried after `period` blocks, for a total amount of `retries` retries or until it - /// succeeds. - /// - /// Tasks which need to be scheduled for a retry are still subject to weight metering and - /// agenda space, same as a regular task. If a periodic task fails, it will be scheduled - /// normally while the task is retrying. - /// - /// Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic - /// 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`. - _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)); - } - - /// Set a retry configuration for a named task so that, in case its scheduled run fails, it - /// will be retried after `period` blocks, for a total amount of `retries` retries or until - /// it succeeds. - /// - /// Tasks which need to be scheduled for a retry are still subject to weight metering and - /// agenda space, same as a regular task. If a periodic task fails, it will be scheduled - /// normally while the task is retrying. - /// - /// Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic - /// 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`. - _i9.Scheduler setRetryNamed({ - required List id, - required int retries, - required _i3.BlockNumberOrTimestamp 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}) { - return _i9.Scheduler(_i10.CancelRetry(task: task)); - } - - /// Cancel the retry configuration of a named task. - _i9.Scheduler cancelRetryNamed({required List id}) { - return _i9.Scheduler(_i10.CancelRetryNamed(id: id)); - } -} - -class Constants { - 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), - ); - - /// The maximum number of scheduled calls in the queue for a single block. - /// - /// NOTE: - /// + Dependent pallets' benchmarks might require a higher limit for the setting. Set a - /// higher limit under `runtime-benchmarks` feature. - final int maxScheduledPerBlock = 50; - - /// Precision of the timestamp buckets. - /// - /// Timestamp based dispatches are rounded to the nearest bucket of this precision. - final BigInt timestampBucketSize = BigInt.from(40000); -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/sudo.dart b/quantus_sdk/lib/generated/resonance/pallets/sudo.dart deleted file mode 100644 index b9cadac9..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/sudo.dart +++ /dev/null @@ -1,78 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i3; -import 'dart:typed_data' as _i4; - -import 'package:polkadart/polkadart.dart' as _i1; - -import '../types/pallet_sudo/pallet/call.dart' as _i6; -import '../types/quantus_runtime/runtime_call.dart' as _i5; -import '../types/sp_core/crypto/account_id32.dart' as _i2; -import '../types/sp_runtime/multiaddress/multi_address.dart' as _i8; -import '../types/sp_weights/weight_v2/weight.dart' as _i7; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageValue<_i2.AccountId32> _key = const _i1.StorageValue<_i2.AccountId32>( - prefix: 'Sudo', - storage: 'Key', - valueCodec: _i2.AccountId32Codec(), - ); - - /// The `AccountId` of the sudo key. - _i3.Future<_i2.AccountId32?> key({_i1.BlockHash? at}) async { - final hashedKey = _key.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _key.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// Returns the storage key for `key`. - _i4.Uint8List keyKey() { - final hashedKey = _key.hashedKey(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Authenticates the sudo key and dispatches a function call with `Root` origin. - _i5.Sudo sudo({required _i5.RuntimeCall call}) { - return _i5.Sudo(_i6.Sudo(call: call)); - } - - /// Authenticates the sudo key and dispatches a function call with `Root` origin. - /// This function does not check the weight of the call, and instead allows the - /// Sudo user to specify the weight of the call. - /// - /// The dispatch origin for this call must be _Signed_. - _i5.Sudo sudoUncheckedWeight({required _i5.RuntimeCall call, required _i7.Weight weight}) { - return _i5.Sudo(_i6.SudoUncheckedWeight(call: call, weight: weight)); - } - - /// Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo - /// key. - _i5.Sudo setKey({required _i8.MultiAddress new_}) { - return _i5.Sudo(_i6.SetKey(new_: new_)); - } - - /// Authenticates the sudo key and dispatches a function call with `Signed` origin from - /// a given account. - /// - /// The dispatch origin for this call must be _Signed_. - _i5.Sudo sudoAs({required _i8.MultiAddress who, required _i5.RuntimeCall call}) { - return _i5.Sudo(_i6.SudoAs(who: who, call: call)); - } - - /// Permanently removes the sudo key. - /// - /// **This cannot be un-done.** - _i5.Sudo removeKey() { - return _i5.Sudo(_i6.RemoveKey()); - } -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/system.dart b/quantus_sdk/lib/generated/resonance/pallets/system.dart deleted file mode 100644 index cec715a9..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/system.dart +++ /dev/null @@ -1,738 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i13; -import 'dart:typed_data' as _i16; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i4; - -import '../types/frame_support/dispatch/per_dispatch_class_1.dart' as _i5; -import '../types/frame_support/dispatch/per_dispatch_class_2.dart' as _i20; -import '../types/frame_support/dispatch/per_dispatch_class_3.dart' as _i23; -import '../types/frame_system/account_info.dart' as _i3; -import '../types/frame_system/code_upgrade_authorization.dart' as _i12; -import '../types/frame_system/event_record.dart' as _i8; -import '../types/frame_system/last_runtime_upgrade_info.dart' as _i10; -import '../types/frame_system/limits/block_length.dart' as _i22; -import '../types/frame_system/limits/block_weights.dart' as _i19; -import '../types/frame_system/limits/weights_per_class.dart' as _i21; -import '../types/frame_system/pallet/call.dart' as _i18; -import '../types/frame_system/phase.dart' as _i11; -import '../types/pallet_balances/types/account_data.dart' as _i14; -import '../types/primitive_types/h256.dart' as _i6; -import '../types/quantus_runtime/runtime_call.dart' as _i17; -import '../types/sp_core/crypto/account_id32.dart' as _i2; -import '../types/sp_runtime/generic/digest/digest.dart' as _i7; -import '../types/sp_version/runtime_version.dart' as _i25; -import '../types/sp_weights/runtime_db_weight.dart' as _i24; -import '../types/sp_weights/weight_v2/weight.dart' as _i15; -import '../types/tuples.dart' as _i9; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - 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()), - ); - - final _i1.StorageValue _extrinsicCount = const _i1.StorageValue( - prefix: 'System', - storage: 'ExtrinsicCount', - valueCodec: _i4.U32Codec.codec, - ); - - final _i1.StorageValue _inherentsApplied = const _i1.StorageValue( - prefix: 'System', - storage: 'InherentsApplied', - valueCodec: _i4.BoolCodec.codec, - ); - - final _i1.StorageValue<_i5.PerDispatchClass> _blockWeight = const _i1.StorageValue<_i5.PerDispatchClass>( - prefix: 'System', - storage: 'BlockWeight', - valueCodec: _i5.PerDispatchClass.codec, - ); - - final _i1.StorageValue _allExtrinsicsLen = const _i1.StorageValue( - prefix: 'System', - storage: 'AllExtrinsicsLen', - valueCodec: _i4.U32Codec.codec, - ); - - 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>( - prefix: 'System', - storage: 'ExtrinsicData', - valueCodec: _i4.U8SequenceCodec.codec, - hasher: _i1.StorageHasher.twoxx64Concat(_i4.U32Codec.codec), - ); - - final _i1.StorageValue _number = const _i1.StorageValue( - prefix: 'System', - storage: 'Number', - valueCodec: _i4.U32Codec.codec, - ); - - 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>( - prefix: 'System', - storage: 'Digest', - valueCodec: _i7.Digest.codec, - ); - - final _i1.StorageValue> _events = const _i1.StorageValue>( - prefix: 'System', - storage: 'Events', - valueCodec: _i4.SequenceCodec<_i8.EventRecord>(_i8.EventRecord.codec), - ); - - final _i1.StorageValue _eventCount = const _i1.StorageValue( - prefix: 'System', - storage: 'EventCount', - valueCodec: _i4.U32Codec.codec, - ); - - 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()), - ); - - final _i1.StorageValue<_i10.LastRuntimeUpgradeInfo> _lastRuntimeUpgrade = - const _i1.StorageValue<_i10.LastRuntimeUpgradeInfo>( - prefix: 'System', - storage: 'LastRuntimeUpgrade', - valueCodec: _i10.LastRuntimeUpgradeInfo.codec, - ); - - final _i1.StorageValue _upgradedToU32RefCount = const _i1.StorageValue( - prefix: 'System', - storage: 'UpgradedToU32RefCount', - valueCodec: _i4.BoolCodec.codec, - ); - - 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>( - prefix: 'System', - storage: 'ExecutionPhase', - valueCodec: _i11.Phase.codec, - ); - - final _i1.StorageValue<_i12.CodeUpgradeAuthorization> _authorizedUpgrade = - const _i1.StorageValue<_i12.CodeUpgradeAuthorization>( - prefix: 'System', - storage: 'AuthorizedUpgrade', - valueCodec: _i12.CodeUpgradeAuthorization.codec, - ); - - /// The full account information for a particular account ID. - _i13.Future<_i3.AccountInfo> account(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _account.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _account.decodeValue(bytes); - } - return _i3.AccountInfo( - nonce: 0, - consumers: 0, - providers: 0, - sufficients: 0, - data: _i14.AccountData( - free: BigInt.zero, - reserved: BigInt.zero, - frozen: BigInt.zero, - flags: BigInt.parse('170141183460469231731687303715884105728', radix: 10), - ), - ); /* Default */ - } - - /// Total extrinsics count for the current block. - _i13.Future extrinsicCount({_i1.BlockHash? at}) async { - final hashedKey = _extrinsicCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _extrinsicCount.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// Whether all inherents have been applied. - _i13.Future inherentsApplied({_i1.BlockHash? at}) async { - final hashedKey = _inherentsApplied.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _inherentsApplied.decodeValue(bytes); - } - return false; /* Default */ - } - - /// The current weight for the block. - _i13.Future<_i5.PerDispatchClass> blockWeight({_i1.BlockHash? at}) async { - final hashedKey = _blockWeight.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _blockWeight.decodeValue(bytes); - } - return _i5.PerDispatchClass( - normal: _i15.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), - operational: _i15.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), - mandatory: _i15.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), - ); /* Default */ - } - - /// Total length (in bytes) for all extrinsics put together, for the current block. - _i13.Future allExtrinsicsLen({_i1.BlockHash? at}) async { - final hashedKey = _allExtrinsicsLen.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _allExtrinsicsLen.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// Map of block numbers to block hashes. - _i13.Future<_i6.H256> blockHash(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _blockHash.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _blockHash.decodeValue(bytes); - } - return List.filled(32, 0, growable: false); /* Default */ - } - - /// Extrinsics data for the current block (maps an extrinsic's index to its data). - _i13.Future> extrinsicData(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _extrinsicData.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _extrinsicData.decodeValue(bytes); - } - return List.filled(0, 0, growable: true); /* Default */ - } - - /// The current block number being processed. Set by `execute_block`. - _i13.Future number({_i1.BlockHash? at}) async { - final hashedKey = _number.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _number.decodeValue(bytes); - } - return 0; /* Default */ - } - - /// Hash of the previous block. - _i13.Future<_i6.H256> parentHash({_i1.BlockHash? at}) async { - final hashedKey = _parentHash.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _parentHash.decodeValue(bytes); - } - return List.filled(32, 0, growable: false); /* Default */ - } - - /// Digest of the current block, also part of the block header. - _i13.Future<_i7.Digest> digest({_i1.BlockHash? at}) async { - final hashedKey = _digest.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _digest.decodeValue(bytes); - } - return _i7.Digest(logs: []); /* Default */ - } - - /// Events deposited for the current block. - /// - /// NOTE: The item is unbound and should therefore never be read on chain. - /// It could otherwise inflate the PoV size of a block. - /// - /// Events have a large in-memory size. Box the events to not go out-of-memory - /// just in case someone still reads them from within the runtime. - _i13.Future> events({_i1.BlockHash? at}) async { - final hashedKey = _events.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _events.decodeValue(bytes); - } - return []; /* Default */ - } - - /// The number of events in the `Events` list. - _i13.Future eventCount({_i1.BlockHash? at}) async { - final hashedKey = _eventCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _eventCount.decodeValue(bytes); - } - return 0; /* Default */ - } - - /// Mapping between a topic (represented by T::Hash) and a vector of indexes - /// of events in the `>` list. - /// - /// All topic vectors have deterministic storage locations depending on the topic. This - /// allows light-clients to leverage the changes trie storage tracking mechanism and - /// in case of changes fetch the list of events of interest. - /// - /// 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. - _i13.Future>> eventTopics(_i6.H256 key1, {_i1.BlockHash? at}) async { - final hashedKey = _eventTopics.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _eventTopics.decodeValue(bytes); - } - return []; /* Default */ - } - - /// Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened. - _i13.Future<_i10.LastRuntimeUpgradeInfo?> lastRuntimeUpgrade({_i1.BlockHash? at}) async { - final hashedKey = _lastRuntimeUpgrade.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _lastRuntimeUpgrade.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// True if we have upgraded so that `type RefCount` is `u32`. False (default) if not. - _i13.Future upgradedToU32RefCount({_i1.BlockHash? at}) async { - final hashedKey = _upgradedToU32RefCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _upgradedToU32RefCount.decodeValue(bytes); - } - return false; /* Default */ - } - - /// True if we have upgraded so that AccountInfo contains three types of `RefCount`. False - /// (default) if not. - _i13.Future upgradedToTripleRefCount({_i1.BlockHash? at}) async { - final hashedKey = _upgradedToTripleRefCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _upgradedToTripleRefCount.decodeValue(bytes); - } - return false; /* Default */ - } - - /// The execution phase of the block. - _i13.Future<_i11.Phase?> executionPhase({_i1.BlockHash? at}) async { - final hashedKey = _executionPhase.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _executionPhase.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// `Some` if a code upgrade has been authorized. - _i13.Future<_i12.CodeUpgradeAuthorization?> authorizedUpgrade({_i1.BlockHash? at}) async { - final hashedKey = _authorizedUpgrade.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _authorizedUpgrade.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// The full account information for a particular account ID. - _i13.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); - if (bytes.isNotEmpty) { - 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: _i14.AccountData( - free: BigInt.zero, - reserved: BigInt.zero, - frozen: BigInt.zero, - flags: BigInt.parse('170141183460469231731687303715884105728', radix: 10), - ), - ), - ) - .toList() - as List<_i3.AccountInfo>); /* Default */ - } - - /// Map of block numbers to block hashes. - _i13.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); - if (bytes.isNotEmpty) { - 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 */ - } - - /// Extrinsics data for the current block (maps an extrinsic's index to its data). - _i13.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 (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 - /// of events in the `>` list. - /// - /// All topic vectors have deterministic storage locations depending on the topic. This - /// allows light-clients to leverage the changes trie storage tracking mechanism and - /// in case of changes fetch the list of events of interest. - /// - /// 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. - _i13.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 (keys.map((key) => []).toList() as List>>); /* Default */ - } - - /// Returns the storage key for `account`. - _i16.Uint8List accountKey(_i2.AccountId32 key1) { - final hashedKey = _account.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `extrinsicCount`. - _i16.Uint8List extrinsicCountKey() { - final hashedKey = _extrinsicCount.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `inherentsApplied`. - _i16.Uint8List inherentsAppliedKey() { - final hashedKey = _inherentsApplied.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `blockWeight`. - _i16.Uint8List blockWeightKey() { - final hashedKey = _blockWeight.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `allExtrinsicsLen`. - _i16.Uint8List allExtrinsicsLenKey() { - final hashedKey = _allExtrinsicsLen.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `blockHash`. - _i16.Uint8List blockHashKey(int key1) { - final hashedKey = _blockHash.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `extrinsicData`. - _i16.Uint8List extrinsicDataKey(int key1) { - final hashedKey = _extrinsicData.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `number`. - _i16.Uint8List numberKey() { - final hashedKey = _number.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `parentHash`. - _i16.Uint8List parentHashKey() { - final hashedKey = _parentHash.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `digest`. - _i16.Uint8List digestKey() { - final hashedKey = _digest.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `events`. - _i16.Uint8List eventsKey() { - final hashedKey = _events.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `eventCount`. - _i16.Uint8List eventCountKey() { - final hashedKey = _eventCount.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `eventTopics`. - _i16.Uint8List eventTopicsKey(_i6.H256 key1) { - final hashedKey = _eventTopics.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `lastRuntimeUpgrade`. - _i16.Uint8List lastRuntimeUpgradeKey() { - final hashedKey = _lastRuntimeUpgrade.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `upgradedToU32RefCount`. - _i16.Uint8List upgradedToU32RefCountKey() { - final hashedKey = _upgradedToU32RefCount.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `upgradedToTripleRefCount`. - _i16.Uint8List upgradedToTripleRefCountKey() { - final hashedKey = _upgradedToTripleRefCount.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `executionPhase`. - _i16.Uint8List executionPhaseKey() { - final hashedKey = _executionPhase.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `authorizedUpgrade`. - _i16.Uint8List authorizedUpgradeKey() { - final hashedKey = _authorizedUpgrade.hashedKey(); - return hashedKey; - } - - /// Returns the storage map key prefix for `account`. - _i16.Uint8List accountMapPrefix() { - final hashedKey = _account.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `blockHash`. - _i16.Uint8List blockHashMapPrefix() { - final hashedKey = _blockHash.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `extrinsicData`. - _i16.Uint8List extrinsicDataMapPrefix() { - final hashedKey = _extrinsicData.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `eventTopics`. - _i16.Uint8List eventTopicsMapPrefix() { - final hashedKey = _eventTopics.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Make some on-chain remark. - /// - /// Can be executed by every `origin`. - _i17.System remark({required List remark}) { - return _i17.System(_i18.Remark(remark: remark)); - } - - /// Set the number of pages in the WebAssembly environment's heap. - _i17.System setHeapPages({required BigInt pages}) { - return _i17.System(_i18.SetHeapPages(pages: pages)); - } - - /// Set the new runtime code. - _i17.System setCode({required List code}) { - return _i17.System(_i18.SetCode(code: code)); - } - - /// Set the new runtime code without doing any checks of the given `code`. - /// - /// Note that runtime upgrades will not run if this is called with a not-increasing spec - /// version! - _i17.System setCodeWithoutChecks({required List code}) { - return _i17.System(_i18.SetCodeWithoutChecks(code: code)); - } - - /// Set some items of storage. - _i17.System setStorage({required List<_i9.Tuple2, List>> items}) { - return _i17.System(_i18.SetStorage(items: items)); - } - - /// Kill some items from storage. - _i17.System killStorage({required List> keys}) { - return _i17.System(_i18.KillStorage(keys: keys)); - } - - /// Kill all storage items with a key that starts with the given prefix. - /// - /// **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)); - } - - /// Make some on-chain remark and emit event. - _i17.System remarkWithEvent({required List remark}) { - return _i17.System(_i18.RemarkWithEvent(remark: remark)); - } - - /// Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied - /// later. - /// - /// This call requires Root origin. - _i17.System authorizeUpgrade({required _i6.H256 codeHash}) { - return _i17.System(_i18.AuthorizeUpgrade(codeHash: codeHash)); - } - - /// Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied - /// later. - /// - /// WARNING: This authorizes an upgrade that will take place without any safety checks, for - /// example that the spec name remains the same and that the version number increases. Not - /// recommended for normal use. Use `authorize_upgrade` instead. - /// - /// This call requires Root origin. - _i17.System authorizeUpgradeWithoutChecks({required _i6.H256 codeHash}) { - return _i17.System(_i18.AuthorizeUpgradeWithoutChecks(codeHash: codeHash)); - } - - /// Provide the preimage (runtime binary) `code` for an upgrade that has been authorized. - /// - /// If the authorization required a version check, this call will ensure the spec name - /// remains unchanged and that the spec version has increased. - /// - /// Depending on the runtime's `OnSetCode` configuration, this function may directly apply - /// the new `code` in the same block or attempt to schedule the upgrade. - /// - /// All origins are allowed. - _i17.System applyAuthorizedUpgrade({required List code}) { - return _i17.System(_i18.ApplyAuthorizedUpgrade(code: code)); - } -} - -class Constants { - Constants(); - - /// Block & extrinsics weights: base values and limits. - final _i19.BlockWeights blockWeights = _i19.BlockWeights( - baseBlock: _i15.Weight(refTime: BigInt.from(431614000), proofSize: BigInt.zero), - maxBlock: _i15.Weight( - refTime: BigInt.from(6000000000000), - proofSize: BigInt.parse('18446744073709551615', radix: 10), - ), - perClass: _i20.PerDispatchClass( - normal: _i21.WeightsPerClass( - baseExtrinsic: _i15.Weight(refTime: BigInt.from(108157000), proofSize: BigInt.zero), - maxExtrinsic: _i15.Weight( - refTime: BigInt.from(3899891843000), - proofSize: BigInt.parse('11990383647911208550', radix: 10), - ), - maxTotal: _i15.Weight( - refTime: BigInt.from(4500000000000), - proofSize: BigInt.parse('13835058055282163711', radix: 10), - ), - reserved: _i15.Weight(refTime: BigInt.zero, proofSize: BigInt.zero), - ), - operational: _i21.WeightsPerClass( - baseExtrinsic: _i15.Weight(refTime: BigInt.from(108157000), proofSize: BigInt.zero), - maxExtrinsic: _i15.Weight( - refTime: BigInt.from(5399891843000), - proofSize: BigInt.parse('16602069666338596454', radix: 10), - ), - maxTotal: _i15.Weight( - refTime: BigInt.from(6000000000000), - proofSize: BigInt.parse('18446744073709551615', radix: 10), - ), - reserved: _i15.Weight( - refTime: BigInt.from(1500000000000), - proofSize: BigInt.parse('4611686018427387904', radix: 10), - ), - ), - mandatory: _i21.WeightsPerClass( - baseExtrinsic: _i15.Weight(refTime: BigInt.from(108157000), proofSize: BigInt.zero), - maxExtrinsic: null, - maxTotal: null, - reserved: null, - ), - ), - ); - - /// The maximum length of a block (in bytes). - final _i22.BlockLength blockLength = const _i22.BlockLength( - 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; - - /// The weight of runtime database operations the runtime can invoke. - final _i24.RuntimeDbWeight dbWeight = _i24.RuntimeDbWeight( - read: BigInt.from(25000000), - write: BigInt.from(100000000), - ); - - /// Get the chain's in-code version. - final _i25.RuntimeVersion version = const _i25.RuntimeVersion( - specName: 'quantus-runtime', - implName: 'quantus-runtime', - authoringVersion: 1, - specVersion: 106, - 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>([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, - ); - - /// The designated SS58 prefix of this chain. - /// - /// This replaces the "ss58Format" property declared in the chain spec. Reason is - /// that the runtime should know about the prefix in order to make use of it as - /// an identifier of the chain. - final int sS58Prefix = 189; -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/tech_collective.dart b/quantus_sdk/lib/generated/resonance/pallets/tech_collective.dart deleted file mode 100644 index 61efa344..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/tech_collective.dart +++ /dev/null @@ -1,315 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:typed_data' as _i7; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i2; - -import '../types/pallet_ranked_collective/member_record.dart' as _i4; -import '../types/pallet_ranked_collective/pallet/call.dart' as _i10; -import '../types/pallet_ranked_collective/vote_record.dart' as _i5; -import '../types/quantus_runtime/runtime_call.dart' as _i8; -import '../types/sp_core/crypto/account_id32.dart' as _i3; -import '../types/sp_runtime/multiaddress/multi_address.dart' as _i9; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageMap _memberCount = const _i1.StorageMap( - prefix: 'TechCollective', - storage: 'MemberCount', - valueCodec: _i2.U32Codec.codec, - hasher: _i1.StorageHasher.twoxx64Concat(_i2.U16Codec.codec), - ); - - 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()), - ); - - 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()), - ); - - 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), - ); - - 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: 'VotingCleanup', - valueCodec: _i2.U8SequenceCodec.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i2.U32Codec.codec), - ); - - /// 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 { - final hashedKey = _memberCount.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _memberCount.decodeValue(bytes); - } - return 0; /* Default */ - } - - /// The current members of the collective. - _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); - if (bytes != null) { - return _members.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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); - if (bytes != null) { - return _idToIndex.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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); - if (bytes != null) { - return _indexToId.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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); - if (bytes != null) { - return _voting.decodeValue(bytes); - } - return null; /* Nullable */ - } - - _i6.Future?> votingCleanup(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _votingCleanup.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _votingCleanup.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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); - if (bytes.isNotEmpty) { - 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 { - final hashedKeys = keys.map((key) => _members.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _votingCleanup.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Returns the storage key for `memberCount`. - _i7.Uint8List memberCountKey(int key1) { - final hashedKey = _memberCount.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `members`. - _i7.Uint8List membersKey(_i3.AccountId32 key1) { - final hashedKey = _members.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `idToIndex`. - _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); - return hashedKey; - } - - /// Returns the storage key for `voting`. - _i7.Uint8List votingKey(int key1, _i3.AccountId32 key2) { - final hashedKey = _voting.hashedKeyFor(key1, key2); - return hashedKey; - } - - /// Returns the storage key for `votingCleanup`. - _i7.Uint8List votingCleanupKey(int key1) { - final hashedKey = _votingCleanup.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `memberCount`. - _i7.Uint8List memberCountMapPrefix() { - final hashedKey = _memberCount.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `members`. - _i7.Uint8List membersMapPrefix() { - final hashedKey = _members.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `idToIndex`. - _i7.Uint8List idToIndexMapPrefix(int key1) { - final hashedKey = _idToIndex.mapPrefix(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `indexToId`. - _i7.Uint8List indexToIdMapPrefix(int key1) { - final hashedKey = _indexToId.mapPrefix(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `voting`. - _i7.Uint8List votingMapPrefix(int key1) { - final hashedKey = _voting.mapPrefix(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `votingCleanup`. - _i7.Uint8List votingCleanupMapPrefix() { - final hashedKey = _votingCleanup.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Introduce a new member. - /// - /// - `origin`: Must be the `AddOrigin`. - /// - `who`: Account of non-member which will become a member. - /// - /// Weight: `O(1)` - _i8.TechCollective addMember({required _i9.MultiAddress who}) { - return _i8.TechCollective(_i10.AddMember(who: who)); - } - - /// Increment the rank of an existing member by one. - /// - /// - `origin`: Must be the `PromoteOrigin`. - /// - `who`: Account of existing member. - /// - /// Weight: `O(1)` - _i8.TechCollective promoteMember({required _i9.MultiAddress who}) { - return _i8.TechCollective(_i10.PromoteMember(who: who)); - } - - /// Decrement the rank of an existing member by one. If the member is already at rank zero, - /// then they are removed entirely. - /// - /// - `origin`: Must be the `DemoteOrigin`. - /// - `who`: Account of existing member of rank greater than zero. - /// - /// Weight: `O(1)`, less if the member's index is highest in its rank. - _i8.TechCollective demoteMember({required _i9.MultiAddress who}) { - return _i8.TechCollective(_i10.DemoteMember(who: who)); - } - - /// Remove the member entirely. - /// - /// - `origin`: Must be the `RemoveOrigin`. - /// - `who`: Account of existing member of rank greater than zero. - /// - `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)); - } - - /// Add an aye or nay vote for the sender to the given proposal. - /// - /// - `origin`: Must be `Signed` by a member account. - /// - `poll`: Index of a poll which is ongoing. - /// - `aye`: `true` if the vote is to approve the proposal, `false` otherwise. - /// - /// Transaction fees are be waived if the member is voting on any particular proposal - /// for the first time and the call is successful. Subsequent vote changes will charge a - /// 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)); - } - - /// Remove votes from the given poll. It must have ended. - /// - /// - `origin`: Must be `Signed` by any account. - /// - `poll_index`: Index of a poll which is completed and for which votes continue to - /// exist. - /// - `max`: Maximum number of vote items from remove in this call. - /// - /// 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)); - } - - /// Exchanges a member with a new account and the same existing rank. - /// - /// - `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)); - } -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/tech_referenda.dart b/quantus_sdk/lib/generated/resonance/pallets/tech_referenda.dart deleted file mode 100644 index 2e77c18d..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/tech_referenda.dart +++ /dev/null @@ -1,366 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:typed_data' as _i7; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i2; - -import '../types/frame_support/traits/preimages/bounded.dart' as _i10; -import '../types/frame_support/traits/schedule/dispatch_time.dart' as _i11; -import '../types/pallet_referenda/pallet/call_2.dart' as _i12; -import '../types/pallet_referenda/types/curve.dart' as _i14; -import '../types/pallet_referenda/types/referendum_info_2.dart' as _i3; -import '../types/pallet_referenda/types/track_info.dart' as _i13; -import '../types/primitive_types/h256.dart' as _i5; -import '../types/quantus_runtime/origin_caller.dart' as _i9; -import '../types/quantus_runtime/runtime_call.dart' as _i8; -import '../types/tuples.dart' as _i4; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageValue _referendumCount = const _i1.StorageValue( - prefix: 'TechReferenda', - storage: 'ReferendumCount', - valueCodec: _i2.U32Codec.codec, - ); - - final _i1.StorageMap _referendumInfoFor = const _i1.StorageMap( - prefix: 'TechReferenda', - storage: 'ReferendumInfoFor', - valueCodec: _i3.ReferendumInfo.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i2.U32Codec.codec), - ); - - 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), - ); - - 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( - prefix: 'TechReferenda', - storage: 'MetadataOf', - valueCodec: _i5.H256Codec(), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.U32Codec.codec), - ); - - /// 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); - if (bytes != null) { - return _referendumCount.decodeValue(bytes); - } - return 0; /* Default */ - } - - /// Information concerning any given referendum. - _i6.Future<_i3.ReferendumInfo?> referendumInfoFor(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _referendumInfoFor.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _referendumInfoFor.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// The sorted list of referenda ready to be decided but not yet being decided, ordered by - /// conviction-weighted approvals. - /// - /// This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. - _i6.Future>> trackQueue(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _trackQueue.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _trackQueue.decodeValue(bytes); - } - return []; /* Default */ - } - - /// The number of referenda being decided currently. - _i6.Future decidingCount(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _decidingCount.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _decidingCount.decodeValue(bytes); - } - return 0; /* Default */ - } - - /// The metadata is a general information concerning the referendum. - /// The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON - /// dump or IPFS hash of a JSON file. - /// - /// 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 { - final hashedKey = _metadataOf.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _metadataOf.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _referendumInfoFor.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// The sorted list of referenda ready to be decided but not yet being decided, ordered by - /// 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _trackQueue.decodeValue(v.key)).toList(); - } - 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _decidingCount.decodeValue(v.key)).toList(); - } - return (keys.map((key) => 0).toList() as List); /* Default */ - } - - /// The metadata is a general information concerning the referendum. - /// The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON - /// dump or IPFS hash of a JSON file. - /// - /// 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); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _metadataOf.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Returns the storage key for `referendumCount`. - _i7.Uint8List referendumCountKey() { - final hashedKey = _referendumCount.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `referendumInfoFor`. - _i7.Uint8List referendumInfoForKey(int key1) { - final hashedKey = _referendumInfoFor.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `trackQueue`. - _i7.Uint8List trackQueueKey(int key1) { - final hashedKey = _trackQueue.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `decidingCount`. - _i7.Uint8List decidingCountKey(int key1) { - final hashedKey = _decidingCount.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `metadataOf`. - _i7.Uint8List metadataOfKey(int key1) { - final hashedKey = _metadataOf.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `referendumInfoFor`. - _i7.Uint8List referendumInfoForMapPrefix() { - final hashedKey = _referendumInfoFor.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `trackQueue`. - _i7.Uint8List trackQueueMapPrefix() { - final hashedKey = _trackQueue.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `decidingCount`. - _i7.Uint8List decidingCountMapPrefix() { - final hashedKey = _decidingCount.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `metadataOf`. - _i7.Uint8List metadataOfMapPrefix() { - final hashedKey = _metadataOf.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Propose a referendum on a privileged action. - /// - /// - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds - /// available. - /// - `proposal_origin`: The origin from which the proposal should be executed. - /// - `proposal`: The proposal. - /// - `enactment_moment`: The moment that the proposal should be enacted. - /// - /// Emits `Submitted`. - _i8.TechReferenda submit({ - required _i9.OriginCaller proposalOrigin, - required _i10.Bounded proposal, - required _i11.DispatchTime enactmentMoment, - }) { - return _i8.TechReferenda( - _i12.Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment), - ); - } - - /// Post the Decision Deposit for a referendum. - /// - /// - `origin`: must be `Signed` and the account must have funds available for the - /// referendum's track's Decision Deposit. - /// - `index`: The index of the submitted referendum whose Decision Deposit is yet to be - /// posted. - /// - /// Emits `DecisionDepositPlaced`. - _i8.TechReferenda placeDecisionDeposit({required int index}) { - return _i8.TechReferenda(_i12.PlaceDecisionDeposit(index: index)); - } - - /// Refund the Decision Deposit for a closed referendum back to the depositor. - /// - /// - `origin`: must be `Signed` or `Root`. - /// - `index`: The index of a closed referendum whose Decision Deposit has not yet been - /// refunded. - /// - /// Emits `DecisionDepositRefunded`. - _i8.TechReferenda refundDecisionDeposit({required int index}) { - return _i8.TechReferenda(_i12.RefundDecisionDeposit(index: index)); - } - - /// Cancel an ongoing referendum. - /// - /// - `origin`: must be the `CancelOrigin`. - /// - `index`: The index of the referendum to be cancelled. - /// - /// Emits `Cancelled`. - _i8.TechReferenda cancel({required int index}) { - return _i8.TechReferenda(_i12.Cancel(index: index)); - } - - /// Cancel an ongoing referendum and slash the deposits. - /// - /// - `origin`: must be the `KillOrigin`. - /// - `index`: The index of the referendum to be cancelled. - /// - /// Emits `Killed` and `DepositSlashed`. - _i8.TechReferenda kill({required int index}) { - return _i8.TechReferenda(_i12.Kill(index: index)); - } - - /// Advance a referendum onto its next logical state. Only used internally. - /// - /// - `origin`: must be `Root`. - /// - `index`: the referendum to be advanced. - _i8.TechReferenda nudgeReferendum({required int index}) { - return _i8.TechReferenda(_i12.NudgeReferendum(index: index)); - } - - /// Advance a track onto its next logical state. Only used internally. - /// - /// - `origin`: must be `Root`. - /// - `track`: the track to be advanced. - /// - /// Action item for when there is now one fewer referendum in the deciding phase and the - /// `DecidingCount` is not yet updated. This means that we should either: - /// - begin deciding another referendum (and leave `DecidingCount` alone); or - /// - decrement `DecidingCount`. - _i8.TechReferenda oneFewerDeciding({required int track}) { - return _i8.TechReferenda(_i12.OneFewerDeciding(track: track)); - } - - /// Refund the Submission Deposit for a closed referendum back to the depositor. - /// - /// - `origin`: must be `Signed` or `Root`. - /// - `index`: The index of a closed referendum whose Submission Deposit has not yet been - /// refunded. - /// - /// Emits `SubmissionDepositRefunded`. - _i8.TechReferenda refundSubmissionDeposit({required int index}) { - return _i8.TechReferenda(_i12.RefundSubmissionDeposit(index: index)); - } - - /// Set or clear metadata of a referendum. - /// - /// Parameters: - /// - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a - /// 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)); - } -} - -class Constants { - Constants(); - - /// The minimum amount to be used as a deposit for a public referendum proposal. - final BigInt submissionDeposit = BigInt.from(100000000000000); - - /// Maximum size of the referendum queue for a single track. - final int maxQueued = 100; - - /// The number of blocks after submission that a referendum must begin being decided by. - /// Once this passes, then anyone may cancel the referendum. - final int undecidingTimeout = 3888000; - - /// Quantization level for the referendum wakeup scheduler. A higher number will result in - /// fewer storage reads/writes needed for smaller voters, but also result in delays to the - /// automatic referendum status changes. Explicit servicing instructions are unaffected. - final int alarmInterval = 1; - - /// Information concerning the different referendum tracks. - final List<_i4.Tuple2> tracks = [ - _i4.Tuple2( - 0, - _i13.TrackInfo( - name: 'tech_collective_members', - maxDeciding: 1, - decisionDeposit: BigInt.from(1000000000000000), - preparePeriod: 100, - decisionPeriod: 86400, - confirmPeriod: 100, - minEnactmentPeriod: 100, - 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/resonance/pallets/timestamp.dart b/quantus_sdk/lib/generated/resonance/pallets/timestamp.dart deleted file mode 100644 index 5f716696..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/timestamp.dart +++ /dev/null @@ -1,101 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i3; -import 'dart:typed_data' as _i4; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i2; - -import '../types/pallet_timestamp/pallet/call.dart' as _i6; -import '../types/quantus_runtime/runtime_call.dart' as _i5; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageValue _now = const _i1.StorageValue( - prefix: 'Timestamp', - storage: 'Now', - valueCodec: _i2.U64Codec.codec, - ); - - final _i1.StorageValue _didUpdate = const _i1.StorageValue( - prefix: 'Timestamp', - storage: 'DidUpdate', - valueCodec: _i2.BoolCodec.codec, - ); - - /// 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); - if (bytes != null) { - return _now.decodeValue(bytes); - } - return BigInt.zero; /* Default */ - } - - /// Whether the timestamp has been updated in this block. - /// - /// This value is updated to `true` upon successful submission of a timestamp by a node. - /// 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); - if (bytes != null) { - return _didUpdate.decodeValue(bytes); - } - return false; /* Default */ - } - - /// Returns the storage key for `now`. - _i4.Uint8List nowKey() { - final hashedKey = _now.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `didUpdate`. - _i4.Uint8List didUpdateKey() { - final hashedKey = _didUpdate.hashedKey(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Set the current time. - /// - /// This call should be invoked exactly once per block. It will panic at the finalization - /// phase, if this call hasn't been invoked by that time. - /// - /// The timestamp should be greater than the previous one by the amount specified by - /// [`Config::MinimumPeriod`]. - /// - /// The dispatch origin for this call must be _None_. - /// - /// This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware - /// that changing the complexity of this call could result exhausting the resources in a - /// block to execute any other calls. - /// - /// ## Complexity - /// - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) - /// - 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in - /// `on_finalize`) - /// - 1 event handler `on_timestamp_set`. Must be `O(1)`. - _i5.Timestamp set({required BigInt now}) { - return _i5.Timestamp(_i6.Set(now: now)); - } -} - -class Constants { - Constants(); - - /// The minimum period between blocks. - /// - /// Be aware that this is different to the *expected* period that the block production - /// apparatus provides. Your chosen consensus system will generally work with this to - /// determine a sensible block time. For example, in the Aura pallet it will be double this - /// period on default settings. - final BigInt minimumPeriod = BigInt.from(100); -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/transaction_payment.dart b/quantus_sdk/lib/generated/resonance/pallets/transaction_payment.dart deleted file mode 100644 index 81c2bb8e..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/transaction_payment.dart +++ /dev/null @@ -1,83 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i4; -import 'dart:typed_data' as _i5; - -import 'package:polkadart/polkadart.dart' as _i1; - -import '../types/pallet_transaction_payment/releases.dart' as _i3; -import '../types/sp_arithmetic/fixed_point/fixed_u128.dart' as _i2; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - 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>( - prefix: 'TransactionPayment', - storage: 'StorageVersion', - valueCodec: _i3.Releases.codec, - ); - - _i4.Future<_i2.FixedU128> nextFeeMultiplier({_i1.BlockHash? at}) async { - final hashedKey = _nextFeeMultiplier.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _nextFeeMultiplier.decodeValue(bytes); - } - return BigInt.parse('1000000000000000000', radix: 10); /* Default */ - } - - _i4.Future<_i3.Releases> storageVersion({_i1.BlockHash? at}) async { - final hashedKey = _storageVersion.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _storageVersion.decodeValue(bytes); - } - return _i3.Releases.v1Ancient; /* Default */ - } - - /// Returns the storage key for `nextFeeMultiplier`. - _i5.Uint8List nextFeeMultiplierKey() { - final hashedKey = _nextFeeMultiplier.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `storageVersion`. - _i5.Uint8List storageVersionKey() { - final hashedKey = _storageVersion.hashedKey(); - return hashedKey; - } -} - -class Constants { - Constants(); - - /// A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their - /// `priority` - /// - /// This value is multiplied by the `final_fee` to obtain a "virtual tip" that is later - /// added to a tip component in regular `priority` calculations. - /// It means that a `Normal` transaction can front-run a similarly-sized `Operational` - /// extrinsic (with no tip), by including a tip value greater than the virtual tip. - /// - /// ```rust,ignore - /// // For `Normal` - /// let priority = priority_calc(tip); - /// - /// // For `Operational` - /// let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier; - /// let priority = priority_calc(tip + virtual_tip); - /// ``` - /// - /// Note that since we use `final_fee` the multiplier applies also to the regular `tip` - /// sent with the transaction. So, not only does the transaction get a priority bump based - /// on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational` - /// transactions. - final int operationalFeeMultiplier = 5; -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/treasury_pallet.dart b/quantus_sdk/lib/generated/resonance/pallets/treasury_pallet.dart deleted file mode 100644 index de5aa2a1..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/treasury_pallet.dart +++ /dev/null @@ -1,397 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; -import 'dart:typed_data' as _i6; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i2; - -import '../types/frame_support/pallet_id.dart' as _i11; -import '../types/pallet_treasury/pallet/call.dart' as _i9; -import '../types/pallet_treasury/proposal.dart' as _i3; -import '../types/pallet_treasury/spend_status.dart' as _i4; -import '../types/quantus_runtime/runtime_call.dart' as _i7; -import '../types/sp_arithmetic/per_things/permill.dart' as _i10; -import '../types/sp_runtime/multiaddress/multi_address.dart' as _i8; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageValue _proposalCount = const _i1.StorageValue( - prefix: 'TreasuryPallet', - storage: 'ProposalCount', - valueCodec: _i2.U32Codec.codec, - ); - - final _i1.StorageMap _proposals = const _i1.StorageMap( - prefix: 'TreasuryPallet', - storage: 'Proposals', - valueCodec: _i3.Proposal.codec, - hasher: _i1.StorageHasher.twoxx64Concat(_i2.U32Codec.codec), - ); - - final _i1.StorageValue _deactivated = const _i1.StorageValue( - prefix: 'TreasuryPallet', - storage: 'Deactivated', - valueCodec: _i2.U128Codec.codec, - ); - - final _i1.StorageValue> _approvals = const _i1.StorageValue>( - prefix: 'TreasuryPallet', - storage: 'Approvals', - valueCodec: _i2.U32SequenceCodec.codec, - ); - - final _i1.StorageValue _spendCount = const _i1.StorageValue( - prefix: 'TreasuryPallet', - storage: 'SpendCount', - valueCodec: _i2.U32Codec.codec, - ); - - final _i1.StorageMap _spends = const _i1.StorageMap( - prefix: 'TreasuryPallet', - storage: 'Spends', - valueCodec: _i4.SpendStatus.codec, - hasher: _i1.StorageHasher.twoxx64Concat(_i2.U32Codec.codec), - ); - - final _i1.StorageValue _lastSpendPeriod = const _i1.StorageValue( - prefix: 'TreasuryPallet', - storage: 'LastSpendPeriod', - valueCodec: _i2.U32Codec.codec, - ); - - /// DEPRECATED: associated with `spend_local` call and will be removed in May 2025. - /// Refer to for migration to `spend`. - /// - /// Number of proposals that have been made. - _i5.Future proposalCount({_i1.BlockHash? at}) async { - final hashedKey = _proposalCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _proposalCount.decodeValue(bytes); - } - return 0; /* Default */ - } - - /// DEPRECATED: associated with `spend_local` call and will be removed in May 2025. - /// Refer to for migration to `spend`. - /// - /// Proposals that have been made. - _i5.Future<_i3.Proposal?> proposals(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _proposals.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _proposals.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// The amount which has been reported as inactive to Currency. - _i5.Future deactivated({_i1.BlockHash? at}) async { - final hashedKey = _deactivated.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _deactivated.decodeValue(bytes); - } - return BigInt.zero; /* Default */ - } - - /// DEPRECATED: associated with `spend_local` call and will be removed in May 2025. - /// Refer to for migration to `spend`. - /// - /// Proposal indices that have been approved but not yet awarded. - _i5.Future> approvals({_i1.BlockHash? at}) async { - final hashedKey = _approvals.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _approvals.decodeValue(bytes); - } - return List.filled(0, 0, growable: true); /* Default */ - } - - /// The count of spends that have been made. - _i5.Future spendCount({_i1.BlockHash? at}) async { - final hashedKey = _spendCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _spendCount.decodeValue(bytes); - } - return 0; /* Default */ - } - - /// Spends that have been approved and being processed. - _i5.Future<_i4.SpendStatus?> spends(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _spends.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _spends.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// The blocknumber for the last triggered spend period. - _i5.Future lastSpendPeriod({_i1.BlockHash? at}) async { - final hashedKey = _lastSpendPeriod.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _lastSpendPeriod.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// DEPRECATED: associated with `spend_local` call and will be removed in May 2025. - /// Refer to for migration to `spend`. - /// - /// Proposals that have been made. - _i5.Future> multiProposals(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _proposals.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _proposals.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Spends that have been approved and being processed. - _i5.Future> multiSpends(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _spends.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _spends.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Returns the storage key for `proposalCount`. - _i6.Uint8List proposalCountKey() { - final hashedKey = _proposalCount.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `proposals`. - _i6.Uint8List proposalsKey(int key1) { - final hashedKey = _proposals.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `deactivated`. - _i6.Uint8List deactivatedKey() { - final hashedKey = _deactivated.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `approvals`. - _i6.Uint8List approvalsKey() { - final hashedKey = _approvals.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `spendCount`. - _i6.Uint8List spendCountKey() { - final hashedKey = _spendCount.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `spends`. - _i6.Uint8List spendsKey(int key1) { - final hashedKey = _spends.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `lastSpendPeriod`. - _i6.Uint8List lastSpendPeriodKey() { - final hashedKey = _lastSpendPeriod.hashedKey(); - return hashedKey; - } - - /// Returns the storage map key prefix for `proposals`. - _i6.Uint8List proposalsMapPrefix() { - final hashedKey = _proposals.mapPrefix(); - return hashedKey; - } - - /// Returns the storage map key prefix for `spends`. - _i6.Uint8List spendsMapPrefix() { - final hashedKey = _spends.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Propose and approve a spend of treasury funds. - /// - /// ## Dispatch Origin - /// - /// Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`. - /// - /// ### Details - /// NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the - /// beneficiary. - /// - /// ### Parameters - /// - `amount`: The amount to be transferred from the treasury to the `beneficiary`. - /// - `beneficiary`: The destination account for the transfer. - /// - /// ## Events - /// - /// Emits [`Event::SpendApproved`] if successful. - _i7.TreasuryPallet spendLocal({required BigInt amount, required _i8.MultiAddress beneficiary}) { - return _i7.TreasuryPallet(_i9.SpendLocal(amount: amount, beneficiary: beneficiary)); - } - - /// Force a previously approved proposal to be removed from the approval queue. - /// - /// ## Dispatch Origin - /// - /// Must be [`Config::RejectOrigin`]. - /// - /// ## Details - /// - /// The original deposit will no longer be returned. - /// - /// ### Parameters - /// - `proposal_id`: The index of a proposal - /// - /// ### Complexity - /// - O(A) where `A` is the number of approvals - /// - /// ### Errors - /// - [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the - /// approval queue, i.e., the proposal has not been approved. This could also mean the - /// proposal does not exist altogether, thus there is no way it would have been approved - /// in the first place. - _i7.TreasuryPallet removeApproval({required BigInt proposalId}) { - return _i7.TreasuryPallet(_i9.RemoveApproval(proposalId: proposalId)); - } - - /// Propose and approve a spend of treasury funds. - /// - /// ## Dispatch Origin - /// - /// Must be [`Config::SpendOrigin`] with the `Success` value being at least - /// `amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted - /// for assertion using the [`Config::BalanceConverter`]. - /// - /// ## Details - /// - /// Create an approved spend for transferring a specific `amount` of `asset_kind` to a - /// designated beneficiary. The spend must be claimed using the `payout` dispatchable within - /// the [`Config::PayoutPeriod`]. - /// - /// ### Parameters - /// - `asset_kind`: An indicator of the specific asset class to be spent. - /// - `amount`: The amount to be transferred from the treasury to the `beneficiary`. - /// - `beneficiary`: The beneficiary of the spend. - /// - `valid_from`: The block number from which the spend can be claimed. It can refer to - /// the past if the resulting spend has not yet expired according to the - /// [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after - /// approval. - /// - /// ## Events - /// - /// Emits [`Event::AssetSpendApproved`] if successful. - _i7.TreasuryPallet spend({ - required dynamic assetKind, - required BigInt amount, - required _i8.MultiAddress beneficiary, - int? validFrom, - }) { - return _i7.TreasuryPallet( - _i9.Spend(assetKind: assetKind, amount: amount, beneficiary: beneficiary, validFrom: validFrom), - ); - } - - /// Claim a spend. - /// - /// ## Dispatch Origin - /// - /// Must be signed - /// - /// ## Details - /// - /// Spends must be claimed within some temporal bounds. A spend may be claimed within one - /// [`Config::PayoutPeriod`] from the `valid_from` block. - /// In case of a payout failure, the spend status must be updated with the `check_status` - /// dispatchable before retrying with the current function. - /// - /// ### Parameters - /// - `index`: The spend index. - /// - /// ## Events - /// - /// Emits [`Event::Paid`] if successful. - _i7.TreasuryPallet payout({required int index}) { - return _i7.TreasuryPallet(_i9.Payout(index: index)); - } - - /// Check the status of the spend and remove it from the storage if processed. - /// - /// ## Dispatch Origin - /// - /// Must be signed. - /// - /// ## Details - /// - /// The status check is a prerequisite for retrying a failed payout. - /// If a spend has either succeeded or expired, it is removed from the storage by this - /// function. In such instances, transaction fees are refunded. - /// - /// ### Parameters - /// - `index`: The spend index. - /// - /// ## Events - /// - /// Emits [`Event::PaymentFailed`] if the spend payout has failed. - /// Emits [`Event::SpendProcessed`] if the spend payout has succeed. - _i7.TreasuryPallet checkStatus({required int index}) { - return _i7.TreasuryPallet(_i9.CheckStatus(index: index)); - } - - /// Void previously approved spend. - /// - /// ## Dispatch Origin - /// - /// Must be [`Config::RejectOrigin`]. - /// - /// ## Details - /// - /// A spend void is only possible if the payout has not been attempted yet. - /// - /// ### Parameters - /// - `index`: The spend index. - /// - /// ## Events - /// - /// Emits [`Event::AssetSpendVoided`] if successful. - _i7.TreasuryPallet voidSpend({required int index}) { - return _i7.TreasuryPallet(_i9.VoidSpend(index: index)); - } -} - -class Constants { - Constants(); - - /// Period between successive spends. - final int spendPeriod = 172800; - - /// Percentage of spare funds (if any) that are burnt per spend period. - final _i10.Permill burn = 0; - - /// The treasury's pallet id, used for deriving its sovereign account ID. - final _i11.PalletId palletId = const [112, 121, 47, 116, 114, 115, 114, 121]; - - /// DEPRECATED: associated with `spend_local` call and will be removed in May 2025. - /// Refer to for migration to `spend`. - /// - /// The maximum number of approvals that can wait in the spending queue. - /// - /// NOTE: This parameter is also used within the Bounties Pallet extension if enabled. - final int maxApprovals = 100; - - /// The period during which an approved treasury spend has to be claimed. - final int payoutPeriod = 1209600; -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/utility.dart b/quantus_sdk/lib/generated/resonance/pallets/utility.dart deleted file mode 100644 index 2ad0fb1a..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/utility.dart +++ /dev/null @@ -1,109 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import '../types/pallet_utility/pallet/call.dart' as _i2; -import '../types/quantus_runtime/origin_caller.dart' as _i3; -import '../types/quantus_runtime/runtime_call.dart' as _i1; -import '../types/sp_weights/weight_v2/weight.dart' as _i4; - -class Txs { - const Txs(); - - /// Send a batch of dispatch calls. - /// - /// May be called from any origin except `None`. - /// - /// - `calls`: The calls to be dispatched from the same origin. The number of call must not - /// exceed the constant: `batched_calls_limit` (available in constant metadata). - /// - /// If origin is root then the calls are dispatched without checking origin filter. (This - /// includes bypassing `frame_system::Config::BaseCallFilter`). - /// - /// ## Complexity - /// - O(C) where C is the number of calls to be batched. - /// - /// This will return `Ok` in all circumstances. To determine the success of the batch, an - /// event is deposited. If a call failed and the batch was interrupted, then the - /// `BatchInterrupted` event is deposited, along with the number of successful calls made - /// and the error of the failed call. If all were successful, then the `BatchCompleted` - /// event is deposited. - _i1.Utility batch({required List<_i1.RuntimeCall> calls}) { - return _i1.Utility(_i2.Batch(calls: calls)); - } - - /// Send a call through an indexed pseudonym of the sender. - /// - /// Filter from origin are passed along. The call will be dispatched with an origin which - /// use the same filter as the origin of this call. - /// - /// NOTE: If you need to ensure that any account-based filtering is not honored (i.e. - /// because you expect `proxy` to have been used prior in the call stack and you do not want - /// the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` - /// in the Multisig pallet instead. - /// - /// 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)); - } - - /// Send a batch of dispatch calls and atomically execute them. - /// The whole transaction will rollback and fail if any of the calls failed. - /// - /// May be called from any origin except `None`. - /// - /// - `calls`: The calls to be dispatched from the same origin. The number of call must not - /// exceed the constant: `batched_calls_limit` (available in constant metadata). - /// - /// If origin is root then the calls are dispatched without checking origin filter. (This - /// includes bypassing `frame_system::Config::BaseCallFilter`). - /// - /// ## Complexity - /// - O(C) where C is the number of calls to be batched. - _i1.Utility batchAll({required List<_i1.RuntimeCall> calls}) { - return _i1.Utility(_i2.BatchAll(calls: calls)); - } - - /// Dispatches a function call with a provided origin. - /// - /// The dispatch origin for this call must be _Root_. - /// - /// ## Complexity - /// - O(1). - _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. - /// Unlike `batch`, it allows errors and won't interrupt. - /// - /// May be called from any origin except `None`. - /// - /// - `calls`: The calls to be dispatched from the same origin. The number of call must not - /// exceed the constant: `batched_calls_limit` (available in constant metadata). - /// - /// If origin is root then the calls are dispatch without checking origin filter. (This - /// includes bypassing `frame_system::Config::BaseCallFilter`). - /// - /// ## Complexity - /// - O(C) where C is the number of calls to be batched. - _i1.Utility forceBatch({required List<_i1.RuntimeCall> calls}) { - return _i1.Utility(_i2.ForceBatch(calls: calls)); - } - - /// Dispatch a function call with a specified weight. - /// - /// This function does not check the weight of the call, and instead allows the - /// 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)); - } -} - -class Constants { - Constants(); - - /// The limit on the number of batched calls. - final int batchedCallsLimit = 10922; -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/vesting.dart b/quantus_sdk/lib/generated/resonance/pallets/vesting.dart deleted file mode 100644 index f80ca5c0..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/vesting.dart +++ /dev/null @@ -1,198 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:typed_data' as _i7; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i4; - -import '../types/pallet_vesting/pallet/call.dart' as _i9; -import '../types/pallet_vesting/releases.dart' as _i5; -import '../types/pallet_vesting/vesting_info/vesting_info.dart' as _i3; -import '../types/quantus_runtime/runtime_call.dart' as _i8; -import '../types/sp_core/crypto/account_id32.dart' as _i2; -import '../types/sp_runtime/multiaddress/multi_address.dart' as _i10; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageMap<_i2.AccountId32, List<_i3.VestingInfo>> _vesting = - const _i1.StorageMap<_i2.AccountId32, List<_i3.VestingInfo>>( - prefix: 'Vesting', - storage: 'Vesting', - valueCodec: _i4.SequenceCodec<_i3.VestingInfo>(_i3.VestingInfo.codec), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); - - final _i1.StorageValue<_i5.Releases> _storageVersion = const _i1.StorageValue<_i5.Releases>( - prefix: 'Vesting', - storage: 'StorageVersion', - valueCodec: _i5.Releases.codec, - ); - - /// Information regarding the vesting of a given account. - _i6.Future?> vesting(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { - final hashedKey = _vesting.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _vesting.decodeValue(bytes); - } - return null; /* Nullable */ - } - - /// Storage version of the pallet. - /// - /// New networks start with latest version, as determined by the genesis build. - _i6.Future<_i5.Releases> storageVersion({_i1.BlockHash? at}) async { - final hashedKey = _storageVersion.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _storageVersion.decodeValue(bytes); - } - return _i5.Releases.v0; /* Default */ - } - - /// Information regarding the vesting of a given account. - _i6.Future?>> multiVesting(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _vesting.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _vesting.decodeValue(v.key)).toList(); - } - return []; /* Nullable */ - } - - /// Returns the storage key for `vesting`. - _i7.Uint8List vestingKey(_i2.AccountId32 key1) { - final hashedKey = _vesting.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `storageVersion`. - _i7.Uint8List storageVersionKey() { - final hashedKey = _storageVersion.hashedKey(); - return hashedKey; - } - - /// Returns the storage map key prefix for `vesting`. - _i7.Uint8List vestingMapPrefix() { - final hashedKey = _vesting.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - /// Unlock any vested funds of the sender account. - /// - /// The dispatch origin for this call must be _Signed_ and the sender must have funds still - /// locked under this pallet. - /// - /// Emits either `VestingCompleted` or `VestingUpdated`. - /// - /// ## Complexity - /// - `O(1)`. - _i8.Vesting vest() { - return _i8.Vesting(_i9.Vest()); - } - - /// Unlock any vested funds of a `target` account. - /// - /// The dispatch origin for this call must be _Signed_. - /// - /// - `target`: The account whose vested funds should be unlocked. Must have funds still - /// locked under this pallet. - /// - /// Emits either `VestingCompleted` or `VestingUpdated`. - /// - /// ## Complexity - /// - `O(1)`. - _i8.Vesting vestOther({required _i10.MultiAddress target}) { - return _i8.Vesting(_i9.VestOther(target: target)); - } - - /// Create a vested transfer. - /// - /// The dispatch origin for this call must be _Signed_. - /// - /// - `target`: The account receiving the vested funds. - /// - `schedule`: The vesting schedule attached to the transfer. - /// - /// Emits `VestingCreated`. - /// - /// NOTE: This will unlock all schedules through the current block. - /// - /// ## Complexity - /// - `O(1)`. - _i8.Vesting vestedTransfer({required _i10.MultiAddress target, required _i3.VestingInfo schedule}) { - return _i8.Vesting(_i9.VestedTransfer(target: target, schedule: schedule)); - } - - /// Force a vested transfer. - /// - /// The dispatch origin for this call must be _Root_. - /// - /// - `source`: The account whose funds should be transferred. - /// - `target`: The account that should be transferred the vested funds. - /// - `schedule`: The vesting schedule attached to the transfer. - /// - /// Emits `VestingCreated`. - /// - /// NOTE: This will unlock all schedules through the current block. - /// - /// ## Complexity - /// - `O(1)`. - _i8.Vesting forceVestedTransfer({ - required _i10.MultiAddress source, - required _i10.MultiAddress target, - required _i3.VestingInfo schedule, - }) { - return _i8.Vesting(_i9.ForceVestedTransfer(source: source, target: target, schedule: schedule)); - } - - /// Merge two vesting schedules together, creating a new vesting schedule that unlocks over - /// the highest possible start and end blocks. If both schedules have already started the - /// current block will be used as the schedule start; with the caveat that if one schedule - /// is finished by the current block, the other will be treated as the new merged schedule, - /// unmodified. - /// - /// NOTE: If `schedule1_index == schedule2_index` this is a no-op. - /// NOTE: This will unlock all schedules through the current block prior to merging. - /// NOTE: If both schedules have ended by the current block, no new schedule will be created - /// and both will be removed. - /// - /// Merged schedule attributes: - /// - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, - /// current_block)`. - /// - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. - /// - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. - /// - /// The dispatch origin for this call must be _Signed_. - /// - /// - `schedule1_index`: index of the first schedule to merge. - /// - `schedule2_index`: index of the second schedule to merge. - _i8.Vesting mergeSchedules({required int schedule1Index, required int schedule2Index}) { - return _i8.Vesting(_i9.MergeSchedules(schedule1Index: schedule1Index, schedule2Index: schedule2Index)); - } - - /// Force remove a vesting schedule - /// - /// The dispatch origin for this call must be _Root_. - /// - /// - `target`: An account that has a vesting schedule - /// - `schedule_index`: The vesting schedule index that should be removed - _i8.Vesting forceRemoveVestingSchedule({required _i10.MultiAddress target, required int scheduleIndex}) { - return _i8.Vesting(_i9.ForceRemoveVestingSchedule(target: target, scheduleIndex: scheduleIndex)); - } -} - -class Constants { - Constants(); - - /// The minimum amount transferred to call `vested_transfer`. - final BigInt minVestedTransfer = BigInt.from(1000000000000); - - final int maxVestingSchedules = 28; -} diff --git a/quantus_sdk/lib/generated/resonance/pallets/wormhole.dart b/quantus_sdk/lib/generated/resonance/pallets/wormhole.dart deleted file mode 100644 index 3199ea02..00000000 --- a/quantus_sdk/lib/generated/resonance/pallets/wormhole.dart +++ /dev/null @@ -1,101 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i3; -import 'dart:typed_data' as _i4; - -import 'package:polkadart/polkadart.dart' as _i1; -import 'package:polkadart/scale_codec.dart' as _i2; - -import '../types/pallet_wormhole/pallet/call.dart' as _i6; -import '../types/quantus_runtime/runtime_call.dart' as _i5; -import '../types/sp_core/crypto/account_id32.dart' as _i7; - -class Queries { - const Queries(this.__api); - - final _i1.StateApi __api; - - final _i1.StorageMap, bool> _usedNullifiers = const _i1.StorageMap, bool>( - prefix: 'Wormhole', - storage: 'UsedNullifiers', - valueCodec: _i2.BoolCodec.codec, - hasher: _i1.StorageHasher.blake2b128Concat(_i2.U8ArrayCodec(32)), - ); - - _i3.Future usedNullifiers(List key1, {_i1.BlockHash? at}) async { - final hashedKey = _usedNullifiers.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _usedNullifiers.decodeValue(bytes); - } - return false; /* Default */ - } - - _i3.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 (keys.map((key) => false).toList() as List); /* Default */ - } - - /// Returns the storage key for `usedNullifiers`. - _i4.Uint8List usedNullifiersKey(List key1) { - final hashedKey = _usedNullifiers.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage map key prefix for `usedNullifiers`. - _i4.Uint8List usedNullifiersMapPrefix() { - final hashedKey = _usedNullifiers.mapPrefix(); - return hashedKey; - } -} - -class Txs { - const Txs(); - - _i5.Wormhole verifyWormholeProof({required List proofBytes, required int blockNumber}) { - return _i5.Wormhole(_i6.VerifyWormholeProof(proofBytes: proofBytes, blockNumber: blockNumber)); - } -} - -class Constants { - Constants(); - - /// Account ID used as the "from" account when creating transfer proofs for minted tokens - final _i7.AccountId32 mintingAccount = const [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - ]; -} diff --git a/quantus_sdk/lib/generated/resonance/resonance.dart b/quantus_sdk/lib/generated/resonance/resonance.dart deleted file mode 100644 index 795d6608..00000000 --- a/quantus_sdk/lib/generated/resonance/resonance.dart +++ /dev/null @@ -1,230 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i23; - -import 'package:polkadart/polkadart.dart' as _i1; - -import 'pallets/assets.dart' as _i21; -import 'pallets/balances.dart' as _i4; -import 'pallets/conviction_voting.dart' as _i15; -import 'pallets/merkle_airdrop.dart' as _i18; -import 'pallets/mining_rewards.dart' as _i9; -import 'pallets/preimage.dart' as _i11; -import 'pallets/q_po_w.dart' as _i7; -import 'pallets/recovery.dart' as _i20; -import 'pallets/referenda.dart' as _i13; -import 'pallets/reversible_transfers.dart' as _i14; -import 'pallets/scheduler.dart' as _i12; -import 'pallets/sudo.dart' as _i6; -import 'pallets/system.dart' as _i2; -import 'pallets/tech_collective.dart' as _i16; -import 'pallets/tech_referenda.dart' as _i17; -import 'pallets/timestamp.dart' as _i3; -import 'pallets/transaction_payment.dart' as _i5; -import 'pallets/treasury_pallet.dart' as _i19; -import 'pallets/utility.dart' as _i22; -import 'pallets/vesting.dart' as _i10; -import 'pallets/wormhole.dart' as _i8; - -class Queries { - Queries(_i1.StateApi api) - : system = _i2.Queries(api), - timestamp = _i3.Queries(api), - balances = _i4.Queries(api), - transactionPayment = _i5.Queries(api), - sudo = _i6.Queries(api), - qPoW = _i7.Queries(api), - wormhole = _i8.Queries(api), - miningRewards = _i9.Queries(api), - vesting = _i10.Queries(api), - preimage = _i11.Queries(api), - scheduler = _i12.Queries(api), - referenda = _i13.Queries(api), - reversibleTransfers = _i14.Queries(api), - convictionVoting = _i15.Queries(api), - techCollective = _i16.Queries(api), - techReferenda = _i17.Queries(api), - merkleAirdrop = _i18.Queries(api), - treasuryPallet = _i19.Queries(api), - recovery = _i20.Queries(api), - assets = _i21.Queries(api); - - final _i2.Queries system; - - final _i3.Queries timestamp; - - final _i4.Queries balances; - - final _i5.Queries transactionPayment; - - final _i6.Queries sudo; - - final _i7.Queries qPoW; - - final _i8.Queries wormhole; - - final _i9.Queries miningRewards; - - final _i10.Queries vesting; - - final _i11.Queries preimage; - - final _i12.Queries scheduler; - - final _i13.Queries referenda; - - final _i14.Queries reversibleTransfers; - - final _i15.Queries convictionVoting; - - final _i16.Queries techCollective; - - final _i17.Queries techReferenda; - - final _i18.Queries merkleAirdrop; - - final _i19.Queries treasuryPallet; - - final _i20.Queries recovery; - - final _i21.Queries assets; -} - -class Extrinsics { - Extrinsics(); - - final _i2.Txs system = _i2.Txs(); - - final _i3.Txs timestamp = _i3.Txs(); - - final _i4.Txs balances = _i4.Txs(); - - final _i6.Txs sudo = _i6.Txs(); - - final _i8.Txs wormhole = _i8.Txs(); - - final _i10.Txs vesting = _i10.Txs(); - - final _i11.Txs preimage = _i11.Txs(); - - final _i12.Txs scheduler = _i12.Txs(); - - final _i22.Txs utility = _i22.Txs(); - - final _i13.Txs referenda = _i13.Txs(); - - final _i14.Txs reversibleTransfers = _i14.Txs(); - - final _i15.Txs convictionVoting = _i15.Txs(); - - final _i16.Txs techCollective = _i16.Txs(); - - final _i17.Txs techReferenda = _i17.Txs(); - - final _i18.Txs merkleAirdrop = _i18.Txs(); - - final _i19.Txs treasuryPallet = _i19.Txs(); - - final _i20.Txs recovery = _i20.Txs(); - - final _i21.Txs assets = _i21.Txs(); -} - -class Constants { - Constants(); - - final _i2.Constants system = _i2.Constants(); - - final _i3.Constants timestamp = _i3.Constants(); - - final _i4.Constants balances = _i4.Constants(); - - final _i5.Constants transactionPayment = _i5.Constants(); - - final _i7.Constants qPoW = _i7.Constants(); - - final _i8.Constants wormhole = _i8.Constants(); - - final _i9.Constants miningRewards = _i9.Constants(); - - final _i10.Constants vesting = _i10.Constants(); - - final _i12.Constants scheduler = _i12.Constants(); - - final _i22.Constants utility = _i22.Constants(); - - final _i13.Constants referenda = _i13.Constants(); - - final _i14.Constants reversibleTransfers = _i14.Constants(); - - final _i15.Constants convictionVoting = _i15.Constants(); - - final _i17.Constants techReferenda = _i17.Constants(); - - final _i18.Constants merkleAirdrop = _i18.Constants(); - - final _i19.Constants treasuryPallet = _i19.Constants(); - - final _i20.Constants recovery = _i20.Constants(); - - final _i21.Constants assets = _i21.Constants(); -} - -class Rpc { - const Rpc({required this.state, required this.system}); - - final _i1.StateApi state; - - final _i1.SystemApi system; -} - -class Registry { - Registry(); - - final int extrinsicVersion = 4; - - List getSignedExtensionTypes() { - return ['CheckMortality', 'CheckNonce', 'ChargeTransactionPayment', 'CheckMetadataHash']; - } - - List getSignedExtensionExtra() { - return ['CheckSpecVersion', 'CheckTxVersion', 'CheckGenesis', 'CheckMortality', 'CheckMetadataHash']; - } -} - -class Resonance { - Resonance._(this._provider, this.rpc) - : query = Queries(rpc.state), - constant = Constants(), - tx = Extrinsics(), - registry = Registry(); - - factory Resonance(_i1.Provider provider) { - final rpc = Rpc(state: _i1.StateApi(provider), system: _i1.SystemApi(provider)); - return Resonance._(provider, rpc); - } - - factory Resonance.url(Uri url) { - final provider = _i1.Provider.fromUri(url); - return Resonance(provider); - } - - final _i1.Provider _provider; - - final Queries query; - - final Constants constant; - - final Rpc rpc; - - final Extrinsics tx; - - final Registry registry; - - _i23.Future connect() async { - return await _provider.connect(); - } - - _i23.Future disconnect() async { - return await _provider.disconnect(); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/cow_1.dart b/quantus_sdk/lib/generated/resonance/types/cow_1.dart deleted file mode 100644 index deb05241..00000000 --- a/quantus_sdk/lib/generated/resonance/types/cow_1.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef Cow = String; - -class CowCodec with _i1.Codec { - const CowCodec(); - - @override - Cow decode(_i1.Input input) { - return _i1.StrCodec.codec.decode(input); - } - - @override - void encodeTo(Cow value, _i1.Output output) { - _i1.StrCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(Cow value) { - return _i1.StrCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/cow_2.dart b/quantus_sdk/lib/generated/resonance/types/cow_2.dart deleted file mode 100644 index 5077d888..00000000 --- a/quantus_sdk/lib/generated/resonance/types/cow_2.dart +++ /dev/null @@ -1,31 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i2; - -import 'tuples.dart' as _i1; - -typedef Cow = List<_i1.Tuple2, int>>; - -class CowCodec with _i2.Codec { - const CowCodec(); - - @override - Cow decode(_i2.Input input) { - return const _i2.SequenceCodec<_i1.Tuple2, int>>( - _i1.Tuple2Codec, int>(_i2.U8ArrayCodec(8), _i2.U32Codec.codec), - ).decode(input); - } - - @override - 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); - } - - @override - int sizeHint(Cow value) { - return const _i2.SequenceCodec<_i1.Tuple2, int>>( - _i1.Tuple2Codec, int>(_i2.U8ArrayCodec(8), _i2.U32Codec.codec), - ).sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/dilithium_crypto/types/dilithium_signature_scheme.dart b/quantus_sdk/lib/generated/resonance/types/dilithium_crypto/types/dilithium_signature_scheme.dart deleted file mode 100644 index 4b323353..00000000 --- a/quantus_sdk/lib/generated/resonance/types/dilithium_crypto/types/dilithium_signature_scheme.dart +++ /dev/null @@ -1,105 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import 'dilithium_signature_with_public.dart' as _i3; - -abstract class DilithiumSignatureScheme { - const DilithiumSignatureScheme(); - - factory DilithiumSignatureScheme.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $DilithiumSignatureSchemeCodec codec = $DilithiumSignatureSchemeCodec(); - - static const $DilithiumSignatureScheme values = $DilithiumSignatureScheme(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map>> toJson(); -} - -class $DilithiumSignatureScheme { - const $DilithiumSignatureScheme(); - - Dilithium dilithium(_i3.DilithiumSignatureWithPublic value0) { - return Dilithium(value0); - } -} - -class $DilithiumSignatureSchemeCodec with _i1.Codec { - const $DilithiumSignatureSchemeCodec(); - - @override - DilithiumSignatureScheme decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Dilithium._decode(input); - default: - throw Exception('DilithiumSignatureScheme: Invalid variant index: "$index"'); - } - } - - @override - 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}"'); - } - } - - @override - int sizeHint(DilithiumSignatureScheme value) { - switch (value.runtimeType) { - case Dilithium: - return (value as Dilithium)._sizeHint(); - default: - throw Exception('DilithiumSignatureScheme: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Dilithium extends DilithiumSignatureScheme { - const Dilithium(this.value0); - - factory Dilithium._decode(_i1.Input input) { - return Dilithium(_i3.DilithiumSignatureWithPublic.codec.decode(input)); - } - - /// DilithiumSignatureWithPublic - final _i3.DilithiumSignatureWithPublic value0; - - @override - Map>> toJson() => {'Dilithium': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i3.DilithiumSignatureWithPublic.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/dilithium_crypto/types/dilithium_signature_with_public.dart b/quantus_sdk/lib/generated/resonance/types/dilithium_crypto/types/dilithium_signature_with_public.dart deleted file mode 100644 index b3db7c34..00000000 --- a/quantus_sdk/lib/generated/resonance/types/dilithium_crypto/types/dilithium_signature_with_public.dart +++ /dev/null @@ -1,52 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i3; - -class DilithiumSignatureWithPublic { - const DilithiumSignatureWithPublic({required this.bytes}); - - factory DilithiumSignatureWithPublic.decode(_i1.Input input) { - return codec.decode(input); - } - - /// [u8; Self::TOTAL_LEN] - final List bytes; - - static const $DilithiumSignatureWithPublicCodec codec = $DilithiumSignatureWithPublicCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - Map> toJson() => {'bytes': bytes.toList()}; - - @override - bool operator ==(Object other) => - identical(this, other) || other is DilithiumSignatureWithPublic && _i3.listsEqual(other.bytes, bytes); - - @override - int get hashCode => bytes.hashCode; -} - -class $DilithiumSignatureWithPublicCodec with _i1.Codec { - const $DilithiumSignatureWithPublicCodec(); - - @override - 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)); - } - - @override - int sizeHint(DilithiumSignatureWithPublic obj) { - int size = 0; - size = size + const _i1.U8ArrayCodec(7219).sizeHint(obj.bytes); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_metadata_hash_extension/check_metadata_hash.dart b/quantus_sdk/lib/generated/resonance/types/frame_metadata_hash_extension/check_metadata_hash.dart deleted file mode 100644 index 58d56ebe..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_metadata_hash_extension/check_metadata_hash.dart +++ /dev/null @@ -1,52 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import 'mode.dart' as _i2; - -class CheckMetadataHash { - const CheckMetadataHash({required this.mode}); - - factory CheckMetadataHash.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Mode - final _i2.Mode mode; - - static const $CheckMetadataHashCodec codec = $CheckMetadataHashCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'mode': mode.toJson()}; - - @override - bool operator ==(Object other) => identical(this, other) || other is CheckMetadataHash && other.mode == mode; - - @override - int get hashCode => mode.hashCode; -} - -class $CheckMetadataHashCodec with _i1.Codec { - const $CheckMetadataHashCodec(); - - @override - void encodeTo(CheckMetadataHash obj, _i1.Output output) { - _i2.Mode.codec.encodeTo(obj.mode, output); - } - - @override - CheckMetadataHash decode(_i1.Input input) { - return CheckMetadataHash(mode: _i2.Mode.codec.decode(input)); - } - - @override - int sizeHint(CheckMetadataHash obj) { - int size = 0; - size = size + _i2.Mode.codec.sizeHint(obj.mode); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_metadata_hash_extension/mode.dart b/quantus_sdk/lib/generated/resonance/types/frame_metadata_hash_extension/mode.dart deleted file mode 100644 index 2abf6f49..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_metadata_hash_extension/mode.dart +++ /dev/null @@ -1,48 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum Mode { - disabled('Disabled', 0), - enabled('Enabled', 1); - - const Mode(this.variantName, this.codecIndex); - - factory Mode.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ModeCodec codec = $ModeCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ModeCodec with _i1.Codec { - const $ModeCodec(); - - @override - Mode decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Mode.disabled; - case 1: - return Mode.enabled; - default: - throw Exception('Mode: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Mode value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/dispatch_class.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/dispatch_class.dart deleted file mode 100644 index a27bebbe..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/dispatch_class.dart +++ /dev/null @@ -1,51 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum DispatchClass { - normal('Normal', 0), - operational('Operational', 1), - mandatory('Mandatory', 2); - - const DispatchClass(this.variantName, this.codecIndex); - - factory DispatchClass.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $DispatchClassCodec codec = $DispatchClassCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $DispatchClassCodec with _i1.Codec { - const $DispatchClassCodec(); - - @override - DispatchClass decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return DispatchClass.normal; - case 1: - return DispatchClass.operational; - case 2: - return DispatchClass.mandatory; - default: - throw Exception('DispatchClass: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(DispatchClass value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/pays.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/pays.dart deleted file mode 100644 index 00b962e6..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/pays.dart +++ /dev/null @@ -1,48 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum Pays { - yes('Yes', 0), - no('No', 1); - - const Pays(this.variantName, this.codecIndex); - - factory Pays.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $PaysCodec codec = $PaysCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $PaysCodec with _i1.Codec { - const $PaysCodec(); - - @override - Pays decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Pays.yes; - case 1: - return Pays.no; - default: - throw Exception('Pays: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Pays value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_1.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_1.dart deleted file mode 100644 index 7f410127..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_1.dart +++ /dev/null @@ -1,75 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -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}); - - factory PerDispatchClass.decode(_i1.Input input) { - return codec.decode(input); - } - - /// T - final _i2.Weight normal; - - /// T - final _i2.Weight operational; - - /// T - final _i2.Weight mandatory; - - static const $PerDispatchClassCodec codec = $PerDispatchClassCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map> toJson() => { - 'normal': normal.toJson(), - 'operational': operational.toJson(), - 'mandatory': mandatory.toJson(), - }; - - @override - bool operator ==(Object 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); -} - -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); - } - - @override - PerDispatchClass decode(_i1.Input input) { - return PerDispatchClass( - normal: _i2.Weight.codec.decode(input), - operational: _i2.Weight.codec.decode(input), - mandatory: _i2.Weight.codec.decode(input), - ); - } - - @override - int sizeHint(PerDispatchClass obj) { - int size = 0; - size = size + _i2.Weight.codec.sizeHint(obj.normal); - size = size + _i2.Weight.codec.sizeHint(obj.operational); - size = size + _i2.Weight.codec.sizeHint(obj.mandatory); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_2.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_2.dart deleted file mode 100644 index 4055b7ae..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_2.dart +++ /dev/null @@ -1,75 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -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}); - - factory PerDispatchClass.decode(_i1.Input input) { - return codec.decode(input); - } - - /// T - final _i2.WeightsPerClass normal; - - /// T - final _i2.WeightsPerClass operational; - - /// T - final _i2.WeightsPerClass mandatory; - - static const $PerDispatchClassCodec codec = $PerDispatchClassCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map?>> toJson() => { - 'normal': normal.toJson(), - 'operational': operational.toJson(), - 'mandatory': mandatory.toJson(), - }; - - @override - bool operator ==(Object 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); -} - -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); - } - - @override - PerDispatchClass decode(_i1.Input input) { - return PerDispatchClass( - normal: _i2.WeightsPerClass.codec.decode(input), - operational: _i2.WeightsPerClass.codec.decode(input), - mandatory: _i2.WeightsPerClass.codec.decode(input), - ); - } - - @override - int sizeHint(PerDispatchClass obj) { - int size = 0; - size = size + _i2.WeightsPerClass.codec.sizeHint(obj.normal); - size = size + _i2.WeightsPerClass.codec.sizeHint(obj.operational); - size = size + _i2.WeightsPerClass.codec.sizeHint(obj.mandatory); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_3.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_3.dart deleted file mode 100644 index a45897bd..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/per_dispatch_class_3.dart +++ /dev/null @@ -1,69 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -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}); - - factory PerDispatchClass.decode(_i1.Input input) { - return codec.decode(input); - } - - /// T - final int normal; - - /// T - final int operational; - - /// T - final int mandatory; - - static const $PerDispatchClassCodec codec = $PerDispatchClassCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'normal': normal, 'operational': operational, 'mandatory': mandatory}; - - @override - bool operator ==(Object 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); -} - -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); - } - - @override - PerDispatchClass decode(_i1.Input input) { - return PerDispatchClass( - normal: _i1.U32Codec.codec.decode(input), - operational: _i1.U32Codec.codec.decode(input), - mandatory: _i1.U32Codec.codec.decode(input), - ); - } - - @override - int sizeHint(PerDispatchClass obj) { - int size = 0; - size = size + _i1.U32Codec.codec.sizeHint(obj.normal); - size = size + _i1.U32Codec.codec.sizeHint(obj.operational); - size = size + _i1.U32Codec.codec.sizeHint(obj.mandatory); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/post_dispatch_info.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/post_dispatch_info.dart deleted file mode 100644 index 05dbdaed..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/post_dispatch_info.dart +++ /dev/null @@ -1,63 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i4; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../sp_weights/weight_v2/weight.dart' as _i2; -import 'pays.dart' as _i3; - -class PostDispatchInfo { - const PostDispatchInfo({this.actualWeight, required this.paysFee}); - - factory PostDispatchInfo.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Option - final _i2.Weight? actualWeight; - - /// Pays - final _i3.Pays paysFee; - - static const $PostDispatchInfoCodec codec = $PostDispatchInfoCodec(); - - _i4.Uint8List encode() { - return codec.encode(this); - } - - 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; - - @override - 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); - } - - @override - PostDispatchInfo decode(_i1.Input input) { - return PostDispatchInfo( - actualWeight: const _i1.OptionCodec<_i2.Weight>(_i2.Weight.codec).decode(input), - paysFee: _i3.Pays.codec.decode(input), - ); - } - - @override - int sizeHint(PostDispatchInfo obj) { - int size = 0; - 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/resonance/types/frame_support/dispatch/raw_origin.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/raw_origin.dart deleted file mode 100644 index d3cd8fdd..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/dispatch/raw_origin.dart +++ /dev/null @@ -1,162 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../sp_core/crypto/account_id32.dart' as _i3; - -abstract class RawOrigin { - const RawOrigin(); - - factory RawOrigin.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $RawOriginCodec codec = $RawOriginCodec(); - - static const $RawOrigin values = $RawOrigin(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $RawOrigin { - const $RawOrigin(); - - Root root() { - return Root(); - } - - Signed signed(_i3.AccountId32 value0) { - return Signed(value0); - } - - None none() { - return None(); - } -} - -class $RawOriginCodec with _i1.Codec { - const $RawOriginCodec(); - - @override - RawOrigin decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return const Root(); - case 1: - return Signed._decode(input); - case 2: - return const None(); - default: - throw Exception('RawOrigin: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(RawOrigin value, _i1.Output output) { - switch (value.runtimeType) { - case Root: - (value as Root).encodeTo(output); - break; - case Signed: - (value as Signed).encodeTo(output); - break; - case None: - (value as None).encodeTo(output); - break; - default: - throw Exception('RawOrigin: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(RawOrigin value) { - switch (value.runtimeType) { - case Root: - return 1; - case Signed: - return (value as Signed)._sizeHint(); - case None: - return 1; - default: - throw Exception('RawOrigin: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Root extends RawOrigin { - const Root(); - - @override - Map toJson() => {'Root': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - } - - @override - bool operator ==(Object other) => other is Root; - - @override - int get hashCode => runtimeType.hashCode; -} - -class Signed extends RawOrigin { - const Signed(this.value0); - - factory Signed._decode(_i1.Input input) { - return Signed(const _i1.U8ArrayCodec(32).decode(input)); - } - - /// AccountId - final _i3.AccountId32 value0; - - @override - Map> toJson() => {'Signed': value0.toList()}; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => value0.hashCode; -} - -class None extends RawOrigin { - const None(); - - @override - Map toJson() => {'None': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - } - - @override - bool operator ==(Object other) => other is None; - - @override - int get hashCode => runtimeType.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/pallet_id.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/pallet_id.dart deleted file mode 100644 index ae6812ea..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/pallet_id.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef PalletId = List; - -class PalletIdCodec with _i1.Codec { - const PalletIdCodec(); - - @override - PalletId decode(_i1.Input input) { - return const _i1.U8ArrayCodec(8).decode(input); - } - - @override - void encodeTo(PalletId value, _i1.Output output) { - const _i1.U8ArrayCodec(8).encodeTo(value, output); - } - - @override - int sizeHint(PalletId value) { - return const _i1.U8ArrayCodec(8).sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/traits/preimages/bounded.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/traits/preimages/bounded.dart deleted file mode 100644 index 289a499b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/traits/preimages/bounded.dart +++ /dev/null @@ -1,200 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../../primitive_types/h256.dart' as _i3; - -abstract class Bounded { - const Bounded(); - - factory Bounded.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $BoundedCodec codec = $BoundedCodec(); - - static const $Bounded values = $Bounded(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $Bounded { - const $Bounded(); - - Legacy legacy({required _i3.H256 hash}) { - return Legacy(hash: hash); - } - - Inline inline(List value0) { - return Inline(value0); - } - - Lookup lookup({required _i3.H256 hash, required int len}) { - return Lookup(hash: hash, len: len); - } -} - -class $BoundedCodec with _i1.Codec { - const $BoundedCodec(); - - @override - Bounded decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Legacy._decode(input); - case 1: - return Inline._decode(input); - case 2: - return Lookup._decode(input); - default: - throw Exception('Bounded: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Bounded value, _i1.Output output) { - switch (value.runtimeType) { - case Legacy: - (value as Legacy).encodeTo(output); - break; - case Inline: - (value as Inline).encodeTo(output); - break; - case Lookup: - (value as Lookup).encodeTo(output); - break; - default: - throw Exception('Bounded: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Bounded value) { - switch (value.runtimeType) { - case Legacy: - return (value as Legacy)._sizeHint(); - case Inline: - return (value as Inline)._sizeHint(); - case Lookup: - return (value as Lookup)._sizeHint(); - default: - throw Exception('Bounded: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Legacy extends Bounded { - const Legacy({required this.hash}); - - factory Legacy._decode(_i1.Input input) { - return Legacy(hash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// H::Output - final _i3.H256 hash; - - @override - Map>> toJson() => { - 'Legacy': {'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.H256Codec().sizeHint(hash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => hash.hashCode; -} - -class Inline extends Bounded { - const Inline(this.value0); - - factory Inline._decode(_i1.Input input) { - return Inline(_i1.U8SequenceCodec.codec.decode(input)); - } - - /// BoundedInline - final List value0; - - @override - Map> toJson() => {'Inline': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8SequenceCodec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => value0.hashCode; -} - -class Lookup extends Bounded { - 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)); - } - - /// H::Output - final _i3.H256 hash; - - /// u32 - final int len; - - @override - Map> toJson() => { - 'Lookup': {'hash': hash.toList(), 'len': len}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.H256Codec().sizeHint(hash); - size = size + _i1.U32Codec.codec.sizeHint(len); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(hash, len); -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/traits/schedule/dispatch_time.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/traits/schedule/dispatch_time.dart deleted file mode 100644 index 5a14fb3f..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/traits/schedule/dispatch_time.dart +++ /dev/null @@ -1,145 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -abstract class DispatchTime { - const DispatchTime(); - - factory DispatchTime.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $DispatchTimeCodec codec = $DispatchTimeCodec(); - - static const $DispatchTime values = $DispatchTime(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $DispatchTime { - const $DispatchTime(); - - At at(int value0) { - return At(value0); - } - - After after(int value0) { - return After(value0); - } -} - -class $DispatchTimeCodec with _i1.Codec { - const $DispatchTimeCodec(); - - @override - DispatchTime decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return At._decode(input); - case 1: - return After._decode(input); - default: - throw Exception('DispatchTime: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(DispatchTime value, _i1.Output output) { - switch (value.runtimeType) { - case At: - (value as At).encodeTo(output); - break; - case After: - (value as After).encodeTo(output); - break; - default: - throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(DispatchTime value) { - switch (value.runtimeType) { - case At: - return (value as At)._sizeHint(); - case After: - return (value as After)._sizeHint(); - default: - throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class At extends DispatchTime { - const At(this.value0); - - factory At._decode(_i1.Input input) { - return At(_i1.U32Codec.codec.decode(input)); - } - - /// BlockNumber - final int value0; - - @override - Map toJson() => {'At': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class After extends DispatchTime { - const After(this.value0); - - factory After._decode(_i1.Input input) { - return After(_i1.U32Codec.codec.decode(input)); - } - - /// BlockNumber - final int value0; - - @override - Map toJson() => {'After': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/balance_status.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/balance_status.dart deleted file mode 100644 index 6d0c1a3d..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/balance_status.dart +++ /dev/null @@ -1,48 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum BalanceStatus { - free('Free', 0), - reserved('Reserved', 1); - - const BalanceStatus(this.variantName, this.codecIndex); - - factory BalanceStatus.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $BalanceStatusCodec codec = $BalanceStatusCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $BalanceStatusCodec with _i1.Codec { - const $BalanceStatusCodec(); - - @override - BalanceStatus decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return BalanceStatus.free; - case 1: - return BalanceStatus.reserved; - default: - throw Exception('BalanceStatus: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(BalanceStatus value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/id_amount_1.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/id_amount_1.dart deleted file mode 100644 index 852db11b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/id_amount_1.dart +++ /dev/null @@ -1,58 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -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}); - - factory IdAmount.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Id - final _i2.RuntimeHoldReason id; - - /// Balance - final BigInt amount; - - static const $IdAmountCodec codec = $IdAmountCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'id': id.toJson(), 'amount': amount}; - - @override - bool operator ==(Object other) => - identical(this, other) || other is IdAmount && other.id == id && other.amount == amount; - - @override - 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); - } - - @override - IdAmount decode(_i1.Input input) { - return IdAmount(id: _i2.RuntimeHoldReason.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - @override - int sizeHint(IdAmount obj) { - int size = 0; - size = size + _i2.RuntimeHoldReason.codec.sizeHint(obj.id); - size = size + _i1.U128Codec.codec.sizeHint(obj.amount); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/id_amount_2.dart b/quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/id_amount_2.dart deleted file mode 100644 index 6ec0b06d..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_support/traits/tokens/misc/id_amount_2.dart +++ /dev/null @@ -1,58 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -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}); - - factory IdAmount.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Id - final _i2.RuntimeFreezeReason id; - - /// Balance - final BigInt amount; - - static const $IdAmountCodec codec = $IdAmountCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'id': null, 'amount': amount}; - - @override - bool operator ==(Object other) => - identical(this, other) || other is IdAmount && other.id == id && other.amount == amount; - - @override - 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); - } - - @override - IdAmount decode(_i1.Input input) { - return IdAmount(id: _i1.NullCodec.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - @override - int sizeHint(IdAmount obj) { - int size = 0; - size = size + const _i2.RuntimeFreezeReasonCodec().sizeHint(obj.id); - size = size + _i1.U128Codec.codec.sizeHint(obj.amount); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/account_info.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/account_info.dart deleted file mode 100644 index d35ddcf1..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/account_info.dart +++ /dev/null @@ -1,97 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../pallet_balances/types/account_data.dart' as _i2; - -class AccountInfo { - const AccountInfo({ - required this.nonce, - required this.consumers, - required this.providers, - required this.sufficients, - required this.data, - }); - - factory AccountInfo.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Nonce - final int nonce; - - /// RefCount - final int consumers; - - /// RefCount - final int providers; - - /// RefCount - final int sufficients; - - /// AccountData - final _i2.AccountData data; - - static const $AccountInfoCodec codec = $AccountInfoCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'nonce': nonce, - 'consumers': consumers, - 'providers': providers, - 'sufficients': sufficients, - 'data': data.toJson(), - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AccountInfo && - other.nonce == nonce && - other.consumers == consumers && - other.providers == providers && - other.sufficients == sufficients && - other.data == data; - - @override - 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); - } - - @override - AccountInfo decode(_i1.Input input) { - return AccountInfo( - nonce: _i1.U32Codec.codec.decode(input), - consumers: _i1.U32Codec.codec.decode(input), - providers: _i1.U32Codec.codec.decode(input), - sufficients: _i1.U32Codec.codec.decode(input), - data: _i2.AccountData.codec.decode(input), - ); - } - - @override - int sizeHint(AccountInfo obj) { - int size = 0; - size = size + _i1.U32Codec.codec.sizeHint(obj.nonce); - size = size + _i1.U32Codec.codec.sizeHint(obj.consumers); - size = size + _i1.U32Codec.codec.sizeHint(obj.providers); - size = size + _i1.U32Codec.codec.sizeHint(obj.sufficients); - size = size + _i2.AccountData.codec.sizeHint(obj.data); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/code_upgrade_authorization.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/code_upgrade_authorization.dart deleted file mode 100644 index d89fc207..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/code_upgrade_authorization.dart +++ /dev/null @@ -1,65 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../primitive_types/h256.dart' as _i2; - -class CodeUpgradeAuthorization { - const CodeUpgradeAuthorization({required this.codeHash, required this.checkVersion}); - - factory CodeUpgradeAuthorization.decode(_i1.Input input) { - return codec.decode(input); - } - - /// T::Hash - final _i2.H256 codeHash; - - /// bool - final bool checkVersion; - - static const $CodeUpgradeAuthorizationCodec codec = $CodeUpgradeAuthorizationCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'codeHash': codeHash.toList(), 'checkVersion': checkVersion}; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is CodeUpgradeAuthorization && - _i4.listsEqual(other.codeHash, codeHash) && - other.checkVersion == checkVersion; - - @override - 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); - } - - @override - CodeUpgradeAuthorization decode(_i1.Input input) { - return CodeUpgradeAuthorization( - codeHash: const _i1.U8ArrayCodec(32).decode(input), - checkVersion: _i1.BoolCodec.codec.decode(input), - ); - } - - @override - int sizeHint(CodeUpgradeAuthorization obj) { - int size = 0; - size = size + const _i2.H256Codec().sizeHint(obj.codeHash); - size = size + _i1.BoolCodec.codec.sizeHint(obj.checkVersion); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/dispatch_event_info.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/dispatch_event_info.dart deleted file mode 100644 index 764759fb..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/dispatch_event_info.dart +++ /dev/null @@ -1,70 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i5; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../frame_support/dispatch/dispatch_class.dart' as _i3; -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}); - - factory DispatchEventInfo.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Weight - final _i2.Weight weight; - - /// DispatchClass - final _i3.DispatchClass class_; - - /// Pays - final _i4.Pays paysFee; - - static const $DispatchEventInfoCodec codec = $DispatchEventInfoCodec(); - - _i5.Uint8List encode() { - return codec.encode(this); - } - - 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; - - @override - 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); - } - - @override - DispatchEventInfo decode(_i1.Input input) { - return DispatchEventInfo( - weight: _i2.Weight.codec.decode(input), - class_: _i3.DispatchClass.codec.decode(input), - paysFee: _i4.Pays.codec.decode(input), - ); - } - - @override - int sizeHint(DispatchEventInfo obj) { - int size = 0; - size = size + _i2.Weight.codec.sizeHint(obj.weight); - size = size + _i3.DispatchClass.codec.sizeHint(obj.class_); - size = size + _i4.Pays.codec.sizeHint(obj.paysFee); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/event_record.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/event_record.dart deleted file mode 100644 index 5987bf9b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/event_record.dart +++ /dev/null @@ -1,75 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i5; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i6; - -import '../primitive_types/h256.dart' as _i4; -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}); - - factory EventRecord.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Phase - final _i2.Phase phase; - - /// E - final _i3.RuntimeEvent event; - - /// Vec - final List<_i4.H256> topics; - - static const $EventRecordCodec codec = $EventRecordCodec(); - - _i5.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - '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); - - @override - 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); - } - - @override - EventRecord decode(_i1.Input input) { - return EventRecord( - phase: _i2.Phase.codec.decode(input), - event: _i3.RuntimeEvent.codec.decode(input), - topics: const _i1.SequenceCodec<_i4.H256>(_i4.H256Codec()).decode(input), - ); - } - - @override - int sizeHint(EventRecord obj) { - 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); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_genesis/check_genesis.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_genesis/check_genesis.dart deleted file mode 100644 index 8868c238..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_genesis/check_genesis.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef CheckGenesis = dynamic; - -class CheckGenesisCodec with _i1.Codec { - const CheckGenesisCodec(); - - @override - CheckGenesis decode(_i1.Input input) { - return _i1.NullCodec.codec.decode(input); - } - - @override - void encodeTo(CheckGenesis value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(CheckGenesis value) { - return _i1.NullCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_mortality/check_mortality.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_mortality/check_mortality.dart deleted file mode 100644 index 06298fe3..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_mortality/check_mortality.dart +++ /dev/null @@ -1,25 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i2; - -import '../../../sp_runtime/generic/era/era.dart' as _i1; - -typedef CheckMortality = _i1.Era; - -class CheckMortalityCodec with _i2.Codec { - const CheckMortalityCodec(); - - @override - CheckMortality decode(_i2.Input input) { - return _i1.Era.codec.decode(input); - } - - @override - void encodeTo(CheckMortality value, _i2.Output output) { - _i1.Era.codec.encodeTo(value, output); - } - - @override - int sizeHint(CheckMortality value) { - return _i1.Era.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart deleted file mode 100644 index f2cf2cad..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef CheckNonZeroSender = dynamic; - -class CheckNonZeroSenderCodec with _i1.Codec { - const CheckNonZeroSenderCodec(); - - @override - CheckNonZeroSender decode(_i1.Input input) { - return _i1.NullCodec.codec.decode(input); - } - - @override - void encodeTo(CheckNonZeroSender value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(CheckNonZeroSender value) { - return _i1.NullCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_nonce/check_nonce.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_nonce/check_nonce.dart deleted file mode 100644 index 5e91c23f..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_nonce/check_nonce.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef CheckNonce = BigInt; - -class CheckNonceCodec with _i1.Codec { - const CheckNonceCodec(); - - @override - CheckNonce decode(_i1.Input input) { - return _i1.CompactBigIntCodec.codec.decode(input); - } - - @override - void encodeTo(CheckNonce value, _i1.Output output) { - _i1.CompactBigIntCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(CheckNonce value) { - return _i1.CompactBigIntCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_spec_version/check_spec_version.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_spec_version/check_spec_version.dart deleted file mode 100644 index 8366f520..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_spec_version/check_spec_version.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef CheckSpecVersion = dynamic; - -class CheckSpecVersionCodec with _i1.Codec { - const CheckSpecVersionCodec(); - - @override - CheckSpecVersion decode(_i1.Input input) { - return _i1.NullCodec.codec.decode(input); - } - - @override - void encodeTo(CheckSpecVersion value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(CheckSpecVersion value) { - return _i1.NullCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_tx_version/check_tx_version.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_tx_version/check_tx_version.dart deleted file mode 100644 index 68153e17..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_tx_version/check_tx_version.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef CheckTxVersion = dynamic; - -class CheckTxVersionCodec with _i1.Codec { - const CheckTxVersionCodec(); - - @override - CheckTxVersion decode(_i1.Input input) { - return _i1.NullCodec.codec.decode(input); - } - - @override - void encodeTo(CheckTxVersion value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(CheckTxVersion value) { - return _i1.NullCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_weight/check_weight.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_weight/check_weight.dart deleted file mode 100644 index 8fec0eef..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/extensions/check_weight/check_weight.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef CheckWeight = dynamic; - -class CheckWeightCodec with _i1.Codec { - const CheckWeightCodec(); - - @override - CheckWeight decode(_i1.Input input) { - return _i1.NullCodec.codec.decode(input); - } - - @override - void encodeTo(CheckWeight value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(CheckWeight value) { - return _i1.NullCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/last_runtime_upgrade_info.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/last_runtime_upgrade_info.dart deleted file mode 100644 index f36c690b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/last_runtime_upgrade_info.dart +++ /dev/null @@ -1,62 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../cow_1.dart' as _i2; - -class LastRuntimeUpgradeInfo { - const LastRuntimeUpgradeInfo({required this.specVersion, required this.specName}); - - factory LastRuntimeUpgradeInfo.decode(_i1.Input input) { - return codec.decode(input); - } - - /// codec::Compact - final BigInt specVersion; - - /// Cow<'static, str> - final _i2.Cow specName; - - static const $LastRuntimeUpgradeInfoCodec codec = $LastRuntimeUpgradeInfoCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'specVersion': specVersion, 'specName': specName}; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LastRuntimeUpgradeInfo && other.specVersion == specVersion && other.specName == specName; - - @override - 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); - } - - @override - LastRuntimeUpgradeInfo decode(_i1.Input input) { - return LastRuntimeUpgradeInfo( - specVersion: _i1.CompactBigIntCodec.codec.decode(input), - specName: _i1.StrCodec.codec.decode(input), - ); - } - - @override - int sizeHint(LastRuntimeUpgradeInfo obj) { - int size = 0; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(obj.specVersion); - size = size + const _i2.CowCodec().sizeHint(obj.specName); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/limits/block_length.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/limits/block_length.dart deleted file mode 100644 index 8d610bb0..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/limits/block_length.dart +++ /dev/null @@ -1,52 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../frame_support/dispatch/per_dispatch_class_3.dart' as _i2; - -class BlockLength { - const BlockLength({required this.max}); - - factory BlockLength.decode(_i1.Input input) { - return codec.decode(input); - } - - /// PerDispatchClass - final _i2.PerDispatchClass max; - - static const $BlockLengthCodec codec = $BlockLengthCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map> toJson() => {'max': max.toJson()}; - - @override - bool operator ==(Object other) => identical(this, other) || other is BlockLength && other.max == max; - - @override - int get hashCode => max.hashCode; -} - -class $BlockLengthCodec with _i1.Codec { - const $BlockLengthCodec(); - - @override - void encodeTo(BlockLength obj, _i1.Output output) { - _i2.PerDispatchClass.codec.encodeTo(obj.max, output); - } - - @override - BlockLength decode(_i1.Input input) { - return BlockLength(max: _i2.PerDispatchClass.codec.decode(input)); - } - - @override - int sizeHint(BlockLength obj) { - int size = 0; - size = size + _i2.PerDispatchClass.codec.sizeHint(obj.max); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/limits/block_weights.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/limits/block_weights.dart deleted file mode 100644 index 45160d0b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/limits/block_weights.dart +++ /dev/null @@ -1,73 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i4; - -import 'package:polkadart/scale_codec.dart' as _i1; - -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}); - - factory BlockWeights.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Weight - final _i2.Weight baseBlock; - - /// Weight - final _i2.Weight maxBlock; - - /// PerDispatchClass - final _i3.PerDispatchClass perClass; - - static const $BlockWeightsCodec codec = $BlockWeightsCodec(); - - _i4.Uint8List encode() { - return codec.encode(this); - } - - Map> 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; - - @override - 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); - } - - @override - BlockWeights decode(_i1.Input input) { - return BlockWeights( - baseBlock: _i2.Weight.codec.decode(input), - maxBlock: _i2.Weight.codec.decode(input), - perClass: _i3.PerDispatchClass.codec.decode(input), - ); - } - - @override - int sizeHint(BlockWeights obj) { - int size = 0; - size = size + _i2.Weight.codec.sizeHint(obj.baseBlock); - size = size + _i2.Weight.codec.sizeHint(obj.maxBlock); - size = size + _i3.PerDispatchClass.codec.sizeHint(obj.perClass); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/limits/weights_per_class.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/limits/weights_per_class.dart deleted file mode 100644 index d3728830..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/limits/weights_per_class.dart +++ /dev/null @@ -1,83 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -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}); - - factory WeightsPerClass.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Weight - final _i2.Weight baseExtrinsic; - - /// Option - final _i2.Weight? maxExtrinsic; - - /// Option - final _i2.Weight? maxTotal; - - /// Option - final _i2.Weight? reserved; - - static const $WeightsPerClassCodec codec = $WeightsPerClassCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map?> toJson() => { - 'baseExtrinsic': baseExtrinsic.toJson(), - 'maxExtrinsic': maxExtrinsic?.toJson(), - 'maxTotal': maxTotal?.toJson(), - 'reserved': reserved?.toJson(), - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is WeightsPerClass && - other.baseExtrinsic == baseExtrinsic && - other.maxExtrinsic == maxExtrinsic && - other.maxTotal == maxTotal && - other.reserved == reserved; - - @override - 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); - } - - @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), - ); - } - - @override - 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); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/pallet/call.dart deleted file mode 100644 index d63a4a81..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/pallet/call.dart +++ /dev/null @@ -1,610 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; - -import '../../primitive_types/h256.dart' as _i4; -import '../../tuples.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - Remark remark({required List remark}) { - return Remark(remark: remark); - } - - SetHeapPages setHeapPages({required BigInt pages}) { - return SetHeapPages(pages: pages); - } - - SetCode setCode({required List code}) { - return SetCode(code: code); - } - - SetCodeWithoutChecks setCodeWithoutChecks({required List code}) { - return SetCodeWithoutChecks(code: code); - } - - SetStorage setStorage({required List<_i3.Tuple2, List>> items}) { - return SetStorage(items: items); - } - - KillStorage killStorage({required List> keys}) { - return KillStorage(keys: keys); - } - - KillPrefix killPrefix({required List prefix, required int subkeys}) { - return KillPrefix(prefix: prefix, subkeys: subkeys); - } - - RemarkWithEvent remarkWithEvent({required List remark}) { - return RemarkWithEvent(remark: remark); - } - - AuthorizeUpgrade authorizeUpgrade({required _i4.H256 codeHash}) { - return AuthorizeUpgrade(codeHash: codeHash); - } - - AuthorizeUpgradeWithoutChecks authorizeUpgradeWithoutChecks({required _i4.H256 codeHash}) { - return AuthorizeUpgradeWithoutChecks(codeHash: codeHash); - } - - ApplyAuthorizedUpgrade applyAuthorizedUpgrade({required List code}) { - return ApplyAuthorizedUpgrade(code: code); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Remark._decode(input); - case 1: - return SetHeapPages._decode(input); - case 2: - return SetCode._decode(input); - case 3: - return SetCodeWithoutChecks._decode(input); - case 4: - return SetStorage._decode(input); - case 5: - return KillStorage._decode(input); - case 6: - return KillPrefix._decode(input); - case 7: - return RemarkWithEvent._decode(input); - case 9: - return AuthorizeUpgrade._decode(input); - case 10: - return AuthorizeUpgradeWithoutChecks._decode(input); - case 11: - return ApplyAuthorizedUpgrade._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case Remark: - (value as Remark).encodeTo(output); - break; - case SetHeapPages: - (value as SetHeapPages).encodeTo(output); - break; - case SetCode: - (value as SetCode).encodeTo(output); - break; - case SetCodeWithoutChecks: - (value as SetCodeWithoutChecks).encodeTo(output); - break; - case SetStorage: - (value as SetStorage).encodeTo(output); - break; - case KillStorage: - (value as KillStorage).encodeTo(output); - break; - case KillPrefix: - (value as KillPrefix).encodeTo(output); - break; - case RemarkWithEvent: - (value as RemarkWithEvent).encodeTo(output); - break; - case AuthorizeUpgrade: - (value as AuthorizeUpgrade).encodeTo(output); - break; - case AuthorizeUpgradeWithoutChecks: - (value as AuthorizeUpgradeWithoutChecks).encodeTo(output); - break; - case ApplyAuthorizedUpgrade: - (value as ApplyAuthorizedUpgrade).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case Remark: - return (value as Remark)._sizeHint(); - case SetHeapPages: - return (value as SetHeapPages)._sizeHint(); - case SetCode: - return (value as SetCode)._sizeHint(); - case SetCodeWithoutChecks: - return (value as SetCodeWithoutChecks)._sizeHint(); - case SetStorage: - return (value as SetStorage)._sizeHint(); - case KillStorage: - return (value as KillStorage)._sizeHint(); - case KillPrefix: - return (value as KillPrefix)._sizeHint(); - case RemarkWithEvent: - return (value as RemarkWithEvent)._sizeHint(); - case AuthorizeUpgrade: - return (value as AuthorizeUpgrade)._sizeHint(); - case AuthorizeUpgradeWithoutChecks: - return (value as AuthorizeUpgradeWithoutChecks)._sizeHint(); - case ApplyAuthorizedUpgrade: - return (value as ApplyAuthorizedUpgrade)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Make some on-chain remark. -/// -/// Can be executed by every `origin`. -class Remark extends Call { - const Remark({required this.remark}); - - factory Remark._decode(_i1.Input input) { - return Remark(remark: _i1.U8SequenceCodec.codec.decode(input)); - } - - /// Vec - final List remark; - - @override - Map>> toJson() => { - 'remark': {'remark': remark}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8SequenceCodec.codec.sizeHint(remark); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => remark.hashCode; -} - -/// Set the number of pages in the WebAssembly environment's heap. -class SetHeapPages extends Call { - const SetHeapPages({required this.pages}); - - factory SetHeapPages._decode(_i1.Input input) { - return SetHeapPages(pages: _i1.U64Codec.codec.decode(input)); - } - - /// u64 - final BigInt pages; - - @override - Map> toJson() => { - 'set_heap_pages': {'pages': pages}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U64Codec.codec.sizeHint(pages); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => pages.hashCode; -} - -/// Set the new runtime code. -class SetCode extends Call { - const SetCode({required this.code}); - - factory SetCode._decode(_i1.Input input) { - return SetCode(code: _i1.U8SequenceCodec.codec.decode(input)); - } - - /// Vec - final List code; - - @override - Map>> toJson() => { - 'set_code': {'code': code}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8SequenceCodec.codec.sizeHint(code); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => code.hashCode; -} - -/// Set the new runtime code without doing any checks of the given `code`. -/// -/// Note that runtime upgrades will not run if this is called with a not-increasing spec -/// version! -class SetCodeWithoutChecks extends Call { - const SetCodeWithoutChecks({required this.code}); - - factory SetCodeWithoutChecks._decode(_i1.Input input) { - return SetCodeWithoutChecks(code: _i1.U8SequenceCodec.codec.decode(input)); - } - - /// Vec - final List code; - - @override - Map>> toJson() => { - 'set_code_without_checks': {'code': code}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8SequenceCodec.codec.sizeHint(code); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => code.hashCode; -} - -/// Set some items of storage. -class SetStorage extends Call { - const SetStorage({required this.items}); - - 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), - ); - } - - /// Vec - final List<_i3.Tuple2, List>> items; - - @override - Map>>>> toJson() => { - 'set_storage': { - 'items': items.map((value) => [value.value0, value.value1]).toList(), - }, - }; - - int _sizeHint() { - int size = 1; - size = - size + - const _i1.SequenceCodec<_i3.Tuple2, List>>( - _i3.Tuple2Codec, List>(_i1.U8SequenceCodec.codec, _i1.U8SequenceCodec.codec), - ).sizeHint(items); - return size; - } - - void encodeTo(_i1.Output 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); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is SetStorage && _i5.listsEqual(other.items, items); - - @override - int get hashCode => items.hashCode; -} - -/// Kill some items from storage. -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)); - } - - /// Vec - final List> keys; - - @override - Map>>> toJson() => { - 'kill_storage': {'keys': keys.map((value) => value).toList()}, - }; - - int _sizeHint() { - int size = 1; - 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); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is KillStorage && _i5.listsEqual(other.keys, keys); - - @override - int get hashCode => keys.hashCode; -} - -/// Kill all storage items with a key that starts with the given prefix. -/// -/// **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}); - - factory KillPrefix._decode(_i1.Input input) { - return KillPrefix(prefix: _i1.U8SequenceCodec.codec.decode(input), subkeys: _i1.U32Codec.codec.decode(input)); - } - - /// Key - final List prefix; - - /// u32 - final int subkeys; - - @override - Map> toJson() => { - 'kill_prefix': {'prefix': prefix, 'subkeys': subkeys}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8SequenceCodec.codec.sizeHint(prefix); - size = size + _i1.U32Codec.codec.sizeHint(subkeys); - return size; - } - - void encodeTo(_i1.Output 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); -} - -/// Make some on-chain remark and emit event. -class RemarkWithEvent extends Call { - const RemarkWithEvent({required this.remark}); - - factory RemarkWithEvent._decode(_i1.Input input) { - return RemarkWithEvent(remark: _i1.U8SequenceCodec.codec.decode(input)); - } - - /// Vec - final List remark; - - @override - Map>> toJson() => { - 'remark_with_event': {'remark': remark}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8SequenceCodec.codec.sizeHint(remark); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => remark.hashCode; -} - -/// Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied -/// later. -/// -/// This call requires Root origin. -class AuthorizeUpgrade extends Call { - const AuthorizeUpgrade({required this.codeHash}); - - factory AuthorizeUpgrade._decode(_i1.Input input) { - return AuthorizeUpgrade(codeHash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::Hash - final _i4.H256 codeHash; - - @override - Map>> toJson() => { - 'authorize_upgrade': {'codeHash': codeHash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i4.H256Codec().sizeHint(codeHash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => codeHash.hashCode; -} - -/// Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied -/// later. -/// -/// WARNING: This authorizes an upgrade that will take place without any safety checks, for -/// example that the spec name remains the same and that the version number increases. Not -/// recommended for normal use. Use `authorize_upgrade` instead. -/// -/// This call requires Root origin. -class AuthorizeUpgradeWithoutChecks extends Call { - const AuthorizeUpgradeWithoutChecks({required this.codeHash}); - - factory AuthorizeUpgradeWithoutChecks._decode(_i1.Input input) { - return AuthorizeUpgradeWithoutChecks(codeHash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::Hash - final _i4.H256 codeHash; - - @override - Map>> toJson() => { - 'authorize_upgrade_without_checks': {'codeHash': codeHash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i4.H256Codec().sizeHint(codeHash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => codeHash.hashCode; -} - -/// Provide the preimage (runtime binary) `code` for an upgrade that has been authorized. -/// -/// If the authorization required a version check, this call will ensure the spec name -/// remains unchanged and that the spec version has increased. -/// -/// Depending on the runtime's `OnSetCode` configuration, this function may directly apply -/// the new `code` in the same block or attempt to schedule the upgrade. -/// -/// All origins are allowed. -class ApplyAuthorizedUpgrade extends Call { - const ApplyAuthorizedUpgrade({required this.code}); - - factory ApplyAuthorizedUpgrade._decode(_i1.Input input) { - return ApplyAuthorizedUpgrade(code: _i1.U8SequenceCodec.codec.decode(input)); - } - - /// Vec - final List code; - - @override - Map>> toJson() => { - 'apply_authorized_upgrade': {'code': code}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8SequenceCodec.codec.sizeHint(code); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => code.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/pallet/error.dart deleted file mode 100644 index ffad510b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/pallet/error.dart +++ /dev/null @@ -1,91 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// Error for the System pallet -enum Error { - /// The name of specification does not match between the current runtime - /// and the new runtime. - invalidSpecName('InvalidSpecName', 0), - - /// The specification version is not allowed to decrease between the current runtime - /// and the new runtime. - specVersionNeedsToIncrease('SpecVersionNeedsToIncrease', 1), - - /// Failed to extract the runtime version from the new runtime. - /// - /// Either calling `Core_version` or decoding `RuntimeVersion` failed. - failedToExtractRuntimeVersion('FailedToExtractRuntimeVersion', 2), - - /// Suicide called when the account has non-default composite data. - nonDefaultComposite('NonDefaultComposite', 3), - - /// There is a non-zero reference count preventing the account from being purged. - nonZeroRefCount('NonZeroRefCount', 4), - - /// The origin filter prevent the call to be dispatched. - callFiltered('CallFiltered', 5), - - /// A multi-block migration is ongoing and prevents the current code from being replaced. - multiBlockMigrationsOngoing('MultiBlockMigrationsOngoing', 6), - - /// No upgrade authorized. - nothingAuthorized('NothingAuthorized', 7), - - /// The submitted code is not authorized. - unauthorized('Unauthorized', 8); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.invalidSpecName; - case 1: - return Error.specVersionNeedsToIncrease; - case 2: - return Error.failedToExtractRuntimeVersion; - case 3: - return Error.nonDefaultComposite; - case 4: - return Error.nonZeroRefCount; - case 5: - return Error.callFiltered; - case 6: - return Error.multiBlockMigrationsOngoing; - case 7: - return Error.nothingAuthorized; - case 8: - return Error.unauthorized; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/pallet/event.dart deleted file mode 100644 index c6ae3957..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/pallet/event.dart +++ /dev/null @@ -1,400 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i7; - -import '../../primitive_types/h256.dart' as _i6; -import '../../sp_core/crypto/account_id32.dart' as _i5; -import '../../sp_runtime/dispatch_error.dart' as _i4; -import '../dispatch_event_info.dart' as _i3; - -/// Event for the System pallet. -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $Event { - const $Event(); - - ExtrinsicSuccess extrinsicSuccess({required _i3.DispatchEventInfo dispatchInfo}) { - return ExtrinsicSuccess(dispatchInfo: dispatchInfo); - } - - ExtrinsicFailed extrinsicFailed({ - required _i4.DispatchError dispatchError, - required _i3.DispatchEventInfo dispatchInfo, - }) { - return ExtrinsicFailed(dispatchError: dispatchError, dispatchInfo: dispatchInfo); - } - - CodeUpdated codeUpdated() { - return CodeUpdated(); - } - - NewAccount newAccount({required _i5.AccountId32 account}) { - return NewAccount(account: account); - } - - KilledAccount killedAccount({required _i5.AccountId32 account}) { - return KilledAccount(account: account); - } - - 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); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return ExtrinsicSuccess._decode(input); - case 1: - return ExtrinsicFailed._decode(input); - case 2: - return const CodeUpdated(); - case 3: - return NewAccount._decode(input); - case 4: - return KilledAccount._decode(input); - case 5: - return Remarked._decode(input); - case 6: - return UpgradeAuthorized._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case ExtrinsicSuccess: - (value as ExtrinsicSuccess).encodeTo(output); - break; - case ExtrinsicFailed: - (value as ExtrinsicFailed).encodeTo(output); - break; - case CodeUpdated: - (value as CodeUpdated).encodeTo(output); - break; - case NewAccount: - (value as NewAccount).encodeTo(output); - break; - case KilledAccount: - (value as KilledAccount).encodeTo(output); - break; - case Remarked: - (value as Remarked).encodeTo(output); - break; - case UpgradeAuthorized: - (value as UpgradeAuthorized).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case ExtrinsicSuccess: - return (value as ExtrinsicSuccess)._sizeHint(); - case ExtrinsicFailed: - return (value as ExtrinsicFailed)._sizeHint(); - case CodeUpdated: - return 1; - case NewAccount: - return (value as NewAccount)._sizeHint(); - case KilledAccount: - return (value as KilledAccount)._sizeHint(); - case Remarked: - return (value as Remarked)._sizeHint(); - case UpgradeAuthorized: - return (value as UpgradeAuthorized)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// An extrinsic completed successfully. -class ExtrinsicSuccess extends Event { - const ExtrinsicSuccess({required this.dispatchInfo}); - - factory ExtrinsicSuccess._decode(_i1.Input input) { - return ExtrinsicSuccess(dispatchInfo: _i3.DispatchEventInfo.codec.decode(input)); - } - - /// DispatchEventInfo - final _i3.DispatchEventInfo dispatchInfo; - - @override - Map>> toJson() => { - 'ExtrinsicSuccess': {'dispatchInfo': dispatchInfo.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.DispatchEventInfo.codec.sizeHint(dispatchInfo); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => dispatchInfo.hashCode; -} - -/// An extrinsic failed. -class ExtrinsicFailed extends Event { - const ExtrinsicFailed({required this.dispatchError, required this.dispatchInfo}); - - factory ExtrinsicFailed._decode(_i1.Input input) { - return ExtrinsicFailed( - dispatchError: _i4.DispatchError.codec.decode(input), - dispatchInfo: _i3.DispatchEventInfo.codec.decode(input), - ); - } - - /// DispatchError - final _i4.DispatchError dispatchError; - - /// DispatchEventInfo - final _i3.DispatchEventInfo dispatchInfo; - - @override - Map>> toJson() => { - 'ExtrinsicFailed': {'dispatchError': dispatchError.toJson(), 'dispatchInfo': dispatchInfo.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i4.DispatchError.codec.sizeHint(dispatchError); - size = size + _i3.DispatchEventInfo.codec.sizeHint(dispatchInfo); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(dispatchError, dispatchInfo); -} - -/// `:code` was updated. -class CodeUpdated extends Event { - const CodeUpdated(); - - @override - Map toJson() => {'CodeUpdated': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - } - - @override - bool operator ==(Object other) => other is CodeUpdated; - - @override - int get hashCode => runtimeType.hashCode; -} - -/// A new account was created. -class NewAccount extends Event { - const NewAccount({required this.account}); - - factory NewAccount._decode(_i1.Input input) { - return NewAccount(account: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::AccountId - final _i5.AccountId32 account; - - @override - Map>> toJson() => { - 'NewAccount': {'account': account.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i5.AccountId32Codec().sizeHint(account); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => account.hashCode; -} - -/// An account was reaped. -class KilledAccount extends Event { - const KilledAccount({required this.account}); - - factory KilledAccount._decode(_i1.Input input) { - return KilledAccount(account: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::AccountId - final _i5.AccountId32 account; - - @override - Map>> toJson() => { - 'KilledAccount': {'account': account.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i5.AccountId32Codec().sizeHint(account); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => account.hashCode; -} - -/// On on-chain remark happened. -class Remarked extends Event { - 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)); - } - - /// T::AccountId - final _i5.AccountId32 sender; - - /// T::Hash - final _i6.H256 hash; - - @override - Map>> toJson() => { - 'Remarked': {'sender': sender.toList(), 'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i5.AccountId32Codec().sizeHint(sender); - size = size + const _i6.H256Codec().sizeHint(hash); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Remarked && _i7.listsEqual(other.sender, sender) && _i7.listsEqual(other.hash, hash); - - @override - int get hashCode => Object.hash(sender, hash); -} - -/// An upgrade was authorized. -class UpgradeAuthorized extends Event { - const UpgradeAuthorized({required this.codeHash, required this.checkVersion}); - - factory UpgradeAuthorized._decode(_i1.Input input) { - return UpgradeAuthorized( - codeHash: const _i1.U8ArrayCodec(32).decode(input), - checkVersion: _i1.BoolCodec.codec.decode(input), - ); - } - - /// T::Hash - final _i6.H256 codeHash; - - /// bool - final bool checkVersion; - - @override - Map> toJson() => { - 'UpgradeAuthorized': {'codeHash': codeHash.toList(), 'checkVersion': checkVersion}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i6.H256Codec().sizeHint(codeHash); - size = size + _i1.BoolCodec.codec.sizeHint(checkVersion); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(codeHash, checkVersion); -} diff --git a/quantus_sdk/lib/generated/resonance/types/frame_system/phase.dart b/quantus_sdk/lib/generated/resonance/types/frame_system/phase.dart deleted file mode 100644 index a888c990..00000000 --- a/quantus_sdk/lib/generated/resonance/types/frame_system/phase.dart +++ /dev/null @@ -1,159 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -abstract class Phase { - const Phase(); - - factory Phase.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $PhaseCodec codec = $PhaseCodec(); - - static const $Phase values = $Phase(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $Phase { - const $Phase(); - - ApplyExtrinsic applyExtrinsic(int value0) { - return ApplyExtrinsic(value0); - } - - Finalization finalization() { - return Finalization(); - } - - Initialization initialization() { - return Initialization(); - } -} - -class $PhaseCodec with _i1.Codec { - const $PhaseCodec(); - - @override - Phase decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return ApplyExtrinsic._decode(input); - case 1: - return const Finalization(); - case 2: - return const Initialization(); - default: - throw Exception('Phase: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Phase value, _i1.Output output) { - switch (value.runtimeType) { - case ApplyExtrinsic: - (value as ApplyExtrinsic).encodeTo(output); - break; - case Finalization: - (value as Finalization).encodeTo(output); - break; - case Initialization: - (value as Initialization).encodeTo(output); - break; - default: - throw Exception('Phase: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Phase value) { - switch (value.runtimeType) { - case ApplyExtrinsic: - return (value as ApplyExtrinsic)._sizeHint(); - case Finalization: - return 1; - case Initialization: - return 1; - default: - throw Exception('Phase: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class ApplyExtrinsic extends Phase { - const ApplyExtrinsic(this.value0); - - factory ApplyExtrinsic._decode(_i1.Input input) { - return ApplyExtrinsic(_i1.U32Codec.codec.decode(input)); - } - - /// u32 - final int value0; - - @override - Map toJson() => {'ApplyExtrinsic': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Finalization extends Phase { - const Finalization(); - - @override - Map toJson() => {'Finalization': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - } - - @override - bool operator ==(Object other) => other is Finalization; - - @override - int get hashCode => runtimeType.hashCode; -} - -class Initialization extends Phase { - const Initialization(); - - @override - Map toJson() => {'Initialization': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - } - - @override - bool operator ==(Object other) => other is Initialization; - - @override - int get hashCode => runtimeType.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/call.dart deleted file mode 100644 index 6bac9ebb..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/call.dart +++ /dev/null @@ -1,2429 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../sp_runtime/multiaddress/multi_address.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - Create create({required BigInt id, required _i3.MultiAddress admin, required BigInt minBalance}) { - return Create(id: id, admin: admin, minBalance: minBalance); - } - - ForceCreate forceCreate({ - required BigInt id, - required _i3.MultiAddress owner, - required bool isSufficient, - required BigInt minBalance, - }) { - return ForceCreate(id: id, owner: owner, isSufficient: isSufficient, minBalance: minBalance); - } - - StartDestroy startDestroy({required BigInt id}) { - return StartDestroy(id: id); - } - - DestroyAccounts destroyAccounts({required BigInt id}) { - return DestroyAccounts(id: id); - } - - DestroyApprovals destroyApprovals({required BigInt id}) { - return DestroyApprovals(id: id); - } - - FinishDestroy finishDestroy({required BigInt id}) { - return FinishDestroy(id: id); - } - - 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); - } - - 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); - } - - ForceTransfer forceTransfer({ - required BigInt id, - required _i3.MultiAddress source, - required _i3.MultiAddress dest, - required BigInt 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); - } - - Thaw thaw({required BigInt id, required _i3.MultiAddress who}) { - return Thaw(id: id, who: who); - } - - FreezeAsset freezeAsset({required BigInt id}) { - return FreezeAsset(id: id); - } - - ThawAsset thawAsset({required BigInt id}) { - return ThawAsset(id: id); - } - - TransferOwnership transferOwnership({required BigInt id, required _i3.MultiAddress owner}) { - return TransferOwnership(id: id, owner: owner); - } - - SetTeam setTeam({ - required BigInt id, - required _i3.MultiAddress issuer, - required _i3.MultiAddress admin, - required _i3.MultiAddress freezer, - }) { - return SetTeam(id: id, issuer: issuer, admin: admin, freezer: freezer); - } - - SetMetadata setMetadata({ - required BigInt id, - required List name, - required List symbol, - required int decimals, - }) { - return SetMetadata(id: id, name: name, symbol: symbol, decimals: decimals); - } - - ClearMetadata clearMetadata({required BigInt id}) { - return ClearMetadata(id: id); - } - - ForceSetMetadata forceSetMetadata({ - required BigInt id, - required List name, - required List symbol, - required int decimals, - required bool isFrozen, - }) { - return ForceSetMetadata(id: id, name: name, symbol: symbol, decimals: decimals, isFrozen: isFrozen); - } - - ForceClearMetadata forceClearMetadata({required BigInt id}) { - return ForceClearMetadata(id: id); - } - - ForceAssetStatus forceAssetStatus({ - required BigInt id, - required _i3.MultiAddress owner, - required _i3.MultiAddress issuer, - required _i3.MultiAddress admin, - required _i3.MultiAddress freezer, - required BigInt minBalance, - required bool isSufficient, - required bool isFrozen, - }) { - return ForceAssetStatus( - id: id, - owner: owner, - issuer: issuer, - admin: admin, - freezer: freezer, - minBalance: minBalance, - isSufficient: isSufficient, - isFrozen: isFrozen, - ); - } - - 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); - } - - ForceCancelApproval forceCancelApproval({ - required BigInt id, - required _i3.MultiAddress owner, - required _i3.MultiAddress delegate, - }) { - return ForceCancelApproval(id: id, owner: owner, delegate: delegate); - } - - TransferApproved transferApproved({ - required BigInt id, - required _i3.MultiAddress owner, - required _i3.MultiAddress destination, - required BigInt 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); - } - - 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); - } - - 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); - } - - TransferAll transferAll({required BigInt id, required _i3.MultiAddress dest, required bool keepAlive}) { - return TransferAll(id: id, dest: dest, keepAlive: keepAlive); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Create._decode(input); - case 1: - return ForceCreate._decode(input); - case 2: - return StartDestroy._decode(input); - case 3: - return DestroyAccounts._decode(input); - case 4: - return DestroyApprovals._decode(input); - case 5: - return FinishDestroy._decode(input); - case 6: - return Mint._decode(input); - case 7: - return Burn._decode(input); - case 8: - return Transfer._decode(input); - case 9: - return TransferKeepAlive._decode(input); - case 10: - return ForceTransfer._decode(input); - case 11: - return Freeze._decode(input); - case 12: - return Thaw._decode(input); - case 13: - return FreezeAsset._decode(input); - case 14: - return ThawAsset._decode(input); - case 15: - return TransferOwnership._decode(input); - case 16: - return SetTeam._decode(input); - case 17: - return SetMetadata._decode(input); - case 18: - return ClearMetadata._decode(input); - case 19: - return ForceSetMetadata._decode(input); - case 20: - return ForceClearMetadata._decode(input); - case 21: - return ForceAssetStatus._decode(input); - case 22: - return ApproveTransfer._decode(input); - case 23: - return CancelApproval._decode(input); - case 24: - return ForceCancelApproval._decode(input); - case 25: - return TransferApproved._decode(input); - case 26: - return Touch._decode(input); - case 27: - return Refund._decode(input); - case 28: - return SetMinBalance._decode(input); - case 29: - return TouchOther._decode(input); - case 30: - return RefundOther._decode(input); - case 31: - return Block._decode(input); - case 32: - return TransferAll._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case Create: - (value as Create).encodeTo(output); - break; - case ForceCreate: - (value as ForceCreate).encodeTo(output); - break; - case StartDestroy: - (value as StartDestroy).encodeTo(output); - break; - case DestroyAccounts: - (value as DestroyAccounts).encodeTo(output); - break; - case DestroyApprovals: - (value as DestroyApprovals).encodeTo(output); - break; - case FinishDestroy: - (value as FinishDestroy).encodeTo(output); - break; - case Mint: - (value as Mint).encodeTo(output); - break; - case Burn: - (value as Burn).encodeTo(output); - break; - case Transfer: - (value as Transfer).encodeTo(output); - break; - case TransferKeepAlive: - (value as TransferKeepAlive).encodeTo(output); - break; - case ForceTransfer: - (value as ForceTransfer).encodeTo(output); - break; - case Freeze: - (value as Freeze).encodeTo(output); - break; - case Thaw: - (value as Thaw).encodeTo(output); - break; - case FreezeAsset: - (value as FreezeAsset).encodeTo(output); - break; - case ThawAsset: - (value as ThawAsset).encodeTo(output); - break; - case TransferOwnership: - (value as TransferOwnership).encodeTo(output); - break; - case SetTeam: - (value as SetTeam).encodeTo(output); - break; - case SetMetadata: - (value as SetMetadata).encodeTo(output); - break; - case ClearMetadata: - (value as ClearMetadata).encodeTo(output); - break; - case ForceSetMetadata: - (value as ForceSetMetadata).encodeTo(output); - break; - case ForceClearMetadata: - (value as ForceClearMetadata).encodeTo(output); - break; - case ForceAssetStatus: - (value as ForceAssetStatus).encodeTo(output); - break; - case ApproveTransfer: - (value as ApproveTransfer).encodeTo(output); - break; - case CancelApproval: - (value as CancelApproval).encodeTo(output); - break; - case ForceCancelApproval: - (value as ForceCancelApproval).encodeTo(output); - break; - case TransferApproved: - (value as TransferApproved).encodeTo(output); - break; - case Touch: - (value as Touch).encodeTo(output); - break; - case Refund: - (value as Refund).encodeTo(output); - break; - case SetMinBalance: - (value as SetMinBalance).encodeTo(output); - break; - case TouchOther: - (value as TouchOther).encodeTo(output); - break; - case RefundOther: - (value as RefundOther).encodeTo(output); - break; - case Block: - (value as Block).encodeTo(output); - break; - case TransferAll: - (value as TransferAll).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case Create: - return (value as Create)._sizeHint(); - case ForceCreate: - return (value as ForceCreate)._sizeHint(); - case StartDestroy: - return (value as StartDestroy)._sizeHint(); - case DestroyAccounts: - return (value as DestroyAccounts)._sizeHint(); - case DestroyApprovals: - return (value as DestroyApprovals)._sizeHint(); - case FinishDestroy: - return (value as FinishDestroy)._sizeHint(); - case Mint: - return (value as Mint)._sizeHint(); - case Burn: - return (value as Burn)._sizeHint(); - case Transfer: - return (value as Transfer)._sizeHint(); - case TransferKeepAlive: - return (value as TransferKeepAlive)._sizeHint(); - case ForceTransfer: - return (value as ForceTransfer)._sizeHint(); - case Freeze: - return (value as Freeze)._sizeHint(); - case Thaw: - return (value as Thaw)._sizeHint(); - case FreezeAsset: - return (value as FreezeAsset)._sizeHint(); - case ThawAsset: - return (value as ThawAsset)._sizeHint(); - case TransferOwnership: - return (value as TransferOwnership)._sizeHint(); - case SetTeam: - return (value as SetTeam)._sizeHint(); - case SetMetadata: - return (value as SetMetadata)._sizeHint(); - case ClearMetadata: - return (value as ClearMetadata)._sizeHint(); - case ForceSetMetadata: - return (value as ForceSetMetadata)._sizeHint(); - case ForceClearMetadata: - return (value as ForceClearMetadata)._sizeHint(); - case ForceAssetStatus: - return (value as ForceAssetStatus)._sizeHint(); - case ApproveTransfer: - return (value as ApproveTransfer)._sizeHint(); - case CancelApproval: - return (value as CancelApproval)._sizeHint(); - case ForceCancelApproval: - return (value as ForceCancelApproval)._sizeHint(); - case TransferApproved: - return (value as TransferApproved)._sizeHint(); - case Touch: - return (value as Touch)._sizeHint(); - case Refund: - return (value as Refund)._sizeHint(); - case SetMinBalance: - return (value as SetMinBalance)._sizeHint(); - case TouchOther: - return (value as TouchOther)._sizeHint(); - case RefundOther: - return (value as RefundOther)._sizeHint(); - case Block: - return (value as Block)._sizeHint(); - case TransferAll: - return (value as TransferAll)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Issue a new class of fungible assets from a public origin. -/// -/// This new asset class has no assets initially and its owner is the origin. -/// -/// The origin must conform to the configured `CreateOrigin` and have sufficient funds free. -/// -/// Funds of sender are reserved by `AssetDeposit`. -/// -/// Parameters: -/// - `id`: The identifier of the new asset. This must not be currently in use to identify -/// an existing asset. If [`NextAssetId`] is set, then this must be equal to it. -/// - `admin`: The admin of this class of assets. The admin is the initial address of each -/// member of the asset class's admin team. -/// - `min_balance`: The minimum balance of this new asset that any single account must -/// have. If an account's balance is reduced below this, then it collapses to zero. -/// -/// Emits `Created` event when successful. -/// -/// Weight: `O(1)` -class Create extends Call { - const Create({required this.id, required this.admin, required this.minBalance}); - - factory Create._decode(_i1.Input input) { - return Create( - id: _i1.CompactBigIntCodec.codec.decode(input), - admin: _i3.MultiAddress.codec.decode(input), - minBalance: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress admin; - - /// T::Balance - final BigInt minBalance; - - @override - Map> toJson() => { - 'create': {'id': id, 'admin': admin.toJson(), 'minBalance': minBalance}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(admin); - size = size + _i1.U128Codec.codec.sizeHint(minBalance); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Create && other.id == id && other.admin == admin && other.minBalance == minBalance; - - @override - int get hashCode => Object.hash(id, admin, minBalance); -} - -/// Issue a new class of fungible assets from a privileged origin. -/// -/// This new asset class has no assets initially. -/// -/// The origin must conform to `ForceOrigin`. -/// -/// Unlike `create`, no funds are reserved. -/// -/// - `id`: The identifier of the new asset. This must not be currently in use to identify -/// an existing asset. If [`NextAssetId`] is set, then this must be equal to it. -/// - `owner`: The owner of this class of assets. The owner has full superuser permissions -/// over this asset, but may later change and configure the permissions using -/// `transfer_ownership` and `set_team`. -/// - `min_balance`: The minimum balance of this new asset that any single account must -/// have. If an account's balance is reduced below this, then it collapses to zero. -/// -/// Emits `ForceCreated` event when successful. -/// -/// Weight: `O(1)` -class ForceCreate extends Call { - const ForceCreate({required this.id, required this.owner, required this.isSufficient, required this.minBalance}); - - factory ForceCreate._decode(_i1.Input input) { - return ForceCreate( - id: _i1.CompactBigIntCodec.codec.decode(input), - owner: _i3.MultiAddress.codec.decode(input), - isSufficient: _i1.BoolCodec.codec.decode(input), - minBalance: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress owner; - - /// bool - final bool isSufficient; - - /// T::Balance - final BigInt minBalance; - - @override - Map> toJson() => { - 'force_create': {'id': id, 'owner': owner.toJson(), 'isSufficient': isSufficient, 'minBalance': minBalance}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(owner); - size = size + _i1.BoolCodec.codec.sizeHint(isSufficient); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(minBalance); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ForceCreate && - other.id == id && - other.owner == owner && - other.isSufficient == isSufficient && - other.minBalance == minBalance; - - @override - int get hashCode => Object.hash(id, owner, isSufficient, minBalance); -} - -/// Start the process of destroying a fungible asset class. -/// -/// `start_destroy` is the first in a series of extrinsics that should be called, to allow -/// destruction of an asset class. -/// -/// The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`. -/// -/// - `id`: The identifier of the asset to be destroyed. This must identify an existing -/// asset. -class StartDestroy extends Call { - const StartDestroy({required this.id}); - - factory StartDestroy._decode(_i1.Input input) { - return StartDestroy(id: _i1.CompactBigIntCodec.codec.decode(input)); - } - - /// T::AssetIdParameter - final BigInt id; - - @override - Map> toJson() => { - 'start_destroy': {'id': id}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => id.hashCode; -} - -/// Destroy all accounts associated with a given asset. -/// -/// `destroy_accounts` should only be called after `start_destroy` has been called, and the -/// asset is in a `Destroying` state. -/// -/// Due to weight restrictions, this function may need to be called multiple times to fully -/// destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time. -/// -/// - `id`: The identifier of the asset to be destroyed. This must identify an existing -/// asset. -/// -/// Each call emits the `Event::DestroyedAccounts` event. -class DestroyAccounts extends Call { - const DestroyAccounts({required this.id}); - - factory DestroyAccounts._decode(_i1.Input input) { - return DestroyAccounts(id: _i1.CompactBigIntCodec.codec.decode(input)); - } - - /// T::AssetIdParameter - final BigInt id; - - @override - Map> toJson() => { - 'destroy_accounts': {'id': id}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => id.hashCode; -} - -/// Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit). -/// -/// `destroy_approvals` should only be called after `start_destroy` has been called, and the -/// asset is in a `Destroying` state. -/// -/// Due to weight restrictions, this function may need to be called multiple times to fully -/// destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time. -/// -/// - `id`: The identifier of the asset to be destroyed. This must identify an existing -/// asset. -/// -/// Each call emits the `Event::DestroyedApprovals` event. -class DestroyApprovals extends Call { - const DestroyApprovals({required this.id}); - - factory DestroyApprovals._decode(_i1.Input input) { - return DestroyApprovals(id: _i1.CompactBigIntCodec.codec.decode(input)); - } - - /// T::AssetIdParameter - final BigInt id; - - @override - Map> toJson() => { - 'destroy_approvals': {'id': id}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => id.hashCode; -} - -/// Complete destroying asset and unreserve currency. -/// -/// `finish_destroy` should only be called after `start_destroy` has been called, and the -/// asset is in a `Destroying` state. All accounts or approvals should be destroyed before -/// hand. -/// -/// - `id`: The identifier of the asset to be destroyed. This must identify an existing -/// asset. -/// -/// Each successful call emits the `Event::Destroyed` event. -class FinishDestroy extends Call { - const FinishDestroy({required this.id}); - - factory FinishDestroy._decode(_i1.Input input) { - return FinishDestroy(id: _i1.CompactBigIntCodec.codec.decode(input)); - } - - /// T::AssetIdParameter - final BigInt id; - - @override - Map> toJson() => { - 'finish_destroy': {'id': id}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => id.hashCode; -} - -/// Mint assets of a particular class. -/// -/// The origin must be Signed and the sender must be the Issuer of the asset `id`. -/// -/// - `id`: The identifier of the asset to have some amount minted. -/// - `beneficiary`: The account to be credited with the minted assets. -/// - `amount`: The amount of the asset to be minted. -/// -/// Emits `Issued` event when successful. -/// -/// 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}); - - factory Mint._decode(_i1.Input input) { - return Mint( - id: _i1.CompactBigIntCodec.codec.decode(input), - beneficiary: _i3.MultiAddress.codec.decode(input), - amount: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress beneficiary; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'mint': {'id': id, 'beneficiary': beneficiary.toJson(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(beneficiary); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Mint && other.id == id && other.beneficiary == beneficiary && other.amount == amount; - - @override - int get hashCode => Object.hash(id, beneficiary, amount); -} - -/// Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. -/// -/// Origin must be Signed and the sender should be the Manager of the asset `id`. -/// -/// Bails with `NoAccount` if the `who` is already dead. -/// -/// - `id`: The identifier of the asset to have some amount burned. -/// - `who`: The account to be debited from. -/// - `amount`: The maximum amount by which `who`'s balance should be reduced. -/// -/// Emits `Burned` with the actual amount burned. If this takes the balance to below the -/// minimum for the asset, then the amount burned is increased to take it to zero. -/// -/// 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}); - - factory Burn._decode(_i1.Input input) { - return Burn( - id: _i1.CompactBigIntCodec.codec.decode(input), - who: _i3.MultiAddress.codec.decode(input), - amount: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'burn': {'id': id, 'who': who.toJson(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(who); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is Burn && other.id == id && other.who == who && other.amount == amount; - - @override - int get hashCode => Object.hash(id, who, amount); -} - -/// Move some assets from the sender account to another. -/// -/// Origin must be Signed. -/// -/// - `id`: The identifier of the asset to have some amount transferred. -/// - `target`: The account to be credited. -/// - `amount`: The amount by which the sender's balance of assets should be reduced and -/// `target`'s balance increased. The amount actually transferred may be slightly greater in -/// the case that the transfer would otherwise take the sender balance above zero but below -/// the minimum balance. Must be greater than zero. -/// -/// Emits `Transferred` with the actual amount transferred. If this takes the source balance -/// to below the minimum for the asset, then the amount transferred is increased to take it -/// to zero. -/// -/// Weight: `O(1)` -/// 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}); - - factory Transfer._decode(_i1.Input input) { - return Transfer( - id: _i1.CompactBigIntCodec.codec.decode(input), - target: _i3.MultiAddress.codec.decode(input), - amount: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress target; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'transfer': {'id': id, 'target': target.toJson(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(target); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is Transfer && other.id == id && other.target == target && other.amount == amount; - - @override - int get hashCode => Object.hash(id, target, amount); -} - -/// Move some assets from the sender account to another, keeping the sender account alive. -/// -/// Origin must be Signed. -/// -/// - `id`: The identifier of the asset to have some amount transferred. -/// - `target`: The account to be credited. -/// - `amount`: The amount by which the sender's balance of assets should be reduced and -/// `target`'s balance increased. The amount actually transferred may be slightly greater in -/// the case that the transfer would otherwise take the sender balance above zero but below -/// the minimum balance. Must be greater than zero. -/// -/// Emits `Transferred` with the actual amount transferred. If this takes the source balance -/// to below the minimum for the asset, then the amount transferred is increased to take it -/// to zero. -/// -/// Weight: `O(1)` -/// 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}); - - factory TransferKeepAlive._decode(_i1.Input input) { - return TransferKeepAlive( - id: _i1.CompactBigIntCodec.codec.decode(input), - target: _i3.MultiAddress.codec.decode(input), - amount: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress target; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'transfer_keep_alive': {'id': id, 'target': target.toJson(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(target); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TransferKeepAlive && other.id == id && other.target == target && other.amount == amount; - - @override - int get hashCode => Object.hash(id, target, amount); -} - -/// Move some assets from one account to another. -/// -/// Origin must be Signed and the sender should be the Admin of the asset `id`. -/// -/// - `id`: The identifier of the asset to have some amount transferred. -/// - `source`: The account to be debited. -/// - `dest`: The account to be credited. -/// - `amount`: The amount by which the `source`'s balance of assets should be reduced and -/// `dest`'s balance increased. The amount actually transferred may be slightly greater in -/// the case that the transfer would otherwise take the `source` balance above zero but -/// below the minimum balance. Must be greater than zero. -/// -/// Emits `Transferred` with the actual amount transferred. If this takes the source balance -/// to below the minimum for the asset, then the amount transferred is increased to take it -/// to zero. -/// -/// Weight: `O(1)` -/// 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}); - - factory ForceTransfer._decode(_i1.Input input) { - return ForceTransfer( - id: _i1.CompactBigIntCodec.codec.decode(input), - source: _i3.MultiAddress.codec.decode(input), - dest: _i3.MultiAddress.codec.decode(input), - amount: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress source; - - /// AccountIdLookupOf - final _i3.MultiAddress dest; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'force_transfer': {'id': id, 'source': source.toJson(), 'dest': dest.toJson(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(source); - size = size + _i3.MultiAddress.codec.sizeHint(dest); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ForceTransfer && - other.id == id && - other.source == source && - other.dest == dest && - other.amount == amount; - - @override - int get hashCode => Object.hash(id, source, dest, amount); -} - -/// Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` -/// must already exist as an entry in `Account`s of the asset. If you want to freeze an -/// account that does not have an entry, use `touch_other` first. -/// -/// Origin must be Signed and the sender should be the Freezer of the asset `id`. -/// -/// - `id`: The identifier of the asset to be frozen. -/// - `who`: The account to be frozen. -/// -/// Emits `Frozen`. -/// -/// Weight: `O(1)` -class Freeze extends Call { - 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)); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - @override - Map> toJson() => { - 'freeze': {'id': id, 'who': who.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(id, who); -} - -/// Allow unprivileged transfers to and from an account again. -/// -/// Origin must be Signed and the sender should be the Admin of the asset `id`. -/// -/// - `id`: The identifier of the asset to be frozen. -/// - `who`: The account to be unfrozen. -/// -/// Emits `Thawed`. -/// -/// Weight: `O(1)` -class Thaw extends Call { - 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)); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - @override - Map> toJson() => { - 'thaw': {'id': id, 'who': who.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(id, who); -} - -/// Disallow further unprivileged transfers for the asset class. -/// -/// Origin must be Signed and the sender should be the Freezer of the asset `id`. -/// -/// - `id`: The identifier of the asset to be frozen. -/// -/// Emits `Frozen`. -/// -/// Weight: `O(1)` -class FreezeAsset extends Call { - const FreezeAsset({required this.id}); - - factory FreezeAsset._decode(_i1.Input input) { - return FreezeAsset(id: _i1.CompactBigIntCodec.codec.decode(input)); - } - - /// T::AssetIdParameter - final BigInt id; - - @override - Map> toJson() => { - 'freeze_asset': {'id': id}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => id.hashCode; -} - -/// Allow unprivileged transfers for the asset again. -/// -/// Origin must be Signed and the sender should be the Admin of the asset `id`. -/// -/// - `id`: The identifier of the asset to be thawed. -/// -/// Emits `Thawed`. -/// -/// Weight: `O(1)` -class ThawAsset extends Call { - const ThawAsset({required this.id}); - - factory ThawAsset._decode(_i1.Input input) { - return ThawAsset(id: _i1.CompactBigIntCodec.codec.decode(input)); - } - - /// T::AssetIdParameter - final BigInt id; - - @override - Map> toJson() => { - 'thaw_asset': {'id': id}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => id.hashCode; -} - -/// Change the Owner of an asset. -/// -/// Origin must be Signed and the sender should be the Owner of the asset `id`. -/// -/// - `id`: The identifier of the asset. -/// - `owner`: The new Owner of this asset. -/// -/// Emits `OwnerChanged`. -/// -/// Weight: `O(1)` -class TransferOwnership extends Call { - const TransferOwnership({required this.id, required this.owner}); - - factory TransferOwnership._decode(_i1.Input input) { - return TransferOwnership( - id: _i1.CompactBigIntCodec.codec.decode(input), - owner: _i3.MultiAddress.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress owner; - - @override - Map> toJson() => { - 'transfer_ownership': {'id': id, 'owner': owner.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(owner); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(id, owner); -} - -/// Change the Issuer, Admin and Freezer of an asset. -/// -/// Origin must be Signed and the sender should be the Owner of the asset `id`. -/// -/// - `id`: The identifier of the asset to be frozen. -/// - `issuer`: The new Issuer of this asset. -/// - `admin`: The new Admin of this asset. -/// - `freezer`: The new Freezer of this asset. -/// -/// Emits `TeamChanged`. -/// -/// Weight: `O(1)` -class SetTeam extends Call { - const SetTeam({required this.id, required this.issuer, required this.admin, required this.freezer}); - - factory SetTeam._decode(_i1.Input input) { - return SetTeam( - id: _i1.CompactBigIntCodec.codec.decode(input), - issuer: _i3.MultiAddress.codec.decode(input), - admin: _i3.MultiAddress.codec.decode(input), - freezer: _i3.MultiAddress.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress issuer; - - /// AccountIdLookupOf - final _i3.MultiAddress admin; - - /// AccountIdLookupOf - final _i3.MultiAddress freezer; - - @override - Map> toJson() => { - 'set_team': {'id': id, 'issuer': issuer.toJson(), 'admin': admin.toJson(), 'freezer': freezer.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(issuer); - size = size + _i3.MultiAddress.codec.sizeHint(admin); - size = size + _i3.MultiAddress.codec.sizeHint(freezer); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - 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); -} - -/// Set the metadata for an asset. -/// -/// Origin must be Signed and the sender should be the Owner of the asset `id`. -/// -/// Funds of sender are reserved according to the formula: -/// `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into -/// account any already reserved funds. -/// -/// - `id`: The identifier of the asset to update. -/// - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. -/// - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. -/// - `decimals`: The number of decimals this asset uses to represent one unit. -/// -/// Emits `MetadataSet`. -/// -/// Weight: `O(1)` -class SetMetadata extends Call { - const SetMetadata({required this.id, required this.name, required this.symbol, required this.decimals}); - - factory SetMetadata._decode(_i1.Input input) { - return SetMetadata( - id: _i1.CompactBigIntCodec.codec.decode(input), - name: _i1.U8SequenceCodec.codec.decode(input), - symbol: _i1.U8SequenceCodec.codec.decode(input), - decimals: _i1.U8Codec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// Vec - final List name; - - /// Vec - final List symbol; - - /// u8 - final int decimals; - - @override - Map> toJson() => { - 'set_metadata': {'id': id, 'name': name, 'symbol': symbol, 'decimals': decimals}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i1.U8SequenceCodec.codec.sizeHint(name); - size = size + _i1.U8SequenceCodec.codec.sizeHint(symbol); - size = size + _i1.U8Codec.codec.sizeHint(decimals); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SetMetadata && - other.id == id && - _i4.listsEqual(other.name, name) && - _i4.listsEqual(other.symbol, symbol) && - other.decimals == decimals; - - @override - int get hashCode => Object.hash(id, name, symbol, decimals); -} - -/// Clear the metadata for an asset. -/// -/// Origin must be Signed and the sender should be the Owner of the asset `id`. -/// -/// Any deposit is freed for the asset owner. -/// -/// - `id`: The identifier of the asset to clear. -/// -/// Emits `MetadataCleared`. -/// -/// Weight: `O(1)` -class ClearMetadata extends Call { - const ClearMetadata({required this.id}); - - factory ClearMetadata._decode(_i1.Input input) { - return ClearMetadata(id: _i1.CompactBigIntCodec.codec.decode(input)); - } - - /// T::AssetIdParameter - final BigInt id; - - @override - Map> toJson() => { - 'clear_metadata': {'id': id}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => id.hashCode; -} - -/// Force the metadata for an asset to some value. -/// -/// Origin must be ForceOrigin. -/// -/// Any deposit is left alone. -/// -/// - `id`: The identifier of the asset to update. -/// - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. -/// - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. -/// - `decimals`: The number of decimals this asset uses to represent one unit. -/// -/// Emits `MetadataSet`. -/// -/// Weight: `O(N + S)` where N and S are the length of the name and symbol respectively. -class ForceSetMetadata extends Call { - const ForceSetMetadata({ - required this.id, - required this.name, - required this.symbol, - required this.decimals, - required this.isFrozen, - }); - - factory ForceSetMetadata._decode(_i1.Input input) { - return ForceSetMetadata( - id: _i1.CompactBigIntCodec.codec.decode(input), - name: _i1.U8SequenceCodec.codec.decode(input), - symbol: _i1.U8SequenceCodec.codec.decode(input), - decimals: _i1.U8Codec.codec.decode(input), - isFrozen: _i1.BoolCodec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// Vec - final List name; - - /// Vec - final List symbol; - - /// u8 - final int decimals; - - /// bool - final bool isFrozen; - - @override - Map> toJson() => { - 'force_set_metadata': {'id': id, 'name': name, 'symbol': symbol, 'decimals': decimals, 'isFrozen': isFrozen}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i1.U8SequenceCodec.codec.sizeHint(name); - size = size + _i1.U8SequenceCodec.codec.sizeHint(symbol); - size = size + _i1.U8Codec.codec.sizeHint(decimals); - size = size + _i1.BoolCodec.codec.sizeHint(isFrozen); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ForceSetMetadata && - other.id == id && - _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); -} - -/// Clear the metadata for an asset. -/// -/// Origin must be ForceOrigin. -/// -/// Any deposit is returned. -/// -/// - `id`: The identifier of the asset to clear. -/// -/// Emits `MetadataCleared`. -/// -/// Weight: `O(1)` -class ForceClearMetadata extends Call { - const ForceClearMetadata({required this.id}); - - factory ForceClearMetadata._decode(_i1.Input input) { - return ForceClearMetadata(id: _i1.CompactBigIntCodec.codec.decode(input)); - } - - /// T::AssetIdParameter - final BigInt id; - - @override - Map> toJson() => { - 'force_clear_metadata': {'id': id}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => id.hashCode; -} - -/// Alter the attributes of a given asset. -/// -/// Origin must be `ForceOrigin`. -/// -/// - `id`: The identifier of the asset. -/// - `owner`: The new Owner of this asset. -/// - `issuer`: The new Issuer of this asset. -/// - `admin`: The new Admin of this asset. -/// - `freezer`: The new Freezer of this asset. -/// - `min_balance`: The minimum balance of this new asset that any single account must -/// have. If an account's balance is reduced below this, then it collapses to zero. -/// - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient -/// value to account for the state bloat associated with its balance storage. If set to -/// `true`, then non-zero balances may be stored without a `consumer` reference (and thus -/// an ED in the Balances pallet or whatever else is used to control user-account state -/// growth). -/// - `is_frozen`: Whether this asset class is frozen except for permissioned/admin -/// instructions. -/// -/// Emits `AssetStatusChanged` with the identity of the asset. -/// -/// Weight: `O(1)` -class ForceAssetStatus extends Call { - const ForceAssetStatus({ - required this.id, - required this.owner, - required this.issuer, - required this.admin, - required this.freezer, - required this.minBalance, - required this.isSufficient, - required this.isFrozen, - }); - - factory ForceAssetStatus._decode(_i1.Input input) { - return ForceAssetStatus( - id: _i1.CompactBigIntCodec.codec.decode(input), - owner: _i3.MultiAddress.codec.decode(input), - issuer: _i3.MultiAddress.codec.decode(input), - admin: _i3.MultiAddress.codec.decode(input), - freezer: _i3.MultiAddress.codec.decode(input), - minBalance: _i1.CompactBigIntCodec.codec.decode(input), - isSufficient: _i1.BoolCodec.codec.decode(input), - isFrozen: _i1.BoolCodec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress owner; - - /// AccountIdLookupOf - final _i3.MultiAddress issuer; - - /// AccountIdLookupOf - final _i3.MultiAddress admin; - - /// AccountIdLookupOf - final _i3.MultiAddress freezer; - - /// T::Balance - final BigInt minBalance; - - /// bool - final bool isSufficient; - - /// bool - final bool isFrozen; - - @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, - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(owner); - size = size + _i3.MultiAddress.codec.sizeHint(issuer); - size = size + _i3.MultiAddress.codec.sizeHint(admin); - size = size + _i3.MultiAddress.codec.sizeHint(freezer); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(minBalance); - size = size + _i1.BoolCodec.codec.sizeHint(isSufficient); - size = size + _i1.BoolCodec.codec.sizeHint(isFrozen); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ForceAssetStatus && - other.id == id && - other.owner == owner && - other.issuer == issuer && - other.admin == admin && - other.freezer == freezer && - other.minBalance == minBalance && - other.isSufficient == isSufficient && - other.isFrozen == isFrozen; - - @override - 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. -/// -/// Origin must be Signed. -/// -/// Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account -/// for the purpose of holding the approval. If some non-zero amount of assets is already -/// approved from signing account to `delegate`, then it is topped up or unreserved to -/// meet the right value. -/// -/// NOTE: The signing account does not need to own `amount` of assets at the point of -/// making this call. -/// -/// - `id`: The identifier of the asset. -/// - `delegate`: The account to delegate permission to transfer asset. -/// - `amount`: The amount of asset that may be transferred by `delegate`. If there is -/// already an approval in place, then this acts additively. -/// -/// Emits `ApprovedTransfer` on success. -/// -/// Weight: `O(1)` -class ApproveTransfer extends Call { - const ApproveTransfer({required this.id, required this.delegate, required this.amount}); - - factory ApproveTransfer._decode(_i1.Input input) { - return ApproveTransfer( - id: _i1.CompactBigIntCodec.codec.decode(input), - delegate: _i3.MultiAddress.codec.decode(input), - amount: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress delegate; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'approve_transfer': {'id': id, 'delegate': delegate.toJson(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(delegate); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ApproveTransfer && other.id == id && other.delegate == delegate && other.amount == amount; - - @override - int get hashCode => Object.hash(id, delegate, amount); -} - -/// Cancel all of some asset approved for delegated transfer by a third-party account. -/// -/// Origin must be Signed and there must be an approval in place between signer and -/// `delegate`. -/// -/// Unreserves any deposit previously reserved by `approve_transfer` for the approval. -/// -/// - `id`: The identifier of the asset. -/// - `delegate`: The account delegated permission to transfer asset. -/// -/// Emits `ApprovalCancelled` on success. -/// -/// Weight: `O(1)` -class CancelApproval extends Call { - const CancelApproval({required this.id, required this.delegate}); - - factory CancelApproval._decode(_i1.Input input) { - return CancelApproval( - id: _i1.CompactBigIntCodec.codec.decode(input), - delegate: _i3.MultiAddress.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress delegate; - - @override - Map> toJson() => { - 'cancel_approval': {'id': id, 'delegate': delegate.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(delegate); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(id, delegate); -} - -/// Cancel all of some asset approved for delegated transfer by a third-party account. -/// -/// Origin must be either ForceOrigin or Signed origin with the signer being the Admin -/// account of the asset `id`. -/// -/// Unreserves any deposit previously reserved by `approve_transfer` for the approval. -/// -/// - `id`: The identifier of the asset. -/// - `delegate`: The account delegated permission to transfer asset. -/// -/// Emits `ApprovalCancelled` on success. -/// -/// Weight: `O(1)` -class ForceCancelApproval extends Call { - const ForceCancelApproval({required this.id, required this.owner, required this.delegate}); - - factory ForceCancelApproval._decode(_i1.Input input) { - return ForceCancelApproval( - id: _i1.CompactBigIntCodec.codec.decode(input), - owner: _i3.MultiAddress.codec.decode(input), - delegate: _i3.MultiAddress.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress owner; - - /// AccountIdLookupOf - final _i3.MultiAddress delegate; - - @override - Map> toJson() => { - 'force_cancel_approval': {'id': id, 'owner': owner.toJson(), 'delegate': delegate.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(owner); - size = size + _i3.MultiAddress.codec.sizeHint(delegate); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ForceCancelApproval && other.id == id && other.owner == owner && other.delegate == delegate; - - @override - int get hashCode => Object.hash(id, owner, delegate); -} - -/// Transfer some asset balance from a previously delegated account to some third-party -/// account. -/// -/// Origin must be Signed and there must be an approval in place by the `owner` to the -/// signer. -/// -/// If the entire amount approved for transfer is transferred, then any deposit previously -/// reserved by `approve_transfer` is unreserved. -/// -/// - `id`: The identifier of the asset. -/// - `owner`: The account which previously approved for a transfer of at least `amount` and -/// from which the asset balance will be withdrawn. -/// - `destination`: The account to which the asset balance of `amount` will be transferred. -/// - `amount`: The amount of assets to transfer. -/// -/// Emits `TransferredApproved` on success. -/// -/// Weight: `O(1)` -class TransferApproved extends Call { - const TransferApproved({required this.id, required this.owner, required this.destination, required this.amount}); - - factory TransferApproved._decode(_i1.Input input) { - return TransferApproved( - id: _i1.CompactBigIntCodec.codec.decode(input), - owner: _i3.MultiAddress.codec.decode(input), - destination: _i3.MultiAddress.codec.decode(input), - amount: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress owner; - - /// AccountIdLookupOf - final _i3.MultiAddress destination; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'transfer_approved': {'id': id, 'owner': owner.toJson(), 'destination': destination.toJson(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(owner); - size = size + _i3.MultiAddress.codec.sizeHint(destination); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TransferApproved && - other.id == id && - other.owner == owner && - other.destination == destination && - other.amount == amount; - - @override - int get hashCode => Object.hash(id, owner, destination, amount); -} - -/// Create an asset account for non-provider assets. -/// -/// A deposit will be taken from the signer account. -/// -/// - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit -/// to be taken. -/// - `id`: The identifier of the asset for the account to be created. -/// -/// Emits `Touched` event when successful. -class Touch extends Call { - const Touch({required this.id}); - - factory Touch._decode(_i1.Input input) { - return Touch(id: _i1.CompactBigIntCodec.codec.decode(input)); - } - - /// T::AssetIdParameter - final BigInt id; - - @override - Map> toJson() => { - 'touch': {'id': id}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => id.hashCode; -} - -/// Return the deposit (if any) of an asset account or a consumer reference (if any) of an -/// account. -/// -/// The origin must be Signed. -/// -/// - `id`: The identifier of the asset for which the caller would like the deposit -/// refunded. -/// - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund. -/// -/// Emits `Refunded` event when successful. -class Refund extends Call { - 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)); - } - - /// T::AssetIdParameter - final BigInt id; - - /// bool - final bool allowBurn; - - @override - Map> toJson() => { - 'refund': {'id': id, 'allowBurn': allowBurn}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i1.BoolCodec.codec.sizeHint(allowBurn); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(id, allowBurn); -} - -/// Sets the minimum balance of an asset. -/// -/// Only works if there aren't any accounts that are holding the asset or if -/// the new value of `min_balance` is less than the old one. -/// -/// Origin must be Signed and the sender has to be the Owner of the -/// asset `id`. -/// -/// - `id`: The identifier of the asset. -/// - `min_balance`: The new value of `min_balance`. -/// -/// Emits `AssetMinBalanceChanged` event when successful. -class SetMinBalance extends Call { - 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)); - } - - /// T::AssetIdParameter - final BigInt id; - - /// T::Balance - final BigInt minBalance; - - @override - Map> toJson() => { - 'set_min_balance': {'id': id, 'minBalance': minBalance}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i1.U128Codec.codec.sizeHint(minBalance); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(id, minBalance); -} - -/// Create an asset account for `who`. -/// -/// A deposit will be taken from the signer account. -/// -/// - `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account -/// must have sufficient funds for a deposit to be taken. -/// - `id`: The identifier of the asset for the account to be created. -/// - `who`: The account to be created. -/// -/// Emits `Touched` event when successful. -class TouchOther extends Call { - 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)); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - @override - Map> toJson() => { - 'touch_other': {'id': id, 'who': who.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(id, who); -} - -/// Return the deposit (if any) of a target asset account. Useful if you are the depositor. -/// -/// The origin must be Signed and either the account owner, depositor, or asset `Admin`. In -/// order to burn a non-zero balance of the asset, the caller must be the account and should -/// use `refund`. -/// -/// - `id`: The identifier of the asset for the account holding a deposit. -/// - `who`: The account to refund. -/// -/// Emits `Refunded` event when successful. -class RefundOther extends Call { - 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)); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - @override - Map> toJson() => { - 'refund_other': {'id': id, 'who': who.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(id, who); -} - -/// Disallow further unprivileged transfers of an asset `id` to and from an account `who`. -/// -/// Origin must be Signed and the sender should be the Freezer of the asset `id`. -/// -/// - `id`: The identifier of the account's asset. -/// - `who`: The account to be unblocked. -/// -/// Emits `Blocked`. -/// -/// Weight: `O(1)` -class Block extends Call { - 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)); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - @override - Map> toJson() => { - 'block': {'id': id, 'who': who.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(id, who); -} - -/// Transfer the entire transferable balance from the caller asset account. -/// -/// NOTE: This function only attempts to transfer _transferable_ balances. This means that -/// any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be -/// transferred by this function. To ensure that this function results in a killed account, -/// you might need to prepare the account by removing any reference counters, storage -/// deposits, etc... -/// -/// The dispatch origin of this call must be Signed. -/// -/// - `id`: The identifier of the asset for the account holding a deposit. -/// - `dest`: The recipient of the transfer. -/// - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all -/// 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). -class TransferAll extends Call { - const TransferAll({required this.id, required this.dest, required this.keepAlive}); - - factory TransferAll._decode(_i1.Input input) { - return TransferAll( - id: _i1.CompactBigIntCodec.codec.decode(input), - dest: _i3.MultiAddress.codec.decode(input), - keepAlive: _i1.BoolCodec.codec.decode(input), - ); - } - - /// T::AssetIdParameter - final BigInt id; - - /// AccountIdLookupOf - final _i3.MultiAddress dest; - - /// bool - final bool keepAlive; - - @override - Map> toJson() => { - 'transfer_all': {'id': id, 'dest': dest.toJson(), 'keepAlive': keepAlive}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(id); - size = size + _i3.MultiAddress.codec.sizeHint(dest); - size = size + _i1.BoolCodec.codec.sizeHint(keepAlive); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TransferAll && other.id == id && other.dest == dest && other.keepAlive == keepAlive; - - @override - int get hashCode => Object.hash(id, dest, keepAlive); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/error.dart deleted file mode 100644 index 3dacb712..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/error.dart +++ /dev/null @@ -1,150 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// Account balance must be greater than or equal to the transfer amount. - balanceLow('BalanceLow', 0), - - /// The account to alter does not exist. - noAccount('NoAccount', 1), - - /// The signing account has no permission to do the operation. - noPermission('NoPermission', 2), - - /// The given asset ID is unknown. - unknown('Unknown', 3), - - /// The origin account is frozen. - frozen('Frozen', 4), - - /// The asset ID is already taken. - inUse('InUse', 5), - - /// Invalid witness data given. - badWitness('BadWitness', 6), - - /// Minimum balance should be non-zero. - minBalanceZero('MinBalanceZero', 7), - - /// Unable to increment the consumer reference counters on the account. Either no provider - /// reference exists to allow a non-zero balance of a non-self-sufficient asset, or one - /// fewer then the maximum number of consumers has been reached. - unavailableConsumer('UnavailableConsumer', 8), - - /// Invalid metadata given. - badMetadata('BadMetadata', 9), - - /// No approval exists that would allow the transfer. - unapproved('Unapproved', 10), - - /// The source account would not survive the transfer and it needs to stay alive. - wouldDie('WouldDie', 11), - - /// The asset-account already exists. - alreadyExists('AlreadyExists', 12), - - /// The asset-account doesn't have an associated deposit. - noDeposit('NoDeposit', 13), - - /// The operation would result in funds being burned. - wouldBurn('WouldBurn', 14), - - /// The asset is a live asset and is actively being used. Usually emit for operations such - /// as `start_destroy` which require the asset to be in a destroying state. - liveAsset('LiveAsset', 15), - - /// The asset is not live, and likely being destroyed. - assetNotLive('AssetNotLive', 16), - - /// The asset status is not the expected status. - incorrectStatus('IncorrectStatus', 17), - - /// The asset should be frozen before the given operation. - notFrozen('NotFrozen', 18), - - /// Callback action resulted in error - callbackFailed('CallbackFailed', 19), - - /// The asset ID must be equal to the [`NextAssetId`]. - badAssetId('BadAssetId', 20); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.balanceLow; - case 1: - return Error.noAccount; - case 2: - return Error.noPermission; - case 3: - return Error.unknown; - case 4: - return Error.frozen; - case 5: - return Error.inUse; - case 6: - return Error.badWitness; - case 7: - return Error.minBalanceZero; - case 8: - return Error.unavailableConsumer; - case 9: - return Error.badMetadata; - case 10: - return Error.unapproved; - case 11: - return Error.wouldDie; - case 12: - return Error.alreadyExists; - case 13: - return Error.noDeposit; - case 14: - return Error.wouldBurn; - case 15: - return Error.liveAsset; - case 16: - return Error.assetNotLive; - case 17: - return Error.incorrectStatus; - case 18: - return Error.notFrozen; - case 19: - return Error.callbackFailed; - case 20: - return Error.badAssetId; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/event.dart deleted file mode 100644 index ef0de033..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_assets/pallet/event.dart +++ /dev/null @@ -1,1668 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../sp_core/crypto/account_id32.dart' as _i3; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -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); - } - - Issued issued({required int assetId, required _i3.AccountId32 owner, required BigInt amount}) { - return Issued(assetId: assetId, owner: owner, amount: amount); - } - - Transferred transferred({ - required int assetId, - required _i3.AccountId32 from, - required _i3.AccountId32 to, - required BigInt 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); - } - - TeamChanged teamChanged({ - required int assetId, - required _i3.AccountId32 issuer, - required _i3.AccountId32 admin, - required _i3.AccountId32 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); - } - - 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); - } - - AssetFrozen assetFrozen({required int assetId}) { - return AssetFrozen(assetId: assetId); - } - - AssetThawed assetThawed({required int assetId}) { - return AssetThawed(assetId: assetId); - } - - AccountsDestroyed accountsDestroyed({ - required int assetId, - required int accountsDestroyed, - required int accountsRemaining, - }) { - return AccountsDestroyed( - assetId: assetId, - accountsDestroyed: accountsDestroyed, - accountsRemaining: accountsRemaining, - ); - } - - ApprovalsDestroyed approvalsDestroyed({ - required int assetId, - required int approvalsDestroyed, - required int approvalsRemaining, - }) { - return ApprovalsDestroyed( - assetId: assetId, - approvalsDestroyed: approvalsDestroyed, - approvalsRemaining: approvalsRemaining, - ); - } - - DestructionStarted destructionStarted({required int assetId}) { - return DestructionStarted(assetId: assetId); - } - - Destroyed destroyed({required int assetId}) { - return Destroyed(assetId: assetId); - } - - ForceCreated forceCreated({required int assetId, required _i3.AccountId32 owner}) { - return ForceCreated(assetId: assetId, owner: owner); - } - - MetadataSet metadataSet({ - required int assetId, - required List name, - required List symbol, - required int decimals, - required bool isFrozen, - }) { - return MetadataSet(assetId: assetId, name: name, symbol: symbol, decimals: decimals, isFrozen: isFrozen); - } - - MetadataCleared metadataCleared({required int assetId}) { - return MetadataCleared(assetId: assetId); - } - - ApprovedTransfer approvedTransfer({ - required int assetId, - required _i3.AccountId32 source, - required _i3.AccountId32 delegate, - required BigInt amount, - }) { - return ApprovedTransfer(assetId: assetId, source: source, delegate: delegate, amount: amount); - } - - ApprovalCancelled approvalCancelled({ - required int assetId, - required _i3.AccountId32 owner, - required _i3.AccountId32 delegate, - }) { - return ApprovalCancelled(assetId: assetId, owner: owner, delegate: delegate); - } - - TransferredApproved transferredApproved({ - required int assetId, - required _i3.AccountId32 owner, - required _i3.AccountId32 delegate, - required _i3.AccountId32 destination, - required BigInt amount, - }) { - return TransferredApproved( - assetId: assetId, - owner: owner, - delegate: delegate, - destination: destination, - amount: amount, - ); - } - - AssetStatusChanged assetStatusChanged({required int assetId}) { - return AssetStatusChanged(assetId: assetId); - } - - 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); - } - - 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); - } - - Withdrawn withdrawn({required int assetId, required _i3.AccountId32 who, required BigInt amount}) { - return Withdrawn(assetId: assetId, who: who, amount: amount); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Created._decode(input); - case 1: - return Issued._decode(input); - case 2: - return Transferred._decode(input); - case 3: - return Burned._decode(input); - case 4: - return TeamChanged._decode(input); - case 5: - return OwnerChanged._decode(input); - case 6: - return Frozen._decode(input); - case 7: - return Thawed._decode(input); - case 8: - return AssetFrozen._decode(input); - case 9: - return AssetThawed._decode(input); - case 10: - return AccountsDestroyed._decode(input); - case 11: - return ApprovalsDestroyed._decode(input); - case 12: - return DestructionStarted._decode(input); - case 13: - return Destroyed._decode(input); - case 14: - return ForceCreated._decode(input); - case 15: - return MetadataSet._decode(input); - case 16: - return MetadataCleared._decode(input); - case 17: - return ApprovedTransfer._decode(input); - case 18: - return ApprovalCancelled._decode(input); - case 19: - return TransferredApproved._decode(input); - case 20: - return AssetStatusChanged._decode(input); - case 21: - return AssetMinBalanceChanged._decode(input); - case 22: - return Touched._decode(input); - case 23: - return Blocked._decode(input); - case 24: - return Deposited._decode(input); - case 25: - return Withdrawn._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case Created: - (value as Created).encodeTo(output); - break; - case Issued: - (value as Issued).encodeTo(output); - break; - case Transferred: - (value as Transferred).encodeTo(output); - break; - case Burned: - (value as Burned).encodeTo(output); - break; - case TeamChanged: - (value as TeamChanged).encodeTo(output); - break; - case OwnerChanged: - (value as OwnerChanged).encodeTo(output); - break; - case Frozen: - (value as Frozen).encodeTo(output); - break; - case Thawed: - (value as Thawed).encodeTo(output); - break; - case AssetFrozen: - (value as AssetFrozen).encodeTo(output); - break; - case AssetThawed: - (value as AssetThawed).encodeTo(output); - break; - case AccountsDestroyed: - (value as AccountsDestroyed).encodeTo(output); - break; - case ApprovalsDestroyed: - (value as ApprovalsDestroyed).encodeTo(output); - break; - case DestructionStarted: - (value as DestructionStarted).encodeTo(output); - break; - case Destroyed: - (value as Destroyed).encodeTo(output); - break; - case ForceCreated: - (value as ForceCreated).encodeTo(output); - break; - case MetadataSet: - (value as MetadataSet).encodeTo(output); - break; - case MetadataCleared: - (value as MetadataCleared).encodeTo(output); - break; - case ApprovedTransfer: - (value as ApprovedTransfer).encodeTo(output); - break; - case ApprovalCancelled: - (value as ApprovalCancelled).encodeTo(output); - break; - case TransferredApproved: - (value as TransferredApproved).encodeTo(output); - break; - case AssetStatusChanged: - (value as AssetStatusChanged).encodeTo(output); - break; - case AssetMinBalanceChanged: - (value as AssetMinBalanceChanged).encodeTo(output); - break; - case Touched: - (value as Touched).encodeTo(output); - break; - case Blocked: - (value as Blocked).encodeTo(output); - break; - case Deposited: - (value as Deposited).encodeTo(output); - break; - case Withdrawn: - (value as Withdrawn).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case Created: - return (value as Created)._sizeHint(); - case Issued: - return (value as Issued)._sizeHint(); - case Transferred: - return (value as Transferred)._sizeHint(); - case Burned: - return (value as Burned)._sizeHint(); - case TeamChanged: - return (value as TeamChanged)._sizeHint(); - case OwnerChanged: - return (value as OwnerChanged)._sizeHint(); - case Frozen: - return (value as Frozen)._sizeHint(); - case Thawed: - return (value as Thawed)._sizeHint(); - case AssetFrozen: - return (value as AssetFrozen)._sizeHint(); - case AssetThawed: - return (value as AssetThawed)._sizeHint(); - case AccountsDestroyed: - return (value as AccountsDestroyed)._sizeHint(); - case ApprovalsDestroyed: - return (value as ApprovalsDestroyed)._sizeHint(); - case DestructionStarted: - return (value as DestructionStarted)._sizeHint(); - case Destroyed: - return (value as Destroyed)._sizeHint(); - case ForceCreated: - return (value as ForceCreated)._sizeHint(); - case MetadataSet: - return (value as MetadataSet)._sizeHint(); - case MetadataCleared: - return (value as MetadataCleared)._sizeHint(); - case ApprovedTransfer: - return (value as ApprovedTransfer)._sizeHint(); - case ApprovalCancelled: - return (value as ApprovalCancelled)._sizeHint(); - case TransferredApproved: - return (value as TransferredApproved)._sizeHint(); - case AssetStatusChanged: - return (value as AssetStatusChanged)._sizeHint(); - case AssetMinBalanceChanged: - return (value as AssetMinBalanceChanged)._sizeHint(); - case Touched: - return (value as Touched)._sizeHint(); - case Blocked: - return (value as Blocked)._sizeHint(); - case Deposited: - return (value as Deposited)._sizeHint(); - case Withdrawn: - return (value as Withdrawn)._sizeHint(); - default: - 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}); - - factory Created._decode(_i1.Input input) { - return Created( - assetId: _i1.U32Codec.codec.decode(input), - creator: const _i1.U8ArrayCodec(32).decode(input), - owner: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 creator; - - /// T::AccountId - final _i3.AccountId32 owner; - - @override - Map> toJson() => { - 'Created': {'assetId': assetId, 'creator': creator.toList(), 'owner': owner.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(creator); - size = size + const _i3.AccountId32Codec().sizeHint(owner); - return size; - } - - 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); - } - - @override - bool operator ==(Object 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); -} - -/// Some assets were issued. -class Issued extends Event { - const Issued({required this.assetId, required this.owner, required this.amount}); - - factory Issued._decode(_i1.Input input) { - return Issued( - assetId: _i1.U32Codec.codec.decode(input), - owner: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 owner; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Issued': {'assetId': assetId, 'owner': owner.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(owner); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - 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); -} - -/// Some assets were transferred. -class Transferred extends Event { - const Transferred({required this.assetId, required this.from, required this.to, required this.amount}); - - factory Transferred._decode(_i1.Input input) { - return Transferred( - assetId: _i1.U32Codec.codec.decode(input), - from: const _i1.U8ArrayCodec(32).decode(input), - to: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 from; - - /// T::AccountId - final _i3.AccountId32 to; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Transferred': {'assetId': assetId, 'from': from.toList(), 'to': to.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(from); - size = size + const _i3.AccountId32Codec().sizeHint(to); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Transferred && - other.assetId == assetId && - _i4.listsEqual(other.from, from) && - _i4.listsEqual(other.to, to) && - other.amount == amount; - - @override - 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}); - - factory Burned._decode(_i1.Input input) { - return Burned( - assetId: _i1.U32Codec.codec.decode(input), - owner: const _i1.U8ArrayCodec(32).decode(input), - balance: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 owner; - - /// T::Balance - final BigInt balance; - - @override - Map> toJson() => { - 'Burned': {'assetId': assetId, 'owner': owner.toList(), 'balance': balance}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(owner); - size = size + _i1.U128Codec.codec.sizeHint(balance); - return size; - } - - 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); - } - - @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); -} - -/// The management team changed. -class TeamChanged extends Event { - const TeamChanged({required this.assetId, required this.issuer, required this.admin, required this.freezer}); - - factory TeamChanged._decode(_i1.Input input) { - return TeamChanged( - assetId: _i1.U32Codec.codec.decode(input), - issuer: const _i1.U8ArrayCodec(32).decode(input), - admin: const _i1.U8ArrayCodec(32).decode(input), - freezer: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 issuer; - - /// T::AccountId - final _i3.AccountId32 admin; - - /// T::AccountId - final _i3.AccountId32 freezer; - - @override - Map> toJson() => { - 'TeamChanged': { - 'assetId': assetId, - 'issuer': issuer.toList(), - 'admin': admin.toList(), - 'freezer': freezer.toList(), - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(issuer); - size = size + const _i3.AccountId32Codec().sizeHint(admin); - size = size + const _i3.AccountId32Codec().sizeHint(freezer); - return size; - } - - 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); - } - - @override - bool operator ==(Object 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); -} - -/// The owner changed. -class OwnerChanged extends Event { - 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)); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 owner; - - @override - Map> toJson() => { - 'OwnerChanged': {'assetId': assetId, 'owner': owner.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(owner); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => Object.hash(assetId, owner); -} - -/// Some account `who` was frozen. -class Frozen extends Event { - 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)); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 who; - - @override - Map> toJson() => { - 'Frozen': {'assetId': assetId, 'who': who.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => Object.hash(assetId, who); -} - -/// Some account `who` was thawed. -class Thawed extends Event { - 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)); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 who; - - @override - Map> toJson() => { - 'Thawed': {'assetId': assetId, 'who': who.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => Object.hash(assetId, who); -} - -/// Some asset `asset_id` was frozen. -class AssetFrozen extends Event { - const AssetFrozen({required this.assetId}); - - factory AssetFrozen._decode(_i1.Input input) { - return AssetFrozen(assetId: _i1.U32Codec.codec.decode(input)); - } - - /// T::AssetId - final int assetId; - - @override - Map> toJson() => { - 'AssetFrozen': {'assetId': assetId}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => assetId.hashCode; -} - -/// Some asset `asset_id` was thawed. -class AssetThawed extends Event { - const AssetThawed({required this.assetId}); - - factory AssetThawed._decode(_i1.Input input) { - return AssetThawed(assetId: _i1.U32Codec.codec.decode(input)); - } - - /// T::AssetId - final int assetId; - - @override - Map> toJson() => { - 'AssetThawed': {'assetId': assetId}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => assetId.hashCode; -} - -/// Accounts were destroyed for given asset. -class AccountsDestroyed extends Event { - const AccountsDestroyed({required this.assetId, required this.accountsDestroyed, required this.accountsRemaining}); - - factory AccountsDestroyed._decode(_i1.Input input) { - return AccountsDestroyed( - assetId: _i1.U32Codec.codec.decode(input), - accountsDestroyed: _i1.U32Codec.codec.decode(input), - accountsRemaining: _i1.U32Codec.codec.decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// u32 - final int accountsDestroyed; - - /// u32 - final int accountsRemaining; - - @override - Map> toJson() => { - 'AccountsDestroyed': { - 'assetId': assetId, - 'accountsDestroyed': accountsDestroyed, - 'accountsRemaining': accountsRemaining, - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + _i1.U32Codec.codec.sizeHint(accountsDestroyed); - size = size + _i1.U32Codec.codec.sizeHint(accountsRemaining); - return size; - } - - 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); - } - - @override - bool operator ==(Object 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); -} - -/// Approvals were destroyed for given asset. -class ApprovalsDestroyed extends Event { - const ApprovalsDestroyed({required this.assetId, required this.approvalsDestroyed, required this.approvalsRemaining}); - - factory ApprovalsDestroyed._decode(_i1.Input input) { - return ApprovalsDestroyed( - assetId: _i1.U32Codec.codec.decode(input), - approvalsDestroyed: _i1.U32Codec.codec.decode(input), - approvalsRemaining: _i1.U32Codec.codec.decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// u32 - final int approvalsDestroyed; - - /// u32 - final int approvalsRemaining; - - @override - Map> toJson() => { - 'ApprovalsDestroyed': { - 'assetId': assetId, - 'approvalsDestroyed': approvalsDestroyed, - 'approvalsRemaining': approvalsRemaining, - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + _i1.U32Codec.codec.sizeHint(approvalsDestroyed); - size = size + _i1.U32Codec.codec.sizeHint(approvalsRemaining); - return size; - } - - 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); - } - - @override - bool operator ==(Object 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); -} - -/// An asset class is in the process of being destroyed. -class DestructionStarted extends Event { - const DestructionStarted({required this.assetId}); - - factory DestructionStarted._decode(_i1.Input input) { - return DestructionStarted(assetId: _i1.U32Codec.codec.decode(input)); - } - - /// T::AssetId - final int assetId; - - @override - Map> toJson() => { - 'DestructionStarted': {'assetId': assetId}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => assetId.hashCode; -} - -/// An asset class was destroyed. -class Destroyed extends Event { - const Destroyed({required this.assetId}); - - factory Destroyed._decode(_i1.Input input) { - return Destroyed(assetId: _i1.U32Codec.codec.decode(input)); - } - - /// T::AssetId - final int assetId; - - @override - Map> toJson() => { - 'Destroyed': {'assetId': assetId}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => assetId.hashCode; -} - -/// Some asset class was force-created. -class ForceCreated extends Event { - 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)); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 owner; - - @override - Map> toJson() => { - 'ForceCreated': {'assetId': assetId, 'owner': owner.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(owner); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => Object.hash(assetId, owner); -} - -/// New metadata has been set for an asset. -class MetadataSet extends Event { - const MetadataSet({ - required this.assetId, - required this.name, - required this.symbol, - required this.decimals, - required this.isFrozen, - }); - - factory MetadataSet._decode(_i1.Input input) { - return MetadataSet( - assetId: _i1.U32Codec.codec.decode(input), - name: _i1.U8SequenceCodec.codec.decode(input), - symbol: _i1.U8SequenceCodec.codec.decode(input), - decimals: _i1.U8Codec.codec.decode(input), - isFrozen: _i1.BoolCodec.codec.decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// Vec - final List name; - - /// Vec - final List symbol; - - /// u8 - final int decimals; - - /// bool - final bool isFrozen; - - @override - Map> toJson() => { - 'MetadataSet': {'assetId': assetId, 'name': name, 'symbol': symbol, 'decimals': decimals, 'isFrozen': isFrozen}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + _i1.U8SequenceCodec.codec.sizeHint(name); - size = size + _i1.U8SequenceCodec.codec.sizeHint(symbol); - size = size + _i1.U8Codec.codec.sizeHint(decimals); - size = size + _i1.BoolCodec.codec.sizeHint(isFrozen); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is MetadataSet && - other.assetId == assetId && - _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); -} - -/// Metadata has been cleared for an asset. -class MetadataCleared extends Event { - const MetadataCleared({required this.assetId}); - - factory MetadataCleared._decode(_i1.Input input) { - return MetadataCleared(assetId: _i1.U32Codec.codec.decode(input)); - } - - /// T::AssetId - final int assetId; - - @override - Map> toJson() => { - 'MetadataCleared': {'assetId': assetId}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => assetId.hashCode; -} - -/// (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}); - - factory ApprovedTransfer._decode(_i1.Input input) { - return ApprovedTransfer( - assetId: _i1.U32Codec.codec.decode(input), - source: const _i1.U8ArrayCodec(32).decode(input), - delegate: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 source; - - /// T::AccountId - final _i3.AccountId32 delegate; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'ApprovedTransfer': { - 'assetId': assetId, - 'source': source.toList(), - 'delegate': delegate.toList(), - 'amount': amount, - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(source); - size = size + const _i3.AccountId32Codec().sizeHint(delegate); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ApprovedTransfer && - other.assetId == assetId && - _i4.listsEqual(other.source, source) && - _i4.listsEqual(other.delegate, delegate) && - other.amount == amount; - - @override - 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}); - - factory ApprovalCancelled._decode(_i1.Input input) { - return ApprovalCancelled( - assetId: _i1.U32Codec.codec.decode(input), - owner: const _i1.U8ArrayCodec(32).decode(input), - delegate: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 owner; - - /// T::AccountId - final _i3.AccountId32 delegate; - - @override - Map> toJson() => { - 'ApprovalCancelled': {'assetId': assetId, 'owner': owner.toList(), 'delegate': delegate.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(owner); - size = size + const _i3.AccountId32Codec().sizeHint(delegate); - return size; - } - - 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); - } - - @override - bool operator ==(Object 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); -} - -/// An `amount` was transferred in its entirety from `owner` to `destination` by -/// the approved `delegate`. -class TransferredApproved extends Event { - const TransferredApproved({ - required this.assetId, - required this.owner, - required this.delegate, - required this.destination, - required this.amount, - }); - - factory TransferredApproved._decode(_i1.Input input) { - return TransferredApproved( - assetId: _i1.U32Codec.codec.decode(input), - owner: const _i1.U8ArrayCodec(32).decode(input), - delegate: const _i1.U8ArrayCodec(32).decode(input), - destination: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 owner; - - /// T::AccountId - final _i3.AccountId32 delegate; - - /// T::AccountId - final _i3.AccountId32 destination; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'TransferredApproved': { - 'assetId': assetId, - 'owner': owner.toList(), - 'delegate': delegate.toList(), - 'destination': destination.toList(), - 'amount': amount, - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(owner); - size = size + const _i3.AccountId32Codec().sizeHint(delegate); - size = size + const _i3.AccountId32Codec().sizeHint(destination); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object 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) && - other.amount == amount; - - @override - int get hashCode => Object.hash(assetId, owner, delegate, destination, amount); -} - -/// An asset has had its attributes changed by the `Force` origin. -class AssetStatusChanged extends Event { - const AssetStatusChanged({required this.assetId}); - - factory AssetStatusChanged._decode(_i1.Input input) { - return AssetStatusChanged(assetId: _i1.U32Codec.codec.decode(input)); - } - - /// T::AssetId - final int assetId; - - @override - Map> toJson() => { - 'AssetStatusChanged': {'assetId': assetId}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => assetId.hashCode; -} - -/// 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}); - - factory AssetMinBalanceChanged._decode(_i1.Input input) { - return AssetMinBalanceChanged( - assetId: _i1.U32Codec.codec.decode(input), - newMinBalance: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::Balance - final BigInt newMinBalance; - - @override - Map> toJson() => { - 'AssetMinBalanceChanged': {'assetId': assetId, 'newMinBalance': newMinBalance}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + _i1.U128Codec.codec.sizeHint(newMinBalance); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory Touched._decode(_i1.Input input) { - return Touched( - assetId: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - depositor: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::AccountId - final _i3.AccountId32 depositor; - - @override - Map> toJson() => { - 'Touched': {'assetId': assetId, 'who': who.toList(), 'depositor': depositor.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + const _i3.AccountId32Codec().sizeHint(depositor); - return size; - } - - 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); - } - - @override - bool operator ==(Object 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); -} - -/// Some account `who` was blocked. -class Blocked extends Event { - 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)); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 who; - - @override - Map> toJson() => { - 'Blocked': {'assetId': assetId, 'who': who.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - 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}); - - factory Deposited._decode(_i1.Input input) { - return Deposited( - assetId: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Deposited': {'assetId': assetId, 'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - 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); -} - -/// 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}); - - factory Withdrawn._decode(_i1.Input input) { - return Withdrawn( - assetId: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AssetId - final int assetId; - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Withdrawn': {'assetId': assetId, 'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(assetId); - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - 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); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/account_status.dart b/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/account_status.dart deleted file mode 100644 index e1fdffda..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/account_status.dart +++ /dev/null @@ -1,51 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum AccountStatus { - liquid('Liquid', 0), - frozen('Frozen', 1), - blocked('Blocked', 2); - - const AccountStatus(this.variantName, this.codecIndex); - - factory AccountStatus.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $AccountStatusCodec codec = $AccountStatusCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $AccountStatusCodec with _i1.Codec { - const $AccountStatusCodec(); - - @override - AccountStatus decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return AccountStatus.liquid; - case 1: - return AccountStatus.frozen; - case 2: - return AccountStatus.blocked; - default: - throw Exception('AccountStatus: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(AccountStatus value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/approval.dart b/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/approval.dart deleted file mode 100644 index ef7cbb93..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/approval.dart +++ /dev/null @@ -1,56 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -class Approval { - const Approval({required this.amount, required this.deposit}); - - factory Approval.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Balance - final BigInt amount; - - /// DepositBalance - final BigInt deposit; - - static const $ApprovalCodec codec = $ApprovalCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'amount': amount, 'deposit': deposit}; - - @override - bool operator ==(Object other) => - identical(this, other) || other is Approval && other.amount == amount && other.deposit == deposit; - - @override - 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); - } - - @override - Approval decode(_i1.Input input) { - return Approval(amount: _i1.U128Codec.codec.decode(input), deposit: _i1.U128Codec.codec.decode(input)); - } - - @override - int sizeHint(Approval obj) { - int size = 0; - size = size + _i1.U128Codec.codec.sizeHint(obj.amount); - size = size + _i1.U128Codec.codec.sizeHint(obj.deposit); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_account.dart b/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_account.dart deleted file mode 100644 index 7002cc2c..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_account.dart +++ /dev/null @@ -1,84 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i4; - -import 'package:polkadart/scale_codec.dart' as _i1; - -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}); - - factory AssetAccount.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Balance - final BigInt balance; - - /// AccountStatus - final _i2.AccountStatus status; - - /// ExistenceReason - final _i3.ExistenceReason reason; - - /// Extra - final dynamic extra; - - static const $AssetAccountCodec codec = $AssetAccountCodec(); - - _i4.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'balance': balance, - 'status': status.toJson(), - 'reason': reason.toJson(), - 'extra': null, - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AssetAccount && - other.balance == balance && - other.status == status && - other.reason == reason && - other.extra == extra; - - @override - 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); - } - - @override - AssetAccount decode(_i1.Input input) { - return AssetAccount( - balance: _i1.U128Codec.codec.decode(input), - status: _i2.AccountStatus.codec.decode(input), - reason: _i3.ExistenceReason.codec.decode(input), - extra: _i1.NullCodec.codec.decode(input), - ); - } - - @override - int sizeHint(AssetAccount obj) { - int size = 0; - size = size + _i1.U128Codec.codec.sizeHint(obj.balance); - size = size + _i2.AccountStatus.codec.sizeHint(obj.status); - size = size + _i3.ExistenceReason.codec.sizeHint(obj.reason); - size = size + _i1.NullCodec.codec.sizeHint(obj.extra); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_details.dart b/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_details.dart deleted file mode 100644 index 9a721ed9..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_details.dart +++ /dev/null @@ -1,175 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i4; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; - -import '../../sp_core/crypto/account_id32.dart' as _i2; -import 'asset_status.dart' as _i3; - -class AssetDetails { - const AssetDetails({ - required this.owner, - required this.issuer, - required this.admin, - required this.freezer, - required this.supply, - required this.deposit, - required this.minBalance, - required this.isSufficient, - required this.accounts, - required this.sufficients, - required this.approvals, - required this.status, - }); - - factory AssetDetails.decode(_i1.Input input) { - return codec.decode(input); - } - - /// AccountId - final _i2.AccountId32 owner; - - /// AccountId - final _i2.AccountId32 issuer; - - /// AccountId - final _i2.AccountId32 admin; - - /// AccountId - final _i2.AccountId32 freezer; - - /// Balance - final BigInt supply; - - /// DepositBalance - final BigInt deposit; - - /// Balance - final BigInt minBalance; - - /// bool - final bool isSufficient; - - /// u32 - final int accounts; - - /// u32 - final int sufficients; - - /// u32 - final int approvals; - - /// AssetStatus - final _i3.AssetStatus status; - - static const $AssetDetailsCodec codec = $AssetDetailsCodec(); - - _i4.Uint8List encode() { - return codec.encode(this); - } - - 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(), - }; - - @override - bool operator ==(Object 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) && - other.supply == supply && - other.deposit == deposit && - other.minBalance == minBalance && - other.isSufficient == isSufficient && - other.accounts == accounts && - other.sufficients == sufficients && - other.approvals == approvals && - other.status == status; - - @override - int get hashCode => Object.hash( - 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); - } - - @override - AssetDetails decode(_i1.Input input) { - return AssetDetails( - owner: const _i1.U8ArrayCodec(32).decode(input), - issuer: const _i1.U8ArrayCodec(32).decode(input), - admin: const _i1.U8ArrayCodec(32).decode(input), - freezer: const _i1.U8ArrayCodec(32).decode(input), - supply: _i1.U128Codec.codec.decode(input), - deposit: _i1.U128Codec.codec.decode(input), - minBalance: _i1.U128Codec.codec.decode(input), - isSufficient: _i1.BoolCodec.codec.decode(input), - accounts: _i1.U32Codec.codec.decode(input), - sufficients: _i1.U32Codec.codec.decode(input), - approvals: _i1.U32Codec.codec.decode(input), - status: _i3.AssetStatus.codec.decode(input), - ); - } - - @override - int sizeHint(AssetDetails obj) { - int size = 0; - size = size + const _i2.AccountId32Codec().sizeHint(obj.owner); - size = size + const _i2.AccountId32Codec().sizeHint(obj.issuer); - size = size + const _i2.AccountId32Codec().sizeHint(obj.admin); - size = size + const _i2.AccountId32Codec().sizeHint(obj.freezer); - size = size + _i1.U128Codec.codec.sizeHint(obj.supply); - size = size + _i1.U128Codec.codec.sizeHint(obj.deposit); - size = size + _i1.U128Codec.codec.sizeHint(obj.minBalance); - size = size + _i1.BoolCodec.codec.sizeHint(obj.isSufficient); - size = size + _i1.U32Codec.codec.sizeHint(obj.accounts); - size = size + _i1.U32Codec.codec.sizeHint(obj.sufficients); - size = size + _i1.U32Codec.codec.sizeHint(obj.approvals); - size = size + _i3.AssetStatus.codec.sizeHint(obj.status); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_metadata.dart b/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_metadata.dart deleted file mode 100644 index 45f1f10f..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_metadata.dart +++ /dev/null @@ -1,96 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i3; - -class AssetMetadata { - const AssetMetadata({ - required this.deposit, - required this.name, - required this.symbol, - required this.decimals, - required this.isFrozen, - }); - - factory AssetMetadata.decode(_i1.Input input) { - return codec.decode(input); - } - - /// DepositBalance - final BigInt deposit; - - /// BoundedString - final List name; - - /// BoundedString - final List symbol; - - /// u8 - final int decimals; - - /// bool - final bool isFrozen; - - static const $AssetMetadataCodec codec = $AssetMetadataCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'deposit': deposit, - 'name': name, - 'symbol': symbol, - 'decimals': decimals, - 'isFrozen': isFrozen, - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AssetMetadata && - other.deposit == deposit && - _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); -} - -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); - } - - @override - AssetMetadata decode(_i1.Input input) { - return AssetMetadata( - deposit: _i1.U128Codec.codec.decode(input), - name: _i1.U8SequenceCodec.codec.decode(input), - symbol: _i1.U8SequenceCodec.codec.decode(input), - decimals: _i1.U8Codec.codec.decode(input), - isFrozen: _i1.BoolCodec.codec.decode(input), - ); - } - - @override - int sizeHint(AssetMetadata obj) { - int size = 0; - size = size + _i1.U128Codec.codec.sizeHint(obj.deposit); - size = size + _i1.U8SequenceCodec.codec.sizeHint(obj.name); - size = size + _i1.U8SequenceCodec.codec.sizeHint(obj.symbol); - size = size + _i1.U8Codec.codec.sizeHint(obj.decimals); - size = size + _i1.BoolCodec.codec.sizeHint(obj.isFrozen); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_status.dart b/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_status.dart deleted file mode 100644 index eebad8fd..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/asset_status.dart +++ /dev/null @@ -1,51 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum AssetStatus { - live('Live', 0), - frozen('Frozen', 1), - destroying('Destroying', 2); - - const AssetStatus(this.variantName, this.codecIndex); - - factory AssetStatus.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $AssetStatusCodec codec = $AssetStatusCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $AssetStatusCodec with _i1.Codec { - const $AssetStatusCodec(); - - @override - AssetStatus decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return AssetStatus.live; - case 1: - return AssetStatus.frozen; - case 2: - return AssetStatus.destroying; - default: - throw Exception('AssetStatus: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(AssetStatus value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/existence_reason.dart b/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/existence_reason.dart deleted file mode 100644 index d0714f82..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_assets/types/existence_reason.dart +++ /dev/null @@ -1,240 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../sp_core/crypto/account_id32.dart' as _i3; - -abstract class ExistenceReason { - const ExistenceReason(); - - factory ExistenceReason.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $ExistenceReasonCodec codec = $ExistenceReasonCodec(); - - static const $ExistenceReason values = $ExistenceReason(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $ExistenceReason { - const $ExistenceReason(); - - Consumer consumer() { - return Consumer(); - } - - Sufficient sufficient() { - return Sufficient(); - } - - DepositHeld depositHeld(BigInt value0) { - return DepositHeld(value0); - } - - DepositRefunded depositRefunded() { - return DepositRefunded(); - } - - DepositFrom depositFrom(_i3.AccountId32 value0, BigInt value1) { - return DepositFrom(value0, value1); - } -} - -class $ExistenceReasonCodec with _i1.Codec { - const $ExistenceReasonCodec(); - - @override - ExistenceReason decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return const Consumer(); - case 1: - return const Sufficient(); - case 2: - return DepositHeld._decode(input); - case 3: - return const DepositRefunded(); - case 4: - return DepositFrom._decode(input); - default: - throw Exception('ExistenceReason: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(ExistenceReason value, _i1.Output output) { - switch (value.runtimeType) { - case Consumer: - (value as Consumer).encodeTo(output); - break; - case Sufficient: - (value as Sufficient).encodeTo(output); - break; - case DepositHeld: - (value as DepositHeld).encodeTo(output); - break; - case DepositRefunded: - (value as DepositRefunded).encodeTo(output); - break; - case DepositFrom: - (value as DepositFrom).encodeTo(output); - break; - default: - throw Exception('ExistenceReason: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(ExistenceReason value) { - switch (value.runtimeType) { - case Consumer: - return 1; - case Sufficient: - return 1; - case DepositHeld: - return (value as DepositHeld)._sizeHint(); - case DepositRefunded: - return 1; - case DepositFrom: - return (value as DepositFrom)._sizeHint(); - default: - throw Exception('ExistenceReason: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Consumer extends ExistenceReason { - const Consumer(); - - @override - Map toJson() => {'Consumer': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - } - - @override - bool operator ==(Object other) => other is Consumer; - - @override - int get hashCode => runtimeType.hashCode; -} - -class Sufficient extends ExistenceReason { - const Sufficient(); - - @override - Map toJson() => {'Sufficient': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - } - - @override - bool operator ==(Object other) => other is Sufficient; - - @override - int get hashCode => runtimeType.hashCode; -} - -class DepositHeld extends ExistenceReason { - const DepositHeld(this.value0); - - factory DepositHeld._decode(_i1.Input input) { - return DepositHeld(_i1.U128Codec.codec.decode(input)); - } - - /// Balance - final BigInt value0; - - @override - Map toJson() => {'DepositHeld': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class DepositRefunded extends ExistenceReason { - const DepositRefunded(); - - @override - Map toJson() => {'DepositRefunded': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - } - - @override - bool operator ==(Object other) => other is DepositRefunded; - - @override - int get hashCode => runtimeType.hashCode; -} - -class DepositFrom extends ExistenceReason { - 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)); - } - - /// AccountId - final _i3.AccountId32 value0; - - /// Balance - final BigInt value1; - - @override - Map> toJson() => { - 'DepositFrom': [value0.toList(), value1], - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(value0); - size = size + _i1.U128Codec.codec.sizeHint(value1); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(value0, value1); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/call.dart deleted file mode 100644 index 0190e45b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/call.dart +++ /dev/null @@ -1,598 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i6; - -import '../../sp_core/crypto/account_id32.dart' as _i4; -import '../../sp_runtime/multiaddress/multi_address.dart' as _i3; -import '../types/adjustment_direction.dart' as _i5; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - TransferAllowDeath transferAllowDeath({required _i3.MultiAddress dest, required BigInt value}) { - return TransferAllowDeath(dest: dest, value: value); - } - - ForceTransfer forceTransfer({ - required _i3.MultiAddress source, - required _i3.MultiAddress dest, - required BigInt value, - }) { - return ForceTransfer(source: source, 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); - } - - 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); - } - - ForceAdjustTotalIssuance forceAdjustTotalIssuance({ - required _i5.AdjustmentDirection direction, - required BigInt delta, - }) { - return ForceAdjustTotalIssuance(direction: direction, delta: delta); - } - - Burn burn({required BigInt value, required bool keepAlive}) { - return Burn(value: value, keepAlive: keepAlive); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return TransferAllowDeath._decode(input); - case 2: - return ForceTransfer._decode(input); - case 3: - return TransferKeepAlive._decode(input); - case 4: - return TransferAll._decode(input); - case 5: - return ForceUnreserve._decode(input); - case 6: - return UpgradeAccounts._decode(input); - case 8: - return ForceSetBalance._decode(input); - case 9: - return ForceAdjustTotalIssuance._decode(input); - case 10: - return Burn._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case TransferAllowDeath: - (value as TransferAllowDeath).encodeTo(output); - break; - case ForceTransfer: - (value as ForceTransfer).encodeTo(output); - break; - case TransferKeepAlive: - (value as TransferKeepAlive).encodeTo(output); - break; - case TransferAll: - (value as TransferAll).encodeTo(output); - break; - case ForceUnreserve: - (value as ForceUnreserve).encodeTo(output); - break; - case UpgradeAccounts: - (value as UpgradeAccounts).encodeTo(output); - break; - case ForceSetBalance: - (value as ForceSetBalance).encodeTo(output); - break; - case ForceAdjustTotalIssuance: - (value as ForceAdjustTotalIssuance).encodeTo(output); - break; - case Burn: - (value as Burn).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case TransferAllowDeath: - return (value as TransferAllowDeath)._sizeHint(); - case ForceTransfer: - return (value as ForceTransfer)._sizeHint(); - case TransferKeepAlive: - return (value as TransferKeepAlive)._sizeHint(); - case TransferAll: - return (value as TransferAll)._sizeHint(); - case ForceUnreserve: - return (value as ForceUnreserve)._sizeHint(); - case UpgradeAccounts: - return (value as UpgradeAccounts)._sizeHint(); - case ForceSetBalance: - return (value as ForceSetBalance)._sizeHint(); - case ForceAdjustTotalIssuance: - return (value as ForceAdjustTotalIssuance)._sizeHint(); - case Burn: - return (value as Burn)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Transfer some liquid free balance to another account. -/// -/// `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. -/// If the sender's account is below the existential deposit as a result -/// of the transfer, the account will be reaped. -/// -/// The dispatch origin for this call must be `Signed` by the transactor. -class TransferAllowDeath extends Call { - const TransferAllowDeath({required this.dest, required this.value}); - - factory TransferAllowDeath._decode(_i1.Input input) { - return TransferAllowDeath( - dest: _i3.MultiAddress.codec.decode(input), - value: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// AccountIdLookupOf - final _i3.MultiAddress dest; - - /// T::Balance - final BigInt value; - - @override - Map> toJson() => { - 'transfer_allow_death': {'dest': dest.toJson(), 'value': value}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(dest); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(value); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory ForceTransfer._decode(_i1.Input input) { - return ForceTransfer( - source: _i3.MultiAddress.codec.decode(input), - dest: _i3.MultiAddress.codec.decode(input), - value: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// AccountIdLookupOf - final _i3.MultiAddress source; - - /// AccountIdLookupOf - final _i3.MultiAddress dest; - - /// T::Balance - final BigInt value; - - @override - Map> toJson() => { - 'force_transfer': {'source': source.toJson(), 'dest': dest.toJson(), 'value': value}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(source); - size = size + _i3.MultiAddress.codec.sizeHint(dest); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(value); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ForceTransfer && other.source == source && other.dest == dest && other.value == value; - - @override - int get hashCode => Object.hash(source, dest, value); -} - -/// Same as the [`transfer_allow_death`] call, but with a check that the transfer will not -/// kill the origin account. -/// -/// 99% of the time you want [`transfer_allow_death`] instead. -/// -/// [`transfer_allow_death`]: struct.Pallet.html#method.transfer -class TransferKeepAlive extends Call { - const TransferKeepAlive({required this.dest, required this.value}); - - factory TransferKeepAlive._decode(_i1.Input input) { - return TransferKeepAlive( - dest: _i3.MultiAddress.codec.decode(input), - value: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// AccountIdLookupOf - final _i3.MultiAddress dest; - - /// T::Balance - final BigInt value; - - @override - Map> toJson() => { - 'transfer_keep_alive': {'dest': dest.toJson(), 'value': value}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(dest); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(value); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(dest, value); -} - -/// Transfer the entire transferable balance from the caller account. -/// -/// NOTE: This function only attempts to transfer _transferable_ balances. This means that -/// any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be -/// transferred by this function. To ensure that this function results in a killed account, -/// you might need to prepare the account by removing any reference counters, storage -/// deposits, etc... -/// -/// The dispatch origin of this call must be Signed. -/// -/// - `dest`: The recipient of the transfer. -/// - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all -/// 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). -class TransferAll extends Call { - 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)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress dest; - - /// bool - final bool keepAlive; - - @override - Map> toJson() => { - 'transfer_all': {'dest': dest.toJson(), 'keepAlive': keepAlive}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(dest); - size = size + _i1.BoolCodec.codec.sizeHint(keepAlive); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory ForceUnreserve._decode(_i1.Input input) { - return ForceUnreserve(who: _i3.MultiAddress.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'force_unreserve': {'who': who.toJson(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(who, amount); -} - -/// Upgrade a specified account. -/// -/// - `origin`: Must be `Signed`. -/// - `who`: The account to be upgraded. -/// -/// This will waive the transaction fee if at least all but 10% of the accounts needed to -/// be upgraded. (We let some not have to be upgraded just in order to allow for the -/// possibility of churn). -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)); - } - - /// Vec - final List<_i4.AccountId32> who; - - @override - Map>>> toJson() => { - '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); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => who.hashCode; -} - -/// Set the regular balance of a given account. -/// -/// The dispatch origin for this call is `root`. -class ForceSetBalance extends Call { - const ForceSetBalance({required this.who, required this.newFree}); - - factory ForceSetBalance._decode(_i1.Input input) { - return ForceSetBalance( - who: _i3.MultiAddress.codec.decode(input), - newFree: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - /// T::Balance - final BigInt newFree; - - @override - Map> toJson() => { - 'force_set_balance': {'who': who.toJson(), 'newFree': newFree}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(who); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(newFree); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(who, newFree); -} - -/// Adjust the total issuance in a saturating way. -/// -/// Can only be called by root and always needs a positive `delta`. -/// -/// # Example -class ForceAdjustTotalIssuance extends Call { - const ForceAdjustTotalIssuance({required this.direction, required this.delta}); - - factory ForceAdjustTotalIssuance._decode(_i1.Input input) { - return ForceAdjustTotalIssuance( - direction: _i5.AdjustmentDirection.codec.decode(input), - delta: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - /// AdjustmentDirection - final _i5.AdjustmentDirection direction; - - /// T::Balance - final BigInt delta; - - @override - Map> toJson() => { - 'force_adjust_total_issuance': {'direction': direction.toJson(), 'delta': delta}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i5.AdjustmentDirection.codec.sizeHint(direction); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(delta); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(direction, delta); -} - -/// Burn the specified liquid free balance from the origin account. -/// -/// If the origin's account ends up below the existential deposit as a result -/// of the burn and `keep_alive` is false, the account will be reaped. -/// -/// 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}); - - factory Burn._decode(_i1.Input input) { - return Burn(value: _i1.CompactBigIntCodec.codec.decode(input), keepAlive: _i1.BoolCodec.codec.decode(input)); - } - - /// T::Balance - final BigInt value; - - /// bool - final bool keepAlive; - - @override - Map> toJson() => { - 'burn': {'value': value, 'keepAlive': keepAlive}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(value); - size = size + _i1.BoolCodec.codec.sizeHint(keepAlive); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(value, keepAlive); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/error.dart deleted file mode 100644 index 686dda4b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/error.dart +++ /dev/null @@ -1,102 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// Vesting balance too high to send value. - vestingBalance('VestingBalance', 0), - - /// Account liquidity restrictions prevent withdrawal. - liquidityRestrictions('LiquidityRestrictions', 1), - - /// Balance too low to send value. - insufficientBalance('InsufficientBalance', 2), - - /// Value too low to create account due to existential deposit. - existentialDeposit('ExistentialDeposit', 3), - - /// Transfer/payment would kill account. - expendability('Expendability', 4), - - /// A vesting schedule already exists for this account. - existingVestingSchedule('ExistingVestingSchedule', 5), - - /// Beneficiary account must pre-exist. - deadAccount('DeadAccount', 6), - - /// Number of named reserves exceed `MaxReserves`. - tooManyReserves('TooManyReserves', 7), - - /// Number of holds exceed `VariantCountOf`. - tooManyHolds('TooManyHolds', 8), - - /// Number of freezes exceed `MaxFreezes`. - tooManyFreezes('TooManyFreezes', 9), - - /// The issuance cannot be modified since it is already deactivated. - issuanceDeactivated('IssuanceDeactivated', 10), - - /// The delta cannot be zero. - deltaZero('DeltaZero', 11); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.vestingBalance; - case 1: - return Error.liquidityRestrictions; - case 2: - return Error.insufficientBalance; - case 3: - return Error.existentialDeposit; - case 4: - return Error.expendability; - case 5: - return Error.existingVestingSchedule; - case 6: - return Error.deadAccount; - case 7: - return Error.tooManyReserves; - case 8: - return Error.tooManyHolds; - case 9: - return Error.tooManyFreezes; - case 10: - return Error.issuanceDeactivated; - case 11: - return Error.deltaZero; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/event.dart deleted file mode 100644 index 590c12c9..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_balances/pallet/event.dart +++ /dev/null @@ -1,1218 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; - -import '../../frame_support/traits/tokens/misc/balance_status.dart' as _i4; -import '../../sp_core/crypto/account_id32.dart' as _i3; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - 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); - } - - 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); - } - - 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); - } - - ReserveRepatriated reserveRepatriated({ - required _i3.AccountId32 from, - required _i3.AccountId32 to, - required BigInt amount, - required _i4.BalanceStatus 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); - } - - 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); - } - - Minted minted({required _i3.AccountId32 who, required BigInt amount}) { - return Minted(who: who, amount: amount); - } - - Burned burned({required _i3.AccountId32 who, required BigInt amount}) { - return Burned(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); - } - - Upgraded upgraded({required _i3.AccountId32 who}) { - return Upgraded(who: who); - } - - Issued issued({required BigInt amount}) { - return Issued(amount: amount); - } - - Rescinded rescinded({required BigInt amount}) { - return Rescinded(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); - } - - 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); - } - - TotalIssuanceForced totalIssuanceForced({required BigInt old, required BigInt new_}) { - return TotalIssuanceForced(old: old, new_: new_); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Endowed._decode(input); - case 1: - return DustLost._decode(input); - case 2: - return Transfer._decode(input); - case 3: - return BalanceSet._decode(input); - case 4: - return Reserved._decode(input); - case 5: - return Unreserved._decode(input); - case 6: - return ReserveRepatriated._decode(input); - case 7: - return Deposit._decode(input); - case 8: - return Withdraw._decode(input); - case 9: - return Slashed._decode(input); - case 10: - return Minted._decode(input); - case 11: - return Burned._decode(input); - case 12: - return Suspended._decode(input); - case 13: - return Restored._decode(input); - case 14: - return Upgraded._decode(input); - case 15: - return Issued._decode(input); - case 16: - return Rescinded._decode(input); - case 17: - return Locked._decode(input); - case 18: - return Unlocked._decode(input); - case 19: - return Frozen._decode(input); - case 20: - return Thawed._decode(input); - case 21: - return TotalIssuanceForced._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case Endowed: - (value as Endowed).encodeTo(output); - break; - case DustLost: - (value as DustLost).encodeTo(output); - break; - case Transfer: - (value as Transfer).encodeTo(output); - break; - case BalanceSet: - (value as BalanceSet).encodeTo(output); - break; - case Reserved: - (value as Reserved).encodeTo(output); - break; - case Unreserved: - (value as Unreserved).encodeTo(output); - break; - case ReserveRepatriated: - (value as ReserveRepatriated).encodeTo(output); - break; - case Deposit: - (value as Deposit).encodeTo(output); - break; - case Withdraw: - (value as Withdraw).encodeTo(output); - break; - case Slashed: - (value as Slashed).encodeTo(output); - break; - case Minted: - (value as Minted).encodeTo(output); - break; - case Burned: - (value as Burned).encodeTo(output); - break; - case Suspended: - (value as Suspended).encodeTo(output); - break; - case Restored: - (value as Restored).encodeTo(output); - break; - case Upgraded: - (value as Upgraded).encodeTo(output); - break; - case Issued: - (value as Issued).encodeTo(output); - break; - case Rescinded: - (value as Rescinded).encodeTo(output); - break; - case Locked: - (value as Locked).encodeTo(output); - break; - case Unlocked: - (value as Unlocked).encodeTo(output); - break; - case Frozen: - (value as Frozen).encodeTo(output); - break; - case Thawed: - (value as Thawed).encodeTo(output); - break; - case TotalIssuanceForced: - (value as TotalIssuanceForced).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case Endowed: - return (value as Endowed)._sizeHint(); - case DustLost: - return (value as DustLost)._sizeHint(); - case Transfer: - return (value as Transfer)._sizeHint(); - case BalanceSet: - return (value as BalanceSet)._sizeHint(); - case Reserved: - return (value as Reserved)._sizeHint(); - case Unreserved: - return (value as Unreserved)._sizeHint(); - case ReserveRepatriated: - return (value as ReserveRepatriated)._sizeHint(); - case Deposit: - return (value as Deposit)._sizeHint(); - case Withdraw: - return (value as Withdraw)._sizeHint(); - case Slashed: - return (value as Slashed)._sizeHint(); - case Minted: - return (value as Minted)._sizeHint(); - case Burned: - return (value as Burned)._sizeHint(); - case Suspended: - return (value as Suspended)._sizeHint(); - case Restored: - return (value as Restored)._sizeHint(); - case Upgraded: - return (value as Upgraded)._sizeHint(); - case Issued: - return (value as Issued)._sizeHint(); - case Rescinded: - return (value as Rescinded)._sizeHint(); - case Locked: - return (value as Locked)._sizeHint(); - case Unlocked: - return (value as Unlocked)._sizeHint(); - case Frozen: - return (value as Frozen)._sizeHint(); - case Thawed: - return (value as Thawed)._sizeHint(); - case TotalIssuanceForced: - return (value as TotalIssuanceForced)._sizeHint(); - default: - 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}); - - factory Endowed._decode(_i1.Input input) { - return Endowed(account: const _i1.U8ArrayCodec(32).decode(input), freeBalance: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 account; - - /// T::Balance - final BigInt freeBalance; - - @override - Map> toJson() => { - 'Endowed': {'account': account.toList(), 'freeBalance': freeBalance}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(account); - size = size + _i1.U128Codec.codec.sizeHint(freeBalance); - return size; - } - - void encodeTo(_i1.Output 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 && _i5.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}); - - factory DustLost._decode(_i1.Input input) { - return DustLost(account: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 account; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'DustLost': {'account': account.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(account); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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 && _i5.listsEqual(other.account, account) && other.amount == amount; - - @override - int get hashCode => Object.hash(account, amount); -} - -/// Transfer succeeded. -class Transfer extends Event { - const Transfer({required this.from, required this.to, required this.amount}); - - factory Transfer._decode(_i1.Input input) { - return Transfer( - from: const _i1.U8ArrayCodec(32).decode(input), - to: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 from; - - /// T::AccountId - final _i3.AccountId32 to; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Transfer': {'from': from.toList(), 'to': to.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(from); - size = size + const _i3.AccountId32Codec().sizeHint(to); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Transfer && _i5.listsEqual(other.from, from) && _i5.listsEqual(other.to, to) && other.amount == amount; - - @override - 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}); - - factory BalanceSet._decode(_i1.Input input) { - return BalanceSet(who: const _i1.U8ArrayCodec(32).decode(input), free: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt free; - - @override - Map> toJson() => { - 'BalanceSet': {'who': who.toList(), 'free': free}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(free); - return size; - } - - void encodeTo(_i1.Output 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 && _i5.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}); - - factory Reserved._decode(_i1.Input input) { - return Reserved(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Reserved': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - 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}); - - factory Unreserved._decode(_i1.Input input) { - return Unreserved(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Unreserved': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); -} - -/// Some balance was moved from the reserve of the first account to the second account. -/// Final argument indicates the destination balance type. -class ReserveRepatriated extends Event { - const ReserveRepatriated({ - required this.from, - required this.to, - required this.amount, - required this.destinationStatus, - }); - - factory ReserveRepatriated._decode(_i1.Input input) { - return ReserveRepatriated( - from: const _i1.U8ArrayCodec(32).decode(input), - to: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - destinationStatus: _i4.BalanceStatus.codec.decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 from; - - /// T::AccountId - final _i3.AccountId32 to; - - /// T::Balance - final BigInt amount; - - /// Status - final _i4.BalanceStatus destinationStatus; - - @override - Map> toJson() => { - 'ReserveRepatriated': { - 'from': from.toList(), - 'to': to.toList(), - 'amount': amount, - 'destinationStatus': destinationStatus.toJson(), - }, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(from); - size = size + const _i3.AccountId32Codec().sizeHint(to); - size = size + _i1.U128Codec.codec.sizeHint(amount); - size = size + _i4.BalanceStatus.codec.sizeHint(destinationStatus); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ReserveRepatriated && - _i5.listsEqual(other.from, from) && - _i5.listsEqual(other.to, to) && - other.amount == amount && - other.destinationStatus == destinationStatus; - - @override - 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}); - - factory Deposit._decode(_i1.Input input) { - return Deposit(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Deposit': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - 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}); - - factory Withdraw._decode(_i1.Input input) { - return Withdraw(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Withdraw': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - 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}); - - factory Slashed._decode(_i1.Input input) { - return Slashed(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Slashed': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - 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}); - - factory Minted._decode(_i1.Input input) { - return Minted(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Minted': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); -} - -/// Some amount was burned from an account. -class Burned extends Event { - 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)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Burned': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); -} - -/// Some amount was suspended from an account (it can be restored later). -class Suspended extends Event { - 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)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Suspended': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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 Suspended && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - 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}); - - factory Restored._decode(_i1.Input input) { - return Restored(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Restored': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); -} - -/// An account was upgraded. -class Upgraded extends Event { - const Upgraded({required this.who}); - - factory Upgraded._decode(_i1.Input input) { - return Upgraded(who: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - @override - Map>> toJson() => { - 'Upgraded': {'who': who.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Upgraded && _i5.listsEqual(other.who, who); - - @override - int get hashCode => who.hashCode; -} - -/// Total issuance was increased by `amount`, creating a credit to be balanced. -class Issued extends Event { - const Issued({required this.amount}); - - factory Issued._decode(_i1.Input input) { - return Issued(amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Issued': {'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - _i1.U128Codec.codec.encodeTo(amount, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Issued && other.amount == amount; - - @override - int get hashCode => amount.hashCode; -} - -/// Total issuance was decreased by `amount`, creating a debt to be balanced. -class Rescinded extends Event { - const Rescinded({required this.amount}); - - factory Rescinded._decode(_i1.Input input) { - return Rescinded(amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Rescinded': {'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(16, output); - _i1.U128Codec.codec.encodeTo(amount, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Rescinded && other.amount == amount; - - @override - int get hashCode => amount.hashCode; -} - -/// Some balance was locked. -class Locked extends Event { - 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)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Locked': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(17, 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); -} - -/// Some balance was unlocked. -class Unlocked extends Event { - 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)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Unlocked': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(18, 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); -} - -/// Some balance was frozen. -class Frozen extends Event { - 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)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Frozen': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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 Frozen && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); -} - -/// Some balance was thawed. -class Thawed extends Event { - 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)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Balance - final BigInt amount; - - @override - Map> toJson() => { - 'Thawed': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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 Thawed && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); -} - -/// The `TotalIssuance` was forcefully changed. -class TotalIssuanceForced extends Event { - 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)); - } - - /// T::Balance - final BigInt old; - - /// T::Balance - final BigInt new_; - - @override - Map> toJson() => { - 'TotalIssuanceForced': {'old': old, 'new': new_}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(old); - size = size + _i1.U128Codec.codec.sizeHint(new_); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(21, 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_; - - @override - int get hashCode => Object.hash(old, new_); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/account_data.dart b/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/account_data.dart deleted file mode 100644 index 751ca8ed..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/account_data.dart +++ /dev/null @@ -1,78 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -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}); - - factory AccountData.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Balance - final BigInt free; - - /// Balance - final BigInt reserved; - - /// Balance - final BigInt frozen; - - /// ExtraFlags - final _i2.ExtraFlags flags; - - static const $AccountDataCodec codec = $AccountDataCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'free': free, 'reserved': reserved, 'frozen': frozen, 'flags': flags}; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AccountData && - other.free == free && - other.reserved == reserved && - other.frozen == frozen && - other.flags == flags; - - @override - 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); - } - - @override - AccountData decode(_i1.Input input) { - return AccountData( - free: _i1.U128Codec.codec.decode(input), - reserved: _i1.U128Codec.codec.decode(input), - frozen: _i1.U128Codec.codec.decode(input), - flags: _i1.U128Codec.codec.decode(input), - ); - } - - @override - int sizeHint(AccountData obj) { - int size = 0; - size = size + _i1.U128Codec.codec.sizeHint(obj.free); - size = size + _i1.U128Codec.codec.sizeHint(obj.reserved); - size = size + _i1.U128Codec.codec.sizeHint(obj.frozen); - size = size + const _i2.ExtraFlagsCodec().sizeHint(obj.flags); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/adjustment_direction.dart b/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/adjustment_direction.dart deleted file mode 100644 index fa2c622f..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/adjustment_direction.dart +++ /dev/null @@ -1,48 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum AdjustmentDirection { - increase('Increase', 0), - decrease('Decrease', 1); - - const AdjustmentDirection(this.variantName, this.codecIndex); - - factory AdjustmentDirection.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $AdjustmentDirectionCodec codec = $AdjustmentDirectionCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $AdjustmentDirectionCodec with _i1.Codec { - const $AdjustmentDirectionCodec(); - - @override - AdjustmentDirection decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return AdjustmentDirection.increase; - case 1: - return AdjustmentDirection.decrease; - default: - throw Exception('AdjustmentDirection: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(AdjustmentDirection value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/balance_lock.dart b/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/balance_lock.dart deleted file mode 100644 index 9f9f90bc..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/balance_lock.dart +++ /dev/null @@ -1,69 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; -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}); - - factory BalanceLock.decode(_i1.Input input) { - return codec.decode(input); - } - - /// LockIdentifier - final List id; - - /// Balance - final BigInt amount; - - /// Reasons - final _i2.Reasons reasons; - - static const $BalanceLockCodec codec = $BalanceLockCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - 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; - - @override - 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); - } - - @override - BalanceLock decode(_i1.Input input) { - return BalanceLock( - id: const _i1.U8ArrayCodec(8).decode(input), - amount: _i1.U128Codec.codec.decode(input), - reasons: _i2.Reasons.codec.decode(input), - ); - } - - @override - int sizeHint(BalanceLock obj) { - int size = 0; - size = size + const _i1.U8ArrayCodec(8).sizeHint(obj.id); - size = size + _i1.U128Codec.codec.sizeHint(obj.amount); - size = size + _i2.Reasons.codec.sizeHint(obj.reasons); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/extra_flags.dart b/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/extra_flags.dart deleted file mode 100644 index 275f36a9..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/extra_flags.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef ExtraFlags = BigInt; - -class ExtraFlagsCodec with _i1.Codec { - const ExtraFlagsCodec(); - - @override - ExtraFlags decode(_i1.Input input) { - return _i1.U128Codec.codec.decode(input); - } - - @override - void encodeTo(ExtraFlags value, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(value, output); - } - - @override - int sizeHint(ExtraFlags value) { - return _i1.U128Codec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/reasons.dart b/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/reasons.dart deleted file mode 100644 index 8ed8b293..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/reasons.dart +++ /dev/null @@ -1,51 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum Reasons { - fee('Fee', 0), - misc('Misc', 1), - all('All', 2); - - const Reasons(this.variantName, this.codecIndex); - - factory Reasons.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ReasonsCodec codec = $ReasonsCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ReasonsCodec with _i1.Codec { - const $ReasonsCodec(); - - @override - Reasons decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Reasons.fee; - case 1: - return Reasons.misc; - case 2: - return Reasons.all; - default: - throw Exception('Reasons: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Reasons value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/reserve_data.dart b/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/reserve_data.dart deleted file mode 100644 index c1436d9a..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_balances/types/reserve_data.dart +++ /dev/null @@ -1,57 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -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}); - - factory ReserveData.decode(_i1.Input input) { - return codec.decode(input); - } - - /// ReserveIdentifier - final List id; - - /// Balance - final BigInt amount; - - static const $ReserveDataCodec codec = $ReserveDataCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - 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; - - @override - 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); - } - - @override - ReserveData decode(_i1.Input input) { - return ReserveData(id: const _i1.U8ArrayCodec(8).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - @override - int sizeHint(ReserveData obj) { - int size = 0; - size = size + const _i1.U8ArrayCodec(8).sizeHint(obj.id); - size = size + _i1.U128Codec.codec.sizeHint(obj.amount); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/conviction/conviction.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/conviction/conviction.dart deleted file mode 100644 index c1d63b68..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/conviction/conviction.dart +++ /dev/null @@ -1,63 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum Conviction { - none('None', 0), - locked1x('Locked1x', 1), - locked2x('Locked2x', 2), - locked3x('Locked3x', 3), - locked4x('Locked4x', 4), - locked5x('Locked5x', 5), - locked6x('Locked6x', 6); - - const Conviction(this.variantName, this.codecIndex); - - factory Conviction.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ConvictionCodec codec = $ConvictionCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ConvictionCodec with _i1.Codec { - const $ConvictionCodec(); - - @override - Conviction decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Conviction.none; - case 1: - return Conviction.locked1x; - case 2: - return Conviction.locked2x; - case 3: - return Conviction.locked3x; - case 4: - return Conviction.locked4x; - case 5: - return Conviction.locked5x; - case 6: - return Conviction.locked6x; - default: - throw Exception('Conviction: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Conviction value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/call.dart deleted file mode 100644 index 45074a76..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/call.dart +++ /dev/null @@ -1,498 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../sp_runtime/multiaddress/multi_address.dart' as _i4; -import '../conviction/conviction.dart' as _i5; -import '../vote/account_vote.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - Vote vote({required BigInt pollIndex, required _i3.AccountVote vote}) { - return Vote(pollIndex: pollIndex, vote: vote); - } - - Delegate delegate({ - required int class_, - required _i4.MultiAddress to, - required _i5.Conviction conviction, - required BigInt 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); - } - - 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); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Vote._decode(input); - case 1: - return Delegate._decode(input); - case 2: - return Undelegate._decode(input); - case 3: - return Unlock._decode(input); - case 4: - return RemoveVote._decode(input); - case 5: - return RemoveOtherVote._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case Vote: - (value as Vote).encodeTo(output); - break; - case Delegate: - (value as Delegate).encodeTo(output); - break; - case Undelegate: - (value as Undelegate).encodeTo(output); - break; - case Unlock: - (value as Unlock).encodeTo(output); - break; - case RemoveVote: - (value as RemoveVote).encodeTo(output); - break; - case RemoveOtherVote: - (value as RemoveOtherVote).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case Vote: - return (value as Vote)._sizeHint(); - case Delegate: - return (value as Delegate)._sizeHint(); - case Undelegate: - return (value as Undelegate)._sizeHint(); - case Unlock: - return (value as Unlock)._sizeHint(); - case RemoveVote: - return (value as RemoveVote)._sizeHint(); - case RemoveOtherVote: - return (value as RemoveOtherVote)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; -/// otherwise it is a vote to keep the status quo. -/// -/// The dispatch origin of this call must be _Signed_. -/// -/// - `poll_index`: The index of the poll to vote for. -/// - `vote`: The vote configuration. -/// -/// 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}); - - factory Vote._decode(_i1.Input input) { - return Vote(pollIndex: _i1.CompactBigIntCodec.codec.decode(input), vote: _i3.AccountVote.codec.decode(input)); - } - - /// PollIndexOf - final BigInt pollIndex; - - /// AccountVote> - final _i3.AccountVote vote; - - @override - Map> toJson() => { - 'vote': {'pollIndex': pollIndex, 'vote': vote.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(pollIndex); - size = size + _i3.AccountVote.codec.sizeHint(vote); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(pollIndex, vote); -} - -/// Delegate the voting power (with some given conviction) of the sending account for a -/// particular class of polls. -/// -/// The balance delegated is locked for as long as it's delegated, and thereafter for the -/// time appropriate for the conviction's lock period. -/// -/// The dispatch origin of this call must be _Signed_, and the signing account must either: -/// - be delegating already; or -/// - have no voting activity (if there is, then it will need to be removed through -/// `remove_vote`). -/// -/// - `to`: The account whose voting the `target` account's voting power will follow. -/// - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls -/// to this function are required. -/// - `conviction`: The conviction that will be attached to the delegated votes. When the -/// account is undelegated, the funds will be locked for the corresponding period. -/// - `balance`: The amount of the account's balance to be used in delegating. This must not -/// be more than the account's current balance. -/// -/// Emits `Delegated`. -/// -/// 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}); - - factory Delegate._decode(_i1.Input input) { - return Delegate( - class_: _i1.U16Codec.codec.decode(input), - to: _i4.MultiAddress.codec.decode(input), - conviction: _i5.Conviction.codec.decode(input), - balance: _i1.U128Codec.codec.decode(input), - ); - } - - /// ClassOf - final int class_; - - /// AccountIdLookupOf - final _i4.MultiAddress to; - - /// Conviction - final _i5.Conviction conviction; - - /// BalanceOf - final BigInt balance; - - @override - Map> toJson() => { - 'delegate': {'class': class_, 'to': to.toJson(), 'conviction': conviction.toJson(), 'balance': balance}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U16Codec.codec.sizeHint(class_); - size = size + _i4.MultiAddress.codec.sizeHint(to); - size = size + _i5.Conviction.codec.sizeHint(conviction); - size = size + _i1.U128Codec.codec.sizeHint(balance); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Delegate && - other.class_ == class_ && - other.to == to && - other.conviction == conviction && - other.balance == balance; - - @override - int get hashCode => Object.hash(class_, to, conviction, balance); -} - -/// Undelegate the voting power of the sending account for a particular class of polls. -/// -/// Tokens may be unlocked following once an amount of time consistent with the lock period -/// of the conviction with which the delegation was issued has passed. -/// -/// The dispatch origin of this call must be _Signed_ and the signing account must be -/// currently delegating. -/// -/// - `class`: The class of polls to remove the delegation from. -/// -/// Emits `Undelegated`. -/// -/// 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 Undelegate extends Call { - const Undelegate({required this.class_}); - - factory Undelegate._decode(_i1.Input input) { - return Undelegate(class_: _i1.U16Codec.codec.decode(input)); - } - - /// ClassOf - final int class_; - - @override - Map> toJson() => { - 'undelegate': {'class': class_}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U16Codec.codec.sizeHint(class_); - return size; - } - - void encodeTo(_i1.Output 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_; - - @override - int get hashCode => class_.hashCode; -} - -/// Remove the lock caused by prior voting/delegating which has expired within a particular -/// class. -/// -/// The dispatch origin of this call must be _Signed_. -/// -/// - `class`: The class of polls to unlock. -/// - `target`: The account to remove the lock on. -/// -/// Weight: `O(R)` with R number of vote of target. -class Unlock extends Call { - 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)); - } - - /// ClassOf - final int class_; - - /// AccountIdLookupOf - final _i4.MultiAddress target; - - @override - Map> toJson() => { - 'unlock': {'class': class_, 'target': target.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U16Codec.codec.sizeHint(class_); - size = size + _i4.MultiAddress.codec.sizeHint(target); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(class_, target); -} - -/// Remove a vote for a poll. -/// -/// If: -/// - the poll was cancelled, or -/// - the poll is ongoing, or -/// - the poll has ended such that -/// - the vote of the account was in opposition to the result; or -/// - there was no conviction to the account's vote; or -/// - the account made a split vote -/// ...then the vote is removed cleanly and a following call to `unlock` may result in more -/// funds being available. -/// -/// If, however, the poll has ended and: -/// - it finished corresponding to the vote of the account, and -/// - the account made a standard vote with conviction, and -/// - the lock period of the conviction is not over -/// ...then the lock will be aggregated into the overall account's lock, which may involve -/// *overlocking* (where the two locks are combined into a single lock that is the maximum -/// of both the amount locked and the time is it locked for). -/// -/// The dispatch origin of this call must be _Signed_, and the signer must have a vote -/// registered for poll `index`. -/// -/// - `index`: The index of poll of the vote to be removed. -/// - `class`: Optional parameter, if given it indicates the class of the poll. For polls -/// which have finished or are cancelled, this must be `Some`. -/// -/// 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}); - - factory RemoveVote._decode(_i1.Input input) { - return RemoveVote( - class_: const _i1.OptionCodec(_i1.U16Codec.codec).decode(input), - index: _i1.U32Codec.codec.decode(input), - ); - } - - /// Option> - final int? class_; - - /// PollIndexOf - final int index; - - @override - Map> toJson() => { - 'remove_vote': {'class': class_, 'index': index}, - }; - - int _sizeHint() { - int size = 1; - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is RemoveVote && other.class_ == class_ && other.index == index; - - @override - int get hashCode => Object.hash(class_, index); -} - -/// Remove a vote for a poll. -/// -/// If the `target` is equal to the signer, then this function is exactly equivalent to -/// `remove_vote`. If not equal to the signer, then the vote must have expired, -/// either because the poll was cancelled, because the voter lost the poll or -/// because the conviction period is over. -/// -/// The dispatch origin of this call must be _Signed_. -/// -/// - `target`: The account of the vote to be removed; this account must have voted for poll -/// `index`. -/// - `index`: The index of poll of the vote to be removed. -/// - `class`: The class of the poll. -/// -/// 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}); - - factory RemoveOtherVote._decode(_i1.Input input) { - return RemoveOtherVote( - target: _i4.MultiAddress.codec.decode(input), - class_: _i1.U16Codec.codec.decode(input), - index: _i1.U32Codec.codec.decode(input), - ); - } - - /// AccountIdLookupOf - final _i4.MultiAddress target; - - /// ClassOf - final int class_; - - /// PollIndexOf - final int index; - - @override - Map> toJson() => { - 'remove_other_vote': {'target': target.toJson(), 'class': class_, 'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i4.MultiAddress.codec.sizeHint(target); - size = size + _i1.U16Codec.codec.sizeHint(class_); - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is RemoveOtherVote && other.target == target && other.class_ == class_ && other.index == index; - - @override - int get hashCode => Object.hash(target, class_, index); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/error.dart deleted file mode 100644 index 1241e4d6..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/error.dart +++ /dev/null @@ -1,103 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// Poll is not ongoing. - notOngoing('NotOngoing', 0), - - /// The given account did not vote on the poll. - notVoter('NotVoter', 1), - - /// The actor has no permission to conduct the action. - noPermission('NoPermission', 2), - - /// The actor has no permission to conduct the action right now but will do in the future. - noPermissionYet('NoPermissionYet', 3), - - /// The account is already delegating. - alreadyDelegating('AlreadyDelegating', 4), - - /// The account currently has votes attached to it and the operation cannot succeed until - /// these are removed through `remove_vote`. - alreadyVoting('AlreadyVoting', 5), - - /// Too high a balance was provided that the account cannot afford. - insufficientFunds('InsufficientFunds', 6), - - /// The account is not currently delegating. - notDelegating('NotDelegating', 7), - - /// Delegation to oneself makes no sense. - nonsense('Nonsense', 8), - - /// Maximum number of votes reached. - maxVotesReached('MaxVotesReached', 9), - - /// The class must be supplied since it is not easily determinable from the state. - classNeeded('ClassNeeded', 10), - - /// The class ID supplied is invalid. - badClass('BadClass', 11); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.notOngoing; - case 1: - return Error.notVoter; - case 2: - return Error.noPermission; - case 3: - return Error.noPermissionYet; - case 4: - return Error.alreadyDelegating; - case 5: - return Error.alreadyVoting; - case 6: - return Error.insufficientFunds; - case 7: - return Error.notDelegating; - case 8: - return Error.nonsense; - case 9: - return Error.maxVotesReached; - case 10: - return Error.classNeeded; - case 11: - return Error.badClass; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/event.dart deleted file mode 100644 index 6acb06a4..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/pallet/event.dart +++ /dev/null @@ -1,264 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; - -import '../../sp_core/crypto/account_id32.dart' as _i3; -import '../vote/account_vote.dart' as _i4; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $Event { - const $Event(); - - Delegated delegated(_i3.AccountId32 value0, _i3.AccountId32 value1) { - return Delegated(value0, value1); - } - - Undelegated undelegated(_i3.AccountId32 value0) { - return Undelegated(value0); - } - - Voted voted({required _i3.AccountId32 who, required _i4.AccountVote vote}) { - return Voted(who: who, vote: vote); - } - - VoteRemoved voteRemoved({required _i3.AccountId32 who, required _i4.AccountVote vote}) { - return VoteRemoved(who: who, vote: vote); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Delegated._decode(input); - case 1: - return Undelegated._decode(input); - case 2: - return Voted._decode(input); - case 3: - return VoteRemoved._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case Delegated: - (value as Delegated).encodeTo(output); - break; - case Undelegated: - (value as Undelegated).encodeTo(output); - break; - case Voted: - (value as Voted).encodeTo(output); - break; - case VoteRemoved: - (value as VoteRemoved).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case Delegated: - return (value as Delegated)._sizeHint(); - case Undelegated: - return (value as Undelegated)._sizeHint(); - case Voted: - return (value as Voted)._sizeHint(); - case VoteRemoved: - return (value as VoteRemoved)._sizeHint(); - default: - 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); - - factory Delegated._decode(_i1.Input input) { - return Delegated(const _i1.U8ArrayCodec(32).decode(input), const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 value0; - - /// T::AccountId - final _i3.AccountId32 value1; - - @override - Map>> toJson() => { - 'Delegated': [value0.toList(), value1.toList()], - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(value0); - size = size + const _i3.AccountId32Codec().sizeHint(value1); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Delegated && _i5.listsEqual(other.value0, value0) && _i5.listsEqual(other.value1, value1); - - @override - int get hashCode => Object.hash(value0, value1); -} - -/// An \[account\] has cancelled a previous delegation operation. -class Undelegated extends Event { - const Undelegated(this.value0); - - factory Undelegated._decode(_i1.Input input) { - return Undelegated(const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 value0; - - @override - Map> toJson() => {'Undelegated': value0.toList()}; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is Undelegated && _i5.listsEqual(other.value0, value0); - - @override - int get hashCode => value0.hashCode; -} - -/// An account that has voted -class Voted extends Event { - const Voted({required this.who, required this.vote}); - - factory Voted._decode(_i1.Input input) { - return Voted(who: const _i1.U8ArrayCodec(32).decode(input), vote: _i4.AccountVote.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// AccountVote> - final _i4.AccountVote vote; - - @override - Map> toJson() => { - 'Voted': {'who': who.toList(), 'vote': vote.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i4.AccountVote.codec.sizeHint(vote); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i4.AccountVote.codec.encodeTo(vote, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is Voted && _i5.listsEqual(other.who, who) && other.vote == vote; - - @override - int get hashCode => Object.hash(who, vote); -} - -/// A vote that been removed -class VoteRemoved extends Event { - const VoteRemoved({required this.who, required this.vote}); - - factory VoteRemoved._decode(_i1.Input input) { - return VoteRemoved(who: const _i1.U8ArrayCodec(32).decode(input), vote: _i4.AccountVote.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// AccountVote> - final _i4.AccountVote vote; - - @override - Map> toJson() => { - 'VoteRemoved': {'who': who.toList(), 'vote': vote.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i4.AccountVote.codec.sizeHint(vote); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i4.AccountVote.codec.encodeTo(vote, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is VoteRemoved && _i5.listsEqual(other.who, who) && other.vote == vote; - - @override - int get hashCode => Object.hash(who, vote); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/types/delegations.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/types/delegations.dart deleted file mode 100644 index fdac6304..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/types/delegations.dart +++ /dev/null @@ -1,56 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -class Delegations { - const Delegations({required this.votes, required this.capital}); - - factory Delegations.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Balance - final BigInt votes; - - /// Balance - final BigInt capital; - - static const $DelegationsCodec codec = $DelegationsCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'votes': votes, 'capital': capital}; - - @override - bool operator ==(Object other) => - identical(this, other) || other is Delegations && other.votes == votes && other.capital == capital; - - @override - 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); - } - - @override - Delegations decode(_i1.Input input) { - return Delegations(votes: _i1.U128Codec.codec.decode(input), capital: _i1.U128Codec.codec.decode(input)); - } - - @override - int sizeHint(Delegations obj) { - int size = 0; - size = size + _i1.U128Codec.codec.sizeHint(obj.votes); - size = size + _i1.U128Codec.codec.sizeHint(obj.capital); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/types/tally.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/types/tally.dart deleted file mode 100644 index 6b84fb7d..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/types/tally.dart +++ /dev/null @@ -1,65 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -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}); - - factory Tally.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Votes - final BigInt ayes; - - /// Votes - final BigInt nays; - - /// Votes - final BigInt support; - - static const $TallyCodec codec = $TallyCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - 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; - - @override - 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); - } - - @override - Tally decode(_i1.Input input) { - return Tally( - ayes: _i1.U128Codec.codec.decode(input), - nays: _i1.U128Codec.codec.decode(input), - support: _i1.U128Codec.codec.decode(input), - ); - } - - @override - int sizeHint(Tally obj) { - int size = 0; - size = size + _i1.U128Codec.codec.sizeHint(obj.ayes); - size = size + _i1.U128Codec.codec.sizeHint(obj.nays); - size = size + _i1.U128Codec.codec.sizeHint(obj.support); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/account_vote.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/account_vote.dart deleted file mode 100644 index c0f7997b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/account_vote.dart +++ /dev/null @@ -1,222 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import 'vote.dart' as _i3; - -abstract class AccountVote { - const AccountVote(); - - factory AccountVote.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $AccountVoteCodec codec = $AccountVoteCodec(); - - static const $AccountVote values = $AccountVote(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $AccountVote { - const $AccountVote(); - - 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); - } - - SplitAbstain splitAbstain({required BigInt aye, required BigInt nay, required BigInt abstain}) { - return SplitAbstain(aye: aye, nay: nay, abstain: abstain); - } -} - -class $AccountVoteCodec with _i1.Codec { - const $AccountVoteCodec(); - - @override - AccountVote decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Standard._decode(input); - case 1: - return Split._decode(input); - case 2: - return SplitAbstain._decode(input); - default: - throw Exception('AccountVote: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(AccountVote value, _i1.Output output) { - switch (value.runtimeType) { - case Standard: - (value as Standard).encodeTo(output); - break; - case Split: - (value as Split).encodeTo(output); - break; - case SplitAbstain: - (value as SplitAbstain).encodeTo(output); - break; - default: - throw Exception('AccountVote: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(AccountVote value) { - switch (value.runtimeType) { - case Standard: - return (value as Standard)._sizeHint(); - case Split: - return (value as Split)._sizeHint(); - case SplitAbstain: - return (value as SplitAbstain)._sizeHint(); - default: - throw Exception('AccountVote: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Standard extends AccountVote { - 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)); - } - - /// Vote - final _i3.Vote vote; - - /// Balance - final BigInt balance; - - @override - Map> toJson() => { - 'Standard': {'vote': vote, 'balance': balance}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.VoteCodec().sizeHint(vote); - size = size + _i1.U128Codec.codec.sizeHint(balance); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(vote, balance); -} - -class Split extends AccountVote { - 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)); - } - - /// Balance - final BigInt aye; - - /// Balance - final BigInt nay; - - @override - Map> toJson() => { - 'Split': {'aye': aye, 'nay': nay}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(aye); - size = size + _i1.U128Codec.codec.sizeHint(nay); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(aye, nay); -} - -class SplitAbstain extends AccountVote { - const SplitAbstain({required this.aye, required this.nay, required this.abstain}); - - factory SplitAbstain._decode(_i1.Input input) { - return SplitAbstain( - aye: _i1.U128Codec.codec.decode(input), - nay: _i1.U128Codec.codec.decode(input), - abstain: _i1.U128Codec.codec.decode(input), - ); - } - - /// Balance - final BigInt aye; - - /// Balance - final BigInt nay; - - /// Balance - final BigInt abstain; - - @override - Map> toJson() => { - 'SplitAbstain': {'aye': aye, 'nay': nay, 'abstain': abstain}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(aye); - size = size + _i1.U128Codec.codec.sizeHint(nay); - size = size + _i1.U128Codec.codec.sizeHint(abstain); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SplitAbstain && other.aye == aye && other.nay == nay && other.abstain == abstain; - - @override - int get hashCode => Object.hash(aye, nay, abstain); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/casting.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/casting.dart deleted file mode 100644 index 851190cf..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/casting.dart +++ /dev/null @@ -1,87 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i6; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i7; - -import '../../tuples.dart' as _i2; -import '../types/delegations.dart' as _i4; -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}); - - factory Casting.decode(_i1.Input input) { - return codec.decode(input); - } - - /// BoundedVec<(PollIndex, AccountVote), MaxVotes> - final List<_i2.Tuple2> votes; - - /// Delegations - final _i4.Delegations delegations; - - /// PriorLock - final _i5.PriorLock prior; - - static const $CastingCodec codec = $CastingCodec(); - - _i6.Uint8List encode() { - return codec.encode(this); - } - - Map 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) || - other is Casting && - _i7.listsEqual(other.votes, votes) && - other.delegations == delegations && - other.prior == prior; - - @override - int get hashCode => Object.hash(votes, delegations, prior); -} - -class $CastingCodec with _i1.Codec { - const $CastingCodec(); - - @override - 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); - } - - @override - Casting decode(_i1.Input input) { - return Casting( - votes: const _i1.SequenceCodec<_i2.Tuple2>( - _i2.Tuple2Codec(_i1.U32Codec.codec, _i3.AccountVote.codec), - ).decode(input), - delegations: _i4.Delegations.codec.decode(input), - prior: _i5.PriorLock.codec.decode(input), - ); - } - - @override - int sizeHint(Casting obj) { - int size = 0; - size = - size + - const _i1.SequenceCodec<_i2.Tuple2>( - _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/resonance/types/pallet_conviction_voting/vote/delegating.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/delegating.dart deleted file mode 100644 index c18056c7..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/delegating.dart +++ /dev/null @@ -1,101 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i6; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i7; - -import '../../sp_core/crypto/account_id32.dart' as _i2; -import '../conviction/conviction.dart' as _i3; -import '../types/delegations.dart' as _i4; -import 'prior_lock.dart' as _i5; - -class Delegating { - const Delegating({ - required this.balance, - required this.target, - required this.conviction, - required this.delegations, - required this.prior, - }); - - factory Delegating.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Balance - final BigInt balance; - - /// AccountId - final _i2.AccountId32 target; - - /// Conviction - final _i3.Conviction conviction; - - /// Delegations - final _i4.Delegations delegations; - - /// PriorLock - final _i5.PriorLock prior; - - static const $DelegatingCodec codec = $DelegatingCodec(); - - _i6.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'balance': balance, - 'target': target.toList(), - 'conviction': conviction.toJson(), - 'delegations': delegations.toJson(), - 'prior': prior.toJson(), - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Delegating && - other.balance == balance && - _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); -} - -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); - } - - @override - Delegating decode(_i1.Input input) { - return Delegating( - balance: _i1.U128Codec.codec.decode(input), - target: const _i1.U8ArrayCodec(32).decode(input), - conviction: _i3.Conviction.codec.decode(input), - delegations: _i4.Delegations.codec.decode(input), - prior: _i5.PriorLock.codec.decode(input), - ); - } - - @override - int sizeHint(Delegating obj) { - int size = 0; - size = size + _i1.U128Codec.codec.sizeHint(obj.balance); - size = size + const _i2.AccountId32Codec().sizeHint(obj.target); - size = size + _i3.Conviction.codec.sizeHint(obj.conviction); - 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/resonance/types/pallet_conviction_voting/vote/prior_lock.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/prior_lock.dart deleted file mode 100644 index 34b7627f..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/prior_lock.dart +++ /dev/null @@ -1,56 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -class PriorLock { - const PriorLock(this.value0, this.value1); - - factory PriorLock.decode(_i1.Input input) { - return codec.decode(input); - } - - /// BlockNumber - final int value0; - - /// Balance - final BigInt value1; - - static const $PriorLockCodec codec = $PriorLockCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - List toJson() => [value0, value1]; - - @override - bool operator ==(Object other) => - identical(this, other) || other is PriorLock && other.value0 == value0 && other.value1 == value1; - - @override - 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); - } - - @override - PriorLock decode(_i1.Input input) { - return PriorLock(_i1.U32Codec.codec.decode(input), _i1.U128Codec.codec.decode(input)); - } - - @override - int sizeHint(PriorLock obj) { - int size = 0; - size = size + _i1.U32Codec.codec.sizeHint(obj.value0); - size = size + _i1.U128Codec.codec.sizeHint(obj.value1); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/vote.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/vote.dart deleted file mode 100644 index c78cd6dc..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/vote.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef Vote = int; - -class VoteCodec with _i1.Codec { - const VoteCodec(); - - @override - Vote decode(_i1.Input input) { - return _i1.U8Codec.codec.decode(input); - } - - @override - void encodeTo(Vote value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value, output); - } - - @override - int sizeHint(Vote value) { - return _i1.U8Codec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/voting.dart b/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/voting.dart deleted file mode 100644 index 4c150bb6..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_conviction_voting/vote/voting.dart +++ /dev/null @@ -1,148 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import 'casting.dart' as _i3; -import 'delegating.dart' as _i4; - -abstract class Voting { - const Voting(); - - factory Voting.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $VotingCodec codec = $VotingCodec(); - - static const $Voting values = $Voting(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Voting { - const $Voting(); - - Casting casting(_i3.Casting value0) { - return Casting(value0); - } - - Delegating delegating(_i4.Delegating value0) { - return Delegating(value0); - } -} - -class $VotingCodec with _i1.Codec { - const $VotingCodec(); - - @override - Voting decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Casting._decode(input); - case 1: - return Delegating._decode(input); - default: - throw Exception('Voting: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Voting value, _i1.Output output) { - switch (value.runtimeType) { - case Casting: - (value as Casting).encodeTo(output); - break; - case Delegating: - (value as Delegating).encodeTo(output); - break; - default: - throw Exception('Voting: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Voting value) { - switch (value.runtimeType) { - case Casting: - return (value as Casting)._sizeHint(); - case Delegating: - return (value as Delegating)._sizeHint(); - default: - throw Exception('Voting: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Casting extends Voting { - const Casting(this.value0); - - factory Casting._decode(_i1.Input input) { - return Casting(_i3.Casting.codec.decode(input)); - } - - /// Casting - final _i3.Casting value0; - - @override - Map> toJson() => {'Casting': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i3.Casting.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Delegating extends Voting { - const Delegating(this.value0); - - factory Delegating._decode(_i1.Input input) { - return Delegating(_i4.Delegating.codec.decode(input)); - } - - /// Delegating - final _i4.Delegating value0; - - @override - Map> toJson() => {'Delegating': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i4.Delegating.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/airdrop_metadata.dart b/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/airdrop_metadata.dart deleted file mode 100644 index 2872952a..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/airdrop_metadata.dart +++ /dev/null @@ -1,98 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../sp_core/crypto/account_id32.dart' as _i2; - -class AirdropMetadata { - const AirdropMetadata({ - required this.merkleRoot, - required this.creator, - required this.balance, - this.vestingPeriod, - this.vestingDelay, - }); - - factory AirdropMetadata.decode(_i1.Input input) { - return codec.decode(input); - } - - /// MerkleHash - final List merkleRoot; - - /// AccountId - final _i2.AccountId32 creator; - - /// Balance - final BigInt balance; - - /// Option - final int? vestingPeriod; - - /// Option - final int? vestingDelay; - - static const $AirdropMetadataCodec codec = $AirdropMetadataCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'merkleRoot': merkleRoot.toList(), - 'creator': creator.toList(), - 'balance': balance, - 'vestingPeriod': vestingPeriod, - 'vestingDelay': vestingDelay, - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AirdropMetadata && - _i4.listsEqual(other.merkleRoot, merkleRoot) && - _i4.listsEqual(other.creator, creator) && - other.balance == balance && - other.vestingPeriod == vestingPeriod && - other.vestingDelay == vestingDelay; - - @override - int get hashCode => Object.hash(merkleRoot, creator, balance, vestingPeriod, vestingDelay); -} - -class $AirdropMetadataCodec with _i1.Codec { - const $AirdropMetadataCodec(); - - @override - void encodeTo(AirdropMetadata obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.merkleRoot, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.creator, output); - _i1.U128Codec.codec.encodeTo(obj.balance, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(obj.vestingPeriod, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(obj.vestingDelay, output); - } - - @override - AirdropMetadata decode(_i1.Input input) { - return AirdropMetadata( - merkleRoot: const _i1.U8ArrayCodec(32).decode(input), - creator: const _i1.U8ArrayCodec(32).decode(input), - balance: _i1.U128Codec.codec.decode(input), - vestingPeriod: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - vestingDelay: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - ); - } - - @override - int sizeHint(AirdropMetadata obj) { - int size = 0; - size = size + const _i1.U8ArrayCodec(32).sizeHint(obj.merkleRoot); - size = size + const _i2.AccountId32Codec().sizeHint(obj.creator); - size = size + _i1.U128Codec.codec.sizeHint(obj.balance); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.vestingPeriod); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.vestingDelay); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/call.dart deleted file mode 100644 index be069d86..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/call.dart +++ /dev/null @@ -1,361 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../sp_core/crypto/account_id32.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - CreateAirdrop createAirdrop({required List merkleRoot, int? vestingPeriod, int? vestingDelay}) { - return CreateAirdrop(merkleRoot: merkleRoot, vestingPeriod: vestingPeriod, vestingDelay: vestingDelay); - } - - FundAirdrop fundAirdrop({required int airdropId, required BigInt amount}) { - return FundAirdrop(airdropId: airdropId, amount: amount); - } - - Claim claim({ - required int airdropId, - required _i3.AccountId32 recipient, - required BigInt amount, - required List> merkleProof, - }) { - return Claim(airdropId: airdropId, recipient: recipient, amount: amount, merkleProof: merkleProof); - } - - DeleteAirdrop deleteAirdrop({required int airdropId}) { - return DeleteAirdrop(airdropId: airdropId); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return CreateAirdrop._decode(input); - case 1: - return FundAirdrop._decode(input); - case 2: - return Claim._decode(input); - case 3: - return DeleteAirdrop._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case CreateAirdrop: - (value as CreateAirdrop).encodeTo(output); - break; - case FundAirdrop: - (value as FundAirdrop).encodeTo(output); - break; - case Claim: - (value as Claim).encodeTo(output); - break; - case DeleteAirdrop: - (value as DeleteAirdrop).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case CreateAirdrop: - return (value as CreateAirdrop)._sizeHint(); - case FundAirdrop: - return (value as FundAirdrop)._sizeHint(); - case Claim: - return (value as Claim)._sizeHint(); - case DeleteAirdrop: - return (value as DeleteAirdrop)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Create a new airdrop with a Merkle root. -/// -/// The Merkle root is a cryptographic hash that represents all valid claims -/// for this airdrop. Users will later provide Merkle proofs to verify their -/// eligibility to claim tokens. -/// -/// # Parameters -/// -/// * `origin` - The origin of the call (must be signed) -/// * `merkle_root` - The Merkle root hash representing all valid claims -/// * `vesting_period` - Optional vesting period for the airdrop -/// * `vesting_delay` - Optional delay before vesting starts -class CreateAirdrop extends Call { - const CreateAirdrop({required this.merkleRoot, this.vestingPeriod, this.vestingDelay}); - - factory CreateAirdrop._decode(_i1.Input input) { - return CreateAirdrop( - merkleRoot: const _i1.U8ArrayCodec(32).decode(input), - vestingPeriod: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - vestingDelay: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - ); - } - - /// MerkleRoot - final List merkleRoot; - - /// Option> - final int? vestingPeriod; - - /// Option> - final int? vestingDelay; - - @override - Map> toJson() => { - 'create_airdrop': {'merkleRoot': merkleRoot.toList(), 'vestingPeriod': vestingPeriod, 'vestingDelay': vestingDelay}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(32).sizeHint(merkleRoot); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(vestingPeriod); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(vestingDelay); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(merkleRoot, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(vestingPeriod, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(vestingDelay, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is CreateAirdrop && - _i4.listsEqual(other.merkleRoot, merkleRoot) && - other.vestingPeriod == vestingPeriod && - other.vestingDelay == vestingDelay; - - @override - int get hashCode => Object.hash(merkleRoot, vestingPeriod, vestingDelay); -} - -/// Fund an existing airdrop with tokens. -/// -/// This function transfers tokens from the caller to the airdrop's account, -/// making them available for users to claim. -/// -/// # Parameters -/// -/// * `origin` - The origin of the call (must be signed) -/// * `airdrop_id` - The ID of the airdrop to fund -/// * `amount` - The amount of tokens to add to the airdrop -/// -/// # Errors -/// -/// * `AirdropNotFound` - If the specified airdrop does not exist -class FundAirdrop extends Call { - const FundAirdrop({required this.airdropId, required this.amount}); - - factory FundAirdrop._decode(_i1.Input input) { - return FundAirdrop(airdropId: _i1.U32Codec.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// AirdropId - final int airdropId; - - /// BalanceOf - final BigInt amount; - - @override - Map> toJson() => { - 'fund_airdrop': {'airdropId': airdropId, 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(airdropId); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - _i1.U128Codec.codec.encodeTo(amount, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is FundAirdrop && other.airdropId == airdropId && other.amount == amount; - - @override - int get hashCode => Object.hash(airdropId, amount); -} - -/// Claim tokens from an airdrop by providing a Merkle proof. -/// -/// Users can claim their tokens by providing a proof of their eligibility. -/// The proof is verified against the airdrop's Merkle root. -/// Anyone can trigger a claim for any eligible recipient. -/// -/// # Parameters -/// -/// * `origin` - The origin of the call -/// * `airdrop_id` - The ID of the airdrop to claim from -/// * `amount` - The amount of tokens to claim -/// * `merkle_proof` - The Merkle proof verifying eligibility -/// -/// # Errors -/// -/// * `AirdropNotFound` - If the specified airdrop does not exist -/// * `AlreadyClaimed` - If the recipient has already claimed from this airdrop -/// * `InvalidProof` - If the provided Merkle proof is invalid -/// * `InsufficientAirdropBalance` - If the airdrop doesn't have enough tokens -class Claim extends Call { - const Claim({required this.airdropId, required this.recipient, required this.amount, required this.merkleProof}); - - factory Claim._decode(_i1.Input input) { - return Claim( - airdropId: _i1.U32Codec.codec.decode(input), - recipient: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - merkleProof: const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).decode(input), - ); - } - - /// AirdropId - final int airdropId; - - /// T::AccountId - final _i3.AccountId32 recipient; - - /// BalanceOf - final BigInt amount; - - /// BoundedVec - final List> merkleProof; - - @override - Map> toJson() => { - 'claim': { - 'airdropId': airdropId, - 'recipient': recipient.toList(), - 'amount': amount, - 'merkleProof': merkleProof.map((value) => value.toList()).toList(), - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(airdropId); - size = size + const _i3.AccountId32Codec().sizeHint(recipient); - size = size + _i1.U128Codec.codec.sizeHint(amount); - size = size + const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).sizeHint(merkleProof); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - const _i1.U8ArrayCodec(32).encodeTo(recipient, output); - _i1.U128Codec.codec.encodeTo(amount, output); - const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).encodeTo(merkleProof, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Claim && - other.airdropId == airdropId && - _i4.listsEqual(other.recipient, recipient) && - other.amount == amount && - _i4.listsEqual(other.merkleProof, merkleProof); - - @override - int get hashCode => Object.hash(airdropId, recipient, amount, merkleProof); -} - -/// Delete an airdrop and reclaim any remaining funds. -/// -/// This function allows the creator of an airdrop to delete it and reclaim -/// any remaining tokens that haven't been claimed. -/// -/// # Parameters -/// -/// * `origin` - The origin of the call (must be the airdrop creator) -/// * `airdrop_id` - The ID of the airdrop to delete -/// -/// # Errors -/// -/// * `AirdropNotFound` - If the specified airdrop does not exist -/// * `NotAirdropCreator` - If the caller is not the creator of the airdrop -class DeleteAirdrop extends Call { - const DeleteAirdrop({required this.airdropId}); - - factory DeleteAirdrop._decode(_i1.Input input) { - return DeleteAirdrop(airdropId: _i1.U32Codec.codec.decode(input)); - } - - /// AirdropId - final int airdropId; - - @override - Map> toJson() => { - 'delete_airdrop': {'airdropId': airdropId}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(airdropId); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is DeleteAirdrop && other.airdropId == airdropId; - - @override - int get hashCode => airdropId.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/error.dart deleted file mode 100644 index 32d472bc..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/error.dart +++ /dev/null @@ -1,67 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// The specified airdrop does not exist. - airdropNotFound('AirdropNotFound', 0), - - /// The airdrop does not have sufficient balance for this operation. - insufficientAirdropBalance('InsufficientAirdropBalance', 1), - - /// The user has already claimed from this airdrop. - alreadyClaimed('AlreadyClaimed', 2), - - /// The provided Merkle proof is invalid. - invalidProof('InvalidProof', 3), - - /// Only the creator of an airdrop can delete it. - notAirdropCreator('NotAirdropCreator', 4); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.airdropNotFound; - case 1: - return Error.insufficientAirdropBalance; - case 2: - return Error.alreadyClaimed; - case 3: - return Error.invalidProof; - case 4: - return Error.notAirdropCreator; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/event.dart deleted file mode 100644 index 76df7d4c..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_merkle_airdrop/pallet/event.dart +++ /dev/null @@ -1,297 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; - -import '../../sp_core/crypto/account_id32.dart' as _i4; -import '../airdrop_metadata.dart' as _i3; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - AirdropCreated airdropCreated({required int airdropId, required _i3.AirdropMetadata airdropMetadata}) { - return AirdropCreated(airdropId: airdropId, airdropMetadata: airdropMetadata); - } - - AirdropFunded airdropFunded({required int airdropId, required BigInt amount}) { - return AirdropFunded(airdropId: airdropId, amount: amount); - } - - Claimed claimed({required int airdropId, required _i4.AccountId32 account, required BigInt amount}) { - return Claimed(airdropId: airdropId, account: account, amount: amount); - } - - AirdropDeleted airdropDeleted({required int airdropId}) { - return AirdropDeleted(airdropId: airdropId); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return AirdropCreated._decode(input); - case 1: - return AirdropFunded._decode(input); - case 2: - return Claimed._decode(input); - case 3: - return AirdropDeleted._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case AirdropCreated: - (value as AirdropCreated).encodeTo(output); - break; - case AirdropFunded: - (value as AirdropFunded).encodeTo(output); - break; - case Claimed: - (value as Claimed).encodeTo(output); - break; - case AirdropDeleted: - (value as AirdropDeleted).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case AirdropCreated: - return (value as AirdropCreated)._sizeHint(); - case AirdropFunded: - return (value as AirdropFunded)._sizeHint(); - case Claimed: - return (value as Claimed)._sizeHint(); - case AirdropDeleted: - return (value as AirdropDeleted)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// A new airdrop has been created. -/// -/// Parameters: [airdrop_id, merkle_root] -class AirdropCreated extends Event { - const AirdropCreated({required this.airdropId, required this.airdropMetadata}); - - factory AirdropCreated._decode(_i1.Input input) { - return AirdropCreated( - airdropId: _i1.U32Codec.codec.decode(input), - airdropMetadata: _i3.AirdropMetadata.codec.decode(input), - ); - } - - /// AirdropId - /// The ID of the created airdrop - final int airdropId; - - /// AirdropMetadataFor - /// Airdrop metadata - final _i3.AirdropMetadata airdropMetadata; - - @override - Map> toJson() => { - 'AirdropCreated': {'airdropId': airdropId, 'airdropMetadata': airdropMetadata.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(airdropId); - size = size + _i3.AirdropMetadata.codec.sizeHint(airdropMetadata); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - _i3.AirdropMetadata.codec.encodeTo(airdropMetadata, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AirdropCreated && other.airdropId == airdropId && other.airdropMetadata == airdropMetadata; - - @override - int get hashCode => Object.hash(airdropId, airdropMetadata); -} - -/// An airdrop has been funded with tokens. -/// -/// Parameters: [airdrop_id, amount] -class AirdropFunded extends Event { - const AirdropFunded({required this.airdropId, required this.amount}); - - factory AirdropFunded._decode(_i1.Input input) { - return AirdropFunded(airdropId: _i1.U32Codec.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// AirdropId - /// The ID of the funded airdrop - final int airdropId; - - /// BalanceOf - /// The amount of tokens added to the airdrop - final BigInt amount; - - @override - Map> toJson() => { - 'AirdropFunded': {'airdropId': airdropId, 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(airdropId); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - _i1.U128Codec.codec.encodeTo(amount, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is AirdropFunded && other.airdropId == airdropId && other.amount == amount; - - @override - int get hashCode => Object.hash(airdropId, amount); -} - -/// A user has claimed tokens from an airdrop. -/// -/// Parameters: [airdrop_id, account, amount] -class Claimed extends Event { - const Claimed({required this.airdropId, required this.account, required this.amount}); - - factory Claimed._decode(_i1.Input input) { - return Claimed( - airdropId: _i1.U32Codec.codec.decode(input), - account: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// AirdropId - /// The ID of the airdrop claimed from - final int airdropId; - - /// T::AccountId - /// The account that claimed the tokens - final _i4.AccountId32 account; - - /// BalanceOf - /// The amount of tokens claimed - final BigInt amount; - - @override - Map> toJson() => { - 'Claimed': {'airdropId': airdropId, 'account': account.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(airdropId); - size = size + const _i4.AccountId32Codec().sizeHint(account); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); - _i1.U128Codec.codec.encodeTo(amount, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Claimed && - other.airdropId == airdropId && - _i5.listsEqual(other.account, account) && - other.amount == amount; - - @override - int get hashCode => Object.hash(airdropId, account, amount); -} - -/// An airdrop has been deleted. -/// -/// Parameters: [airdrop_id] -class AirdropDeleted extends Event { - const AirdropDeleted({required this.airdropId}); - - factory AirdropDeleted._decode(_i1.Input input) { - return AirdropDeleted(airdropId: _i1.U32Codec.codec.decode(input)); - } - - /// AirdropId - /// The ID of the deleted airdrop - final int airdropId; - - @override - Map> toJson() => { - 'AirdropDeleted': {'airdropId': airdropId}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(airdropId); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is AirdropDeleted && other.airdropId == airdropId; - - @override - int get hashCode => airdropId.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_mining_rewards/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_mining_rewards/pallet/event.dart deleted file mode 100644 index 081e7da5..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_mining_rewards/pallet/event.dart +++ /dev/null @@ -1,217 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../sp_core/crypto/account_id32.dart' as _i3; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - 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); - } - - TreasuryRewarded treasuryRewarded({required BigInt reward}) { - return TreasuryRewarded(reward: reward); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return MinerRewarded._decode(input); - case 1: - return FeesCollected._decode(input); - case 2: - return TreasuryRewarded._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case MinerRewarded: - (value as MinerRewarded).encodeTo(output); - break; - case FeesCollected: - (value as FeesCollected).encodeTo(output); - break; - case TreasuryRewarded: - (value as TreasuryRewarded).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case MinerRewarded: - return (value as MinerRewarded)._sizeHint(); - case FeesCollected: - return (value as FeesCollected)._sizeHint(); - case TreasuryRewarded: - return (value as TreasuryRewarded)._sizeHint(); - default: - 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}); - - factory MinerRewarded._decode(_i1.Input input) { - return MinerRewarded(miner: const _i1.U8ArrayCodec(32).decode(input), reward: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - /// Miner account - final _i3.AccountId32 miner; - - /// BalanceOf - /// Total reward (base + fees) - final BigInt reward; - - @override - Map> toJson() => { - 'MinerRewarded': {'miner': miner.toList(), 'reward': reward}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(miner); - size = size + _i1.U128Codec.codec.sizeHint(reward); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory FeesCollected._decode(_i1.Input input) { - return FeesCollected(amount: _i1.U128Codec.codec.decode(input), total: _i1.U128Codec.codec.decode(input)); - } - - /// BalanceOf - /// The amount collected - final BigInt amount; - - /// BalanceOf - /// Total fees waiting for distribution - final BigInt total; - - @override - Map> toJson() => { - 'FeesCollected': {'amount': amount, 'total': total}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(amount); - size = size + _i1.U128Codec.codec.sizeHint(total); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(amount, total); -} - -/// Rewards were sent to Treasury when no miner was specified -class TreasuryRewarded extends Event { - const TreasuryRewarded({required this.reward}); - - factory TreasuryRewarded._decode(_i1.Input input) { - return TreasuryRewarded(reward: _i1.U128Codec.codec.decode(input)); - } - - /// BalanceOf - /// Total reward (base + fees) - final BigInt reward; - - @override - Map> toJson() => { - 'TreasuryRewarded': {'reward': reward}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(reward); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => reward.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/old_request_status.dart b/quantus_sdk/lib/generated/resonance/types/pallet_preimage/old_request_status.dart deleted file mode 100644 index 69303e64..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/old_request_status.dart +++ /dev/null @@ -1,200 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../sp_core/crypto/account_id32.dart' as _i4; -import '../tuples.dart' as _i3; - -abstract class OldRequestStatus { - const OldRequestStatus(); - - factory OldRequestStatus.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $OldRequestStatusCodec codec = $OldRequestStatusCodec(); - - static const $OldRequestStatus values = $OldRequestStatus(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $OldRequestStatus { - const $OldRequestStatus(); - - 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); - } -} - -class $OldRequestStatusCodec with _i1.Codec { - const $OldRequestStatusCodec(); - - @override - OldRequestStatus decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Unrequested._decode(input); - case 1: - return Requested._decode(input); - default: - throw Exception('OldRequestStatus: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(OldRequestStatus value, _i1.Output output) { - switch (value.runtimeType) { - case Unrequested: - (value as Unrequested).encodeTo(output); - break; - case Requested: - (value as Requested).encodeTo(output); - break; - default: - throw Exception('OldRequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(OldRequestStatus value) { - switch (value.runtimeType) { - case Unrequested: - return (value as Unrequested)._sizeHint(); - case Requested: - return (value as Requested)._sizeHint(); - default: - throw Exception('OldRequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Unrequested extends OldRequestStatus { - const Unrequested({required this.deposit, required this.len}); - - factory Unrequested._decode(_i1.Input input) { - return Unrequested( - deposit: const _i3.Tuple2Codec<_i4.AccountId32, BigInt>( - _i4.AccountId32Codec(), - _i1.U128Codec.codec, - ).decode(input), - len: _i1.U32Codec.codec.decode(input), - ); - } - - /// (AccountId, Balance) - final _i3.Tuple2<_i4.AccountId32, BigInt> deposit; - - /// u32 - final int len; - - @override - Map> toJson() => { - '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 + _i1.U32Codec.codec.sizeHint(len); - return size; - } - - void encodeTo(_i1.Output 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is Unrequested && other.deposit == deposit && other.len == len; - - @override - int get hashCode => Object.hash(deposit, len); -} - -class Requested extends OldRequestStatus { - 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), - count: _i1.U32Codec.codec.decode(input), - len: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - ); - } - - /// Option<(AccountId, Balance)> - final _i3.Tuple2<_i4.AccountId32, BigInt>? deposit; - - /// u32 - final int count; - - /// Option - final int? len; - - @override - Map> toJson() => { - 'Requested': { - 'deposit': [deposit?.value0.toList(), deposit?.value1], - 'count': count, - 'len': len, - }, - }; - - int _sizeHint() { - int size = 1; - size = - size + - const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, BigInt>>( - _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); - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Requested && other.deposit == deposit && other.count == count && other.len == len; - - @override - int get hashCode => Object.hash(deposit, count, len); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/call.dart deleted file mode 100644 index d9d96ac2..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/call.dart +++ /dev/null @@ -1,310 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../primitive_types/h256.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map>> toJson(); -} - -class $Call { - const $Call(); - - NotePreimage notePreimage({required List bytes}) { - return NotePreimage(bytes: bytes); - } - - UnnotePreimage unnotePreimage({required _i3.H256 hash}) { - return UnnotePreimage(hash: hash); - } - - RequestPreimage requestPreimage({required _i3.H256 hash}) { - return RequestPreimage(hash: hash); - } - - UnrequestPreimage unrequestPreimage({required _i3.H256 hash}) { - return UnrequestPreimage(hash: hash); - } - - EnsureUpdated ensureUpdated({required List<_i3.H256> hashes}) { - return EnsureUpdated(hashes: hashes); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return NotePreimage._decode(input); - case 1: - return UnnotePreimage._decode(input); - case 2: - return RequestPreimage._decode(input); - case 3: - return UnrequestPreimage._decode(input); - case 4: - return EnsureUpdated._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case NotePreimage: - (value as NotePreimage).encodeTo(output); - break; - case UnnotePreimage: - (value as UnnotePreimage).encodeTo(output); - break; - case RequestPreimage: - (value as RequestPreimage).encodeTo(output); - break; - case UnrequestPreimage: - (value as UnrequestPreimage).encodeTo(output); - break; - case EnsureUpdated: - (value as EnsureUpdated).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case NotePreimage: - return (value as NotePreimage)._sizeHint(); - case UnnotePreimage: - return (value as UnnotePreimage)._sizeHint(); - case RequestPreimage: - return (value as RequestPreimage)._sizeHint(); - case UnrequestPreimage: - return (value as UnrequestPreimage)._sizeHint(); - case EnsureUpdated: - return (value as EnsureUpdated)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Register a preimage on-chain. -/// -/// If the preimage was previously requested, no fees or deposits are taken for providing -/// the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. -class NotePreimage extends Call { - const NotePreimage({required this.bytes}); - - factory NotePreimage._decode(_i1.Input input) { - return NotePreimage(bytes: _i1.U8SequenceCodec.codec.decode(input)); - } - - /// Vec - final List bytes; - - @override - Map>> toJson() => { - 'note_preimage': {'bytes': bytes}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8SequenceCodec.codec.sizeHint(bytes); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => bytes.hashCode; -} - -/// Clear an unrequested preimage from the runtime storage. -/// -/// If `len` is provided, then it will be a much cheaper operation. -/// -/// - `hash`: The hash of the preimage to be removed from the store. -/// - `len`: The length of the preimage of `hash`. -class UnnotePreimage extends Call { - const UnnotePreimage({required this.hash}); - - factory UnnotePreimage._decode(_i1.Input input) { - return UnnotePreimage(hash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::Hash - final _i3.H256 hash; - - @override - Map>> toJson() => { - 'unnote_preimage': {'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.H256Codec().sizeHint(hash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => hash.hashCode; -} - -/// Request a preimage be uploaded to the chain without paying any fees or deposits. -/// -/// If the preimage requests has already been provided on-chain, we unreserve any deposit -/// a user may have paid, and take the control of the preimage out of their hands. -class RequestPreimage extends Call { - const RequestPreimage({required this.hash}); - - factory RequestPreimage._decode(_i1.Input input) { - return RequestPreimage(hash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::Hash - final _i3.H256 hash; - - @override - Map>> toJson() => { - 'request_preimage': {'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.H256Codec().sizeHint(hash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => hash.hashCode; -} - -/// Clear a previously made request for a preimage. -/// -/// NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. -class UnrequestPreimage extends Call { - const UnrequestPreimage({required this.hash}); - - factory UnrequestPreimage._decode(_i1.Input input) { - return UnrequestPreimage(hash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::Hash - final _i3.H256 hash; - - @override - Map>> toJson() => { - 'unrequest_preimage': {'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.H256Codec().sizeHint(hash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => hash.hashCode; -} - -/// Ensure that the a bulk of pre-images is upgraded. -/// -/// The caller pays no fee if at least 90% of pre-images were successfully updated. -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)); - } - - /// Vec - final List<_i3.H256> hashes; - - @override - Map>>> toJson() => { - '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); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => hashes.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/error.dart deleted file mode 100644 index 596aaa89..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/error.dart +++ /dev/null @@ -1,82 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// Preimage is too large to store on-chain. - tooBig('TooBig', 0), - - /// Preimage has already been noted on-chain. - alreadyNoted('AlreadyNoted', 1), - - /// The user is not authorized to perform this action. - notAuthorized('NotAuthorized', 2), - - /// The preimage cannot be removed since it has not yet been noted. - notNoted('NotNoted', 3), - - /// A preimage may not be removed when there are outstanding requests. - requested('Requested', 4), - - /// The preimage request cannot be removed since no outstanding requests exist. - notRequested('NotRequested', 5), - - /// More than `MAX_HASH_UPGRADE_BULK_COUNT` hashes were requested to be upgraded at once. - tooMany('TooMany', 6), - - /// Too few hashes were requested to be upgraded (i.e. zero). - tooFew('TooFew', 7); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.tooBig; - case 1: - return Error.alreadyNoted; - case 2: - return Error.notAuthorized; - case 3: - return Error.notNoted; - case 4: - return Error.requested; - case 5: - return Error.notRequested; - case 6: - return Error.tooMany; - case 7: - return Error.tooFew; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/event.dart deleted file mode 100644 index 26f10fba..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/event.dart +++ /dev/null @@ -1,200 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../primitive_types/h256.dart' as _i3; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map>> toJson(); -} - -class $Event { - const $Event(); - - Noted noted({required _i3.H256 hash}) { - return Noted(hash: hash); - } - - Requested requested({required _i3.H256 hash}) { - return Requested(hash: hash); - } - - Cleared cleared({required _i3.H256 hash}) { - return Cleared(hash: hash); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Noted._decode(input); - case 1: - return Requested._decode(input); - case 2: - return Cleared._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case Noted: - (value as Noted).encodeTo(output); - break; - case Requested: - (value as Requested).encodeTo(output); - break; - case Cleared: - (value as Cleared).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case Noted: - return (value as Noted)._sizeHint(); - case Requested: - return (value as Requested)._sizeHint(); - case Cleared: - return (value as Cleared)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// A preimage has been noted. -class Noted extends Event { - const Noted({required this.hash}); - - factory Noted._decode(_i1.Input input) { - return Noted(hash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::Hash - final _i3.H256 hash; - - @override - Map>> toJson() => { - 'Noted': {'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.H256Codec().sizeHint(hash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => hash.hashCode; -} - -/// A preimage has been requested. -class Requested extends Event { - const Requested({required this.hash}); - - factory Requested._decode(_i1.Input input) { - return Requested(hash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::Hash - final _i3.H256 hash; - - @override - Map>> toJson() => { - 'Requested': {'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.H256Codec().sizeHint(hash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => hash.hashCode; -} - -/// A preimage has ben cleared. -class Cleared extends Event { - const Cleared({required this.hash}); - - factory Cleared._decode(_i1.Input input) { - return Cleared(hash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::Hash - final _i3.H256 hash; - - @override - Map>> toJson() => { - 'Cleared': {'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.H256Codec().sizeHint(hash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => hash.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/hold_reason.dart b/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/hold_reason.dart deleted file mode 100644 index ed80e5ab..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/pallet/hold_reason.dart +++ /dev/null @@ -1,45 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum HoldReason { - preimage('Preimage', 0); - - const HoldReason(this.variantName, this.codecIndex); - - factory HoldReason.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $HoldReasonCodec codec = $HoldReasonCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $HoldReasonCodec with _i1.Codec { - const $HoldReasonCodec(); - - @override - HoldReason decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return HoldReason.preimage; - default: - throw Exception('HoldReason: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(HoldReason value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/request_status.dart b/quantus_sdk/lib/generated/resonance/types/pallet_preimage/request_status.dart deleted file mode 100644 index c3a46ad8..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_preimage/request_status.dart +++ /dev/null @@ -1,208 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../quantus_runtime/governance/definitions/preimage_deposit.dart' as _i5; -import '../sp_core/crypto/account_id32.dart' as _i4; -import '../tuples.dart' as _i3; - -abstract class RequestStatus { - const RequestStatus(); - - factory RequestStatus.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $RequestStatusCodec codec = $RequestStatusCodec(); - - static const $RequestStatus values = $RequestStatus(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $RequestStatus { - const $RequestStatus(); - - Unrequested unrequested({required _i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit> ticket, required int len}) { - return Unrequested(ticket: ticket, len: len); - } - - Requested requested({ - _i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit>? maybeTicket, - required int count, - int? maybeLen, - }) { - return Requested(maybeTicket: maybeTicket, count: count, maybeLen: maybeLen); - } -} - -class $RequestStatusCodec with _i1.Codec { - const $RequestStatusCodec(); - - @override - RequestStatus decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Unrequested._decode(input); - case 1: - return Requested._decode(input); - default: - throw Exception('RequestStatus: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(RequestStatus value, _i1.Output output) { - switch (value.runtimeType) { - case Unrequested: - (value as Unrequested).encodeTo(output); - break; - case Requested: - (value as Requested).encodeTo(output); - break; - default: - throw Exception('RequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(RequestStatus value) { - switch (value.runtimeType) { - case Unrequested: - return (value as Unrequested)._sizeHint(); - case Requested: - return (value as Requested)._sizeHint(); - default: - throw Exception('RequestStatus: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Unrequested extends RequestStatus { - const Unrequested({required this.ticket, required this.len}); - - factory Unrequested._decode(_i1.Input input) { - return Unrequested( - ticket: const _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( - _i4.AccountId32Codec(), - _i5.PreimageDeposit.codec, - ).decode(input), - len: _i1.U32Codec.codec.decode(input), - ); - } - - /// (AccountId, Ticket) - final _i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit> ticket; - - /// u32 - final int len; - - @override - Map> toJson() => { - 'Unrequested': { - 'ticket': [ticket.value0.toList(), ticket.value1.toJson()], - 'len': len, - }, - }; - - int _sizeHint() { - int size = 1; - size = - size + - const _i3.Tuple2Codec<_i4.AccountId32, _i5.PreimageDeposit>( - _i4.AccountId32Codec(), - _i5.PreimageDeposit.codec, - ).sizeHint(ticket); - size = size + _i1.U32Codec.codec.sizeHint(len); - return size; - } - - void encodeTo(_i1.Output 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is Unrequested && other.ticket == ticket && other.len == len; - - @override - int get hashCode => Object.hash(ticket, len); -} - -class Requested extends RequestStatus { - 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), - count: _i1.U32Codec.codec.decode(input), - maybeLen: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - ); - } - - /// Option<(AccountId, Ticket)> - final _i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit>? maybeTicket; - - /// u32 - final int count; - - /// Option - final int? maybeLen; - - @override - Map> toJson() => { - 'Requested': { - 'maybeTicket': [maybeTicket?.value0.toList(), maybeTicket?.value1.toJson()], - 'count': count, - 'maybeLen': maybeLen, - }, - }; - - int _sizeHint() { - int size = 1; - size = - size + - const _i1.OptionCodec<_i3.Tuple2<_i4.AccountId32, _i5.PreimageDeposit>>( - _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); - return size; - } - - void encodeTo(_i1.Output 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Requested && other.maybeTicket == maybeTicket && other.count == count && other.maybeLen == maybeLen; - - @override - int get hashCode => Object.hash(maybeTicket, count, maybeLen); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_qpow/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_qpow/pallet/error.dart deleted file mode 100644 index c35439cc..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_qpow/pallet/error.dart +++ /dev/null @@ -1,49 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - invalidSolution('InvalidSolution', 0), - arithmeticOverflow('ArithmeticOverflow', 1); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.invalidSolution; - case 1: - return Error.arithmeticOverflow; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_qpow/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_qpow/pallet/event.dart deleted file mode 100644 index e5f127fb..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_qpow/pallet/event.dart +++ /dev/null @@ -1,189 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../primitive_types/u512.dart' as _i3; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - ProofSubmitted proofSubmitted({required List nonce}) { - return ProofSubmitted(nonce: nonce); - } - - DistanceThresholdAdjusted distanceThresholdAdjusted({ - required _i3.U512 oldDistanceThreshold, - required _i3.U512 newDistanceThreshold, - required BigInt observedBlockTime, - }) { - return DistanceThresholdAdjusted( - oldDistanceThreshold: oldDistanceThreshold, - newDistanceThreshold: newDistanceThreshold, - observedBlockTime: observedBlockTime, - ); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return ProofSubmitted._decode(input); - case 1: - return DistanceThresholdAdjusted._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case ProofSubmitted: - (value as ProofSubmitted).encodeTo(output); - break; - case DistanceThresholdAdjusted: - (value as DistanceThresholdAdjusted).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case ProofSubmitted: - return (value as ProofSubmitted)._sizeHint(); - case DistanceThresholdAdjusted: - return (value as DistanceThresholdAdjusted)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class ProofSubmitted extends Event { - const ProofSubmitted({required this.nonce}); - - factory ProofSubmitted._decode(_i1.Input input) { - return ProofSubmitted(nonce: const _i1.U8ArrayCodec(64).decode(input)); - } - - /// NonceType - final List nonce; - - @override - Map>> toJson() => { - 'ProofSubmitted': {'nonce': nonce.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(64).sizeHint(nonce); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(64).encodeTo(nonce, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is ProofSubmitted && _i4.listsEqual(other.nonce, nonce); - - @override - int get hashCode => nonce.hashCode; -} - -class DistanceThresholdAdjusted extends Event { - const DistanceThresholdAdjusted({ - required this.oldDistanceThreshold, - required this.newDistanceThreshold, - required this.observedBlockTime, - }); - - factory DistanceThresholdAdjusted._decode(_i1.Input input) { - return DistanceThresholdAdjusted( - oldDistanceThreshold: const _i1.U64ArrayCodec(8).decode(input), - newDistanceThreshold: const _i1.U64ArrayCodec(8).decode(input), - observedBlockTime: _i1.U64Codec.codec.decode(input), - ); - } - - /// DistanceThreshold - final _i3.U512 oldDistanceThreshold; - - /// DistanceThreshold - final _i3.U512 newDistanceThreshold; - - /// BlockDuration - final BigInt observedBlockTime; - - @override - Map> toJson() => { - 'DistanceThresholdAdjusted': { - 'oldDistanceThreshold': oldDistanceThreshold.toList(), - 'newDistanceThreshold': newDistanceThreshold.toList(), - 'observedBlockTime': observedBlockTime, - }, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.U512Codec().sizeHint(oldDistanceThreshold); - size = size + const _i3.U512Codec().sizeHint(newDistanceThreshold); - size = size + _i1.U64Codec.codec.sizeHint(observedBlockTime); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U64ArrayCodec(8).encodeTo(oldDistanceThreshold, output); - const _i1.U64ArrayCodec(8).encodeTo(newDistanceThreshold, output); - _i1.U64Codec.codec.encodeTo(observedBlockTime, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is DistanceThresholdAdjusted && - _i4.listsEqual(other.oldDistanceThreshold, oldDistanceThreshold) && - _i4.listsEqual(other.newDistanceThreshold, newDistanceThreshold) && - other.observedBlockTime == observedBlockTime; - - @override - int get hashCode => Object.hash(oldDistanceThreshold, newDistanceThreshold, observedBlockTime); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/member_record.dart b/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/member_record.dart deleted file mode 100644 index bbcabb46..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/member_record.dart +++ /dev/null @@ -1,50 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -class MemberRecord { - const MemberRecord({required this.rank}); - - factory MemberRecord.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Rank - final int rank; - - static const $MemberRecordCodec codec = $MemberRecordCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'rank': rank}; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemberRecord && other.rank == rank; - - @override - int get hashCode => rank.hashCode; -} - -class $MemberRecordCodec with _i1.Codec { - const $MemberRecordCodec(); - - @override - void encodeTo(MemberRecord obj, _i1.Output output) { - _i1.U16Codec.codec.encodeTo(obj.rank, output); - } - - @override - MemberRecord decode(_i1.Input input) { - return MemberRecord(rank: _i1.U16Codec.codec.decode(input)); - } - - @override - int sizeHint(MemberRecord obj) { - int size = 0; - size = size + _i1.U16Codec.codec.sizeHint(obj.rank); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/call.dart deleted file mode 100644 index 430c043f..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/call.dart +++ /dev/null @@ -1,447 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../sp_runtime/multiaddress/multi_address.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - AddMember addMember({required _i3.MultiAddress who}) { - return AddMember(who: who); - } - - PromoteMember promoteMember({required _i3.MultiAddress who}) { - return PromoteMember(who: who); - } - - DemoteMember demoteMember({required _i3.MultiAddress who}) { - 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); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return AddMember._decode(input); - case 1: - return PromoteMember._decode(input); - case 2: - return DemoteMember._decode(input); - case 3: - return RemoveMember._decode(input); - case 4: - return Vote._decode(input); - case 5: - return CleanupPoll._decode(input); - case 6: - return ExchangeMember._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case AddMember: - (value as AddMember).encodeTo(output); - break; - case PromoteMember: - (value as PromoteMember).encodeTo(output); - break; - case DemoteMember: - (value as DemoteMember).encodeTo(output); - break; - case RemoveMember: - (value as RemoveMember).encodeTo(output); - break; - case Vote: - (value as Vote).encodeTo(output); - break; - case CleanupPoll: - (value as CleanupPoll).encodeTo(output); - break; - case ExchangeMember: - (value as ExchangeMember).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case AddMember: - return (value as AddMember)._sizeHint(); - case PromoteMember: - return (value as PromoteMember)._sizeHint(); - case DemoteMember: - return (value as DemoteMember)._sizeHint(); - case RemoveMember: - return (value as RemoveMember)._sizeHint(); - case Vote: - return (value as Vote)._sizeHint(); - case CleanupPoll: - return (value as CleanupPoll)._sizeHint(); - case ExchangeMember: - return (value as ExchangeMember)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Introduce a new member. -/// -/// - `origin`: Must be the `AddOrigin`. -/// - `who`: Account of non-member which will become a member. -/// -/// Weight: `O(1)` -class AddMember extends Call { - const AddMember({required this.who}); - - factory AddMember._decode(_i1.Input input) { - return AddMember(who: _i3.MultiAddress.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - @override - Map>> toJson() => { - 'add_member': {'who': who.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => who.hashCode; -} - -/// Increment the rank of an existing member by one. -/// -/// - `origin`: Must be the `PromoteOrigin`. -/// - `who`: Account of existing member. -/// -/// Weight: `O(1)` -class PromoteMember extends Call { - const PromoteMember({required this.who}); - - factory PromoteMember._decode(_i1.Input input) { - return PromoteMember(who: _i3.MultiAddress.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - @override - Map>> toJson() => { - 'promote_member': {'who': who.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => who.hashCode; -} - -/// Decrement the rank of an existing member by one. If the member is already at rank zero, -/// then they are removed entirely. -/// -/// - `origin`: Must be the `DemoteOrigin`. -/// - `who`: Account of existing member of rank greater than zero. -/// -/// Weight: `O(1)`, less if the member's index is highest in its rank. -class DemoteMember extends Call { - const DemoteMember({required this.who}); - - factory DemoteMember._decode(_i1.Input input) { - return DemoteMember(who: _i3.MultiAddress.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - @override - Map>> toJson() => { - 'demote_member': {'who': who.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => who.hashCode; -} - -/// Remove the member entirely. -/// -/// - `origin`: Must be the `RemoveOrigin`. -/// - `who`: Account of existing member of rank greater than zero. -/// - `min_rank`: The rank of the member or greater. -/// -/// Weight: `O(min_rank)`. -class RemoveMember extends Call { - 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)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - /// Rank - final int minRank; - - @override - Map> toJson() => { - 'remove_member': {'who': who.toJson(), 'minRank': minRank}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(who); - size = size + _i1.U16Codec.codec.sizeHint(minRank); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(who, minRank); -} - -/// Add an aye or nay vote for the sender to the given proposal. -/// -/// - `origin`: Must be `Signed` by a member account. -/// - `poll`: Index of a poll which is ongoing. -/// - `aye`: `true` if the vote is to approve the proposal, `false` otherwise. -/// -/// Transaction fees are be waived if the member is voting on any particular proposal -/// for the first time and the call is successful. Subsequent vote changes will charge a -/// fee. -/// -/// 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}); - - factory Vote._decode(_i1.Input input) { - return Vote(poll: _i1.U32Codec.codec.decode(input), aye: _i1.BoolCodec.codec.decode(input)); - } - - /// PollIndexOf - final int poll; - - /// bool - final bool aye; - - @override - Map> toJson() => { - 'vote': {'poll': poll, 'aye': aye}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(poll); - size = size + _i1.BoolCodec.codec.sizeHint(aye); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(poll, aye); -} - -/// Remove votes from the given poll. It must have ended. -/// -/// - `origin`: Must be `Signed` by any account. -/// - `poll_index`: Index of a poll which is completed and for which votes continue to -/// exist. -/// - `max`: Maximum number of vote items from remove in this call. -/// -/// Transaction fees are waived if the operation is successful. -/// -/// 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}); - - factory CleanupPoll._decode(_i1.Input input) { - return CleanupPoll(pollIndex: _i1.U32Codec.codec.decode(input), max: _i1.U32Codec.codec.decode(input)); - } - - /// PollIndexOf - final int pollIndex; - - /// u32 - final int max; - - @override - Map> toJson() => { - 'cleanup_poll': {'pollIndex': pollIndex, 'max': max}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(pollIndex); - size = size + _i1.U32Codec.codec.sizeHint(max); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(pollIndex, max); -} - -/// Exchanges a member with a new account and the same existing rank. -/// -/// - `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. -class ExchangeMember extends Call { - 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)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress who; - - /// AccountIdLookupOf - final _i3.MultiAddress newWho; - - @override - Map>> toJson() => { - 'exchange_member': {'who': who.toJson(), 'newWho': newWho.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(who); - size = size + _i3.MultiAddress.codec.sizeHint(newWho); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(who, newWho); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/error.dart deleted file mode 100644 index 3906b1e7..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/error.dart +++ /dev/null @@ -1,97 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// Account is already a member. - alreadyMember('AlreadyMember', 0), - - /// Account is not a member. - notMember('NotMember', 1), - - /// The given poll index is unknown or has closed. - notPolling('NotPolling', 2), - - /// The given poll is still ongoing. - ongoing('Ongoing', 3), - - /// There are no further records to be removed. - noneRemaining('NoneRemaining', 4), - - /// Unexpected error in state. - corruption('Corruption', 5), - - /// The member's rank is too low to vote. - rankTooLow('RankTooLow', 6), - - /// The information provided is incorrect. - invalidWitness('InvalidWitness', 7), - - /// The origin is not sufficiently privileged to do the operation. - noPermission('NoPermission', 8), - - /// The new member to exchange is the same as the old member - sameMember('SameMember', 9), - - /// The max member count for the rank has been reached. - tooManyMembers('TooManyMembers', 10); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.alreadyMember; - case 1: - return Error.notMember; - case 2: - return Error.notPolling; - case 3: - return Error.ongoing; - case 4: - return Error.noneRemaining; - case 5: - return Error.corruption; - case 6: - return Error.rankTooLow; - case 7: - return Error.invalidWitness; - case 8: - return Error.noPermission; - case 9: - return Error.sameMember; - case 10: - return Error.tooManyMembers; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/event.dart deleted file mode 100644 index 380795e3..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/pallet/event.dart +++ /dev/null @@ -1,346 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i6; - -import '../../sp_core/crypto/account_id32.dart' as _i3; -import '../tally.dart' as _i5; -import '../vote_record.dart' as _i4; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - MemberAdded memberAdded({required _i3.AccountId32 who}) { - return MemberAdded(who: who); - } - - 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); - } - - Voted voted({ - required _i3.AccountId32 who, - required int poll, - required _i4.VoteRecord vote, - required _i5.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); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return MemberAdded._decode(input); - case 1: - return RankChanged._decode(input); - case 2: - return MemberRemoved._decode(input); - case 3: - return Voted._decode(input); - case 4: - return MemberExchanged._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case MemberAdded: - (value as MemberAdded).encodeTo(output); - break; - case RankChanged: - (value as RankChanged).encodeTo(output); - break; - case MemberRemoved: - (value as MemberRemoved).encodeTo(output); - break; - case Voted: - (value as Voted).encodeTo(output); - break; - case MemberExchanged: - (value as MemberExchanged).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case MemberAdded: - return (value as MemberAdded)._sizeHint(); - case RankChanged: - return (value as RankChanged)._sizeHint(); - case MemberRemoved: - return (value as MemberRemoved)._sizeHint(); - case Voted: - return (value as Voted)._sizeHint(); - case MemberExchanged: - return (value as MemberExchanged)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// A member `who` has been added. -class MemberAdded extends Event { - const MemberAdded({required this.who}); - - factory MemberAdded._decode(_i1.Input input) { - return MemberAdded(who: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - @override - Map>> toJson() => { - 'MemberAdded': {'who': who.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => who.hashCode; -} - -/// The member `who`se rank has been changed to the given `rank`. -class RankChanged extends Event { - 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)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// Rank - final int rank; - - @override - Map> toJson() => { - 'RankChanged': {'who': who.toList(), 'rank': rank}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U16Codec.codec.sizeHint(rank); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory MemberRemoved._decode(_i1.Input input) { - return MemberRemoved(who: const _i1.U8ArrayCodec(32).decode(input), rank: _i1.U16Codec.codec.decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// Rank - final int rank; - - @override - Map> toJson() => { - 'MemberRemoved': {'who': who.toList(), 'rank': rank}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U16Codec.codec.sizeHint(rank); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory Voted._decode(_i1.Input input) { - return Voted( - who: const _i1.U8ArrayCodec(32).decode(input), - poll: _i1.U32Codec.codec.decode(input), - vote: _i4.VoteRecord.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// PollIndexOf - final int poll; - - /// VoteRecord - final _i4.VoteRecord vote; - - /// TallyOf - final _i5.Tally tally; - - @override - Map> toJson() => { - 'Voted': {'who': who.toList(), 'poll': poll, 'vote': vote.toJson(), 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U32Codec.codec.sizeHint(poll); - size = size + _i4.VoteRecord.codec.sizeHint(vote); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Voted && - _i6.listsEqual(other.who, who) && - other.poll == poll && - other.vote == vote && - other.tally == tally; - - @override - 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}); - - factory MemberExchanged._decode(_i1.Input input) { - return MemberExchanged( - who: const _i1.U8ArrayCodec(32).decode(input), - newWho: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::AccountId - final _i3.AccountId32 newWho; - - @override - Map>> toJson() => { - 'MemberExchanged': {'who': who.toList(), 'newWho': newWho.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + const _i3.AccountId32Codec().sizeHint(newWho); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is MemberExchanged && _i6.listsEqual(other.who, who) && _i6.listsEqual(other.newWho, newWho); - - @override - int get hashCode => Object.hash(who, newWho); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/tally.dart b/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/tally.dart deleted file mode 100644 index dcacb46c..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/tally.dart +++ /dev/null @@ -1,66 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -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}); - - factory Tally.decode(_i1.Input input) { - return codec.decode(input); - } - - /// MemberIndex - final int bareAyes; - - /// Votes - final int ayes; - - /// Votes - final int nays; - - static const $TallyCodec codec = $TallyCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - 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; - - @override - 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); - } - - @override - Tally decode(_i1.Input input) { - return Tally( - bareAyes: _i1.U32Codec.codec.decode(input), - ayes: _i1.U32Codec.codec.decode(input), - nays: _i1.U32Codec.codec.decode(input), - ); - } - - @override - int sizeHint(Tally obj) { - int size = 0; - size = size + _i1.U32Codec.codec.sizeHint(obj.bareAyes); - size = size + _i1.U32Codec.codec.sizeHint(obj.ayes); - size = size + _i1.U32Codec.codec.sizeHint(obj.nays); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/vote_record.dart b/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/vote_record.dart deleted file mode 100644 index 8a05fdc3..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_ranked_collective/vote_record.dart +++ /dev/null @@ -1,145 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -abstract class VoteRecord { - const VoteRecord(); - - factory VoteRecord.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $VoteRecordCodec codec = $VoteRecordCodec(); - - static const $VoteRecord values = $VoteRecord(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $VoteRecord { - const $VoteRecord(); - - Aye aye(int value0) { - return Aye(value0); - } - - Nay nay(int value0) { - return Nay(value0); - } -} - -class $VoteRecordCodec with _i1.Codec { - const $VoteRecordCodec(); - - @override - VoteRecord decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Aye._decode(input); - case 1: - return Nay._decode(input); - default: - throw Exception('VoteRecord: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(VoteRecord value, _i1.Output output) { - switch (value.runtimeType) { - case Aye: - (value as Aye).encodeTo(output); - break; - case Nay: - (value as Nay).encodeTo(output); - break; - default: - throw Exception('VoteRecord: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(VoteRecord value) { - switch (value.runtimeType) { - case Aye: - return (value as Aye)._sizeHint(); - case Nay: - return (value as Nay)._sizeHint(); - default: - throw Exception('VoteRecord: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Aye extends VoteRecord { - const Aye(this.value0); - - factory Aye._decode(_i1.Input input) { - return Aye(_i1.U32Codec.codec.decode(input)); - } - - /// Votes - final int value0; - - @override - Map toJson() => {'Aye': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Nay extends VoteRecord { - const Nay(this.value0); - - factory Nay._decode(_i1.Input input) { - return Nay(_i1.U32Codec.codec.decode(input)); - } - - /// Votes - final int value0; - - @override - Map toJson() => {'Nay': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_recovery/active_recovery.dart b/quantus_sdk/lib/generated/resonance/types/pallet_recovery/active_recovery.dart deleted file mode 100644 index 2df5af34..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_recovery/active_recovery.dart +++ /dev/null @@ -1,76 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; -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}); - - factory ActiveRecovery.decode(_i1.Input input) { - return codec.decode(input); - } - - /// BlockNumber - final int created; - - /// Balance - final BigInt deposit; - - /// Friends - final List<_i2.AccountId32> friends; - - static const $ActiveRecoveryCodec codec = $ActiveRecoveryCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'created': created, - 'deposit': deposit, - 'friends': friends.map((value) => value.toList()).toList(), - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ActiveRecovery && - other.created == created && - other.deposit == deposit && - _i4.listsEqual(other.friends, friends); - - @override - 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); - } - - @override - ActiveRecovery decode(_i1.Input input) { - return ActiveRecovery( - created: _i1.U32Codec.codec.decode(input), - deposit: _i1.U128Codec.codec.decode(input), - friends: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).decode(input), - ); - } - - @override - int sizeHint(ActiveRecovery obj) { - 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); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/call.dart deleted file mode 100644 index be32da15..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/call.dart +++ /dev/null @@ -1,585 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i6; - -import '../../quantus_runtime/runtime_call.dart' as _i4; -import '../../sp_core/crypto/account_id32.dart' as _i5; -import '../../sp_runtime/multiaddress/multi_address.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $Call { - const $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); - } - - CreateRecovery createRecovery({ - required List<_i5.AccountId32> friends, - required int threshold, - required int 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); - } - - ClaimRecovery claimRecovery({required _i3.MultiAddress account}) { - return ClaimRecovery(account: account); - } - - CloseRecovery closeRecovery({required _i3.MultiAddress rescuer}) { - return CloseRecovery(rescuer: rescuer); - } - - RemoveRecovery removeRecovery() { - return RemoveRecovery(); - } - - CancelRecovered cancelRecovered({required _i3.MultiAddress account}) { - return CancelRecovered(account: account); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return AsRecovered._decode(input); - case 1: - return SetRecovered._decode(input); - case 2: - return CreateRecovery._decode(input); - case 3: - return InitiateRecovery._decode(input); - case 4: - return VouchRecovery._decode(input); - case 5: - return ClaimRecovery._decode(input); - case 6: - return CloseRecovery._decode(input); - case 7: - return const RemoveRecovery(); - case 8: - return CancelRecovered._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case AsRecovered: - (value as AsRecovered).encodeTo(output); - break; - case SetRecovered: - (value as SetRecovered).encodeTo(output); - break; - case CreateRecovery: - (value as CreateRecovery).encodeTo(output); - break; - case InitiateRecovery: - (value as InitiateRecovery).encodeTo(output); - break; - case VouchRecovery: - (value as VouchRecovery).encodeTo(output); - break; - case ClaimRecovery: - (value as ClaimRecovery).encodeTo(output); - break; - case CloseRecovery: - (value as CloseRecovery).encodeTo(output); - break; - case RemoveRecovery: - (value as RemoveRecovery).encodeTo(output); - break; - case CancelRecovered: - (value as CancelRecovered).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case AsRecovered: - return (value as AsRecovered)._sizeHint(); - case SetRecovered: - return (value as SetRecovered)._sizeHint(); - case CreateRecovery: - return (value as CreateRecovery)._sizeHint(); - case InitiateRecovery: - return (value as InitiateRecovery)._sizeHint(); - case VouchRecovery: - return (value as VouchRecovery)._sizeHint(); - case ClaimRecovery: - return (value as ClaimRecovery)._sizeHint(); - case CloseRecovery: - return (value as CloseRecovery)._sizeHint(); - case RemoveRecovery: - return 1; - case CancelRecovered: - return (value as CancelRecovered)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Send a call through a recovered account. -/// -/// The dispatch origin for this call must be _Signed_ and registered to -/// be able to make calls on behalf of the recovered account. -/// -/// 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. -class AsRecovered extends 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)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress account; - - /// Box<::RuntimeCall> - final _i4.RuntimeCall call; - - @override - Map>> toJson() => { - 'as_recovered': {'account': account.toJson(), 'call': call.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(account); - size = size + _i4.RuntimeCall.codec.sizeHint(call); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(account, call); -} - -/// Allow ROOT to bypass the recovery process and set an a rescuer account -/// for a lost account directly. -/// -/// The dispatch origin for this call must be _ROOT_. -/// -/// Parameters: -/// - `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}); - - factory SetRecovered._decode(_i1.Input input) { - return SetRecovered(lost: _i3.MultiAddress.codec.decode(input), rescuer: _i3.MultiAddress.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress lost; - - /// AccountIdLookupOf - final _i3.MultiAddress rescuer; - - @override - Map>> toJson() => { - 'set_recovered': {'lost': lost.toJson(), 'rescuer': rescuer.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(lost); - size = size + _i3.MultiAddress.codec.sizeHint(rescuer); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(lost, rescuer); -} - -/// Create a recovery configuration for your account. This makes your account recoverable. -/// -/// Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance -/// will be reserved for storing the recovery configuration. This deposit is returned -/// in full when the user calls `remove_recovery`. -/// -/// The dispatch origin for this call must be _Signed_. -/// -/// Parameters: -/// - `friends`: A list of friends you trust to vouch for recovery attempts. Should be -/// ordered and contain no duplicate values. -/// - `threshold`: The number of friends that must vouch for a recovery attempt before the -/// account can be recovered. Should be less than or equal to the length of the list of -/// friends. -/// - `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}); - - factory CreateRecovery._decode(_i1.Input input) { - return CreateRecovery( - friends: const _i1.SequenceCodec<_i5.AccountId32>(_i5.AccountId32Codec()).decode(input), - threshold: _i1.U16Codec.codec.decode(input), - delayPeriod: _i1.U32Codec.codec.decode(input), - ); - } - - /// Vec - final List<_i5.AccountId32> friends; - - /// u16 - final int threshold; - - /// BlockNumberFor - final int delayPeriod; - - @override - Map> toJson() => { - '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 + _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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is CreateRecovery && - _i6.listsEqual(other.friends, friends) && - other.threshold == threshold && - other.delayPeriod == delayPeriod; - - @override - int get hashCode => Object.hash(friends, threshold, delayPeriod); -} - -/// Initiate the process for recovering a recoverable account. -/// -/// Payment: `RecoveryDeposit` balance will be reserved for initiating the -/// recovery process. This deposit will always be repatriated to the account -/// trying to be recovered. See `close_recovery`. -/// -/// The dispatch origin for this call must be _Signed_. -/// -/// Parameters: -/// - `account`: The lost account that you want to recover. This account needs to be -/// recoverable (i.e. have a recovery configuration). -class InitiateRecovery extends Call { - const InitiateRecovery({required this.account}); - - factory InitiateRecovery._decode(_i1.Input input) { - return InitiateRecovery(account: _i3.MultiAddress.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress account; - - @override - Map>> toJson() => { - 'initiate_recovery': {'account': account.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(account); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => account.hashCode; -} - -/// Allow a "friend" of a recoverable account to vouch for an active recovery -/// process for that account. -/// -/// The dispatch origin for this call must be _Signed_ and must be a "friend" -/// for the recoverable account. -/// -/// Parameters: -/// - `lost`: The lost account that you want to recover. -/// - `rescuer`: The account trying to rescue the lost account that you want to vouch for. -/// -/// 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}); - - factory VouchRecovery._decode(_i1.Input input) { - return VouchRecovery(lost: _i3.MultiAddress.codec.decode(input), rescuer: _i3.MultiAddress.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress lost; - - /// AccountIdLookupOf - final _i3.MultiAddress rescuer; - - @override - Map>> toJson() => { - 'vouch_recovery': {'lost': lost.toJson(), 'rescuer': rescuer.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(lost); - size = size + _i3.MultiAddress.codec.sizeHint(rescuer); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(lost, rescuer); -} - -/// Allow a successful rescuer to claim their recovered account. -/// -/// The dispatch origin for this call must be _Signed_ and must be a "rescuer" -/// who has successfully completed the account recovery process: collected -/// `threshold` or more vouches, waited `delay_period` blocks since initiation. -/// -/// Parameters: -/// - `account`: The lost account that you want to claim has been successfully recovered by -/// you. -class ClaimRecovery extends Call { - const ClaimRecovery({required this.account}); - - factory ClaimRecovery._decode(_i1.Input input) { - return ClaimRecovery(account: _i3.MultiAddress.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress account; - - @override - Map>> toJson() => { - 'claim_recovery': {'account': account.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(account); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => account.hashCode; -} - -/// As the controller of a recoverable account, close an active recovery -/// process for your account. -/// -/// Payment: By calling this function, the recoverable account will receive -/// the recovery deposit `RecoveryDeposit` placed by the rescuer. -/// -/// The dispatch origin for this call must be _Signed_ and must be a -/// recoverable account with an active recovery process for it. -/// -/// Parameters: -/// - `rescuer`: The account trying to rescue this recoverable account. -class CloseRecovery extends Call { - const CloseRecovery({required this.rescuer}); - - factory CloseRecovery._decode(_i1.Input input) { - return CloseRecovery(rescuer: _i3.MultiAddress.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress rescuer; - - @override - Map>> toJson() => { - 'close_recovery': {'rescuer': rescuer.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(rescuer); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => rescuer.hashCode; -} - -/// Remove the recovery process for your account. Recovered accounts are still accessible. -/// -/// NOTE: The user must make sure to call `close_recovery` on all active -/// recovery attempts before calling this function else it will fail. -/// -/// Payment: By calling this function the recoverable account will unreserve -/// their recovery configuration deposit. -/// (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) -/// -/// The dispatch origin for this call must be _Signed_ and must be a -/// recoverable account (i.e. has a recovery configuration). -class RemoveRecovery extends Call { - const RemoveRecovery(); - - @override - Map toJson() => {'remove_recovery': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - } - - @override - bool operator ==(Object other) => other is RemoveRecovery; - - @override - int get hashCode => runtimeType.hashCode; -} - -/// Cancel the ability to use `as_recovered` for `account`. -/// -/// The dispatch origin for this call must be _Signed_ and registered to -/// be able to make calls on behalf of the recovered account. -/// -/// Parameters: -/// - `account`: The recovered account you are able to call on-behalf-of. -class CancelRecovered extends Call { - const CancelRecovered({required this.account}); - - factory CancelRecovered._decode(_i1.Input input) { - return CancelRecovered(account: _i3.MultiAddress.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress account; - - @override - Map>> toJson() => { - 'cancel_recovered': {'account': account.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(account); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => account.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/error.dart deleted file mode 100644 index 5f8ebe8c..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/error.dart +++ /dev/null @@ -1,122 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// User is not allowed to make a call on behalf of this account - notAllowed('NotAllowed', 0), - - /// Threshold must be greater than zero - zeroThreshold('ZeroThreshold', 1), - - /// Friends list must be greater than zero and threshold - notEnoughFriends('NotEnoughFriends', 2), - - /// Friends list must be less than max friends - maxFriends('MaxFriends', 3), - - /// Friends list must be sorted and free of duplicates - notSorted('NotSorted', 4), - - /// This account is not set up for recovery - notRecoverable('NotRecoverable', 5), - - /// This account is already set up for recovery - alreadyRecoverable('AlreadyRecoverable', 6), - - /// A recovery process has already started for this account - alreadyStarted('AlreadyStarted', 7), - - /// A recovery process has not started for this rescuer - notStarted('NotStarted', 8), - - /// This account is not a friend who can vouch - notFriend('NotFriend', 9), - - /// The friend must wait until the delay period to vouch for this recovery - delayPeriod('DelayPeriod', 10), - - /// This user has already vouched for this recovery - alreadyVouched('AlreadyVouched', 11), - - /// The threshold for recovering this account has not been met - threshold('Threshold', 12), - - /// There are still active recovery attempts that need to be closed - stillActive('StillActive', 13), - - /// This account is already set up for recovery - alreadyProxy('AlreadyProxy', 14), - - /// Some internal state is broken. - badState('BadState', 15); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.notAllowed; - case 1: - return Error.zeroThreshold; - case 2: - return Error.notEnoughFriends; - case 3: - return Error.maxFriends; - case 4: - return Error.notSorted; - case 5: - return Error.notRecoverable; - case 6: - return Error.alreadyRecoverable; - case 7: - return Error.alreadyStarted; - case 8: - return Error.notStarted; - case 9: - return Error.notFriend; - case 10: - return Error.delayPeriod; - case 11: - return Error.alreadyVouched; - case 12: - return Error.threshold; - case 13: - return Error.stillActive; - case 14: - return Error.alreadyProxy; - case 15: - return Error.badState; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/event.dart deleted file mode 100644 index f9206b1e..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_recovery/pallet/event.dart +++ /dev/null @@ -1,400 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../sp_core/crypto/account_id32.dart' as _i3; - -/// Events type. -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map>> toJson(); -} - -class $Event { - const $Event(); - - RecoveryCreated recoveryCreated({required _i3.AccountId32 account}) { - return RecoveryCreated(account: account); - } - - RecoveryInitiated recoveryInitiated({required _i3.AccountId32 lostAccount, required _i3.AccountId32 rescuerAccount}) { - return RecoveryInitiated(lostAccount: lostAccount, rescuerAccount: rescuerAccount); - } - - RecoveryVouched recoveryVouched({ - required _i3.AccountId32 lostAccount, - required _i3.AccountId32 rescuerAccount, - required _i3.AccountId32 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); - } - - AccountRecovered accountRecovered({required _i3.AccountId32 lostAccount, required _i3.AccountId32 rescuerAccount}) { - return AccountRecovered(lostAccount: lostAccount, rescuerAccount: rescuerAccount); - } - - RecoveryRemoved recoveryRemoved({required _i3.AccountId32 lostAccount}) { - return RecoveryRemoved(lostAccount: lostAccount); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return RecoveryCreated._decode(input); - case 1: - return RecoveryInitiated._decode(input); - case 2: - return RecoveryVouched._decode(input); - case 3: - return RecoveryClosed._decode(input); - case 4: - return AccountRecovered._decode(input); - case 5: - return RecoveryRemoved._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case RecoveryCreated: - (value as RecoveryCreated).encodeTo(output); - break; - case RecoveryInitiated: - (value as RecoveryInitiated).encodeTo(output); - break; - case RecoveryVouched: - (value as RecoveryVouched).encodeTo(output); - break; - case RecoveryClosed: - (value as RecoveryClosed).encodeTo(output); - break; - case AccountRecovered: - (value as AccountRecovered).encodeTo(output); - break; - case RecoveryRemoved: - (value as RecoveryRemoved).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case RecoveryCreated: - return (value as RecoveryCreated)._sizeHint(); - case RecoveryInitiated: - return (value as RecoveryInitiated)._sizeHint(); - case RecoveryVouched: - return (value as RecoveryVouched)._sizeHint(); - case RecoveryClosed: - return (value as RecoveryClosed)._sizeHint(); - case AccountRecovered: - return (value as AccountRecovered)._sizeHint(); - case RecoveryRemoved: - return (value as RecoveryRemoved)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// A recovery process has been set up for an account. -class RecoveryCreated extends Event { - const RecoveryCreated({required this.account}); - - factory RecoveryCreated._decode(_i1.Input input) { - return RecoveryCreated(account: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 account; - - @override - Map>> toJson() => { - 'RecoveryCreated': {'account': account.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(account); - return size; - } - - void encodeTo(_i1.Output 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 && _i4.listsEqual(other.account, account); - - @override - int get hashCode => account.hashCode; -} - -/// A recovery process has been initiated for lost account by rescuer account. -class RecoveryInitiated extends Event { - const RecoveryInitiated({required this.lostAccount, required this.rescuerAccount}); - - factory RecoveryInitiated._decode(_i1.Input input) { - return RecoveryInitiated( - lostAccount: const _i1.U8ArrayCodec(32).decode(input), - rescuerAccount: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 lostAccount; - - /// T::AccountId - final _i3.AccountId32 rescuerAccount; - - @override - Map>> toJson() => { - 'RecoveryInitiated': {'lostAccount': lostAccount.toList(), 'rescuerAccount': rescuerAccount.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(lostAccount); - size = size + const _i3.AccountId32Codec().sizeHint(rescuerAccount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is RecoveryInitiated && - _i4.listsEqual(other.lostAccount, lostAccount) && - _i4.listsEqual(other.rescuerAccount, rescuerAccount); - - @override - 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}); - - factory RecoveryVouched._decode(_i1.Input input) { - return RecoveryVouched( - lostAccount: const _i1.U8ArrayCodec(32).decode(input), - rescuerAccount: const _i1.U8ArrayCodec(32).decode(input), - sender: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 lostAccount; - - /// T::AccountId - final _i3.AccountId32 rescuerAccount; - - /// T::AccountId - final _i3.AccountId32 sender; - - @override - Map>> toJson() => { - 'RecoveryVouched': { - 'lostAccount': lostAccount.toList(), - 'rescuerAccount': rescuerAccount.toList(), - 'sender': sender.toList(), - }, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(lostAccount); - size = size + const _i3.AccountId32Codec().sizeHint(rescuerAccount); - size = size + const _i3.AccountId32Codec().sizeHint(sender); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is RecoveryVouched && - _i4.listsEqual(other.lostAccount, lostAccount) && - _i4.listsEqual(other.rescuerAccount, rescuerAccount) && - _i4.listsEqual(other.sender, sender); - - @override - 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}); - - factory RecoveryClosed._decode(_i1.Input input) { - return RecoveryClosed( - lostAccount: const _i1.U8ArrayCodec(32).decode(input), - rescuerAccount: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 lostAccount; - - /// T::AccountId - final _i3.AccountId32 rescuerAccount; - - @override - Map>> toJson() => { - 'RecoveryClosed': {'lostAccount': lostAccount.toList(), 'rescuerAccount': rescuerAccount.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(lostAccount); - size = size + const _i3.AccountId32Codec().sizeHint(rescuerAccount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is RecoveryClosed && - _i4.listsEqual(other.lostAccount, lostAccount) && - _i4.listsEqual(other.rescuerAccount, rescuerAccount); - - @override - 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}); - - factory AccountRecovered._decode(_i1.Input input) { - return AccountRecovered( - lostAccount: const _i1.U8ArrayCodec(32).decode(input), - rescuerAccount: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 lostAccount; - - /// T::AccountId - final _i3.AccountId32 rescuerAccount; - - @override - Map>> toJson() => { - 'AccountRecovered': {'lostAccount': lostAccount.toList(), 'rescuerAccount': rescuerAccount.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(lostAccount); - size = size + const _i3.AccountId32Codec().sizeHint(rescuerAccount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AccountRecovered && - _i4.listsEqual(other.lostAccount, lostAccount) && - _i4.listsEqual(other.rescuerAccount, rescuerAccount); - - @override - int get hashCode => Object.hash(lostAccount, rescuerAccount); -} - -/// A recovery process has been removed for an account. -class RecoveryRemoved extends Event { - const RecoveryRemoved({required this.lostAccount}); - - factory RecoveryRemoved._decode(_i1.Input input) { - return RecoveryRemoved(lostAccount: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 lostAccount; - - @override - Map>> toJson() => { - 'RecoveryRemoved': {'lostAccount': lostAccount.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(lostAccount); - return size; - } - - void encodeTo(_i1.Output 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 && _i4.listsEqual(other.lostAccount, lostAccount); - - @override - int get hashCode => lostAccount.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_recovery/recovery_config.dart b/quantus_sdk/lib/generated/resonance/types/pallet_recovery/recovery_config.dart deleted file mode 100644 index 2a6992a2..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_recovery/recovery_config.dart +++ /dev/null @@ -1,89 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../sp_core/crypto/account_id32.dart' as _i2; - -class RecoveryConfig { - const RecoveryConfig({ - required this.delayPeriod, - required this.deposit, - required this.friends, - required this.threshold, - }); - - factory RecoveryConfig.decode(_i1.Input input) { - return codec.decode(input); - } - - /// BlockNumber - final int delayPeriod; - - /// Balance - final BigInt deposit; - - /// Friends - final List<_i2.AccountId32> friends; - - /// u16 - final int threshold; - - static const $RecoveryConfigCodec codec = $RecoveryConfigCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'delayPeriod': delayPeriod, - 'deposit': deposit, - 'friends': friends.map((value) => value.toList()).toList(), - 'threshold': threshold, - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is RecoveryConfig && - other.delayPeriod == delayPeriod && - other.deposit == deposit && - _i4.listsEqual(other.friends, friends) && - other.threshold == threshold; - - @override - 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); - } - - @override - RecoveryConfig decode(_i1.Input input) { - return RecoveryConfig( - delayPeriod: _i1.U32Codec.codec.decode(input), - deposit: _i1.U128Codec.codec.decode(input), - friends: const _i1.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()).decode(input), - threshold: _i1.U16Codec.codec.decode(input), - ); - } - - @override - int sizeHint(RecoveryConfig obj) { - 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 + _i1.U16Codec.codec.sizeHint(obj.threshold); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/call_1.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/call_1.dart deleted file mode 100644 index 1917521b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/call_1.dart +++ /dev/null @@ -1,562 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../frame_support/traits/preimages/bounded.dart' as _i4; -import '../../frame_support/traits/schedule/dispatch_time.dart' as _i5; -import '../../primitive_types/h256.dart' as _i6; -import '../../quantus_runtime/origin_caller.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - Submit submit({ - required _i3.OriginCaller proposalOrigin, - required _i4.Bounded proposal, - required _i5.DispatchTime enactmentMoment, - }) { - return Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment); - } - - PlaceDecisionDeposit placeDecisionDeposit({required int index}) { - return PlaceDecisionDeposit(index: index); - } - - RefundDecisionDeposit refundDecisionDeposit({required int index}) { - return RefundDecisionDeposit(index: index); - } - - Cancel cancel({required int index}) { - return Cancel(index: index); - } - - Kill kill({required int index}) { - return Kill(index: index); - } - - NudgeReferendum nudgeReferendum({required int index}) { - return NudgeReferendum(index: index); - } - - OneFewerDeciding oneFewerDeciding({required int track}) { - return OneFewerDeciding(track: track); - } - - RefundSubmissionDeposit refundSubmissionDeposit({required int index}) { - return RefundSubmissionDeposit(index: index); - } - - SetMetadata setMetadata({required int index, _i6.H256? maybeHash}) { - return SetMetadata(index: index, maybeHash: maybeHash); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Submit._decode(input); - case 1: - return PlaceDecisionDeposit._decode(input); - case 2: - return RefundDecisionDeposit._decode(input); - case 3: - return Cancel._decode(input); - case 4: - return Kill._decode(input); - case 5: - return NudgeReferendum._decode(input); - case 6: - return OneFewerDeciding._decode(input); - case 7: - return RefundSubmissionDeposit._decode(input); - case 8: - return SetMetadata._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case Submit: - (value as Submit).encodeTo(output); - break; - case PlaceDecisionDeposit: - (value as PlaceDecisionDeposit).encodeTo(output); - break; - case RefundDecisionDeposit: - (value as RefundDecisionDeposit).encodeTo(output); - break; - case Cancel: - (value as Cancel).encodeTo(output); - break; - case Kill: - (value as Kill).encodeTo(output); - break; - case NudgeReferendum: - (value as NudgeReferendum).encodeTo(output); - break; - case OneFewerDeciding: - (value as OneFewerDeciding).encodeTo(output); - break; - case RefundSubmissionDeposit: - (value as RefundSubmissionDeposit).encodeTo(output); - break; - case SetMetadata: - (value as SetMetadata).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case Submit: - return (value as Submit)._sizeHint(); - case PlaceDecisionDeposit: - return (value as PlaceDecisionDeposit)._sizeHint(); - case RefundDecisionDeposit: - return (value as RefundDecisionDeposit)._sizeHint(); - case Cancel: - return (value as Cancel)._sizeHint(); - case Kill: - return (value as Kill)._sizeHint(); - case NudgeReferendum: - return (value as NudgeReferendum)._sizeHint(); - case OneFewerDeciding: - return (value as OneFewerDeciding)._sizeHint(); - case RefundSubmissionDeposit: - return (value as RefundSubmissionDeposit)._sizeHint(); - case SetMetadata: - return (value as SetMetadata)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Propose a referendum on a privileged action. -/// -/// - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds -/// available. -/// - `proposal_origin`: The origin from which the proposal should be executed. -/// - `proposal`: The proposal. -/// - `enactment_moment`: The moment that the proposal should be enacted. -/// -/// Emits `Submitted`. -class Submit extends Call { - const Submit({required this.proposalOrigin, required this.proposal, required this.enactmentMoment}); - - factory Submit._decode(_i1.Input input) { - return Submit( - proposalOrigin: _i3.OriginCaller.codec.decode(input), - proposal: _i4.Bounded.codec.decode(input), - enactmentMoment: _i5.DispatchTime.codec.decode(input), - ); - } - - /// Box> - final _i3.OriginCaller proposalOrigin; - - /// BoundedCallOf - final _i4.Bounded proposal; - - /// DispatchTime> - final _i5.DispatchTime enactmentMoment; - - @override - Map>> toJson() => { - 'submit': { - 'proposalOrigin': proposalOrigin.toJson(), - 'proposal': proposal.toJson(), - 'enactmentMoment': enactmentMoment.toJson(), - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.OriginCaller.codec.sizeHint(proposalOrigin); - size = size + _i4.Bounded.codec.sizeHint(proposal); - size = size + _i5.DispatchTime.codec.sizeHint(enactmentMoment); - return size; - } - - 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); - } - - @override - bool operator ==(Object 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); -} - -/// Post the Decision Deposit for a referendum. -/// -/// - `origin`: must be `Signed` and the account must have funds available for the -/// referendum's track's Decision Deposit. -/// - `index`: The index of the submitted referendum whose Decision Deposit is yet to be -/// posted. -/// -/// Emits `DecisionDepositPlaced`. -class PlaceDecisionDeposit extends Call { - const PlaceDecisionDeposit({required this.index}); - - factory PlaceDecisionDeposit._decode(_i1.Input input) { - return PlaceDecisionDeposit(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'place_decision_deposit': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Refund the Decision Deposit for a closed referendum back to the depositor. -/// -/// - `origin`: must be `Signed` or `Root`. -/// - `index`: The index of a closed referendum whose Decision Deposit has not yet been -/// refunded. -/// -/// Emits `DecisionDepositRefunded`. -class RefundDecisionDeposit extends Call { - const RefundDecisionDeposit({required this.index}); - - factory RefundDecisionDeposit._decode(_i1.Input input) { - return RefundDecisionDeposit(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'refund_decision_deposit': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Cancel an ongoing referendum. -/// -/// - `origin`: must be the `CancelOrigin`. -/// - `index`: The index of the referendum to be cancelled. -/// -/// Emits `Cancelled`. -class Cancel extends Call { - const Cancel({required this.index}); - - factory Cancel._decode(_i1.Input input) { - return Cancel(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'cancel': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Cancel an ongoing referendum and slash the deposits. -/// -/// - `origin`: must be the `KillOrigin`. -/// - `index`: The index of the referendum to be cancelled. -/// -/// Emits `Killed` and `DepositSlashed`. -class Kill extends Call { - const Kill({required this.index}); - - factory Kill._decode(_i1.Input input) { - return Kill(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'kill': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Advance a referendum onto its next logical state. Only used internally. -/// -/// - `origin`: must be `Root`. -/// - `index`: the referendum to be advanced. -class NudgeReferendum extends Call { - const NudgeReferendum({required this.index}); - - factory NudgeReferendum._decode(_i1.Input input) { - return NudgeReferendum(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'nudge_referendum': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Advance a track onto its next logical state. Only used internally. -/// -/// - `origin`: must be `Root`. -/// - `track`: the track to be advanced. -/// -/// Action item for when there is now one fewer referendum in the deciding phase and the -/// `DecidingCount` is not yet updated. This means that we should either: -/// - begin deciding another referendum (and leave `DecidingCount` alone); or -/// - decrement `DecidingCount`. -class OneFewerDeciding extends Call { - const OneFewerDeciding({required this.track}); - - factory OneFewerDeciding._decode(_i1.Input input) { - return OneFewerDeciding(track: _i1.U16Codec.codec.decode(input)); - } - - /// TrackIdOf - final int track; - - @override - Map> toJson() => { - 'one_fewer_deciding': {'track': track}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U16Codec.codec.sizeHint(track); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => track.hashCode; -} - -/// Refund the Submission Deposit for a closed referendum back to the depositor. -/// -/// - `origin`: must be `Signed` or `Root`. -/// - `index`: The index of a closed referendum whose Submission Deposit has not yet been -/// refunded. -/// -/// Emits `SubmissionDepositRefunded`. -class RefundSubmissionDeposit extends Call { - const RefundSubmissionDeposit({required this.index}); - - factory RefundSubmissionDeposit._decode(_i1.Input input) { - return RefundSubmissionDeposit(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'refund_submission_deposit': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Set or clear metadata of a referendum. -/// -/// Parameters: -/// - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a -/// 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. -class SetMetadata extends Call { - const SetMetadata({required this.index, this.maybeHash}); - - factory SetMetadata._decode(_i1.Input input) { - return SetMetadata( - index: _i1.U32Codec.codec.decode(input), - maybeHash: const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).decode(input), - ); - } - - /// ReferendumIndex - final int index; - - /// Option - final _i6.H256? maybeHash; - - @override - Map> toJson() => { - '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); - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is SetMetadata && other.index == index && other.maybeHash == maybeHash; - - @override - int get hashCode => Object.hash(index, maybeHash); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/call_2.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/call_2.dart deleted file mode 100644 index 1917521b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/call_2.dart +++ /dev/null @@ -1,562 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../frame_support/traits/preimages/bounded.dart' as _i4; -import '../../frame_support/traits/schedule/dispatch_time.dart' as _i5; -import '../../primitive_types/h256.dart' as _i6; -import '../../quantus_runtime/origin_caller.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - Submit submit({ - required _i3.OriginCaller proposalOrigin, - required _i4.Bounded proposal, - required _i5.DispatchTime enactmentMoment, - }) { - return Submit(proposalOrigin: proposalOrigin, proposal: proposal, enactmentMoment: enactmentMoment); - } - - PlaceDecisionDeposit placeDecisionDeposit({required int index}) { - return PlaceDecisionDeposit(index: index); - } - - RefundDecisionDeposit refundDecisionDeposit({required int index}) { - return RefundDecisionDeposit(index: index); - } - - Cancel cancel({required int index}) { - return Cancel(index: index); - } - - Kill kill({required int index}) { - return Kill(index: index); - } - - NudgeReferendum nudgeReferendum({required int index}) { - return NudgeReferendum(index: index); - } - - OneFewerDeciding oneFewerDeciding({required int track}) { - return OneFewerDeciding(track: track); - } - - RefundSubmissionDeposit refundSubmissionDeposit({required int index}) { - return RefundSubmissionDeposit(index: index); - } - - SetMetadata setMetadata({required int index, _i6.H256? maybeHash}) { - return SetMetadata(index: index, maybeHash: maybeHash); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Submit._decode(input); - case 1: - return PlaceDecisionDeposit._decode(input); - case 2: - return RefundDecisionDeposit._decode(input); - case 3: - return Cancel._decode(input); - case 4: - return Kill._decode(input); - case 5: - return NudgeReferendum._decode(input); - case 6: - return OneFewerDeciding._decode(input); - case 7: - return RefundSubmissionDeposit._decode(input); - case 8: - return SetMetadata._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case Submit: - (value as Submit).encodeTo(output); - break; - case PlaceDecisionDeposit: - (value as PlaceDecisionDeposit).encodeTo(output); - break; - case RefundDecisionDeposit: - (value as RefundDecisionDeposit).encodeTo(output); - break; - case Cancel: - (value as Cancel).encodeTo(output); - break; - case Kill: - (value as Kill).encodeTo(output); - break; - case NudgeReferendum: - (value as NudgeReferendum).encodeTo(output); - break; - case OneFewerDeciding: - (value as OneFewerDeciding).encodeTo(output); - break; - case RefundSubmissionDeposit: - (value as RefundSubmissionDeposit).encodeTo(output); - break; - case SetMetadata: - (value as SetMetadata).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case Submit: - return (value as Submit)._sizeHint(); - case PlaceDecisionDeposit: - return (value as PlaceDecisionDeposit)._sizeHint(); - case RefundDecisionDeposit: - return (value as RefundDecisionDeposit)._sizeHint(); - case Cancel: - return (value as Cancel)._sizeHint(); - case Kill: - return (value as Kill)._sizeHint(); - case NudgeReferendum: - return (value as NudgeReferendum)._sizeHint(); - case OneFewerDeciding: - return (value as OneFewerDeciding)._sizeHint(); - case RefundSubmissionDeposit: - return (value as RefundSubmissionDeposit)._sizeHint(); - case SetMetadata: - return (value as SetMetadata)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Propose a referendum on a privileged action. -/// -/// - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds -/// available. -/// - `proposal_origin`: The origin from which the proposal should be executed. -/// - `proposal`: The proposal. -/// - `enactment_moment`: The moment that the proposal should be enacted. -/// -/// Emits `Submitted`. -class Submit extends Call { - const Submit({required this.proposalOrigin, required this.proposal, required this.enactmentMoment}); - - factory Submit._decode(_i1.Input input) { - return Submit( - proposalOrigin: _i3.OriginCaller.codec.decode(input), - proposal: _i4.Bounded.codec.decode(input), - enactmentMoment: _i5.DispatchTime.codec.decode(input), - ); - } - - /// Box> - final _i3.OriginCaller proposalOrigin; - - /// BoundedCallOf - final _i4.Bounded proposal; - - /// DispatchTime> - final _i5.DispatchTime enactmentMoment; - - @override - Map>> toJson() => { - 'submit': { - 'proposalOrigin': proposalOrigin.toJson(), - 'proposal': proposal.toJson(), - 'enactmentMoment': enactmentMoment.toJson(), - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.OriginCaller.codec.sizeHint(proposalOrigin); - size = size + _i4.Bounded.codec.sizeHint(proposal); - size = size + _i5.DispatchTime.codec.sizeHint(enactmentMoment); - return size; - } - - 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); - } - - @override - bool operator ==(Object 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); -} - -/// Post the Decision Deposit for a referendum. -/// -/// - `origin`: must be `Signed` and the account must have funds available for the -/// referendum's track's Decision Deposit. -/// - `index`: The index of the submitted referendum whose Decision Deposit is yet to be -/// posted. -/// -/// Emits `DecisionDepositPlaced`. -class PlaceDecisionDeposit extends Call { - const PlaceDecisionDeposit({required this.index}); - - factory PlaceDecisionDeposit._decode(_i1.Input input) { - return PlaceDecisionDeposit(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'place_decision_deposit': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Refund the Decision Deposit for a closed referendum back to the depositor. -/// -/// - `origin`: must be `Signed` or `Root`. -/// - `index`: The index of a closed referendum whose Decision Deposit has not yet been -/// refunded. -/// -/// Emits `DecisionDepositRefunded`. -class RefundDecisionDeposit extends Call { - const RefundDecisionDeposit({required this.index}); - - factory RefundDecisionDeposit._decode(_i1.Input input) { - return RefundDecisionDeposit(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'refund_decision_deposit': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Cancel an ongoing referendum. -/// -/// - `origin`: must be the `CancelOrigin`. -/// - `index`: The index of the referendum to be cancelled. -/// -/// Emits `Cancelled`. -class Cancel extends Call { - const Cancel({required this.index}); - - factory Cancel._decode(_i1.Input input) { - return Cancel(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'cancel': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Cancel an ongoing referendum and slash the deposits. -/// -/// - `origin`: must be the `KillOrigin`. -/// - `index`: The index of the referendum to be cancelled. -/// -/// Emits `Killed` and `DepositSlashed`. -class Kill extends Call { - const Kill({required this.index}); - - factory Kill._decode(_i1.Input input) { - return Kill(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'kill': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Advance a referendum onto its next logical state. Only used internally. -/// -/// - `origin`: must be `Root`. -/// - `index`: the referendum to be advanced. -class NudgeReferendum extends Call { - const NudgeReferendum({required this.index}); - - factory NudgeReferendum._decode(_i1.Input input) { - return NudgeReferendum(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'nudge_referendum': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Advance a track onto its next logical state. Only used internally. -/// -/// - `origin`: must be `Root`. -/// - `track`: the track to be advanced. -/// -/// Action item for when there is now one fewer referendum in the deciding phase and the -/// `DecidingCount` is not yet updated. This means that we should either: -/// - begin deciding another referendum (and leave `DecidingCount` alone); or -/// - decrement `DecidingCount`. -class OneFewerDeciding extends Call { - const OneFewerDeciding({required this.track}); - - factory OneFewerDeciding._decode(_i1.Input input) { - return OneFewerDeciding(track: _i1.U16Codec.codec.decode(input)); - } - - /// TrackIdOf - final int track; - - @override - Map> toJson() => { - 'one_fewer_deciding': {'track': track}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U16Codec.codec.sizeHint(track); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => track.hashCode; -} - -/// Refund the Submission Deposit for a closed referendum back to the depositor. -/// -/// - `origin`: must be `Signed` or `Root`. -/// - `index`: The index of a closed referendum whose Submission Deposit has not yet been -/// refunded. -/// -/// Emits `SubmissionDepositRefunded`. -class RefundSubmissionDeposit extends Call { - const RefundSubmissionDeposit({required this.index}); - - factory RefundSubmissionDeposit._decode(_i1.Input input) { - return RefundSubmissionDeposit(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - final int index; - - @override - Map> toJson() => { - 'refund_submission_deposit': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// Set or clear metadata of a referendum. -/// -/// Parameters: -/// - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a -/// 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. -class SetMetadata extends Call { - const SetMetadata({required this.index, this.maybeHash}); - - factory SetMetadata._decode(_i1.Input input) { - return SetMetadata( - index: _i1.U32Codec.codec.decode(input), - maybeHash: const _i1.OptionCodec<_i6.H256>(_i6.H256Codec()).decode(input), - ); - } - - /// ReferendumIndex - final int index; - - /// Option - final _i6.H256? maybeHash; - - @override - Map> toJson() => { - '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); - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is SetMetadata && other.index == index && other.maybeHash == maybeHash; - - @override - int get hashCode => Object.hash(index, maybeHash); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/error_1.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/error_1.dart deleted file mode 100644 index 8c6cf831..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/error_1.dart +++ /dev/null @@ -1,112 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// Referendum is not ongoing. - notOngoing('NotOngoing', 0), - - /// Referendum's decision deposit is already paid. - hasDeposit('HasDeposit', 1), - - /// The track identifier given was invalid. - badTrack('BadTrack', 2), - - /// There are already a full complement of referenda in progress for this track. - full('Full', 3), - - /// The queue of the track is empty. - queueEmpty('QueueEmpty', 4), - - /// The referendum index provided is invalid in this context. - badReferendum('BadReferendum', 5), - - /// There was nothing to do in the advancement. - nothingToDo('NothingToDo', 6), - - /// No track exists for the proposal origin. - noTrack('NoTrack', 7), - - /// Any deposit cannot be refunded until after the decision is over. - unfinished('Unfinished', 8), - - /// The deposit refunder is not the depositor. - noPermission('NoPermission', 9), - - /// The deposit cannot be refunded since none was made. - noDeposit('NoDeposit', 10), - - /// The referendum status is invalid for this operation. - badStatus('BadStatus', 11), - - /// The preimage does not exist. - preimageNotExist('PreimageNotExist', 12), - - /// The preimage is stored with a different length than the one provided. - preimageStoredWithDifferentLength('PreimageStoredWithDifferentLength', 13); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.notOngoing; - case 1: - return Error.hasDeposit; - case 2: - return Error.badTrack; - case 3: - return Error.full; - case 4: - return Error.queueEmpty; - case 5: - return Error.badReferendum; - case 6: - return Error.nothingToDo; - case 7: - return Error.noTrack; - case 8: - return Error.unfinished; - case 9: - return Error.noPermission; - case 10: - return Error.noDeposit; - case 11: - return Error.badStatus; - case 12: - return Error.preimageNotExist; - case 13: - return Error.preimageStoredWithDifferentLength; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/error_2.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/error_2.dart deleted file mode 100644 index 8c6cf831..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/error_2.dart +++ /dev/null @@ -1,112 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// Referendum is not ongoing. - notOngoing('NotOngoing', 0), - - /// Referendum's decision deposit is already paid. - hasDeposit('HasDeposit', 1), - - /// The track identifier given was invalid. - badTrack('BadTrack', 2), - - /// There are already a full complement of referenda in progress for this track. - full('Full', 3), - - /// The queue of the track is empty. - queueEmpty('QueueEmpty', 4), - - /// The referendum index provided is invalid in this context. - badReferendum('BadReferendum', 5), - - /// There was nothing to do in the advancement. - nothingToDo('NothingToDo', 6), - - /// No track exists for the proposal origin. - noTrack('NoTrack', 7), - - /// Any deposit cannot be refunded until after the decision is over. - unfinished('Unfinished', 8), - - /// The deposit refunder is not the depositor. - noPermission('NoPermission', 9), - - /// The deposit cannot be refunded since none was made. - noDeposit('NoDeposit', 10), - - /// The referendum status is invalid for this operation. - badStatus('BadStatus', 11), - - /// The preimage does not exist. - preimageNotExist('PreimageNotExist', 12), - - /// The preimage is stored with a different length than the one provided. - preimageStoredWithDifferentLength('PreimageStoredWithDifferentLength', 13); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.notOngoing; - case 1: - return Error.hasDeposit; - case 2: - return Error.badTrack; - case 3: - return Error.full; - case 4: - return Error.queueEmpty; - case 5: - return Error.badReferendum; - case 6: - return Error.nothingToDo; - case 7: - return Error.noTrack; - case 8: - return Error.unfinished; - case 9: - return Error.noPermission; - case 10: - return Error.noDeposit; - case 11: - return Error.badStatus; - case 12: - return Error.preimageNotExist; - case 13: - return Error.preimageStoredWithDifferentLength; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/event_1.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/event_1.dart deleted file mode 100644 index 1be40aae..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/event_1.dart +++ /dev/null @@ -1,985 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i7; - -import '../../frame_support/traits/preimages/bounded.dart' as _i3; -import '../../pallet_conviction_voting/types/tally.dart' as _i5; -import '../../primitive_types/h256.dart' as _i6; -import '../../sp_core/crypto/account_id32.dart' as _i4; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - Submitted submitted({required int index, required int track, required _i3.Bounded proposal}) { - return Submitted(index: index, track: track, proposal: proposal); - } - - DecisionDepositPlaced decisionDepositPlaced({ - required int index, - required _i4.AccountId32 who, - required BigInt amount, - }) { - return DecisionDepositPlaced(index: index, who: who, amount: amount); - } - - DecisionDepositRefunded decisionDepositRefunded({ - required int index, - required _i4.AccountId32 who, - required BigInt amount, - }) { - return DecisionDepositRefunded(index: index, who: who, amount: amount); - } - - DepositSlashed depositSlashed({required _i4.AccountId32 who, required BigInt amount}) { - return DepositSlashed(who: who, amount: amount); - } - - DecisionStarted decisionStarted({ - required int index, - required int track, - required _i3.Bounded proposal, - required _i5.Tally tally, - }) { - return DecisionStarted(index: index, track: track, proposal: proposal, tally: tally); - } - - ConfirmStarted confirmStarted({required int index}) { - return ConfirmStarted(index: index); - } - - ConfirmAborted confirmAborted({required int index}) { - return ConfirmAborted(index: index); - } - - 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); - } - - 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); - } - - Killed killed({required int index, required _i5.Tally tally}) { - return Killed(index: index, tally: tally); - } - - SubmissionDepositRefunded submissionDepositRefunded({ - required int index, - required _i4.AccountId32 who, - required BigInt amount, - }) { - return SubmissionDepositRefunded(index: index, who: who, amount: amount); - } - - 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); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Submitted._decode(input); - case 1: - return DecisionDepositPlaced._decode(input); - case 2: - return DecisionDepositRefunded._decode(input); - case 3: - return DepositSlashed._decode(input); - case 4: - return DecisionStarted._decode(input); - case 5: - return ConfirmStarted._decode(input); - case 6: - return ConfirmAborted._decode(input); - case 7: - return Confirmed._decode(input); - case 8: - return Approved._decode(input); - case 9: - return Rejected._decode(input); - case 10: - return TimedOut._decode(input); - case 11: - return Cancelled._decode(input); - case 12: - return Killed._decode(input); - case 13: - return SubmissionDepositRefunded._decode(input); - case 14: - return MetadataSet._decode(input); - case 15: - return MetadataCleared._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case Submitted: - (value as Submitted).encodeTo(output); - break; - case DecisionDepositPlaced: - (value as DecisionDepositPlaced).encodeTo(output); - break; - case DecisionDepositRefunded: - (value as DecisionDepositRefunded).encodeTo(output); - break; - case DepositSlashed: - (value as DepositSlashed).encodeTo(output); - break; - case DecisionStarted: - (value as DecisionStarted).encodeTo(output); - break; - case ConfirmStarted: - (value as ConfirmStarted).encodeTo(output); - break; - case ConfirmAborted: - (value as ConfirmAborted).encodeTo(output); - break; - case Confirmed: - (value as Confirmed).encodeTo(output); - break; - case Approved: - (value as Approved).encodeTo(output); - break; - case Rejected: - (value as Rejected).encodeTo(output); - break; - case TimedOut: - (value as TimedOut).encodeTo(output); - break; - case Cancelled: - (value as Cancelled).encodeTo(output); - break; - case Killed: - (value as Killed).encodeTo(output); - break; - case SubmissionDepositRefunded: - (value as SubmissionDepositRefunded).encodeTo(output); - break; - case MetadataSet: - (value as MetadataSet).encodeTo(output); - break; - case MetadataCleared: - (value as MetadataCleared).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case Submitted: - return (value as Submitted)._sizeHint(); - case DecisionDepositPlaced: - return (value as DecisionDepositPlaced)._sizeHint(); - case DecisionDepositRefunded: - return (value as DecisionDepositRefunded)._sizeHint(); - case DepositSlashed: - return (value as DepositSlashed)._sizeHint(); - case DecisionStarted: - return (value as DecisionStarted)._sizeHint(); - case ConfirmStarted: - return (value as ConfirmStarted)._sizeHint(); - case ConfirmAborted: - return (value as ConfirmAborted)._sizeHint(); - case Confirmed: - return (value as Confirmed)._sizeHint(); - case Approved: - return (value as Approved)._sizeHint(); - case Rejected: - return (value as Rejected)._sizeHint(); - case TimedOut: - return (value as TimedOut)._sizeHint(); - case Cancelled: - return (value as Cancelled)._sizeHint(); - case Killed: - return (value as Killed)._sizeHint(); - case SubmissionDepositRefunded: - return (value as SubmissionDepositRefunded)._sizeHint(); - case MetadataSet: - return (value as MetadataSet)._sizeHint(); - case MetadataCleared: - return (value as MetadataCleared)._sizeHint(); - default: - 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}); - - factory Submitted._decode(_i1.Input input) { - return Submitted( - index: _i1.U32Codec.codec.decode(input), - track: _i1.U16Codec.codec.decode(input), - proposal: _i3.Bounded.codec.decode(input), - ); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// TrackIdOf - /// The track (and by extension proposal dispatch origin) of this referendum. - final int track; - - /// BoundedCallOf - /// The proposal for the referendum. - final _i3.Bounded proposal; - - @override - Map> toJson() => { - 'Submitted': {'index': index, 'track': track, 'proposal': proposal.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i1.U16Codec.codec.sizeHint(track); - size = size + _i3.Bounded.codec.sizeHint(proposal); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Submitted && other.index == index && other.track == track && other.proposal == proposal; - - @override - 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}); - - factory DecisionDepositPlaced._decode(_i1.Input input) { - return DecisionDepositPlaced( - index: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::AccountId - /// The account who placed the deposit. - final _i4.AccountId32 who; - - /// BalanceOf - /// The amount placed by the account. - final BigInt amount; - - @override - Map> toJson() => { - 'DecisionDepositPlaced': {'index': index, 'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i4.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is DecisionDepositPlaced && - other.index == index && - _i7.listsEqual(other.who, who) && - other.amount == amount; - - @override - 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}); - - factory DecisionDepositRefunded._decode(_i1.Input input) { - return DecisionDepositRefunded( - index: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::AccountId - /// The account who placed the deposit. - final _i4.AccountId32 who; - - /// BalanceOf - /// The amount placed by the account. - final BigInt amount; - - @override - Map> toJson() => { - 'DecisionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i4.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is DecisionDepositRefunded && - other.index == index && - _i7.listsEqual(other.who, who) && - other.amount == amount; - - @override - 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}); - - factory DepositSlashed._decode(_i1.Input input) { - return DepositSlashed(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - /// The account who placed the deposit. - final _i4.AccountId32 who; - - /// BalanceOf - /// The amount placed by the account. - final BigInt amount; - - @override - Map> toJson() => { - 'DepositSlashed': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i4.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory DecisionStarted._decode(_i1.Input input) { - return DecisionStarted( - index: _i1.U32Codec.codec.decode(input), - track: _i1.U16Codec.codec.decode(input), - proposal: _i3.Bounded.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// TrackIdOf - /// The track (and by extension proposal dispatch origin) of this referendum. - final int track; - - /// BoundedCallOf - /// The proposal for the referendum. - final _i3.Bounded proposal; - - /// T::Tally - /// The current tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'DecisionStarted': {'index': index, 'track': track, 'proposal': proposal.toJson(), 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i1.U16Codec.codec.sizeHint(track); - size = size + _i3.Bounded.codec.sizeHint(proposal); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is DecisionStarted && - other.index == index && - other.track == track && - other.proposal == proposal && - other.tally == tally; - - @override - int get hashCode => Object.hash(index, track, proposal, tally); -} - -class ConfirmStarted extends Event { - const ConfirmStarted({required this.index}); - - factory ConfirmStarted._decode(_i1.Input input) { - return ConfirmStarted(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - @override - Map> toJson() => { - 'ConfirmStarted': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -class ConfirmAborted extends Event { - const ConfirmAborted({required this.index}); - - factory ConfirmAborted._decode(_i1.Input input) { - return ConfirmAborted(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - @override - Map> toJson() => { - 'ConfirmAborted': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// A referendum has ended its confirmation phase and is ready for approval. -class Confirmed extends Event { - 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)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Tally - /// The final tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'Confirmed': {'index': index, 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(index, tally); -} - -/// A referendum has been approved and its proposal has been scheduled. -class Approved extends Event { - const Approved({required this.index}); - - factory Approved._decode(_i1.Input input) { - return Approved(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - @override - Map> toJson() => { - 'Approved': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// A proposal has been rejected by referendum. -class Rejected extends Event { - 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)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Tally - /// The final tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'Rejected': {'index': index, 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory TimedOut._decode(_i1.Input input) { - return TimedOut(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Tally - /// The final tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'TimedOut': {'index': index, 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(index, tally); -} - -/// A referendum has been cancelled. -class Cancelled extends Event { - 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)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Tally - /// The final tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'Cancelled': {'index': index, 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(index, tally); -} - -/// A referendum has been killed. -class Killed extends Event { - 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)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Tally - /// The final tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'Killed': {'index': index, 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory SubmissionDepositRefunded._decode(_i1.Input input) { - return SubmissionDepositRefunded( - index: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::AccountId - /// The account who placed the deposit. - final _i4.AccountId32 who; - - /// BalanceOf - /// The amount placed by the account. - final BigInt amount; - - @override - Map> toJson() => { - 'SubmissionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i4.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SubmissionDepositRefunded && - other.index == index && - _i7.listsEqual(other.who, who) && - other.amount == amount; - - @override - 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}); - - factory MetadataSet._decode(_i1.Input input) { - return MetadataSet(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Hash - /// Preimage hash. - final _i6.H256 hash; - - @override - Map> toJson() => { - 'MetadataSet': {'index': index, 'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i6.H256Codec().sizeHint(hash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - 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}); - - factory MetadataCleared._decode(_i1.Input input) { - return MetadataCleared(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Hash - /// Preimage hash. - final _i6.H256 hash; - - @override - Map> toJson() => { - 'MetadataCleared': {'index': index, 'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i6.H256Codec().sizeHint(hash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => Object.hash(index, hash); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/event_2.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/event_2.dart deleted file mode 100644 index 4010a513..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/pallet/event_2.dart +++ /dev/null @@ -1,985 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i7; - -import '../../frame_support/traits/preimages/bounded.dart' as _i3; -import '../../pallet_ranked_collective/tally.dart' as _i5; -import '../../primitive_types/h256.dart' as _i6; -import '../../sp_core/crypto/account_id32.dart' as _i4; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - Submitted submitted({required int index, required int track, required _i3.Bounded proposal}) { - return Submitted(index: index, track: track, proposal: proposal); - } - - DecisionDepositPlaced decisionDepositPlaced({ - required int index, - required _i4.AccountId32 who, - required BigInt amount, - }) { - return DecisionDepositPlaced(index: index, who: who, amount: amount); - } - - DecisionDepositRefunded decisionDepositRefunded({ - required int index, - required _i4.AccountId32 who, - required BigInt amount, - }) { - return DecisionDepositRefunded(index: index, who: who, amount: amount); - } - - DepositSlashed depositSlashed({required _i4.AccountId32 who, required BigInt amount}) { - return DepositSlashed(who: who, amount: amount); - } - - DecisionStarted decisionStarted({ - required int index, - required int track, - required _i3.Bounded proposal, - required _i5.Tally tally, - }) { - return DecisionStarted(index: index, track: track, proposal: proposal, tally: tally); - } - - ConfirmStarted confirmStarted({required int index}) { - return ConfirmStarted(index: index); - } - - ConfirmAborted confirmAborted({required int index}) { - return ConfirmAborted(index: index); - } - - 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); - } - - 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); - } - - Killed killed({required int index, required _i5.Tally tally}) { - return Killed(index: index, tally: tally); - } - - SubmissionDepositRefunded submissionDepositRefunded({ - required int index, - required _i4.AccountId32 who, - required BigInt amount, - }) { - return SubmissionDepositRefunded(index: index, who: who, amount: amount); - } - - 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); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Submitted._decode(input); - case 1: - return DecisionDepositPlaced._decode(input); - case 2: - return DecisionDepositRefunded._decode(input); - case 3: - return DepositSlashed._decode(input); - case 4: - return DecisionStarted._decode(input); - case 5: - return ConfirmStarted._decode(input); - case 6: - return ConfirmAborted._decode(input); - case 7: - return Confirmed._decode(input); - case 8: - return Approved._decode(input); - case 9: - return Rejected._decode(input); - case 10: - return TimedOut._decode(input); - case 11: - return Cancelled._decode(input); - case 12: - return Killed._decode(input); - case 13: - return SubmissionDepositRefunded._decode(input); - case 14: - return MetadataSet._decode(input); - case 15: - return MetadataCleared._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case Submitted: - (value as Submitted).encodeTo(output); - break; - case DecisionDepositPlaced: - (value as DecisionDepositPlaced).encodeTo(output); - break; - case DecisionDepositRefunded: - (value as DecisionDepositRefunded).encodeTo(output); - break; - case DepositSlashed: - (value as DepositSlashed).encodeTo(output); - break; - case DecisionStarted: - (value as DecisionStarted).encodeTo(output); - break; - case ConfirmStarted: - (value as ConfirmStarted).encodeTo(output); - break; - case ConfirmAborted: - (value as ConfirmAborted).encodeTo(output); - break; - case Confirmed: - (value as Confirmed).encodeTo(output); - break; - case Approved: - (value as Approved).encodeTo(output); - break; - case Rejected: - (value as Rejected).encodeTo(output); - break; - case TimedOut: - (value as TimedOut).encodeTo(output); - break; - case Cancelled: - (value as Cancelled).encodeTo(output); - break; - case Killed: - (value as Killed).encodeTo(output); - break; - case SubmissionDepositRefunded: - (value as SubmissionDepositRefunded).encodeTo(output); - break; - case MetadataSet: - (value as MetadataSet).encodeTo(output); - break; - case MetadataCleared: - (value as MetadataCleared).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case Submitted: - return (value as Submitted)._sizeHint(); - case DecisionDepositPlaced: - return (value as DecisionDepositPlaced)._sizeHint(); - case DecisionDepositRefunded: - return (value as DecisionDepositRefunded)._sizeHint(); - case DepositSlashed: - return (value as DepositSlashed)._sizeHint(); - case DecisionStarted: - return (value as DecisionStarted)._sizeHint(); - case ConfirmStarted: - return (value as ConfirmStarted)._sizeHint(); - case ConfirmAborted: - return (value as ConfirmAborted)._sizeHint(); - case Confirmed: - return (value as Confirmed)._sizeHint(); - case Approved: - return (value as Approved)._sizeHint(); - case Rejected: - return (value as Rejected)._sizeHint(); - case TimedOut: - return (value as TimedOut)._sizeHint(); - case Cancelled: - return (value as Cancelled)._sizeHint(); - case Killed: - return (value as Killed)._sizeHint(); - case SubmissionDepositRefunded: - return (value as SubmissionDepositRefunded)._sizeHint(); - case MetadataSet: - return (value as MetadataSet)._sizeHint(); - case MetadataCleared: - return (value as MetadataCleared)._sizeHint(); - default: - 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}); - - factory Submitted._decode(_i1.Input input) { - return Submitted( - index: _i1.U32Codec.codec.decode(input), - track: _i1.U16Codec.codec.decode(input), - proposal: _i3.Bounded.codec.decode(input), - ); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// TrackIdOf - /// The track (and by extension proposal dispatch origin) of this referendum. - final int track; - - /// BoundedCallOf - /// The proposal for the referendum. - final _i3.Bounded proposal; - - @override - Map> toJson() => { - 'Submitted': {'index': index, 'track': track, 'proposal': proposal.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i1.U16Codec.codec.sizeHint(track); - size = size + _i3.Bounded.codec.sizeHint(proposal); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Submitted && other.index == index && other.track == track && other.proposal == proposal; - - @override - 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}); - - factory DecisionDepositPlaced._decode(_i1.Input input) { - return DecisionDepositPlaced( - index: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::AccountId - /// The account who placed the deposit. - final _i4.AccountId32 who; - - /// BalanceOf - /// The amount placed by the account. - final BigInt amount; - - @override - Map> toJson() => { - 'DecisionDepositPlaced': {'index': index, 'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i4.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is DecisionDepositPlaced && - other.index == index && - _i7.listsEqual(other.who, who) && - other.amount == amount; - - @override - 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}); - - factory DecisionDepositRefunded._decode(_i1.Input input) { - return DecisionDepositRefunded( - index: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::AccountId - /// The account who placed the deposit. - final _i4.AccountId32 who; - - /// BalanceOf - /// The amount placed by the account. - final BigInt amount; - - @override - Map> toJson() => { - 'DecisionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i4.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is DecisionDepositRefunded && - other.index == index && - _i7.listsEqual(other.who, who) && - other.amount == amount; - - @override - 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}); - - factory DepositSlashed._decode(_i1.Input input) { - return DepositSlashed(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - /// T::AccountId - /// The account who placed the deposit. - final _i4.AccountId32 who; - - /// BalanceOf - /// The amount placed by the account. - final BigInt amount; - - @override - Map> toJson() => { - 'DepositSlashed': {'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i4.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory DecisionStarted._decode(_i1.Input input) { - return DecisionStarted( - index: _i1.U32Codec.codec.decode(input), - track: _i1.U16Codec.codec.decode(input), - proposal: _i3.Bounded.codec.decode(input), - tally: _i5.Tally.codec.decode(input), - ); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// TrackIdOf - /// The track (and by extension proposal dispatch origin) of this referendum. - final int track; - - /// BoundedCallOf - /// The proposal for the referendum. - final _i3.Bounded proposal; - - /// T::Tally - /// The current tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'DecisionStarted': {'index': index, 'track': track, 'proposal': proposal.toJson(), 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i1.U16Codec.codec.sizeHint(track); - size = size + _i3.Bounded.codec.sizeHint(proposal); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is DecisionStarted && - other.index == index && - other.track == track && - other.proposal == proposal && - other.tally == tally; - - @override - int get hashCode => Object.hash(index, track, proposal, tally); -} - -class ConfirmStarted extends Event { - const ConfirmStarted({required this.index}); - - factory ConfirmStarted._decode(_i1.Input input) { - return ConfirmStarted(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - @override - Map> toJson() => { - 'ConfirmStarted': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -class ConfirmAborted extends Event { - const ConfirmAborted({required this.index}); - - factory ConfirmAborted._decode(_i1.Input input) { - return ConfirmAborted(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - @override - Map> toJson() => { - 'ConfirmAborted': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// A referendum has ended its confirmation phase and is ready for approval. -class Confirmed extends Event { - 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)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Tally - /// The final tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'Confirmed': {'index': index, 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(index, tally); -} - -/// A referendum has been approved and its proposal has been scheduled. -class Approved extends Event { - const Approved({required this.index}); - - factory Approved._decode(_i1.Input input) { - return Approved(index: _i1.U32Codec.codec.decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - @override - Map> toJson() => { - 'Approved': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => index.hashCode; -} - -/// A proposal has been rejected by referendum. -class Rejected extends Event { - 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)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Tally - /// The final tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'Rejected': {'index': index, 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory TimedOut._decode(_i1.Input input) { - return TimedOut(index: _i1.U32Codec.codec.decode(input), tally: _i5.Tally.codec.decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Tally - /// The final tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'TimedOut': {'index': index, 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(index, tally); -} - -/// A referendum has been cancelled. -class Cancelled extends Event { - 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)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Tally - /// The final tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'Cancelled': {'index': index, 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(index, tally); -} - -/// A referendum has been killed. -class Killed extends Event { - 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)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Tally - /// The final tally of votes in this referendum. - final _i5.Tally tally; - - @override - Map> toJson() => { - 'Killed': {'index': index, 'tally': tally.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i5.Tally.codec.sizeHint(tally); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - 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}); - - factory SubmissionDepositRefunded._decode(_i1.Input input) { - return SubmissionDepositRefunded( - index: _i1.U32Codec.codec.decode(input), - who: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::AccountId - /// The account who placed the deposit. - final _i4.AccountId32 who; - - /// BalanceOf - /// The amount placed by the account. - final BigInt amount; - - @override - Map> toJson() => { - 'SubmissionDepositRefunded': {'index': index, 'who': who.toList(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i4.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SubmissionDepositRefunded && - other.index == index && - _i7.listsEqual(other.who, who) && - other.amount == amount; - - @override - 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}); - - factory MetadataSet._decode(_i1.Input input) { - return MetadataSet(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Hash - /// Preimage hash. - final _i6.H256 hash; - - @override - Map> toJson() => { - 'MetadataSet': {'index': index, 'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i6.H256Codec().sizeHint(hash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - 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}); - - factory MetadataCleared._decode(_i1.Input input) { - return MetadataCleared(index: _i1.U32Codec.codec.decode(input), hash: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// ReferendumIndex - /// Index of the referendum. - final int index; - - /// T::Hash - /// Preimage hash. - final _i6.H256 hash; - - @override - Map> toJson() => { - 'MetadataCleared': {'index': index, 'hash': hash.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + const _i6.H256Codec().sizeHint(hash); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => Object.hash(index, hash); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/curve.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/curve.dart deleted file mode 100644 index 79a32460..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/curve.dart +++ /dev/null @@ -1,263 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../sp_arithmetic/fixed_point/fixed_i64.dart' as _i4; -import '../../sp_arithmetic/per_things/perbill.dart' as _i3; - -abstract class Curve { - const Curve(); - - factory Curve.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CurveCodec codec = $CurveCodec(); - - static const $Curve values = $Curve(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Curve { - const $Curve(); - - LinearDecreasing linearDecreasing({ - required _i3.Perbill length, - required _i3.Perbill floor, - required _i3.Perbill ceil, - }) { - return LinearDecreasing(length: length, floor: floor, ceil: ceil); - } - - SteppedDecreasing steppedDecreasing({ - required _i3.Perbill begin, - required _i3.Perbill end, - required _i3.Perbill step, - required _i3.Perbill 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); - } -} - -class $CurveCodec with _i1.Codec { - const $CurveCodec(); - - @override - Curve decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return LinearDecreasing._decode(input); - case 1: - return SteppedDecreasing._decode(input); - case 2: - return Reciprocal._decode(input); - default: - throw Exception('Curve: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Curve value, _i1.Output output) { - switch (value.runtimeType) { - case LinearDecreasing: - (value as LinearDecreasing).encodeTo(output); - break; - case SteppedDecreasing: - (value as SteppedDecreasing).encodeTo(output); - break; - case Reciprocal: - (value as Reciprocal).encodeTo(output); - break; - default: - throw Exception('Curve: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Curve value) { - switch (value.runtimeType) { - case LinearDecreasing: - return (value as LinearDecreasing)._sizeHint(); - case SteppedDecreasing: - return (value as SteppedDecreasing)._sizeHint(); - case Reciprocal: - return (value as Reciprocal)._sizeHint(); - default: - throw Exception('Curve: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class LinearDecreasing extends Curve { - const LinearDecreasing({required this.length, required this.floor, required this.ceil}); - - factory LinearDecreasing._decode(_i1.Input input) { - return LinearDecreasing( - length: _i1.U32Codec.codec.decode(input), - floor: _i1.U32Codec.codec.decode(input), - ceil: _i1.U32Codec.codec.decode(input), - ); - } - - /// Perbill - final _i3.Perbill length; - - /// Perbill - final _i3.Perbill floor; - - /// Perbill - final _i3.Perbill ceil; - - @override - Map> toJson() => { - 'LinearDecreasing': {'length': length, 'floor': floor, 'ceil': ceil}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.PerbillCodec().sizeHint(length); - size = size + const _i3.PerbillCodec().sizeHint(floor); - size = size + const _i3.PerbillCodec().sizeHint(ceil); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LinearDecreasing && other.length == length && other.floor == floor && other.ceil == ceil; - - @override - 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}); - - factory SteppedDecreasing._decode(_i1.Input input) { - return SteppedDecreasing( - begin: _i1.U32Codec.codec.decode(input), - end: _i1.U32Codec.codec.decode(input), - step: _i1.U32Codec.codec.decode(input), - period: _i1.U32Codec.codec.decode(input), - ); - } - - /// Perbill - final _i3.Perbill begin; - - /// Perbill - final _i3.Perbill end; - - /// Perbill - final _i3.Perbill step; - - /// Perbill - final _i3.Perbill period; - - @override - Map> toJson() => { - 'SteppedDecreasing': {'begin': begin, 'end': end, 'step': step, 'period': period}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.PerbillCodec().sizeHint(begin); - size = size + const _i3.PerbillCodec().sizeHint(end); - size = size + const _i3.PerbillCodec().sizeHint(step); - size = size + const _i3.PerbillCodec().sizeHint(period); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SteppedDecreasing && - other.begin == begin && - other.end == end && - other.step == step && - other.period == period; - - @override - int get hashCode => Object.hash(begin, end, step, period); -} - -class Reciprocal extends Curve { - const Reciprocal({required this.factor, required this.xOffset, required this.yOffset}); - - factory Reciprocal._decode(_i1.Input input) { - return Reciprocal( - factor: _i1.I64Codec.codec.decode(input), - xOffset: _i1.I64Codec.codec.decode(input), - yOffset: _i1.I64Codec.codec.decode(input), - ); - } - - /// FixedI64 - final _i4.FixedI64 factor; - - /// FixedI64 - final _i4.FixedI64 xOffset; - - /// FixedI64 - final _i4.FixedI64 yOffset; - - @override - Map> toJson() => { - 'Reciprocal': {'factor': factor, 'xOffset': xOffset, 'yOffset': yOffset}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i4.FixedI64Codec().sizeHint(factor); - size = size + const _i4.FixedI64Codec().sizeHint(xOffset); - size = size + const _i4.FixedI64Codec().sizeHint(yOffset); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Reciprocal && other.factor == factor && other.xOffset == xOffset && other.yOffset == yOffset; - - @override - int get hashCode => Object.hash(factor, xOffset, yOffset); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/deciding_status.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/deciding_status.dart deleted file mode 100644 index 0330544f..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/deciding_status.dart +++ /dev/null @@ -1,59 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -class DecidingStatus { - const DecidingStatus({required this.since, this.confirming}); - - factory DecidingStatus.decode(_i1.Input input) { - return codec.decode(input); - } - - /// BlockNumber - final int since; - - /// Option - final int? confirming; - - static const $DecidingStatusCodec codec = $DecidingStatusCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'since': since, 'confirming': confirming}; - - @override - bool operator ==(Object other) => - identical(this, other) || other is DecidingStatus && other.since == since && other.confirming == confirming; - - @override - 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); - } - - @override - DecidingStatus decode(_i1.Input input) { - return DecidingStatus( - since: _i1.U32Codec.codec.decode(input), - confirming: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - ); - } - - @override - 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); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/deposit.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/deposit.dart deleted file mode 100644 index 7477eb42..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/deposit.dart +++ /dev/null @@ -1,59 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; -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}); - - factory Deposit.decode(_i1.Input input) { - return codec.decode(input); - } - - /// AccountId - final _i2.AccountId32 who; - - /// Balance - final BigInt amount; - - static const $DepositCodec codec = $DepositCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - 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; - - @override - 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); - } - - @override - Deposit decode(_i1.Input input) { - return Deposit(who: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input)); - } - - @override - int sizeHint(Deposit obj) { - int size = 0; - size = size + const _i2.AccountId32Codec().sizeHint(obj.who); - size = size + _i1.U128Codec.codec.sizeHint(obj.amount); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_info_1.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_info_1.dart deleted file mode 100644 index a4fe6c9b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_info_1.dart +++ /dev/null @@ -1,389 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import 'deposit.dart' as _i4; -import 'referendum_status_1.dart' as _i3; - -abstract class ReferendumInfo { - const ReferendumInfo(); - - factory ReferendumInfo.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $ReferendumInfoCodec codec = $ReferendumInfoCodec(); - - static const $ReferendumInfo values = $ReferendumInfo(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $ReferendumInfo { - const $ReferendumInfo(); - - Ongoing ongoing(_i3.ReferendumStatus value0) { - return Ongoing(value0); - } - - 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); - } - - 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); - } - - Killed killed(int value0) { - return Killed(value0); - } -} - -class $ReferendumInfoCodec with _i1.Codec { - const $ReferendumInfoCodec(); - - @override - ReferendumInfo decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Ongoing._decode(input); - case 1: - return Approved._decode(input); - case 2: - return Rejected._decode(input); - case 3: - return Cancelled._decode(input); - case 4: - return TimedOut._decode(input); - case 5: - return Killed._decode(input); - default: - throw Exception('ReferendumInfo: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(ReferendumInfo value, _i1.Output output) { - switch (value.runtimeType) { - case Ongoing: - (value as Ongoing).encodeTo(output); - break; - case Approved: - (value as Approved).encodeTo(output); - break; - case Rejected: - (value as Rejected).encodeTo(output); - break; - case Cancelled: - (value as Cancelled).encodeTo(output); - break; - case TimedOut: - (value as TimedOut).encodeTo(output); - break; - case Killed: - (value as Killed).encodeTo(output); - break; - default: - throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(ReferendumInfo value) { - switch (value.runtimeType) { - case Ongoing: - return (value as Ongoing)._sizeHint(); - case Approved: - return (value as Approved)._sizeHint(); - case Rejected: - return (value as Rejected)._sizeHint(); - case Cancelled: - return (value as Cancelled)._sizeHint(); - case TimedOut: - return (value as TimedOut)._sizeHint(); - case Killed: - return (value as Killed)._sizeHint(); - default: - throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Ongoing extends ReferendumInfo { - const Ongoing(this.value0); - - factory Ongoing._decode(_i1.Input input) { - return Ongoing(_i3.ReferendumStatus.codec.decode(input)); - } - - /// ReferendumStatus - final _i3.ReferendumStatus value0; - - @override - Map> toJson() => {'Ongoing': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i3.ReferendumStatus.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Approved extends ReferendumInfo { - const Approved(this.value0, this.value1, this.value2); - - factory Approved._decode(_i1.Input input) { - return Approved( - _i1.U32Codec.codec.decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - ); - } - - /// Moment - final int value0; - - /// Option> - final _i4.Deposit? value1; - - /// Option> - final _i4.Deposit? value2; - - @override - Map> 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); - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Approved && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; - - @override - int get hashCode => Object.hash(value0, value1, value2); -} - -class Rejected extends ReferendumInfo { - const Rejected(this.value0, this.value1, this.value2); - - factory Rejected._decode(_i1.Input input) { - return Rejected( - _i1.U32Codec.codec.decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - ); - } - - /// Moment - final int value0; - - /// Option> - final _i4.Deposit? value1; - - /// Option> - final _i4.Deposit? value2; - - @override - Map> 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); - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Rejected && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; - - @override - int get hashCode => Object.hash(value0, value1, value2); -} - -class Cancelled extends ReferendumInfo { - const Cancelled(this.value0, this.value1, this.value2); - - factory Cancelled._decode(_i1.Input input) { - return Cancelled( - _i1.U32Codec.codec.decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - ); - } - - /// Moment - final int value0; - - /// Option> - final _i4.Deposit? value1; - - /// Option> - final _i4.Deposit? value2; - - @override - Map> 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); - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Cancelled && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; - - @override - int get hashCode => Object.hash(value0, value1, value2); -} - -class TimedOut extends ReferendumInfo { - const TimedOut(this.value0, this.value1, this.value2); - - factory TimedOut._decode(_i1.Input input) { - return TimedOut( - _i1.U32Codec.codec.decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - ); - } - - /// Moment - final int value0; - - /// Option> - final _i4.Deposit? value1; - - /// Option> - final _i4.Deposit? value2; - - @override - Map> 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); - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TimedOut && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; - - @override - int get hashCode => Object.hash(value0, value1, value2); -} - -class Killed extends ReferendumInfo { - const Killed(this.value0); - - factory Killed._decode(_i1.Input input) { - return Killed(_i1.U32Codec.codec.decode(input)); - } - - /// Moment - final int value0; - - @override - Map toJson() => {'Killed': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_info_2.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_info_2.dart deleted file mode 100644 index 90cca436..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_info_2.dart +++ /dev/null @@ -1,389 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import 'deposit.dart' as _i4; -import 'referendum_status_2.dart' as _i3; - -abstract class ReferendumInfo { - const ReferendumInfo(); - - factory ReferendumInfo.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $ReferendumInfoCodec codec = $ReferendumInfoCodec(); - - static const $ReferendumInfo values = $ReferendumInfo(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $ReferendumInfo { - const $ReferendumInfo(); - - Ongoing ongoing(_i3.ReferendumStatus value0) { - return Ongoing(value0); - } - - 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); - } - - 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); - } - - Killed killed(int value0) { - return Killed(value0); - } -} - -class $ReferendumInfoCodec with _i1.Codec { - const $ReferendumInfoCodec(); - - @override - ReferendumInfo decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Ongoing._decode(input); - case 1: - return Approved._decode(input); - case 2: - return Rejected._decode(input); - case 3: - return Cancelled._decode(input); - case 4: - return TimedOut._decode(input); - case 5: - return Killed._decode(input); - default: - throw Exception('ReferendumInfo: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(ReferendumInfo value, _i1.Output output) { - switch (value.runtimeType) { - case Ongoing: - (value as Ongoing).encodeTo(output); - break; - case Approved: - (value as Approved).encodeTo(output); - break; - case Rejected: - (value as Rejected).encodeTo(output); - break; - case Cancelled: - (value as Cancelled).encodeTo(output); - break; - case TimedOut: - (value as TimedOut).encodeTo(output); - break; - case Killed: - (value as Killed).encodeTo(output); - break; - default: - throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(ReferendumInfo value) { - switch (value.runtimeType) { - case Ongoing: - return (value as Ongoing)._sizeHint(); - case Approved: - return (value as Approved)._sizeHint(); - case Rejected: - return (value as Rejected)._sizeHint(); - case Cancelled: - return (value as Cancelled)._sizeHint(); - case TimedOut: - return (value as TimedOut)._sizeHint(); - case Killed: - return (value as Killed)._sizeHint(); - default: - throw Exception('ReferendumInfo: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Ongoing extends ReferendumInfo { - const Ongoing(this.value0); - - factory Ongoing._decode(_i1.Input input) { - return Ongoing(_i3.ReferendumStatus.codec.decode(input)); - } - - /// ReferendumStatus - final _i3.ReferendumStatus value0; - - @override - Map> toJson() => {'Ongoing': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i3.ReferendumStatus.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Approved extends ReferendumInfo { - const Approved(this.value0, this.value1, this.value2); - - factory Approved._decode(_i1.Input input) { - return Approved( - _i1.U32Codec.codec.decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - ); - } - - /// Moment - final int value0; - - /// Option> - final _i4.Deposit? value1; - - /// Option> - final _i4.Deposit? value2; - - @override - Map> 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); - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Approved && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; - - @override - int get hashCode => Object.hash(value0, value1, value2); -} - -class Rejected extends ReferendumInfo { - const Rejected(this.value0, this.value1, this.value2); - - factory Rejected._decode(_i1.Input input) { - return Rejected( - _i1.U32Codec.codec.decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - ); - } - - /// Moment - final int value0; - - /// Option> - final _i4.Deposit? value1; - - /// Option> - final _i4.Deposit? value2; - - @override - Map> 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); - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Rejected && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; - - @override - int get hashCode => Object.hash(value0, value1, value2); -} - -class Cancelled extends ReferendumInfo { - const Cancelled(this.value0, this.value1, this.value2); - - factory Cancelled._decode(_i1.Input input) { - return Cancelled( - _i1.U32Codec.codec.decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - ); - } - - /// Moment - final int value0; - - /// Option> - final _i4.Deposit? value1; - - /// Option> - final _i4.Deposit? value2; - - @override - Map> 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); - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Cancelled && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; - - @override - int get hashCode => Object.hash(value0, value1, value2); -} - -class TimedOut extends ReferendumInfo { - const TimedOut(this.value0, this.value1, this.value2); - - factory TimedOut._decode(_i1.Input input) { - return TimedOut( - _i1.U32Codec.codec.decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - const _i1.OptionCodec<_i4.Deposit>(_i4.Deposit.codec).decode(input), - ); - } - - /// Moment - final int value0; - - /// Option> - final _i4.Deposit? value1; - - /// Option> - final _i4.Deposit? value2; - - @override - Map> 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); - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TimedOut && other.value0 == value0 && other.value1 == value1 && other.value2 == value2; - - @override - int get hashCode => Object.hash(value0, value1, value2); -} - -class Killed extends ReferendumInfo { - const Killed(this.value0); - - factory Killed._decode(_i1.Input input) { - return Killed(_i1.U32Codec.codec.decode(input)); - } - - /// Moment - final int value0; - - @override - Map toJson() => {'Killed': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_status_1.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_status_1.dart deleted file mode 100644 index 8bd8a9f7..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_status_1.dart +++ /dev/null @@ -1,191 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i11; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../frame_support/traits/preimages/bounded.dart' as _i3; -import '../../frame_support/traits/schedule/dispatch_time.dart' as _i4; -import '../../pallet_conviction_voting/types/tally.dart' as _i7; -import '../../qp_scheduler/block_number_or_timestamp.dart' as _i10; -import '../../quantus_runtime/origin_caller.dart' as _i2; -import '../../tuples.dart' as _i8; -import '../../tuples_1.dart' as _i9; -import 'deciding_status.dart' as _i6; -import 'deposit.dart' as _i5; - -class ReferendumStatus { - const ReferendumStatus({ - required this.track, - required this.origin, - required this.proposal, - required this.enactment, - required this.submitted, - required this.submissionDeposit, - this.decisionDeposit, - this.deciding, - required this.tally, - required this.inQueue, - this.alarm, - }); - - factory ReferendumStatus.decode(_i1.Input input) { - return codec.decode(input); - } - - /// TrackId - final int track; - - /// RuntimeOrigin - final _i2.OriginCaller origin; - - /// Call - final _i3.Bounded proposal; - - /// DispatchTime - final _i4.DispatchTime enactment; - - /// Moment - final int submitted; - - /// Deposit - final _i5.Deposit submissionDeposit; - - /// Option> - final _i5.Deposit? decisionDeposit; - - /// Option> - final _i6.DecidingStatus? deciding; - - /// Tally - final _i7.Tally tally; - - /// bool - final bool inQueue; - - /// Option<(Moment, ScheduleAddress)> - final _i8.Tuple2>? alarm; - - static const $ReferendumStatusCodec codec = $ReferendumStatusCodec(); - - _i11.Uint8List encode() { - return codec.encode(this); - } - - 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], - ], - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ReferendumStatus && - other.track == track && - other.origin == origin && - other.proposal == proposal && - other.enactment == enactment && - other.submitted == submitted && - other.submissionDeposit == submissionDeposit && - other.decisionDeposit == decisionDeposit && - other.deciding == deciding && - other.tally == tally && - other.inQueue == inQueue && - other.alarm == alarm; - - @override - int get hashCode => Object.hash( - 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, _i1.U32Codec.codec), - ), - ).encodeTo(obj.alarm, output); - } - - @override - ReferendumStatus decode(_i1.Input input) { - return ReferendumStatus( - track: _i1.U16Codec.codec.decode(input), - origin: _i2.OriginCaller.codec.decode(input), - proposal: _i3.Bounded.codec.decode(input), - 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), - 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, _i1.U32Codec.codec), - ), - ).decode(input), - ); - } - - @override - int sizeHint(ReferendumStatus obj) { - int size = 0; - size = size + _i1.U16Codec.codec.sizeHint(obj.track); - size = size + _i2.OriginCaller.codec.sizeHint(obj.origin); - size = size + _i3.Bounded.codec.sizeHint(obj.proposal); - 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 + _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, _i1.U32Codec.codec), - ), - ).sizeHint(obj.alarm); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_status_2.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_status_2.dart deleted file mode 100644 index 80e244fd..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/referendum_status_2.dart +++ /dev/null @@ -1,191 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i11; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../frame_support/traits/preimages/bounded.dart' as _i3; -import '../../frame_support/traits/schedule/dispatch_time.dart' as _i4; -import '../../pallet_ranked_collective/tally.dart' as _i7; -import '../../qp_scheduler/block_number_or_timestamp.dart' as _i10; -import '../../quantus_runtime/origin_caller.dart' as _i2; -import '../../tuples.dart' as _i8; -import '../../tuples_1.dart' as _i9; -import 'deciding_status.dart' as _i6; -import 'deposit.dart' as _i5; - -class ReferendumStatus { - const ReferendumStatus({ - required this.track, - required this.origin, - required this.proposal, - required this.enactment, - required this.submitted, - required this.submissionDeposit, - this.decisionDeposit, - this.deciding, - required this.tally, - required this.inQueue, - this.alarm, - }); - - factory ReferendumStatus.decode(_i1.Input input) { - return codec.decode(input); - } - - /// TrackId - final int track; - - /// RuntimeOrigin - final _i2.OriginCaller origin; - - /// Call - final _i3.Bounded proposal; - - /// DispatchTime - final _i4.DispatchTime enactment; - - /// Moment - final int submitted; - - /// Deposit - final _i5.Deposit submissionDeposit; - - /// Option> - final _i5.Deposit? decisionDeposit; - - /// Option> - final _i6.DecidingStatus? deciding; - - /// Tally - final _i7.Tally tally; - - /// bool - final bool inQueue; - - /// Option<(Moment, ScheduleAddress)> - final _i8.Tuple2>? alarm; - - static const $ReferendumStatusCodec codec = $ReferendumStatusCodec(); - - _i11.Uint8List encode() { - return codec.encode(this); - } - - 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], - ], - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ReferendumStatus && - other.track == track && - other.origin == origin && - other.proposal == proposal && - other.enactment == enactment && - other.submitted == submitted && - other.submissionDeposit == submissionDeposit && - other.decisionDeposit == decisionDeposit && - other.deciding == deciding && - other.tally == tally && - other.inQueue == inQueue && - other.alarm == alarm; - - @override - int get hashCode => Object.hash( - 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, _i1.U32Codec.codec), - ), - ).encodeTo(obj.alarm, output); - } - - @override - ReferendumStatus decode(_i1.Input input) { - return ReferendumStatus( - track: _i1.U16Codec.codec.decode(input), - origin: _i2.OriginCaller.codec.decode(input), - proposal: _i3.Bounded.codec.decode(input), - 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), - 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, _i1.U32Codec.codec), - ), - ).decode(input), - ); - } - - @override - int sizeHint(ReferendumStatus obj) { - int size = 0; - size = size + _i1.U16Codec.codec.sizeHint(obj.track); - size = size + _i2.OriginCaller.codec.sizeHint(obj.origin); - size = size + _i3.Bounded.codec.sizeHint(obj.proposal); - 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 + _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, _i1.U32Codec.codec), - ), - ).sizeHint(obj.alarm); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/track_info.dart b/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/track_info.dart deleted file mode 100644 index 2ce3edf2..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_referenda/types/track_info.dart +++ /dev/null @@ -1,143 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import 'curve.dart' as _i2; - -class TrackInfo { - const TrackInfo({ - required this.name, - required this.maxDeciding, - required this.decisionDeposit, - required this.preparePeriod, - required this.decisionPeriod, - required this.confirmPeriod, - required this.minEnactmentPeriod, - required this.minApproval, - required this.minSupport, - }); - - factory TrackInfo.decode(_i1.Input input) { - return codec.decode(input); - } - - /// &'static str - final String name; - - /// u32 - final int maxDeciding; - - /// Balance - final BigInt decisionDeposit; - - /// Moment - final int preparePeriod; - - /// Moment - final int decisionPeriod; - - /// Moment - final int confirmPeriod; - - /// Moment - final int minEnactmentPeriod; - - /// Curve - final _i2.Curve minApproval; - - /// Curve - final _i2.Curve minSupport; - - static const $TrackInfoCodec codec = $TrackInfoCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map 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) || - other is TrackInfo && - other.name == name && - other.maxDeciding == maxDeciding && - other.decisionDeposit == decisionDeposit && - other.preparePeriod == preparePeriod && - other.decisionPeriod == decisionPeriod && - other.confirmPeriod == confirmPeriod && - other.minEnactmentPeriod == minEnactmentPeriod && - other.minApproval == minApproval && - other.minSupport == minSupport; - - @override - int get hashCode => Object.hash( - name, - maxDeciding, - decisionDeposit, - preparePeriod, - decisionPeriod, - confirmPeriod, - minEnactmentPeriod, - minApproval, - minSupport, - ); -} - -class $TrackInfoCodec with _i1.Codec { - const $TrackInfoCodec(); - - @override - void encodeTo(TrackInfo 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 - TrackInfo decode(_i1.Input input) { - return TrackInfo( - name: _i1.StrCodec.codec.decode(input), - maxDeciding: _i1.U32Codec.codec.decode(input), - decisionDeposit: _i1.U128Codec.codec.decode(input), - preparePeriod: _i1.U32Codec.codec.decode(input), - decisionPeriod: _i1.U32Codec.codec.decode(input), - confirmPeriod: _i1.U32Codec.codec.decode(input), - minEnactmentPeriod: _i1.U32Codec.codec.decode(input), - minApproval: _i2.Curve.codec.decode(input), - minSupport: _i2.Curve.codec.decode(input), - ); - } - - @override - int sizeHint(TrackInfo obj) { - int size = 0; - size = size + _i1.StrCodec.codec.sizeHint(obj.name); - size = size + _i1.U32Codec.codec.sizeHint(obj.maxDeciding); - size = size + _i1.U128Codec.codec.sizeHint(obj.decisionDeposit); - size = size + _i1.U32Codec.codec.sizeHint(obj.preparePeriod); - size = size + _i1.U32Codec.codec.sizeHint(obj.decisionPeriod); - size = size + _i1.U32Codec.codec.sizeHint(obj.confirmPeriod); - size = size + _i1.U32Codec.codec.sizeHint(obj.minEnactmentPeriod); - size = size + _i2.Curve.codec.sizeHint(obj.minApproval); - size = size + _i2.Curve.codec.sizeHint(obj.minSupport); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/high_security_account_data.dart b/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/high_security_account_data.dart deleted file mode 100644 index d44d382c..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/high_security_account_data.dart +++ /dev/null @@ -1,77 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i4; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; - -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.recoverer, required this.delay}); - - factory HighSecurityAccountData.decode(_i1.Input input) { - return codec.decode(input); - } - - /// AccountId - final _i2.AccountId32 interceptor; - - /// AccountId - final _i2.AccountId32 recoverer; - - /// Delay - final _i3.BlockNumberOrTimestamp delay; - - static const $HighSecurityAccountDataCodec codec = $HighSecurityAccountDataCodec(); - - _i4.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'interceptor': interceptor.toList(), - 'recoverer': recoverer.toList(), - 'delay': delay.toJson(), - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is HighSecurityAccountData && - _i5.listsEqual(other.interceptor, interceptor) && - _i5.listsEqual(other.recoverer, recoverer) && - other.delay == delay; - - @override - int get hashCode => Object.hash(interceptor, recoverer, delay); -} - -class $HighSecurityAccountDataCodec with _i1.Codec { - const $HighSecurityAccountDataCodec(); - - @override - void encodeTo(HighSecurityAccountData obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.interceptor, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.recoverer, output); - _i3.BlockNumberOrTimestamp.codec.encodeTo(obj.delay, output); - } - - @override - HighSecurityAccountData decode(_i1.Input input) { - return HighSecurityAccountData( - interceptor: const _i1.U8ArrayCodec(32).decode(input), - recoverer: const _i1.U8ArrayCodec(32).decode(input), - delay: _i3.BlockNumberOrTimestamp.codec.decode(input), - ); - } - - @override - int sizeHint(HighSecurityAccountData obj) { - int size = 0; - size = size + const _i2.AccountId32Codec().sizeHint(obj.interceptor); - size = size + const _i2.AccountId32Codec().sizeHint(obj.recoverer); - size = size + _i3.BlockNumberOrTimestamp.codec.sizeHint(obj.delay); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/call.dart deleted file mode 100644 index bbf5f0b3..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/call.dart +++ /dev/null @@ -1,358 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i7; - -import '../../primitive_types/h256.dart' as _i5; -import '../../qp_scheduler/block_number_or_timestamp.dart' as _i3; -import '../../sp_core/crypto/account_id32.dart' as _i4; -import '../../sp_runtime/multiaddress/multi_address.dart' as _i6; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - SetHighSecurity setHighSecurity({ - required _i3.BlockNumberOrTimestamp delay, - required _i4.AccountId32 interceptor, - required _i4.AccountId32 recoverer, - }) { - return SetHighSecurity(delay: delay, interceptor: interceptor, recoverer: recoverer); - } - - Cancel cancel({required _i5.H256 txId}) { - return Cancel(txId: txId); - } - - ExecuteTransfer executeTransfer({required _i5.H256 txId}) { - return ExecuteTransfer(txId: txId); - } - - ScheduleTransfer scheduleTransfer({required _i6.MultiAddress dest, required BigInt amount}) { - return ScheduleTransfer(dest: dest, amount: amount); - } - - ScheduleTransferWithDelay scheduleTransferWithDelay({ - required _i6.MultiAddress dest, - required BigInt amount, - required _i3.BlockNumberOrTimestamp delay, - }) { - return ScheduleTransferWithDelay(dest: dest, amount: amount, delay: delay); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return SetHighSecurity._decode(input); - case 1: - return Cancel._decode(input); - case 2: - return ExecuteTransfer._decode(input); - case 3: - return ScheduleTransfer._decode(input); - case 4: - return ScheduleTransferWithDelay._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case SetHighSecurity: - (value as SetHighSecurity).encodeTo(output); - break; - case Cancel: - (value as Cancel).encodeTo(output); - break; - case ExecuteTransfer: - (value as ExecuteTransfer).encodeTo(output); - break; - case ScheduleTransfer: - (value as ScheduleTransfer).encodeTo(output); - break; - case ScheduleTransferWithDelay: - (value as ScheduleTransferWithDelay).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case SetHighSecurity: - return (value as SetHighSecurity)._sizeHint(); - case Cancel: - return (value as Cancel)._sizeHint(); - case ExecuteTransfer: - return (value as ExecuteTransfer)._sizeHint(); - case ScheduleTransfer: - return (value as ScheduleTransfer)._sizeHint(); - case ScheduleTransferWithDelay: - return (value as ScheduleTransferWithDelay)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Enable high-security for the calling account with a specified delay -/// -/// - `delay`: The time (in milliseconds) after submission before the transaction executes. -class SetHighSecurity extends Call { - const SetHighSecurity({required this.delay, required this.interceptor, required this.recoverer}); - - factory SetHighSecurity._decode(_i1.Input input) { - return SetHighSecurity( - delay: _i3.BlockNumberOrTimestamp.codec.decode(input), - interceptor: const _i1.U8ArrayCodec(32).decode(input), - recoverer: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// BlockNumberOrTimestampOf - final _i3.BlockNumberOrTimestamp delay; - - /// T::AccountId - final _i4.AccountId32 interceptor; - - /// T::AccountId - final _i4.AccountId32 recoverer; - - @override - Map> toJson() => { - 'set_high_security': { - 'delay': delay.toJson(), - 'interceptor': interceptor.toList(), - 'recoverer': recoverer.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(recoverer); - 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); - const _i1.U8ArrayCodec(32).encodeTo(recoverer, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SetHighSecurity && - other.delay == delay && - _i7.listsEqual(other.interceptor, interceptor) && - _i7.listsEqual(other.recoverer, recoverer); - - @override - int get hashCode => Object.hash(delay, interceptor, recoverer); -} - -/// Cancel a pending reversible transaction scheduled by the caller. -/// -/// - `tx_id`: The unique identifier of the transaction to cancel. -class Cancel extends Call { - const Cancel({required this.txId}); - - factory Cancel._decode(_i1.Input input) { - return Cancel(txId: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::Hash - final _i5.H256 txId; - - @override - Map>> toJson() => { - 'cancel': {'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(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); - - @override - int get hashCode => txId.hashCode; -} - -/// Called by the Scheduler to finalize the scheduled task/call -/// -/// - `tx_id`: The unique id of the transaction to finalize and dispatch. -class ExecuteTransfer extends Call { - const ExecuteTransfer({required this.txId}); - - factory ExecuteTransfer._decode(_i1.Input input) { - return ExecuteTransfer(txId: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::Hash - final _i5.H256 txId; - - @override - Map>> toJson() => { - 'execute_transfer': {'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(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); - - @override - int get hashCode => txId.hashCode; -} - -/// Schedule a transaction for delayed execution. -class ScheduleTransfer extends Call { - 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)); - } - - /// <::Lookup as StaticLookup>::Source - final _i6.MultiAddress dest; - - /// BalanceOf - final BigInt amount; - - @override - Map> toJson() => { - 'schedule_transfer': {'dest': dest.toJson(), 'amount': amount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i6.MultiAddress.codec.sizeHint(dest); - size = size + _i1.U128Codec.codec.sizeHint(amount); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(dest, amount); -} - -/// Schedule a transaction for delayed execution with a custom, one-time delay. -/// -/// This can only be used by accounts that have *not* set up a persistent -/// reversibility configuration with `set_reversibility`. -/// -/// - `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}); - - factory ScheduleTransferWithDelay._decode(_i1.Input input) { - return ScheduleTransferWithDelay( - dest: _i6.MultiAddress.codec.decode(input), - amount: _i1.U128Codec.codec.decode(input), - delay: _i3.BlockNumberOrTimestamp.codec.decode(input), - ); - } - - /// <::Lookup as StaticLookup>::Source - final _i6.MultiAddress dest; - - /// BalanceOf - final BigInt amount; - - /// BlockNumberOrTimestampOf - final _i3.BlockNumberOrTimestamp delay; - - @override - Map> toJson() => { - 'schedule_transfer_with_delay': {'dest': dest.toJson(), 'amount': amount, 'delay': delay.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i6.MultiAddress.codec.sizeHint(dest); - size = size + _i1.U128Codec.codec.sizeHint(amount); - size = size + _i3.BlockNumberOrTimestamp.codec.sizeHint(delay); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ScheduleTransferWithDelay && other.dest == dest && other.amount == amount && other.delay == delay; - - @override - int get hashCode => Object.hash(dest, amount, delay); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/error.dart deleted file mode 100644 index 4014ff7c..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/error.dart +++ /dev/null @@ -1,122 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// The account attempting to enable reversibility is already marked as reversible. - accountAlreadyHighSecurity('AccountAlreadyHighSecurity', 0), - - /// 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), - - /// Recoverer cannot be the account itself, because it is redundant. - recovererCannotBeSelf('RecovererCannotBeSelf', 3), - - /// The specified pending transaction ID was not found. - pendingTxNotFound('PendingTxNotFound', 4), - - /// The caller is not the original submitter of the transaction they are trying to cancel. - notOwner('NotOwner', 5), - - /// The account has reached the maximum number of pending reversible transactions. - tooManyPendingTransactions('TooManyPendingTransactions', 6), - - /// The specified delay period is below the configured minimum. - delayTooShort('DelayTooShort', 7), - - /// Failed to schedule the transaction execution with the scheduler pallet. - schedulingFailed('SchedulingFailed', 8), - - /// Failed to cancel the scheduled task with the scheduler pallet. - cancellationFailed('CancellationFailed', 9), - - /// Failed to decode the OpaqueCall back into a RuntimeCall. - callDecodingFailed('CallDecodingFailed', 10), - - /// Call is invalid. - invalidCall('InvalidCall', 11), - - /// Invalid scheduler origin - invalidSchedulerOrigin('InvalidSchedulerOrigin', 12), - - /// Reverser is invalid - invalidReverser('InvalidReverser', 13), - - /// Cannot schedule one time reversible transaction when account is reversible (theft deterrence) - accountAlreadyReversibleCannotScheduleOneTime('AccountAlreadyReversibleCannotScheduleOneTime', 14), - - /// The interceptor has reached the maximum number of accounts they can intercept for. - tooManyInterceptorAccounts('TooManyInterceptorAccounts', 15); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.accountAlreadyHighSecurity; - case 1: - return Error.accountNotHighSecurity; - case 2: - return Error.interceptorCannotBeSelf; - case 3: - return Error.recovererCannotBeSelf; - case 4: - return Error.pendingTxNotFound; - case 5: - return Error.notOwner; - case 6: - return Error.tooManyPendingTransactions; - case 7: - return Error.delayTooShort; - case 8: - return Error.schedulingFailed; - case 9: - return Error.cancellationFailed; - case 10: - return Error.callDecodingFailed; - case 11: - return Error.invalidCall; - case 12: - return Error.invalidSchedulerOrigin; - case 13: - return Error.invalidReverser; - case 14: - return Error.accountAlreadyReversibleCannotScheduleOneTime; - case 15: - return Error.tooManyInterceptorAccounts; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/event.dart deleted file mode 100644 index 00ca6b90..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/event.dart +++ /dev/null @@ -1,392 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i9; - -import '../../frame_support/dispatch/post_dispatch_info.dart' as _i7; -import '../../primitive_types/h256.dart' as _i5; -import '../../qp_scheduler/block_number_or_timestamp.dart' as _i4; -import '../../qp_scheduler/dispatch_time.dart' as _i6; -import '../../sp_core/crypto/account_id32.dart' as _i3; -import '../../sp_runtime/dispatch_error_with_post_info.dart' as _i8; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - HighSecuritySet highSecuritySet({ - required _i3.AccountId32 who, - required _i3.AccountId32 interceptor, - required _i3.AccountId32 recoverer, - required _i4.BlockNumberOrTimestamp delay, - }) { - return HighSecuritySet(who: who, interceptor: interceptor, recoverer: recoverer, delay: delay); - } - - TransactionScheduled transactionScheduled({ - required _i3.AccountId32 from, - required _i3.AccountId32 to, - required _i3.AccountId32 interceptor, - required BigInt amount, - required _i5.H256 txId, - required _i6.DispatchTime executeAt, - }) { - return TransactionScheduled( - from: from, - to: to, - interceptor: interceptor, - amount: amount, - txId: txId, - executeAt: executeAt, - ); - } - - 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, - }) { - return TransactionExecuted(txId: txId, result: result); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return HighSecuritySet._decode(input); - case 1: - return TransactionScheduled._decode(input); - case 2: - return TransactionCancelled._decode(input); - case 3: - return TransactionExecuted._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case HighSecuritySet: - (value as HighSecuritySet).encodeTo(output); - break; - case TransactionScheduled: - (value as TransactionScheduled).encodeTo(output); - break; - case TransactionCancelled: - (value as TransactionCancelled).encodeTo(output); - break; - case TransactionExecuted: - (value as TransactionExecuted).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case HighSecuritySet: - return (value as HighSecuritySet)._sizeHint(); - case TransactionScheduled: - return (value as TransactionScheduled)._sizeHint(); - case TransactionCancelled: - return (value as TransactionCancelled)._sizeHint(); - case TransactionExecuted: - return (value as TransactionExecuted)._sizeHint(); - default: - 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.recoverer, 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), - recoverer: const _i1.U8ArrayCodec(32).decode(input), - delay: _i4.BlockNumberOrTimestamp.codec.decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::AccountId - final _i3.AccountId32 interceptor; - - /// T::AccountId - final _i3.AccountId32 recoverer; - - /// BlockNumberOrTimestampOf - final _i4.BlockNumberOrTimestamp delay; - - @override - Map> toJson() => { - 'HighSecuritySet': { - 'who': who.toList(), - 'interceptor': interceptor.toList(), - 'recoverer': recoverer.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(recoverer); - 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); - const _i1.U8ArrayCodec(32).encodeTo(recoverer, output); - _i4.BlockNumberOrTimestamp.codec.encodeTo(delay, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is HighSecuritySet && - _i9.listsEqual(other.who, who) && - _i9.listsEqual(other.interceptor, interceptor) && - _i9.listsEqual(other.recoverer, recoverer) && - other.delay == delay; - - @override - int get hashCode => Object.hash(who, interceptor, recoverer, delay); -} - -/// A transaction has been intercepted and scheduled for delayed execution. -/// [from, to, interceptor, amount, tx_id, execute_at_moment] -class TransactionScheduled extends Event { - const TransactionScheduled({ - required this.from, - required this.to, - required this.interceptor, - required this.amount, - required this.txId, - required this.executeAt, - }); - - factory TransactionScheduled._decode(_i1.Input input) { - return TransactionScheduled( - from: const _i1.U8ArrayCodec(32).decode(input), - to: const _i1.U8ArrayCodec(32).decode(input), - interceptor: const _i1.U8ArrayCodec(32).decode(input), - amount: _i1.U128Codec.codec.decode(input), - txId: const _i1.U8ArrayCodec(32).decode(input), - executeAt: _i6.DispatchTime.codec.decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 from; - - /// T::AccountId - final _i3.AccountId32 to; - - /// T::AccountId - final _i3.AccountId32 interceptor; - - /// T::Balance - final BigInt amount; - - /// T::Hash - final _i5.H256 txId; - - /// DispatchTime, T::Moment> - final _i6.DispatchTime executeAt; - - @override - Map> toJson() => { - 'TransactionScheduled': { - 'from': from.toList(), - 'to': to.toList(), - 'interceptor': interceptor.toList(), - '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 + _i1.U128Codec.codec.sizeHint(amount); - size = size + const _i5.H256Codec().sizeHint(txId); - size = size + _i6.DispatchTime.codec.sizeHint(executeAt); - return size; - } - - 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); - _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) || - other is TransactionScheduled && - _i9.listsEqual(other.from, from) && - _i9.listsEqual(other.to, to) && - _i9.listsEqual(other.interceptor, interceptor) && - other.amount == amount && - _i9.listsEqual(other.txId, txId) && - other.executeAt == executeAt; - - @override - int get hashCode => Object.hash(from, to, interceptor, amount, txId, executeAt); -} - -/// A scheduled transaction has been successfully cancelled by the owner. -/// [who, tx_id] -class TransactionCancelled extends Event { - const TransactionCancelled({required this.who, required this.txId}); - - factory TransactionCancelled._decode(_i1.Input input) { - return TransactionCancelled( - who: const _i1.U8ArrayCodec(32).decode(input), - txId: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// T::Hash - final _i5.H256 txId; - - @override - Map>> toJson() => { - 'TransactionCancelled': {'who': who.toList(), 'txId': txId.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + const _i5.H256Codec().sizeHint(txId); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TransactionCancelled && _i9.listsEqual(other.who, who) && _i9.listsEqual(other.txId, txId); - - @override - int get hashCode => Object.hash(who, txId); -} - -/// A scheduled transaction was executed by the scheduler. -/// [tx_id, dispatch_result] -class TransactionExecuted extends Event { - 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>( - _i7.PostDispatchInfo.codec, - _i8.DispatchErrorWithPostInfo.codec, - ).decode(input), - ); - } - - /// T::Hash - final _i5.H256 txId; - - /// DispatchResultWithPostInfo - final _i1.Result<_i7.PostDispatchInfo, _i8.DispatchErrorWithPostInfo> result; - - @override - Map> 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>( - _i7.PostDispatchInfo.codec, - _i8.DispatchErrorWithPostInfo.codec, - ).sizeHint(result); - return size; - } - - void encodeTo(_i1.Output 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TransactionExecuted && _i9.listsEqual(other.txId, txId) && other.result == result; - - @override - int get hashCode => Object.hash(txId, result); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/hold_reason.dart b/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/hold_reason.dart deleted file mode 100644 index bca8ed2f..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pallet/hold_reason.dart +++ /dev/null @@ -1,45 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum HoldReason { - scheduledTransfer('ScheduledTransfer', 0); - - const HoldReason(this.variantName, this.codecIndex); - - factory HoldReason.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $HoldReasonCodec codec = $HoldReasonCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $HoldReasonCodec with _i1.Codec { - const $HoldReasonCodec(); - - @override - HoldReason decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return HoldReason.scheduledTransfer; - default: - throw Exception('HoldReason: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(HoldReason value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pending_transfer.dart b/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pending_transfer.dart deleted file mode 100644 index 823f72db..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_reversible_transfers/pending_transfer.dart +++ /dev/null @@ -1,99 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i4; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; - -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.amount, - }); - - factory PendingTransfer.decode(_i1.Input input) { - return codec.decode(input); - } - - /// AccountId - final _i2.AccountId32 from; - - /// AccountId - final _i2.AccountId32 to; - - /// AccountId - final _i2.AccountId32 interceptor; - - /// Call - final _i3.Bounded call; - - /// Balance - final BigInt amount; - - static const $PendingTransferCodec codec = $PendingTransferCodec(); - - _i4.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'from': from.toList(), - 'to': to.toList(), - 'interceptor': interceptor.toList(), - 'call': call.toJson(), - 'amount': amount, - }; - - @override - bool operator ==(Object 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 && - other.amount == amount; - - @override - int get hashCode => Object.hash(from, to, interceptor, call, 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); - } - - @override - PendingTransfer decode(_i1.Input input) { - 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), - amount: _i1.U128Codec.codec.decode(input), - ); - } - - @override - int sizeHint(PendingTransfer obj) { - 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 + _i1.U128Codec.codec.sizeHint(obj.amount); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/call.dart deleted file mode 100644 index 92a790d4..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/call.dart +++ /dev/null @@ -1,821 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i6; - -import '../../qp_scheduler/block_number_or_timestamp.dart' as _i4; -import '../../quantus_runtime/runtime_call.dart' as _i5; -import '../../tuples_1.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - Schedule schedule({ - required int when, - _i3.Tuple2<_i4.BlockNumberOrTimestamp, int>? maybePeriodic, - required int priority, - required _i5.RuntimeCall call, - }) { - return Schedule(when: when, maybePeriodic: maybePeriodic, priority: priority, call: call); - } - - Cancel cancel({required _i4.BlockNumberOrTimestamp when, required int index}) { - return Cancel(when: when, index: index); - } - - ScheduleNamed scheduleNamed({ - required List id, - required int when, - _i3.Tuple2<_i4.BlockNumberOrTimestamp, int>? maybePeriodic, - required int priority, - required _i5.RuntimeCall call, - }) { - return ScheduleNamed(id: id, when: when, maybePeriodic: maybePeriodic, priority: priority, call: call); - } - - CancelNamed cancelNamed({required List id}) { - return CancelNamed(id: id); - } - - ScheduleAfter scheduleAfter({ - required _i4.BlockNumberOrTimestamp after, - _i3.Tuple2<_i4.BlockNumberOrTimestamp, int>? maybePeriodic, - required int priority, - required _i5.RuntimeCall call, - }) { - return ScheduleAfter(after: after, maybePeriodic: maybePeriodic, priority: priority, call: call); - } - - ScheduleNamedAfter scheduleNamedAfter({ - required List id, - required _i4.BlockNumberOrTimestamp after, - _i3.Tuple2<_i4.BlockNumberOrTimestamp, int>? maybePeriodic, - required int priority, - required _i5.RuntimeCall call, - }) { - return ScheduleNamedAfter(id: id, after: after, maybePeriodic: maybePeriodic, priority: priority, call: call); - } - - SetRetry setRetry({ - required _i3.Tuple2<_i4.BlockNumberOrTimestamp, int> task, - required int retries, - required _i4.BlockNumberOrTimestamp period, - }) { - return SetRetry(task: task, retries: retries, period: period); - } - - SetRetryNamed setRetryNamed({ - required List id, - required int retries, - required _i4.BlockNumberOrTimestamp period, - }) { - return SetRetryNamed(id: id, retries: retries, period: period); - } - - CancelRetry cancelRetry({required _i3.Tuple2<_i4.BlockNumberOrTimestamp, int> task}) { - return CancelRetry(task: task); - } - - CancelRetryNamed cancelRetryNamed({required List id}) { - return CancelRetryNamed(id: id); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Schedule._decode(input); - case 1: - return Cancel._decode(input); - case 2: - return ScheduleNamed._decode(input); - case 3: - return CancelNamed._decode(input); - case 4: - return ScheduleAfter._decode(input); - case 5: - return ScheduleNamedAfter._decode(input); - case 6: - return SetRetry._decode(input); - case 7: - return SetRetryNamed._decode(input); - case 8: - return CancelRetry._decode(input); - case 9: - return CancelRetryNamed._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case Schedule: - (value as Schedule).encodeTo(output); - break; - case Cancel: - (value as Cancel).encodeTo(output); - break; - case ScheduleNamed: - (value as ScheduleNamed).encodeTo(output); - break; - case CancelNamed: - (value as CancelNamed).encodeTo(output); - break; - case ScheduleAfter: - (value as ScheduleAfter).encodeTo(output); - break; - case ScheduleNamedAfter: - (value as ScheduleNamedAfter).encodeTo(output); - break; - case SetRetry: - (value as SetRetry).encodeTo(output); - break; - case SetRetryNamed: - (value as SetRetryNamed).encodeTo(output); - break; - case CancelRetry: - (value as CancelRetry).encodeTo(output); - break; - case CancelRetryNamed: - (value as CancelRetryNamed).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case Schedule: - return (value as Schedule)._sizeHint(); - case Cancel: - return (value as Cancel)._sizeHint(); - case ScheduleNamed: - return (value as ScheduleNamed)._sizeHint(); - case CancelNamed: - return (value as CancelNamed)._sizeHint(); - case ScheduleAfter: - return (value as ScheduleAfter)._sizeHint(); - case ScheduleNamedAfter: - return (value as ScheduleNamedAfter)._sizeHint(); - case SetRetry: - return (value as SetRetry)._sizeHint(); - case SetRetryNamed: - return (value as SetRetryNamed)._sizeHint(); - case CancelRetry: - return (value as CancelRetry)._sizeHint(); - case CancelRetryNamed: - return (value as CancelRetryNamed)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Anonymously schedule a task. -class Schedule extends Call { - const Schedule({required this.when, this.maybePeriodic, required this.priority, required this.call}); - - factory Schedule._decode(_i1.Input input) { - return Schedule( - when: _i1.U32Codec.codec.decode(input), - maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).decode(input), - priority: _i1.U8Codec.codec.decode(input), - call: _i5.RuntimeCall.codec.decode(input), - ); - } - - /// BlockNumberFor - final int when; - - /// Option, T::Moment>> - final _i3.Tuple2<_i4.BlockNumberOrTimestamp, int>? maybePeriodic; - - /// schedule::Priority - final int priority; - - /// Box<::RuntimeCall> - final _i5.RuntimeCall call; - - @override - Map> toJson() => { - 'schedule': { - 'when': when, - 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], - 'priority': priority, - 'call': call.toJson(), - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(when); - size = - size + - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).sizeHint(maybePeriodic); - size = size + _i1.U8Codec.codec.sizeHint(priority); - size = size + _i5.RuntimeCall.codec.sizeHint(call); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(when, output); - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).encodeTo(maybePeriodic, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i5.RuntimeCall.codec.encodeTo(call, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Schedule && - other.when == when && - other.maybePeriodic == maybePeriodic && - other.priority == priority && - other.call == call; - - @override - int get hashCode => Object.hash(when, maybePeriodic, priority, call); -} - -/// Cancel an anonymously scheduled task. -class Cancel extends Call { - 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)); - } - - /// BlockNumberOrTimestampOf - final _i4.BlockNumberOrTimestamp when; - - /// u32 - final int index; - - @override - Map> toJson() => { - 'cancel': {'when': when.toJson(), 'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i4.BlockNumberOrTimestamp.codec.sizeHint(when); - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(when, index); -} - -/// Schedule a named task. -class ScheduleNamed extends Call { - const ScheduleNamed({ - required this.id, - required this.when, - this.maybePeriodic, - required this.priority, - required this.call, - }); - - factory ScheduleNamed._decode(_i1.Input input) { - return ScheduleNamed( - id: const _i1.U8ArrayCodec(32).decode(input), - when: _i1.U32Codec.codec.decode(input), - maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).decode(input), - priority: _i1.U8Codec.codec.decode(input), - call: _i5.RuntimeCall.codec.decode(input), - ); - } - - /// TaskName - final List id; - - /// BlockNumberFor - final int when; - - /// Option, T::Moment>> - final _i3.Tuple2<_i4.BlockNumberOrTimestamp, int>? maybePeriodic; - - /// schedule::Priority - final int priority; - - /// Box<::RuntimeCall> - final _i5.RuntimeCall call; - - @override - Map> toJson() => { - 'schedule_named': { - 'id': id.toList(), - 'when': when, - 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], - 'priority': priority, - 'call': call.toJson(), - }, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(32).sizeHint(id); - size = size + _i1.U32Codec.codec.sizeHint(when); - size = - size + - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).sizeHint(maybePeriodic); - size = size + _i1.U8Codec.codec.sizeHint(priority); - size = size + _i5.RuntimeCall.codec.sizeHint(call); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(id, output); - _i1.U32Codec.codec.encodeTo(when, output); - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).encodeTo(maybePeriodic, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i5.RuntimeCall.codec.encodeTo(call, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ScheduleNamed && - _i6.listsEqual(other.id, id) && - other.when == when && - other.maybePeriodic == maybePeriodic && - other.priority == priority && - other.call == call; - - @override - int get hashCode => Object.hash(id, when, maybePeriodic, priority, call); -} - -/// Cancel a named scheduled task. -class CancelNamed extends Call { - const CancelNamed({required this.id}); - - factory CancelNamed._decode(_i1.Input input) { - return CancelNamed(id: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// TaskName - final List id; - - @override - Map>> toJson() => { - 'cancel_named': {'id': id.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(32).sizeHint(id); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => id.hashCode; -} - -/// Anonymously schedule a task after a delay. -class ScheduleAfter extends Call { - const ScheduleAfter({required this.after, this.maybePeriodic, required this.priority, required this.call}); - - factory ScheduleAfter._decode(_i1.Input input) { - return ScheduleAfter( - after: _i4.BlockNumberOrTimestamp.codec.decode(input), - maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).decode(input), - priority: _i1.U8Codec.codec.decode(input), - call: _i5.RuntimeCall.codec.decode(input), - ); - } - - /// BlockNumberOrTimestamp, T::Moment> - final _i4.BlockNumberOrTimestamp after; - - /// Option, T::Moment>> - final _i3.Tuple2<_i4.BlockNumberOrTimestamp, int>? maybePeriodic; - - /// schedule::Priority - final int priority; - - /// Box<::RuntimeCall> - final _i5.RuntimeCall call; - - @override - Map> toJson() => { - 'schedule_after': { - 'after': after.toJson(), - 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], - 'priority': priority, - 'call': call.toJson(), - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i4.BlockNumberOrTimestamp.codec.sizeHint(after); - size = - size + - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).sizeHint(maybePeriodic); - size = size + _i1.U8Codec.codec.sizeHint(priority); - size = size + _i5.RuntimeCall.codec.sizeHint(call); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i4.BlockNumberOrTimestamp.codec.encodeTo(after, output); - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).encodeTo(maybePeriodic, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i5.RuntimeCall.codec.encodeTo(call, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ScheduleAfter && - other.after == after && - other.maybePeriodic == maybePeriodic && - other.priority == priority && - other.call == call; - - @override - int get hashCode => Object.hash(after, maybePeriodic, priority, call); -} - -/// Schedule a named task after a delay. -class ScheduleNamedAfter extends Call { - const ScheduleNamedAfter({ - required this.id, - required this.after, - this.maybePeriodic, - required this.priority, - required this.call, - }); - - factory ScheduleNamedAfter._decode(_i1.Input input) { - return ScheduleNamedAfter( - id: const _i1.U8ArrayCodec(32).decode(input), - after: _i4.BlockNumberOrTimestamp.codec.decode(input), - maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).decode(input), - priority: _i1.U8Codec.codec.decode(input), - call: _i5.RuntimeCall.codec.decode(input), - ); - } - - /// TaskName - final List id; - - /// BlockNumberOrTimestamp, T::Moment> - final _i4.BlockNumberOrTimestamp after; - - /// Option, T::Moment>> - final _i3.Tuple2<_i4.BlockNumberOrTimestamp, int>? maybePeriodic; - - /// schedule::Priority - final int priority; - - /// Box<::RuntimeCall> - final _i5.RuntimeCall call; - - @override - Map> toJson() => { - 'schedule_named_after': { - 'id': id.toList(), - 'after': after.toJson(), - 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], - 'priority': priority, - 'call': call.toJson(), - }, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(32).sizeHint(id); - size = size + _i4.BlockNumberOrTimestamp.codec.sizeHint(after); - size = - size + - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).sizeHint(maybePeriodic); - size = size + _i1.U8Codec.codec.sizeHint(priority); - size = size + _i5.RuntimeCall.codec.sizeHint(call); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - const _i1.U8ArrayCodec(32).encodeTo(id, output); - _i4.BlockNumberOrTimestamp.codec.encodeTo(after, output); - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).encodeTo(maybePeriodic, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i5.RuntimeCall.codec.encodeTo(call, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ScheduleNamedAfter && - _i6.listsEqual(other.id, id) && - other.after == after && - other.maybePeriodic == maybePeriodic && - other.priority == priority && - other.call == call; - - @override - int get hashCode => Object.hash(id, after, maybePeriodic, priority, call); -} - -/// Set a retry configuration for a task so that, in case its scheduled run fails, it will -/// be retried after `period` blocks, for a total amount of `retries` retries or until it -/// succeeds. -/// -/// Tasks which need to be scheduled for a retry are still subject to weight metering and -/// agenda space, same as a regular task. If a periodic task fails, it will be scheduled -/// normally while the task is retrying. -/// -/// Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic -/// 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`. -class SetRetry extends Call { - const SetRetry({required this.task, required this.retries, required this.period}); - - factory SetRetry._decode(_i1.Input input) { - return SetRetry( - task: const _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input), - retries: _i1.U8Codec.codec.decode(input), - period: _i4.BlockNumberOrTimestamp.codec.decode(input), - ); - } - - /// TaskAddressOf - final _i3.Tuple2<_i4.BlockNumberOrTimestamp, int> task; - - /// u8 - final int retries; - - /// BlockNumberOrTimestampOf - final _i4.BlockNumberOrTimestamp period; - - @override - Map> toJson() => { - 'set_retry': { - 'task': [task.value0.toJson(), task.value1], - 'retries': retries, - 'period': period.toJson(), - }, - }; - - int _sizeHint() { - int size = 1; - size = - size + - const _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).sizeHint(task); - size = size + _i1.U8Codec.codec.sizeHint(retries); - size = size + _i4.BlockNumberOrTimestamp.codec.sizeHint(period); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - const _i3.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); - } - - @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); -} - -/// Set a retry configuration for a named task so that, in case its scheduled run fails, it -/// will be retried after `period` blocks, for a total amount of `retries` retries or until -/// it succeeds. -/// -/// Tasks which need to be scheduled for a retry are still subject to weight metering and -/// agenda space, same as a regular task. If a periodic task fails, it will be scheduled -/// normally while the task is retrying. -/// -/// Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic -/// 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`. -class SetRetryNamed extends Call { - const SetRetryNamed({required this.id, required this.retries, required this.period}); - - factory SetRetryNamed._decode(_i1.Input input) { - return SetRetryNamed( - id: const _i1.U8ArrayCodec(32).decode(input), - retries: _i1.U8Codec.codec.decode(input), - period: _i4.BlockNumberOrTimestamp.codec.decode(input), - ); - } - - /// TaskName - final List id; - - /// u8 - final int retries; - - /// BlockNumberOrTimestampOf - final _i4.BlockNumberOrTimestamp period; - - @override - Map> toJson() => { - 'set_retry_named': {'id': id.toList(), 'retries': retries, 'period': period.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(32).sizeHint(id); - size = size + _i1.U8Codec.codec.sizeHint(retries); - size = size + _i4.BlockNumberOrTimestamp.codec.sizeHint(period); - return size; - } - - 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); - } - - @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); -} - -/// Removes the retry configuration of a task. -class CancelRetry extends Call { - const CancelRetry({required this.task}); - - factory CancelRetry._decode(_i1.Input input) { - return CancelRetry( - task: const _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input), - ); - } - - /// TaskAddressOf - final _i3.Tuple2<_i4.BlockNumberOrTimestamp, int> task; - - @override - Map>> toJson() => { - 'cancel_retry': { - 'task': [task.value0.toJson(), task.value1], - }, - }; - - int _sizeHint() { - int size = 1; - size = - size + - const _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).sizeHint(task); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - const _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).encodeTo(task, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is CancelRetry && other.task == task; - - @override - int get hashCode => task.hashCode; -} - -/// Cancel the retry configuration of a named task. -class CancelRetryNamed extends Call { - const CancelRetryNamed({required this.id}); - - factory CancelRetryNamed._decode(_i1.Input input) { - return CancelRetryNamed(id: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// TaskName - final List id; - - @override - Map>> toJson() => { - 'cancel_retry_named': {'id': id.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(32).sizeHint(id); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => id.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/error.dart deleted file mode 100644 index 4cdb7fe1..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/error.dart +++ /dev/null @@ -1,72 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// Failed to schedule a call - failedToSchedule('FailedToSchedule', 0), - - /// Cannot find the scheduled call. - notFound('NotFound', 1), - - /// Given target block number is in the past. - targetBlockNumberInPast('TargetBlockNumberInPast', 2), - - /// Given target timestamp is in the past. - targetTimestampInPast('TargetTimestampInPast', 3), - - /// Reschedule failed because it does not change scheduled time. - rescheduleNoChange('RescheduleNoChange', 4), - - /// Attempt to use a non-named function on a named task. - named('Named', 5); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.failedToSchedule; - case 1: - return Error.notFound; - case 2: - return Error.targetBlockNumberInPast; - case 3: - return Error.targetTimestampInPast; - case 4: - return Error.rescheduleNoChange; - case 5: - return Error.named; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/event.dart deleted file mode 100644 index 09186880..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/pallet/event.dart +++ /dev/null @@ -1,690 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../qp_scheduler/block_number_or_timestamp.dart' as _i3; -import '../../sp_runtime/dispatch_error.dart' as _i5; -import '../../tuples_1.dart' as _i4; - -/// Events type. -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - 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); - } - - Dispatched dispatched({ - required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, - List? id, - required _i1.Result result, - }) { - return Dispatched(task: task, id: id, result: result); - } - - RetrySet retrySet({ - required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, - List? id, - required _i3.BlockNumberOrTimestamp period, - required int 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); - } - - CallUnavailable callUnavailable({required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id}) { - return CallUnavailable(task: task, id: id); - } - - PeriodicFailed periodicFailed({required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id}) { - return PeriodicFailed(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); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Scheduled._decode(input); - case 1: - return Canceled._decode(input); - case 2: - return Dispatched._decode(input); - case 3: - return RetrySet._decode(input); - case 4: - return RetryCancelled._decode(input); - case 5: - return CallUnavailable._decode(input); - case 6: - return PeriodicFailed._decode(input); - case 7: - return RetryFailed._decode(input); - case 8: - return PermanentlyOverweight._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case Scheduled: - (value as Scheduled).encodeTo(output); - break; - case Canceled: - (value as Canceled).encodeTo(output); - break; - case Dispatched: - (value as Dispatched).encodeTo(output); - break; - case RetrySet: - (value as RetrySet).encodeTo(output); - break; - case RetryCancelled: - (value as RetryCancelled).encodeTo(output); - break; - case CallUnavailable: - (value as CallUnavailable).encodeTo(output); - break; - case PeriodicFailed: - (value as PeriodicFailed).encodeTo(output); - break; - case RetryFailed: - (value as RetryFailed).encodeTo(output); - break; - case PermanentlyOverweight: - (value as PermanentlyOverweight).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case Scheduled: - return (value as Scheduled)._sizeHint(); - case Canceled: - return (value as Canceled)._sizeHint(); - case Dispatched: - return (value as Dispatched)._sizeHint(); - case RetrySet: - return (value as RetrySet)._sizeHint(); - case RetryCancelled: - return (value as RetryCancelled)._sizeHint(); - case CallUnavailable: - return (value as CallUnavailable)._sizeHint(); - case PeriodicFailed: - return (value as PeriodicFailed)._sizeHint(); - case RetryFailed: - return (value as RetryFailed)._sizeHint(); - case PermanentlyOverweight: - return (value as PermanentlyOverweight)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Scheduled some task. -class Scheduled extends Event { - 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)); - } - - /// BlockNumberOrTimestampOf - final _i3.BlockNumberOrTimestamp when; - - /// u32 - final int index; - - @override - Map> toJson() => { - 'Scheduled': {'when': when.toJson(), 'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.BlockNumberOrTimestamp.codec.sizeHint(when); - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(when, index); -} - -/// Canceled some task. -class Canceled extends Event { - 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)); - } - - /// BlockNumberOrTimestampOf - final _i3.BlockNumberOrTimestamp when; - - /// u32 - final int index; - - @override - Map> toJson() => { - 'Canceled': {'when': when.toJson(), 'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.BlockNumberOrTimestamp.codec.sizeHint(when); - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(when, index); -} - -/// Dispatched some task. -class Dispatched extends Event { - const Dispatched({required this.task, this.id, required this.result}); - - factory Dispatched._decode(_i1.Input input) { - return Dispatched( - task: const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( - _i3.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input), - id: const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), - result: const _i1.ResultCodec( - _i1.NullCodec.codec, - _i5.DispatchError.codec, - ).decode(input), - ); - } - - /// TaskAddressOf - final _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task; - - /// Option - final List? id; - - /// DispatchResult - final _i1.Result result; - - @override - Map> toJson() => { - 'Dispatched': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - 'result': result.toJson(), - }, - }; - - int _sizeHint() { - int size = 1; - 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.ResultCodec( - _i1.NullCodec.codec, - _i5.DispatchError.codec, - ).sizeHint(result); - return size; - } - - void encodeTo(_i1.Output 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); - const _i1.ResultCodec( - _i1.NullCodec.codec, - _i5.DispatchError.codec, - ).encodeTo(result, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is Dispatched && other.task == task && other.id == id && other.result == result; - - @override - 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}); - - factory RetrySet._decode(_i1.Input input) { - return RetrySet( - task: const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( - _i3.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input), - id: const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), - period: _i3.BlockNumberOrTimestamp.codec.decode(input), - retries: _i1.U8Codec.codec.decode(input), - ); - } - - /// TaskAddressOf - final _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task; - - /// Option - final List? id; - - /// BlockNumberOrTimestampOf - final _i3.BlockNumberOrTimestamp period; - - /// u8 - final int retries; - - @override - Map> toJson() => { - 'RetrySet': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - 'period': period.toJson(), - 'retries': retries, - }, - }; - - int _sizeHint() { - int size = 1; - 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 + _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); - 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); - } - - @override - bool operator ==(Object other) => - 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); -} - -/// Cancel a retry configuration for some task. -class RetryCancelled extends Event { - const RetryCancelled({required this.task, this.id}); - - factory RetryCancelled._decode(_i1.Input input) { - return RetryCancelled( - task: const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( - _i3.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input), - id: const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), - ); - } - - /// TaskAddressOf - final _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task; - - /// Option - final List? id; - - @override - Map?>> toJson() => { - 'RetryCancelled': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - }, - }; - - int _sizeHint() { - int size = 1; - 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); - return size; - } - - void encodeTo(_i1.Output 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is RetryCancelled && other.task == task && other.id == id; - - @override - 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}); - - factory CallUnavailable._decode(_i1.Input input) { - return CallUnavailable( - task: const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( - _i3.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input), - id: const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), - ); - } - - /// TaskAddressOf - final _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task; - - /// Option - final List? id; - - @override - Map?>> toJson() => { - 'CallUnavailable': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - }, - }; - - int _sizeHint() { - int size = 1; - 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); - return size; - } - - void encodeTo(_i1.Output 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is CallUnavailable && other.task == task && other.id == id; - - @override - int get hashCode => Object.hash(task, id); -} - -/// The given task was unable to be renewed since the agenda is full at that block. -class PeriodicFailed extends Event { - const PeriodicFailed({required this.task, this.id}); - - factory PeriodicFailed._decode(_i1.Input input) { - return PeriodicFailed( - task: const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( - _i3.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input), - id: const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), - ); - } - - /// TaskAddressOf - final _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task; - - /// Option - final List? id; - - @override - Map?>> toJson() => { - 'PeriodicFailed': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - }, - }; - - int _sizeHint() { - int size = 1; - 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); - return size; - } - - void encodeTo(_i1.Output 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is PeriodicFailed && other.task == task && other.id == id; - - @override - 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}); - - factory RetryFailed._decode(_i1.Input input) { - return RetryFailed( - task: const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( - _i3.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input), - id: const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), - ); - } - - /// TaskAddressOf - final _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task; - - /// Option - final List? id; - - @override - Map?>> toJson() => { - 'RetryFailed': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - }, - }; - - int _sizeHint() { - int size = 1; - 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); - return size; - } - - void encodeTo(_i1.Output 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is RetryFailed && other.task == task && other.id == id; - - @override - 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}); - - factory PermanentlyOverweight._decode(_i1.Input input) { - return PermanentlyOverweight( - task: const _i4.Tuple2Codec<_i3.BlockNumberOrTimestamp, int>( - _i3.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input), - id: const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), - ); - } - - /// TaskAddressOf - final _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task; - - /// Option - final List? id; - - @override - Map?>> toJson() => { - 'PermanentlyOverweight': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - }, - }; - - int _sizeHint() { - int size = 1; - 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); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, 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); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is PermanentlyOverweight && other.task == task && other.id == id; - - @override - int get hashCode => Object.hash(task, id); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/retry_config.dart b/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/retry_config.dart deleted file mode 100644 index 57203819..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/retry_config.dart +++ /dev/null @@ -1,71 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -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}); - - factory RetryConfig.decode(_i1.Input input) { - return codec.decode(input); - } - - /// u8 - final int totalRetries; - - /// u8 - final int remaining; - - /// Period - final _i2.BlockNumberOrTimestamp period; - - static const $RetryConfigCodec codec = $RetryConfigCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'totalRetries': totalRetries, 'remaining': remaining, 'period': period.toJson()}; - - @override - bool operator ==(Object 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); -} - -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); - } - - @override - RetryConfig decode(_i1.Input input) { - return RetryConfig( - totalRetries: _i1.U8Codec.codec.decode(input), - remaining: _i1.U8Codec.codec.decode(input), - period: _i2.BlockNumberOrTimestamp.codec.decode(input), - ); - } - - @override - int sizeHint(RetryConfig obj) { - int size = 0; - size = size + _i1.U8Codec.codec.sizeHint(obj.totalRetries); - size = size + _i1.U8Codec.codec.sizeHint(obj.remaining); - size = size + _i2.BlockNumberOrTimestamp.codec.sizeHint(obj.period); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/scheduled.dart b/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/scheduled.dart deleted file mode 100644 index 0fec4c35..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_scheduler/scheduled.dart +++ /dev/null @@ -1,102 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i6; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../frame_support/traits/preimages/bounded.dart' as _i2; -import '../qp_scheduler/block_number_or_timestamp.dart' as _i4; -import '../quantus_runtime/origin_caller.dart' as _i5; -import '../tuples_1.dart' as _i3; - -class Scheduled { - const Scheduled({this.maybeId, required this.priority, required this.call, this.maybePeriodic, required this.origin}); - - factory Scheduled.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Option - final List? maybeId; - - /// schedule::Priority - final int priority; - - /// Call - final _i2.Bounded call; - - /// Option> - final _i3.Tuple2<_i4.BlockNumberOrTimestamp, int>? maybePeriodic; - - /// PalletsOrigin - final _i5.OriginCaller origin; - - static const $ScheduledCodec codec = $ScheduledCodec(); - - _i6.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'maybeId': maybeId?.toList(), - 'priority': priority, - 'call': call.toJson(), - 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], - 'origin': origin.toJson(), - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Scheduled && - other.maybeId == maybeId && - other.priority == priority && - other.call == call && - other.maybePeriodic == maybePeriodic && - other.origin == origin; - - @override - int get hashCode => Object.hash(maybeId, priority, call, maybePeriodic, 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); - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).encodeTo(obj.maybePeriodic, output); - _i5.OriginCaller.codec.encodeTo(obj.origin, output); - } - - @override - Scheduled decode(_i1.Input input) { - return Scheduled( - maybeId: const _i1.OptionCodec>(_i1.U8ArrayCodec(32)).decode(input), - priority: _i1.U8Codec.codec.decode(input), - call: _i2.Bounded.codec.decode(input), - maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).decode(input), - origin: _i5.OriginCaller.codec.decode(input), - ); - } - - @override - int sizeHint(Scheduled obj) { - int size = 0; - 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 + - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).sizeHint(obj.maybePeriodic); - size = size + _i5.OriginCaller.codec.sizeHint(obj.origin); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/call.dart deleted file mode 100644 index 9513e6c8..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/call.dart +++ /dev/null @@ -1,296 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../quantus_runtime/runtime_call.dart' as _i3; -import '../../sp_runtime/multiaddress/multi_address.dart' as _i5; -import '../../sp_weights/weight_v2/weight.dart' as _i4; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $Call { - const $Call(); - - Sudo sudo({required _i3.RuntimeCall call}) { - return Sudo(call: call); - } - - SudoUncheckedWeight sudoUncheckedWeight({required _i3.RuntimeCall call, required _i4.Weight weight}) { - return SudoUncheckedWeight(call: call, weight: weight); - } - - SetKey setKey({required _i5.MultiAddress new_}) { - return SetKey(new_: new_); - } - - SudoAs sudoAs({required _i5.MultiAddress who, required _i3.RuntimeCall call}) { - return SudoAs(who: who, call: call); - } - - RemoveKey removeKey() { - return RemoveKey(); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Sudo._decode(input); - case 1: - return SudoUncheckedWeight._decode(input); - case 2: - return SetKey._decode(input); - case 3: - return SudoAs._decode(input); - case 4: - return const RemoveKey(); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case Sudo: - (value as Sudo).encodeTo(output); - break; - case SudoUncheckedWeight: - (value as SudoUncheckedWeight).encodeTo(output); - break; - case SetKey: - (value as SetKey).encodeTo(output); - break; - case SudoAs: - (value as SudoAs).encodeTo(output); - break; - case RemoveKey: - (value as RemoveKey).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case Sudo: - return (value as Sudo)._sizeHint(); - case SudoUncheckedWeight: - return (value as SudoUncheckedWeight)._sizeHint(); - case SetKey: - return (value as SetKey)._sizeHint(); - case SudoAs: - return (value as SudoAs)._sizeHint(); - case RemoveKey: - return 1; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Authenticates the sudo key and dispatches a function call with `Root` origin. -class Sudo extends Call { - const Sudo({required this.call}); - - factory Sudo._decode(_i1.Input input) { - return Sudo(call: _i3.RuntimeCall.codec.decode(input)); - } - - /// Box<::RuntimeCall> - final _i3.RuntimeCall call; - - @override - Map>>> toJson() => { - 'sudo': {'call': call.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.RuntimeCall.codec.sizeHint(call); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.RuntimeCall.codec.encodeTo(call, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Sudo && other.call == call; - - @override - int get hashCode => call.hashCode; -} - -/// Authenticates the sudo key and dispatches a function call with `Root` origin. -/// This function does not check the weight of the call, and instead allows the -/// Sudo user to specify the weight of the call. -/// -/// The dispatch origin for this call must be _Signed_. -class SudoUncheckedWeight extends Call { - const SudoUncheckedWeight({required this.call, required this.weight}); - - factory SudoUncheckedWeight._decode(_i1.Input input) { - return SudoUncheckedWeight(call: _i3.RuntimeCall.codec.decode(input), weight: _i4.Weight.codec.decode(input)); - } - - /// Box<::RuntimeCall> - final _i3.RuntimeCall call; - - /// Weight - final _i4.Weight weight; - - @override - Map>> toJson() => { - 'sudo_unchecked_weight': {'call': call.toJson(), 'weight': weight.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.RuntimeCall.codec.sizeHint(call); - size = size + _i4.Weight.codec.sizeHint(weight); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i3.RuntimeCall.codec.encodeTo(call, output); - _i4.Weight.codec.encodeTo(weight, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is SudoUncheckedWeight && other.call == call && other.weight == weight; - - @override - int get hashCode => Object.hash(call, weight); -} - -/// Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo -/// key. -class SetKey extends Call { - const SetKey({required this.new_}); - - factory SetKey._decode(_i1.Input input) { - return SetKey(new_: _i5.MultiAddress.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i5.MultiAddress new_; - - @override - Map>> toJson() => { - 'set_key': {'new': new_.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i5.MultiAddress.codec.sizeHint(new_); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i5.MultiAddress.codec.encodeTo(new_, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is SetKey && other.new_ == new_; - - @override - int get hashCode => new_.hashCode; -} - -/// Authenticates the sudo key and dispatches a function call with `Signed` origin from -/// a given account. -/// -/// The dispatch origin for this call must be _Signed_. -class SudoAs extends Call { - const SudoAs({required this.who, required this.call}); - - factory SudoAs._decode(_i1.Input input) { - return SudoAs(who: _i5.MultiAddress.codec.decode(input), call: _i3.RuntimeCall.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i5.MultiAddress who; - - /// Box<::RuntimeCall> - final _i3.RuntimeCall call; - - @override - Map>> toJson() => { - 'sudo_as': {'who': who.toJson(), 'call': call.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i5.MultiAddress.codec.sizeHint(who); - size = size + _i3.RuntimeCall.codec.sizeHint(call); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i5.MultiAddress.codec.encodeTo(who, output); - _i3.RuntimeCall.codec.encodeTo(call, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is SudoAs && other.who == who && other.call == call; - - @override - int get hashCode => Object.hash(who, call); -} - -/// Permanently removes the sudo key. -/// -/// **This cannot be un-done.** -class RemoveKey extends Call { - const RemoveKey(); - - @override - Map toJson() => {'remove_key': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - } - - @override - bool operator ==(Object other) => other is RemoveKey; - - @override - int get hashCode => runtimeType.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/error.dart deleted file mode 100644 index 5f9a8048..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/error.dart +++ /dev/null @@ -1,47 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// Error for the Sudo pallet. -enum Error { - /// Sender must be the Sudo account. - requireSudo('RequireSudo', 0); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.requireSudo; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/event.dart deleted file mode 100644 index 7c57f805..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_sudo/pallet/event.dart +++ /dev/null @@ -1,269 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; - -import '../../sp_core/crypto/account_id32.dart' as _i4; -import '../../sp_runtime/dispatch_error.dart' as _i3; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $Event { - const $Event(); - - Sudid sudid({required _i1.Result sudoResult}) { - return Sudid(sudoResult: sudoResult); - } - - KeyChanged keyChanged({_i4.AccountId32? old, required _i4.AccountId32 new_}) { - return KeyChanged(old: old, new_: new_); - } - - KeyRemoved keyRemoved() { - return KeyRemoved(); - } - - SudoAsDone sudoAsDone({required _i1.Result sudoResult}) { - return SudoAsDone(sudoResult: sudoResult); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Sudid._decode(input); - case 1: - return KeyChanged._decode(input); - case 2: - return const KeyRemoved(); - case 3: - return SudoAsDone._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case Sudid: - (value as Sudid).encodeTo(output); - break; - case KeyChanged: - (value as KeyChanged).encodeTo(output); - break; - case KeyRemoved: - (value as KeyRemoved).encodeTo(output); - break; - case SudoAsDone: - (value as SudoAsDone).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case Sudid: - return (value as Sudid)._sizeHint(); - case KeyChanged: - return (value as KeyChanged)._sizeHint(); - case KeyRemoved: - return 1; - case SudoAsDone: - return (value as SudoAsDone)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// A sudo call just took place. -class Sudid extends Event { - const Sudid({required this.sudoResult}); - - factory Sudid._decode(_i1.Input input) { - return Sudid( - sudoResult: const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).decode(input), - ); - } - - /// DispatchResult - /// The result of the call made by the sudo user. - final _i1.Result sudoResult; - - @override - Map>> toJson() => { - 'Sudid': {'sudoResult': sudoResult.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = - size + - const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).sizeHint(sudoResult); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).encodeTo(sudoResult, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Sudid && other.sudoResult == sudoResult; - - @override - int get hashCode => sudoResult.hashCode; -} - -/// The sudo key has been updated. -class KeyChanged extends Event { - const KeyChanged({this.old, required this.new_}); - - factory KeyChanged._decode(_i1.Input input) { - return KeyChanged( - old: const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()).decode(input), - new_: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// Option - /// The old sudo key (if one was previously set). - final _i4.AccountId32? old; - - /// T::AccountId - /// The new sudo key (if one was set). - final _i4.AccountId32 new_; - - @override - Map?>> toJson() => { - 'KeyChanged': {'old': old?.toList(), 'new': new_.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()).sizeHint(old); - size = size + const _i4.AccountId32Codec().sizeHint(new_); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()).encodeTo(old, output); - const _i1.U8ArrayCodec(32).encodeTo(new_, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is KeyChanged && other.old == old && _i5.listsEqual(other.new_, new_); - - @override - int get hashCode => Object.hash(old, new_); -} - -/// The key was permanently removed. -class KeyRemoved extends Event { - const KeyRemoved(); - - @override - Map toJson() => {'KeyRemoved': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - } - - @override - bool operator ==(Object other) => other is KeyRemoved; - - @override - int get hashCode => runtimeType.hashCode; -} - -/// A [sudo_as](Pallet::sudo_as) call just took place. -class SudoAsDone extends Event { - const SudoAsDone({required this.sudoResult}); - - factory SudoAsDone._decode(_i1.Input input) { - return SudoAsDone( - sudoResult: const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).decode(input), - ); - } - - /// DispatchResult - /// The result of the call made by the sudo user. - final _i1.Result sudoResult; - - @override - Map>> toJson() => { - 'SudoAsDone': {'sudoResult': sudoResult.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = - size + - const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).sizeHint(sudoResult); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).encodeTo(sudoResult, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is SudoAsDone && other.sudoResult == sudoResult; - - @override - int get hashCode => sudoResult.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_timestamp/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_timestamp/pallet/call.dart deleted file mode 100644 index 513d9777..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_timestamp/pallet/call.dart +++ /dev/null @@ -1,125 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - Set set({required BigInt now}) { - return Set(now: now); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Set._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - 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}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case Set: - return (value as Set)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Set the current time. -/// -/// This call should be invoked exactly once per block. It will panic at the finalization -/// phase, if this call hasn't been invoked by that time. -/// -/// The timestamp should be greater than the previous one by the amount specified by -/// [`Config::MinimumPeriod`]. -/// -/// The dispatch origin for this call must be _None_. -/// -/// This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware -/// that changing the complexity of this call could result exhausting the resources in a -/// block to execute any other calls. -/// -/// ## Complexity -/// - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) -/// - 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in -/// `on_finalize`) -/// - 1 event handler `on_timestamp_set`. Must be `O(1)`. -class Set extends Call { - const Set({required this.now}); - - factory Set._decode(_i1.Input input) { - return Set(now: _i1.CompactBigIntCodec.codec.decode(input)); - } - - /// T::Moment - final BigInt now; - - @override - Map> toJson() => { - 'set': {'now': now}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(now); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => now.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/charge_transaction_payment.dart b/quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/charge_transaction_payment.dart deleted file mode 100644 index 7146a0fb..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/charge_transaction_payment.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef ChargeTransactionPayment = BigInt; - -class ChargeTransactionPaymentCodec with _i1.Codec { - const ChargeTransactionPaymentCodec(); - - @override - ChargeTransactionPayment decode(_i1.Input input) { - return _i1.CompactBigIntCodec.codec.decode(input); - } - - @override - void encodeTo(ChargeTransactionPayment value, _i1.Output output) { - _i1.CompactBigIntCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(ChargeTransactionPayment value) { - return _i1.CompactBigIntCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/pallet/event.dart deleted file mode 100644 index a0f28f9a..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/pallet/event.dart +++ /dev/null @@ -1,131 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../sp_core/crypto/account_id32.dart' as _i3; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - TransactionFeePaid transactionFeePaid({ - required _i3.AccountId32 who, - required BigInt actualFee, - required BigInt tip, - }) { - return TransactionFeePaid(who: who, actualFee: actualFee, tip: tip); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return TransactionFeePaid._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - 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}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case TransactionFeePaid: - return (value as TransactionFeePaid)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// 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}); - - factory TransactionFeePaid._decode(_i1.Input input) { - return TransactionFeePaid( - who: const _i1.U8ArrayCodec(32).decode(input), - actualFee: _i1.U128Codec.codec.decode(input), - tip: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 who; - - /// BalanceOf - final BigInt actualFee; - - /// BalanceOf - final BigInt tip; - - @override - Map> toJson() => { - 'TransactionFeePaid': {'who': who.toList(), 'actualFee': actualFee, 'tip': tip}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(who); - size = size + _i1.U128Codec.codec.sizeHint(actualFee); - size = size + _i1.U128Codec.codec.sizeHint(tip); - return size; - } - - 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); - } - - @override - bool operator ==(Object other) => - 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); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/releases.dart b/quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/releases.dart deleted file mode 100644 index a01f00ee..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_transaction_payment/releases.dart +++ /dev/null @@ -1,48 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum Releases { - v1Ancient('V1Ancient', 0), - v2('V2', 1); - - const Releases(this.variantName, this.codecIndex); - - factory Releases.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ReleasesCodec codec = $ReleasesCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ReleasesCodec with _i1.Codec { - const $ReleasesCodec(); - - @override - Releases decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Releases.v1Ancient; - case 1: - return Releases.v2; - default: - throw Exception('Releases: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Releases value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/call.dart deleted file mode 100644 index 2b80f08e..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/call.dart +++ /dev/null @@ -1,486 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../sp_runtime/multiaddress/multi_address.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - SpendLocal spendLocal({required BigInt amount, required _i3.MultiAddress beneficiary}) { - return SpendLocal(amount: amount, beneficiary: beneficiary); - } - - RemoveApproval removeApproval({required BigInt proposalId}) { - return RemoveApproval(proposalId: proposalId); - } - - Spend spend({ - required dynamic assetKind, - required BigInt amount, - required _i3.MultiAddress beneficiary, - int? validFrom, - }) { - return Spend(assetKind: assetKind, amount: amount, beneficiary: beneficiary, validFrom: validFrom); - } - - Payout payout({required int index}) { - return Payout(index: index); - } - - CheckStatus checkStatus({required int index}) { - return CheckStatus(index: index); - } - - VoidSpend voidSpend({required int index}) { - return VoidSpend(index: index); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 3: - return SpendLocal._decode(input); - case 4: - return RemoveApproval._decode(input); - case 5: - return Spend._decode(input); - case 6: - return Payout._decode(input); - case 7: - return CheckStatus._decode(input); - case 8: - return VoidSpend._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case SpendLocal: - (value as SpendLocal).encodeTo(output); - break; - case RemoveApproval: - (value as RemoveApproval).encodeTo(output); - break; - case Spend: - (value as Spend).encodeTo(output); - break; - case Payout: - (value as Payout).encodeTo(output); - break; - case CheckStatus: - (value as CheckStatus).encodeTo(output); - break; - case VoidSpend: - (value as VoidSpend).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case SpendLocal: - return (value as SpendLocal)._sizeHint(); - case RemoveApproval: - return (value as RemoveApproval)._sizeHint(); - case Spend: - return (value as Spend)._sizeHint(); - case Payout: - return (value as Payout)._sizeHint(); - case CheckStatus: - return (value as CheckStatus)._sizeHint(); - case VoidSpend: - return (value as VoidSpend)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Propose and approve a spend of treasury funds. -/// -/// ## Dispatch Origin -/// -/// Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`. -/// -/// ### Details -/// NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the -/// beneficiary. -/// -/// ### Parameters -/// - `amount`: The amount to be transferred from the treasury to the `beneficiary`. -/// - `beneficiary`: The destination account for the transfer. -/// -/// ## Events -/// -/// Emits [`Event::SpendApproved`] if successful. -class SpendLocal extends Call { - const SpendLocal({required this.amount, required this.beneficiary}); - - factory SpendLocal._decode(_i1.Input input) { - return SpendLocal( - amount: _i1.CompactBigIntCodec.codec.decode(input), - beneficiary: _i3.MultiAddress.codec.decode(input), - ); - } - - /// BalanceOf - final BigInt amount; - - /// AccountIdLookupOf - final _i3.MultiAddress beneficiary; - - @override - Map> toJson() => { - 'spend_local': {'amount': amount, 'beneficiary': beneficiary.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(amount); - size = size + _i3.MultiAddress.codec.sizeHint(beneficiary); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.CompactBigIntCodec.codec.encodeTo(amount, output); - _i3.MultiAddress.codec.encodeTo(beneficiary, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is SpendLocal && other.amount == amount && other.beneficiary == beneficiary; - - @override - int get hashCode => Object.hash(amount, beneficiary); -} - -/// Force a previously approved proposal to be removed from the approval queue. -/// -/// ## Dispatch Origin -/// -/// Must be [`Config::RejectOrigin`]. -/// -/// ## Details -/// -/// The original deposit will no longer be returned. -/// -/// ### Parameters -/// - `proposal_id`: The index of a proposal -/// -/// ### Complexity -/// - O(A) where `A` is the number of approvals -/// -/// ### Errors -/// - [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the -/// approval queue, i.e., the proposal has not been approved. This could also mean the -/// proposal does not exist altogether, thus there is no way it would have been approved -/// in the first place. -class RemoveApproval extends Call { - const RemoveApproval({required this.proposalId}); - - factory RemoveApproval._decode(_i1.Input input) { - return RemoveApproval(proposalId: _i1.CompactBigIntCodec.codec.decode(input)); - } - - /// ProposalIndex - final BigInt proposalId; - - @override - Map> toJson() => { - 'remove_approval': {'proposalId': proposalId}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(proposalId); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.CompactBigIntCodec.codec.encodeTo(proposalId, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is RemoveApproval && other.proposalId == proposalId; - - @override - int get hashCode => proposalId.hashCode; -} - -/// Propose and approve a spend of treasury funds. -/// -/// ## Dispatch Origin -/// -/// Must be [`Config::SpendOrigin`] with the `Success` value being at least -/// `amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted -/// for assertion using the [`Config::BalanceConverter`]. -/// -/// ## Details -/// -/// Create an approved spend for transferring a specific `amount` of `asset_kind` to a -/// designated beneficiary. The spend must be claimed using the `payout` dispatchable within -/// the [`Config::PayoutPeriod`]. -/// -/// ### Parameters -/// - `asset_kind`: An indicator of the specific asset class to be spent. -/// - `amount`: The amount to be transferred from the treasury to the `beneficiary`. -/// - `beneficiary`: The beneficiary of the spend. -/// - `valid_from`: The block number from which the spend can be claimed. It can refer to -/// the past if the resulting spend has not yet expired according to the -/// [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after -/// approval. -/// -/// ## Events -/// -/// Emits [`Event::AssetSpendApproved`] if successful. -class Spend extends Call { - const Spend({required this.assetKind, required this.amount, required this.beneficiary, this.validFrom}); - - factory Spend._decode(_i1.Input input) { - return Spend( - assetKind: _i1.NullCodec.codec.decode(input), - amount: _i1.CompactBigIntCodec.codec.decode(input), - beneficiary: _i3.MultiAddress.codec.decode(input), - validFrom: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - ); - } - - /// Box - final dynamic assetKind; - - /// AssetBalanceOf - final BigInt amount; - - /// Box> - final _i3.MultiAddress beneficiary; - - /// Option> - final int? validFrom; - - @override - Map> toJson() => { - 'spend': {'assetKind': null, 'amount': amount, 'beneficiary': beneficiary.toJson(), 'validFrom': validFrom}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.NullCodec.codec.sizeHint(assetKind); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(amount); - size = size + _i3.MultiAddress.codec.sizeHint(beneficiary); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(validFrom); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.NullCodec.codec.encodeTo(assetKind, output); - _i1.CompactBigIntCodec.codec.encodeTo(amount, output); - _i3.MultiAddress.codec.encodeTo(beneficiary, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(validFrom, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Spend && - other.assetKind == assetKind && - other.amount == amount && - other.beneficiary == beneficiary && - other.validFrom == validFrom; - - @override - int get hashCode => Object.hash(assetKind, amount, beneficiary, validFrom); -} - -/// Claim a spend. -/// -/// ## Dispatch Origin -/// -/// Must be signed -/// -/// ## Details -/// -/// Spends must be claimed within some temporal bounds. A spend may be claimed within one -/// [`Config::PayoutPeriod`] from the `valid_from` block. -/// In case of a payout failure, the spend status must be updated with the `check_status` -/// dispatchable before retrying with the current function. -/// -/// ### Parameters -/// - `index`: The spend index. -/// -/// ## Events -/// -/// Emits [`Event::Paid`] if successful. -class Payout extends Call { - const Payout({required this.index}); - - factory Payout._decode(_i1.Input input) { - return Payout(index: _i1.U32Codec.codec.decode(input)); - } - - /// SpendIndex - final int index; - - @override - Map> toJson() => { - 'payout': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.U32Codec.codec.encodeTo(index, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Payout && other.index == index; - - @override - int get hashCode => index.hashCode; -} - -/// Check the status of the spend and remove it from the storage if processed. -/// -/// ## Dispatch Origin -/// -/// Must be signed. -/// -/// ## Details -/// -/// The status check is a prerequisite for retrying a failed payout. -/// If a spend has either succeeded or expired, it is removed from the storage by this -/// function. In such instances, transaction fees are refunded. -/// -/// ### Parameters -/// - `index`: The spend index. -/// -/// ## Events -/// -/// Emits [`Event::PaymentFailed`] if the spend payout has failed. -/// Emits [`Event::SpendProcessed`] if the spend payout has succeed. -class CheckStatus extends Call { - const CheckStatus({required this.index}); - - factory CheckStatus._decode(_i1.Input input) { - return CheckStatus(index: _i1.U32Codec.codec.decode(input)); - } - - /// SpendIndex - final int index; - - @override - Map> toJson() => { - 'check_status': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i1.U32Codec.codec.encodeTo(index, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is CheckStatus && other.index == index; - - @override - int get hashCode => index.hashCode; -} - -/// Void previously approved spend. -/// -/// ## Dispatch Origin -/// -/// Must be [`Config::RejectOrigin`]. -/// -/// ## Details -/// -/// A spend void is only possible if the payout has not been attempted yet. -/// -/// ### Parameters -/// - `index`: The spend index. -/// -/// ## Events -/// -/// Emits [`Event::AssetSpendVoided`] if successful. -class VoidSpend extends Call { - const VoidSpend({required this.index}); - - factory VoidSpend._decode(_i1.Input input) { - return VoidSpend(index: _i1.U32Codec.codec.decode(input)); - } - - /// SpendIndex - final int index; - - @override - Map> toJson() => { - 'void_spend': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i1.U32Codec.codec.encodeTo(index, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is VoidSpend && other.index == index; - - @override - int get hashCode => index.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/error.dart deleted file mode 100644 index a6718c9b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/error.dart +++ /dev/null @@ -1,98 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// Error for the treasury pallet. -enum Error { - /// No proposal, bounty or spend at that index. - invalidIndex('InvalidIndex', 0), - - /// Too many approvals in the queue. - tooManyApprovals('TooManyApprovals', 1), - - /// The spend origin is valid but the amount it is allowed to spend is lower than the - /// amount to be spent. - insufficientPermission('InsufficientPermission', 2), - - /// Proposal has not been approved. - proposalNotApproved('ProposalNotApproved', 3), - - /// The balance of the asset kind is not convertible to the balance of the native asset. - failedToConvertBalance('FailedToConvertBalance', 4), - - /// The spend has expired and cannot be claimed. - spendExpired('SpendExpired', 5), - - /// The spend is not yet eligible for payout. - earlyPayout('EarlyPayout', 6), - - /// The payment has already been attempted. - alreadyAttempted('AlreadyAttempted', 7), - - /// There was some issue with the mechanism of payment. - payoutError('PayoutError', 8), - - /// The payout was not yet attempted/claimed. - notAttempted('NotAttempted', 9), - - /// The payment has neither failed nor succeeded yet. - inconclusive('Inconclusive', 10); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.invalidIndex; - case 1: - return Error.tooManyApprovals; - case 2: - return Error.insufficientPermission; - case 3: - return Error.proposalNotApproved; - case 4: - return Error.failedToConvertBalance; - case 5: - return Error.spendExpired; - case 6: - return Error.earlyPayout; - case 7: - return Error.alreadyAttempted; - case 8: - return Error.payoutError; - case 9: - return Error.notAttempted; - case 10: - return Error.inconclusive; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/event.dart deleted file mode 100644 index b324b32d..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/pallet/event.dart +++ /dev/null @@ -1,740 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../sp_core/crypto/account_id32.dart' as _i3; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - Spending spending({required BigInt budgetRemaining}) { - return Spending(budgetRemaining: budgetRemaining); - } - - Awarded awarded({required int proposalIndex, required BigInt award, required _i3.AccountId32 account}) { - return Awarded(proposalIndex: proposalIndex, award: award, account: account); - } - - Burnt burnt({required BigInt burntFunds}) { - return Burnt(burntFunds: burntFunds); - } - - Rollover rollover({required BigInt rolloverBalance}) { - return Rollover(rolloverBalance: rolloverBalance); - } - - Deposit deposit({required BigInt value}) { - return Deposit(value: value); - } - - SpendApproved spendApproved({ - required int proposalIndex, - required BigInt amount, - required _i3.AccountId32 beneficiary, - }) { - return SpendApproved(proposalIndex: proposalIndex, amount: amount, beneficiary: beneficiary); - } - - UpdatedInactive updatedInactive({required BigInt reactivated, required BigInt deactivated}) { - return UpdatedInactive(reactivated: reactivated, deactivated: deactivated); - } - - AssetSpendApproved assetSpendApproved({ - required int index, - required dynamic assetKind, - required BigInt amount, - required _i3.AccountId32 beneficiary, - required int validFrom, - required int expireAt, - }) { - return AssetSpendApproved( - index: index, - assetKind: assetKind, - amount: amount, - beneficiary: beneficiary, - validFrom: validFrom, - expireAt: expireAt, - ); - } - - AssetSpendVoided assetSpendVoided({required int index}) { - return AssetSpendVoided(index: index); - } - - Paid paid({required int index, required int paymentId}) { - return Paid(index: index, paymentId: paymentId); - } - - PaymentFailed paymentFailed({required int index, required int paymentId}) { - return PaymentFailed(index: index, paymentId: paymentId); - } - - SpendProcessed spendProcessed({required int index}) { - return SpendProcessed(index: index); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Spending._decode(input); - case 1: - return Awarded._decode(input); - case 2: - return Burnt._decode(input); - case 3: - return Rollover._decode(input); - case 4: - return Deposit._decode(input); - case 5: - return SpendApproved._decode(input); - case 6: - return UpdatedInactive._decode(input); - case 7: - return AssetSpendApproved._decode(input); - case 8: - return AssetSpendVoided._decode(input); - case 9: - return Paid._decode(input); - case 10: - return PaymentFailed._decode(input); - case 11: - return SpendProcessed._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case Spending: - (value as Spending).encodeTo(output); - break; - case Awarded: - (value as Awarded).encodeTo(output); - break; - case Burnt: - (value as Burnt).encodeTo(output); - break; - case Rollover: - (value as Rollover).encodeTo(output); - break; - case Deposit: - (value as Deposit).encodeTo(output); - break; - case SpendApproved: - (value as SpendApproved).encodeTo(output); - break; - case UpdatedInactive: - (value as UpdatedInactive).encodeTo(output); - break; - case AssetSpendApproved: - (value as AssetSpendApproved).encodeTo(output); - break; - case AssetSpendVoided: - (value as AssetSpendVoided).encodeTo(output); - break; - case Paid: - (value as Paid).encodeTo(output); - break; - case PaymentFailed: - (value as PaymentFailed).encodeTo(output); - break; - case SpendProcessed: - (value as SpendProcessed).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case Spending: - return (value as Spending)._sizeHint(); - case Awarded: - return (value as Awarded)._sizeHint(); - case Burnt: - return (value as Burnt)._sizeHint(); - case Rollover: - return (value as Rollover)._sizeHint(); - case Deposit: - return (value as Deposit)._sizeHint(); - case SpendApproved: - return (value as SpendApproved)._sizeHint(); - case UpdatedInactive: - return (value as UpdatedInactive)._sizeHint(); - case AssetSpendApproved: - return (value as AssetSpendApproved)._sizeHint(); - case AssetSpendVoided: - return (value as AssetSpendVoided)._sizeHint(); - case Paid: - return (value as Paid)._sizeHint(); - case PaymentFailed: - return (value as PaymentFailed)._sizeHint(); - case SpendProcessed: - return (value as SpendProcessed)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// We have ended a spend period and will now allocate funds. -class Spending extends Event { - const Spending({required this.budgetRemaining}); - - factory Spending._decode(_i1.Input input) { - return Spending(budgetRemaining: _i1.U128Codec.codec.decode(input)); - } - - /// BalanceOf - final BigInt budgetRemaining; - - @override - Map> toJson() => { - 'Spending': {'budgetRemaining': budgetRemaining}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(budgetRemaining); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U128Codec.codec.encodeTo(budgetRemaining, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is Spending && other.budgetRemaining == budgetRemaining; - - @override - int get hashCode => budgetRemaining.hashCode; -} - -/// Some funds have been allocated. -class Awarded extends Event { - const Awarded({required this.proposalIndex, required this.award, required this.account}); - - factory Awarded._decode(_i1.Input input) { - return Awarded( - proposalIndex: _i1.U32Codec.codec.decode(input), - award: _i1.U128Codec.codec.decode(input), - account: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// ProposalIndex - final int proposalIndex; - - /// BalanceOf - final BigInt award; - - /// T::AccountId - final _i3.AccountId32 account; - - @override - Map> toJson() => { - 'Awarded': {'proposalIndex': proposalIndex, 'award': award, 'account': account.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(proposalIndex); - size = size + _i1.U128Codec.codec.sizeHint(award); - size = size + const _i3.AccountId32Codec().sizeHint(account); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(proposalIndex, output); - _i1.U128Codec.codec.encodeTo(award, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Awarded && - other.proposalIndex == proposalIndex && - other.award == award && - _i4.listsEqual(other.account, account); - - @override - int get hashCode => Object.hash(proposalIndex, award, account); -} - -/// Some of our funds have been burnt. -class Burnt extends Event { - const Burnt({required this.burntFunds}); - - factory Burnt._decode(_i1.Input input) { - return Burnt(burntFunds: _i1.U128Codec.codec.decode(input)); - } - - /// BalanceOf - final BigInt burntFunds; - - @override - Map> toJson() => { - 'Burnt': {'burntFunds': burntFunds}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(burntFunds); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U128Codec.codec.encodeTo(burntFunds, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Burnt && other.burntFunds == burntFunds; - - @override - int get hashCode => burntFunds.hashCode; -} - -/// Spending has finished; this is the amount that rolls over until next spend. -class Rollover extends Event { - const Rollover({required this.rolloverBalance}); - - factory Rollover._decode(_i1.Input input) { - return Rollover(rolloverBalance: _i1.U128Codec.codec.decode(input)); - } - - /// BalanceOf - final BigInt rolloverBalance; - - @override - Map> toJson() => { - 'Rollover': {'rolloverBalance': rolloverBalance}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(rolloverBalance); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U128Codec.codec.encodeTo(rolloverBalance, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is Rollover && other.rolloverBalance == rolloverBalance; - - @override - int get hashCode => rolloverBalance.hashCode; -} - -/// Some funds have been deposited. -class Deposit extends Event { - const Deposit({required this.value}); - - factory Deposit._decode(_i1.Input input) { - return Deposit(value: _i1.U128Codec.codec.decode(input)); - } - - /// BalanceOf - final BigInt value; - - @override - Map> toJson() => { - 'Deposit': {'value': value}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(value); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U128Codec.codec.encodeTo(value, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Deposit && other.value == value; - - @override - int get hashCode => value.hashCode; -} - -/// A new spend proposal has been approved. -class SpendApproved extends Event { - const SpendApproved({required this.proposalIndex, required this.amount, required this.beneficiary}); - - factory SpendApproved._decode(_i1.Input input) { - return SpendApproved( - proposalIndex: _i1.U32Codec.codec.decode(input), - amount: _i1.U128Codec.codec.decode(input), - beneficiary: const _i1.U8ArrayCodec(32).decode(input), - ); - } - - /// ProposalIndex - final int proposalIndex; - - /// BalanceOf - final BigInt amount; - - /// T::AccountId - final _i3.AccountId32 beneficiary; - - @override - Map> toJson() => { - 'SpendApproved': {'proposalIndex': proposalIndex, 'amount': amount, 'beneficiary': beneficiary.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(proposalIndex); - size = size + _i1.U128Codec.codec.sizeHint(amount); - size = size + const _i3.AccountId32Codec().sizeHint(beneficiary); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U32Codec.codec.encodeTo(proposalIndex, output); - _i1.U128Codec.codec.encodeTo(amount, output); - const _i1.U8ArrayCodec(32).encodeTo(beneficiary, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SpendApproved && - other.proposalIndex == proposalIndex && - other.amount == amount && - _i4.listsEqual(other.beneficiary, beneficiary); - - @override - int get hashCode => Object.hash(proposalIndex, amount, beneficiary); -} - -/// The inactive funds of the pallet have been updated. -class UpdatedInactive extends Event { - const UpdatedInactive({required this.reactivated, required this.deactivated}); - - factory UpdatedInactive._decode(_i1.Input input) { - return UpdatedInactive( - reactivated: _i1.U128Codec.codec.decode(input), - deactivated: _i1.U128Codec.codec.decode(input), - ); - } - - /// BalanceOf - final BigInt reactivated; - - /// BalanceOf - final BigInt deactivated; - - @override - Map> toJson() => { - 'UpdatedInactive': {'reactivated': reactivated, 'deactivated': deactivated}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(reactivated); - size = size + _i1.U128Codec.codec.sizeHint(deactivated); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.U128Codec.codec.encodeTo(reactivated, output); - _i1.U128Codec.codec.encodeTo(deactivated, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is UpdatedInactive && other.reactivated == reactivated && other.deactivated == deactivated; - - @override - int get hashCode => Object.hash(reactivated, deactivated); -} - -/// A new asset spend proposal has been approved. -class AssetSpendApproved extends Event { - const AssetSpendApproved({ - required this.index, - required this.assetKind, - required this.amount, - required this.beneficiary, - required this.validFrom, - required this.expireAt, - }); - - factory AssetSpendApproved._decode(_i1.Input input) { - return AssetSpendApproved( - index: _i1.U32Codec.codec.decode(input), - assetKind: _i1.NullCodec.codec.decode(input), - amount: _i1.U128Codec.codec.decode(input), - beneficiary: const _i1.U8ArrayCodec(32).decode(input), - validFrom: _i1.U32Codec.codec.decode(input), - expireAt: _i1.U32Codec.codec.decode(input), - ); - } - - /// SpendIndex - final int index; - - /// T::AssetKind - final dynamic assetKind; - - /// AssetBalanceOf - final BigInt amount; - - /// T::Beneficiary - final _i3.AccountId32 beneficiary; - - /// BlockNumberFor - final int validFrom; - - /// BlockNumberFor - final int expireAt; - - @override - Map> toJson() => { - 'AssetSpendApproved': { - 'index': index, - 'assetKind': null, - 'amount': amount, - 'beneficiary': beneficiary.toList(), - 'validFrom': validFrom, - 'expireAt': expireAt, - }, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i1.NullCodec.codec.sizeHint(assetKind); - size = size + _i1.U128Codec.codec.sizeHint(amount); - size = size + const _i3.AccountId32Codec().sizeHint(beneficiary); - size = size + _i1.U32Codec.codec.sizeHint(validFrom); - size = size + _i1.U32Codec.codec.sizeHint(expireAt); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i1.NullCodec.codec.encodeTo(assetKind, output); - _i1.U128Codec.codec.encodeTo(amount, output); - const _i1.U8ArrayCodec(32).encodeTo(beneficiary, output); - _i1.U32Codec.codec.encodeTo(validFrom, output); - _i1.U32Codec.codec.encodeTo(expireAt, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AssetSpendApproved && - other.index == index && - other.assetKind == assetKind && - other.amount == amount && - _i4.listsEqual(other.beneficiary, beneficiary) && - other.validFrom == validFrom && - other.expireAt == expireAt; - - @override - int get hashCode => Object.hash(index, assetKind, amount, beneficiary, validFrom, expireAt); -} - -/// An approved spend was voided. -class AssetSpendVoided extends Event { - const AssetSpendVoided({required this.index}); - - factory AssetSpendVoided._decode(_i1.Input input) { - return AssetSpendVoided(index: _i1.U32Codec.codec.decode(input)); - } - - /// SpendIndex - final int index; - - @override - Map> toJson() => { - 'AssetSpendVoided': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i1.U32Codec.codec.encodeTo(index, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetSpendVoided && other.index == index; - - @override - int get hashCode => index.hashCode; -} - -/// A payment happened. -class Paid extends Event { - const Paid({required this.index, required this.paymentId}); - - factory Paid._decode(_i1.Input input) { - return Paid(index: _i1.U32Codec.codec.decode(input), paymentId: _i1.U32Codec.codec.decode(input)); - } - - /// SpendIndex - final int index; - - /// ::Id - final int paymentId; - - @override - Map> toJson() => { - 'Paid': {'index': index, 'paymentId': paymentId}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i1.U32Codec.codec.sizeHint(paymentId); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i1.U32Codec.codec.encodeTo(paymentId, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is Paid && other.index == index && other.paymentId == paymentId; - - @override - int get hashCode => Object.hash(index, paymentId); -} - -/// A payment failed and can be retried. -class PaymentFailed extends Event { - const PaymentFailed({required this.index, required this.paymentId}); - - factory PaymentFailed._decode(_i1.Input input) { - return PaymentFailed(index: _i1.U32Codec.codec.decode(input), paymentId: _i1.U32Codec.codec.decode(input)); - } - - /// SpendIndex - final int index; - - /// ::Id - final int paymentId; - - @override - Map> toJson() => { - 'PaymentFailed': {'index': index, 'paymentId': paymentId}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i1.U32Codec.codec.sizeHint(paymentId); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i1.U32Codec.codec.encodeTo(paymentId, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is PaymentFailed && other.index == index && other.paymentId == paymentId; - - @override - int get hashCode => Object.hash(index, paymentId); -} - -/// A spend was processed and removed from the storage. It might have been successfully -/// paid or it may have expired. -class SpendProcessed extends Event { - const SpendProcessed({required this.index}); - - factory SpendProcessed._decode(_i1.Input input) { - return SpendProcessed(index: _i1.U32Codec.codec.decode(input)); - } - - /// SpendIndex - final int index; - - @override - Map> toJson() => { - 'SpendProcessed': {'index': index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i1.U32Codec.codec.encodeTo(index, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is SpendProcessed && other.index == index; - - @override - int get hashCode => index.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/payment_state.dart b/quantus_sdk/lib/generated/resonance/types/pallet_treasury/payment_state.dart deleted file mode 100644 index b15460bb..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/payment_state.dart +++ /dev/null @@ -1,161 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -abstract class PaymentState { - const PaymentState(); - - factory PaymentState.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $PaymentStateCodec codec = $PaymentStateCodec(); - - static const $PaymentState values = $PaymentState(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $PaymentState { - const $PaymentState(); - - Pending pending() { - return Pending(); - } - - Attempted attempted({required int id}) { - return Attempted(id: id); - } - - Failed failed() { - return Failed(); - } -} - -class $PaymentStateCodec with _i1.Codec { - const $PaymentStateCodec(); - - @override - PaymentState decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return const Pending(); - case 1: - return Attempted._decode(input); - case 2: - return const Failed(); - default: - throw Exception('PaymentState: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(PaymentState value, _i1.Output output) { - switch (value.runtimeType) { - case Pending: - (value as Pending).encodeTo(output); - break; - case Attempted: - (value as Attempted).encodeTo(output); - break; - case Failed: - (value as Failed).encodeTo(output); - break; - default: - throw Exception('PaymentState: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(PaymentState value) { - switch (value.runtimeType) { - case Pending: - return 1; - case Attempted: - return (value as Attempted)._sizeHint(); - case Failed: - return 1; - default: - throw Exception('PaymentState: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Pending extends PaymentState { - const Pending(); - - @override - Map toJson() => {'Pending': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - } - - @override - bool operator ==(Object other) => other is Pending; - - @override - int get hashCode => runtimeType.hashCode; -} - -class Attempted extends PaymentState { - const Attempted({required this.id}); - - factory Attempted._decode(_i1.Input input) { - return Attempted(id: _i1.U32Codec.codec.decode(input)); - } - - /// Id - final int id; - - @override - Map> toJson() => { - 'Attempted': {'id': id}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(id); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(id, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Attempted && other.id == id; - - @override - int get hashCode => id.hashCode; -} - -class Failed extends PaymentState { - const Failed(); - - @override - Map toJson() => {'Failed': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - } - - @override - bool operator ==(Object other) => other is Failed; - - @override - int get hashCode => runtimeType.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/proposal.dart b/quantus_sdk/lib/generated/resonance/types/pallet_treasury/proposal.dart deleted file mode 100644 index 061a1ce7..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/proposal.dart +++ /dev/null @@ -1,84 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../sp_core/crypto/account_id32.dart' as _i2; - -class Proposal { - const Proposal({required this.proposer, required this.value, required this.beneficiary, required this.bond}); - - factory Proposal.decode(_i1.Input input) { - return codec.decode(input); - } - - /// AccountId - final _i2.AccountId32 proposer; - - /// Balance - final BigInt value; - - /// AccountId - final _i2.AccountId32 beneficiary; - - /// Balance - final BigInt bond; - - static const $ProposalCodec codec = $ProposalCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'proposer': proposer.toList(), - 'value': value, - 'beneficiary': beneficiary.toList(), - 'bond': bond, - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Proposal && - _i4.listsEqual(other.proposer, proposer) && - other.value == value && - _i4.listsEqual(other.beneficiary, beneficiary) && - other.bond == bond; - - @override - int get hashCode => Object.hash(proposer, value, beneficiary, bond); -} - -class $ProposalCodec with _i1.Codec { - const $ProposalCodec(); - - @override - void encodeTo(Proposal obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.proposer, output); - _i1.U128Codec.codec.encodeTo(obj.value, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.beneficiary, output); - _i1.U128Codec.codec.encodeTo(obj.bond, output); - } - - @override - Proposal decode(_i1.Input input) { - return Proposal( - proposer: const _i1.U8ArrayCodec(32).decode(input), - value: _i1.U128Codec.codec.decode(input), - beneficiary: const _i1.U8ArrayCodec(32).decode(input), - bond: _i1.U128Codec.codec.decode(input), - ); - } - - @override - int sizeHint(Proposal obj) { - int size = 0; - size = size + const _i2.AccountId32Codec().sizeHint(obj.proposer); - size = size + _i1.U128Codec.codec.sizeHint(obj.value); - size = size + const _i2.AccountId32Codec().sizeHint(obj.beneficiary); - size = size + _i1.U128Codec.codec.sizeHint(obj.bond); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/spend_status.dart b/quantus_sdk/lib/generated/resonance/types/pallet_treasury/spend_status.dart deleted file mode 100644 index ade044e9..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_treasury/spend_status.dart +++ /dev/null @@ -1,108 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i4; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; - -import '../sp_core/crypto/account_id32.dart' as _i2; -import 'payment_state.dart' as _i3; - -class SpendStatus { - const SpendStatus({ - required this.assetKind, - required this.amount, - required this.beneficiary, - required this.validFrom, - required this.expireAt, - required this.status, - }); - - factory SpendStatus.decode(_i1.Input input) { - return codec.decode(input); - } - - /// AssetKind - final dynamic assetKind; - - /// AssetBalance - final BigInt amount; - - /// Beneficiary - final _i2.AccountId32 beneficiary; - - /// BlockNumber - final int validFrom; - - /// BlockNumber - final int expireAt; - - /// PaymentState - final _i3.PaymentState status; - - static const $SpendStatusCodec codec = $SpendStatusCodec(); - - _i4.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => { - 'assetKind': null, - 'amount': amount, - 'beneficiary': beneficiary.toList(), - 'validFrom': validFrom, - 'expireAt': expireAt, - 'status': status.toJson(), - }; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SpendStatus && - other.assetKind == assetKind && - other.amount == amount && - _i5.listsEqual(other.beneficiary, beneficiary) && - other.validFrom == validFrom && - other.expireAt == expireAt && - other.status == status; - - @override - int get hashCode => Object.hash(assetKind, amount, beneficiary, validFrom, expireAt, status); -} - -class $SpendStatusCodec with _i1.Codec { - const $SpendStatusCodec(); - - @override - void encodeTo(SpendStatus obj, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(obj.assetKind, output); - _i1.U128Codec.codec.encodeTo(obj.amount, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.beneficiary, output); - _i1.U32Codec.codec.encodeTo(obj.validFrom, output); - _i1.U32Codec.codec.encodeTo(obj.expireAt, output); - _i3.PaymentState.codec.encodeTo(obj.status, output); - } - - @override - SpendStatus decode(_i1.Input input) { - return SpendStatus( - assetKind: _i1.NullCodec.codec.decode(input), - amount: _i1.U128Codec.codec.decode(input), - beneficiary: const _i1.U8ArrayCodec(32).decode(input), - validFrom: _i1.U32Codec.codec.decode(input), - expireAt: _i1.U32Codec.codec.decode(input), - status: _i3.PaymentState.codec.decode(input), - ); - } - - @override - int sizeHint(SpendStatus obj) { - int size = 0; - size = size + _i1.NullCodec.codec.sizeHint(obj.assetKind); - size = size + _i1.U128Codec.codec.sizeHint(obj.amount); - size = size + const _i2.AccountId32Codec().sizeHint(obj.beneficiary); - size = size + _i1.U32Codec.codec.sizeHint(obj.validFrom); - size = size + _i1.U32Codec.codec.sizeHint(obj.expireAt); - size = size + _i3.PaymentState.codec.sizeHint(obj.status); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/call.dart deleted file mode 100644 index 8e77d732..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/call.dart +++ /dev/null @@ -1,418 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i6; - -import '../../quantus_runtime/origin_caller.dart' as _i4; -import '../../quantus_runtime/runtime_call.dart' as _i3; -import '../../sp_weights/weight_v2/weight.dart' as _i5; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - Batch batch({required List<_i3.RuntimeCall> calls}) { - return Batch(calls: calls); - } - - 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); - } - - 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); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Batch._decode(input); - case 1: - return AsDerivative._decode(input); - case 2: - return BatchAll._decode(input); - case 3: - return DispatchAs._decode(input); - case 4: - return ForceBatch._decode(input); - case 5: - return WithWeight._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case Batch: - (value as Batch).encodeTo(output); - break; - case AsDerivative: - (value as AsDerivative).encodeTo(output); - break; - case BatchAll: - (value as BatchAll).encodeTo(output); - break; - case DispatchAs: - (value as DispatchAs).encodeTo(output); - break; - case ForceBatch: - (value as ForceBatch).encodeTo(output); - break; - case WithWeight: - (value as WithWeight).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case Batch: - return (value as Batch)._sizeHint(); - case AsDerivative: - return (value as AsDerivative)._sizeHint(); - case BatchAll: - return (value as BatchAll)._sizeHint(); - case DispatchAs: - return (value as DispatchAs)._sizeHint(); - case ForceBatch: - return (value as ForceBatch)._sizeHint(); - case WithWeight: - return (value as WithWeight)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Send a batch of dispatch calls. -/// -/// May be called from any origin except `None`. -/// -/// - `calls`: The calls to be dispatched from the same origin. The number of call must not -/// exceed the constant: `batched_calls_limit` (available in constant metadata). -/// -/// If origin is root then the calls are dispatched without checking origin filter. (This -/// includes bypassing `frame_system::Config::BaseCallFilter`). -/// -/// ## Complexity -/// - O(C) where C is the number of calls to be batched. -/// -/// This will return `Ok` in all circumstances. To determine the success of the batch, an -/// event is deposited. If a call failed and the batch was interrupted, then the -/// `BatchInterrupted` event is deposited, along with the number of successful calls made -/// and the error of the failed call. If all were successful, then the `BatchCompleted` -/// event is deposited. -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)); - } - - /// Vec<::RuntimeCall> - final List<_i3.RuntimeCall> calls; - - @override - 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); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => calls.hashCode; -} - -/// Send a call through an indexed pseudonym of the sender. -/// -/// Filter from origin are passed along. The call will be dispatched with an origin which -/// use the same filter as the origin of this call. -/// -/// NOTE: If you need to ensure that any account-based filtering is not honored (i.e. -/// because you expect `proxy` to have been used prior in the call stack and you do not want -/// the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` -/// in the Multisig pallet instead. -/// -/// NOTE: Prior to version *12, this was called `as_limited_sub`. -/// -/// The dispatch origin for this call must be _Signed_. -class AsDerivative extends 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)); - } - - /// u16 - final int index; - - /// Box<::RuntimeCall> - final _i3.RuntimeCall call; - - @override - Map> toJson() => { - 'as_derivative': {'index': index, 'call': call.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U16Codec.codec.sizeHint(index); - size = size + _i3.RuntimeCall.codec.sizeHint(call); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(index, call); -} - -/// Send a batch of dispatch calls and atomically execute them. -/// The whole transaction will rollback and fail if any of the calls failed. -/// -/// May be called from any origin except `None`. -/// -/// - `calls`: The calls to be dispatched from the same origin. The number of call must not -/// exceed the constant: `batched_calls_limit` (available in constant metadata). -/// -/// If origin is root then the calls are dispatched without checking origin filter. (This -/// includes bypassing `frame_system::Config::BaseCallFilter`). -/// -/// ## Complexity -/// - O(C) where C is the number of calls to be batched. -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)); - } - - /// Vec<::RuntimeCall> - final List<_i3.RuntimeCall> calls; - - @override - Map>> toJson() => { - '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); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => calls.hashCode; -} - -/// Dispatches a function call with a provided origin. -/// -/// The dispatch origin for this call must be _Root_. -/// -/// ## Complexity -/// - O(1). -class DispatchAs extends 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)); - } - - /// Box - final _i4.OriginCaller asOrigin; - - /// Box<::RuntimeCall> - final _i3.RuntimeCall call; - - @override - Map>> toJson() => { - 'dispatch_as': {'asOrigin': asOrigin.toJson(), 'call': call.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i4.OriginCaller.codec.sizeHint(asOrigin); - size = size + _i3.RuntimeCall.codec.sizeHint(call); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(asOrigin, call); -} - -/// Send a batch of dispatch calls. -/// Unlike `batch`, it allows errors and won't interrupt. -/// -/// May be called from any origin except `None`. -/// -/// - `calls`: The calls to be dispatched from the same origin. The number of call must not -/// exceed the constant: `batched_calls_limit` (available in constant metadata). -/// -/// If origin is root then the calls are dispatch without checking origin filter. (This -/// includes bypassing `frame_system::Config::BaseCallFilter`). -/// -/// ## Complexity -/// - O(C) where C is the number of calls to be batched. -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)); - } - - /// Vec<::RuntimeCall> - final List<_i3.RuntimeCall> calls; - - @override - Map>> toJson() => { - '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); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => calls.hashCode; -} - -/// Dispatch a function call with a specified weight. -/// -/// This function does not check the weight of the call, and instead allows the -/// Root origin to specify the weight of the call. -/// -/// The dispatch origin for this call must be _Root_. -class WithWeight extends Call { - 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)); - } - - /// Box<::RuntimeCall> - final _i3.RuntimeCall call; - - /// Weight - final _i5.Weight weight; - - @override - Map>> toJson() => { - 'with_weight': {'call': call.toJson(), 'weight': weight.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.RuntimeCall.codec.sizeHint(call); - size = size + _i5.Weight.codec.sizeHint(weight); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(call, weight); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/error.dart deleted file mode 100644 index 885d1676..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/error.dart +++ /dev/null @@ -1,47 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - /// Too many calls batched. - tooManyCalls('TooManyCalls', 0); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.tooManyCalls; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/event.dart deleted file mode 100644 index 6ff35a3c..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_utility/pallet/event.dart +++ /dev/null @@ -1,306 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../sp_runtime/dispatch_error.dart' as _i3; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $Event { - const $Event(); - - BatchInterrupted batchInterrupted({required int index, required _i3.DispatchError error}) { - return BatchInterrupted(index: index, error: error); - } - - BatchCompleted batchCompleted() { - return BatchCompleted(); - } - - BatchCompletedWithErrors batchCompletedWithErrors() { - return BatchCompletedWithErrors(); - } - - ItemCompleted itemCompleted() { - return ItemCompleted(); - } - - ItemFailed itemFailed({required _i3.DispatchError error}) { - return ItemFailed(error: error); - } - - DispatchedAs dispatchedAs({required _i1.Result result}) { - return DispatchedAs(result: result); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return BatchInterrupted._decode(input); - case 1: - return const BatchCompleted(); - case 2: - return const BatchCompletedWithErrors(); - case 3: - return const ItemCompleted(); - case 4: - return ItemFailed._decode(input); - case 5: - return DispatchedAs._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case BatchInterrupted: - (value as BatchInterrupted).encodeTo(output); - break; - case BatchCompleted: - (value as BatchCompleted).encodeTo(output); - break; - case BatchCompletedWithErrors: - (value as BatchCompletedWithErrors).encodeTo(output); - break; - case ItemCompleted: - (value as ItemCompleted).encodeTo(output); - break; - case ItemFailed: - (value as ItemFailed).encodeTo(output); - break; - case DispatchedAs: - (value as DispatchedAs).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case BatchInterrupted: - return (value as BatchInterrupted)._sizeHint(); - case BatchCompleted: - return 1; - case BatchCompletedWithErrors: - return 1; - case ItemCompleted: - return 1; - case ItemFailed: - return (value as ItemFailed)._sizeHint(); - case DispatchedAs: - return (value as DispatchedAs)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// 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}); - - factory BatchInterrupted._decode(_i1.Input input) { - return BatchInterrupted(index: _i1.U32Codec.codec.decode(input), error: _i3.DispatchError.codec.decode(input)); - } - - /// u32 - final int index; - - /// DispatchError - final _i3.DispatchError error; - - @override - Map> toJson() => { - 'BatchInterrupted': {'index': index, 'error': error.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(index); - size = size + _i3.DispatchError.codec.sizeHint(error); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => Object.hash(index, error); -} - -/// Batch of dispatches completed fully with no error. -class BatchCompleted extends Event { - const BatchCompleted(); - - @override - Map toJson() => {'BatchCompleted': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - } - - @override - bool operator ==(Object other) => other is BatchCompleted; - - @override - int get hashCode => runtimeType.hashCode; -} - -/// Batch of dispatches completed but has errors. -class BatchCompletedWithErrors extends Event { - const BatchCompletedWithErrors(); - - @override - Map toJson() => {'BatchCompletedWithErrors': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - } - - @override - bool operator ==(Object other) => other is BatchCompletedWithErrors; - - @override - int get hashCode => runtimeType.hashCode; -} - -/// A single item within a Batch of dispatches has completed with no error. -class ItemCompleted extends Event { - const ItemCompleted(); - - @override - Map toJson() => {'ItemCompleted': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - } - - @override - bool operator ==(Object other) => other is ItemCompleted; - - @override - int get hashCode => runtimeType.hashCode; -} - -/// A single item within a Batch of dispatches has completed with error. -class ItemFailed extends Event { - const ItemFailed({required this.error}); - - factory ItemFailed._decode(_i1.Input input) { - return ItemFailed(error: _i3.DispatchError.codec.decode(input)); - } - - /// DispatchError - final _i3.DispatchError error; - - @override - Map>> toJson() => { - 'ItemFailed': {'error': error.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.DispatchError.codec.sizeHint(error); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => error.hashCode; -} - -/// A call was dispatched. -class DispatchedAs extends Event { - const DispatchedAs({required this.result}); - - factory DispatchedAs._decode(_i1.Input input) { - return DispatchedAs( - result: const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).decode(input), - ); - } - - /// DispatchResult - final _i1.Result result; - - @override - Map>> toJson() => { - 'DispatchedAs': {'result': result.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = - size + - const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).sizeHint(result); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).encodeTo(result, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is DispatchedAs && other.result == result; - - @override - int get hashCode => result.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/call.dart deleted file mode 100644 index 34f97f7b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/call.dart +++ /dev/null @@ -1,436 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../../sp_runtime/multiaddress/multi_address.dart' as _i3; -import '../vesting_info/vesting_info.dart' as _i4; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $Call { - const $Call(); - - Vest vest() { - return Vest(); - } - - VestOther vestOther({required _i3.MultiAddress target}) { - return VestOther(target: target); - } - - VestedTransfer vestedTransfer({required _i3.MultiAddress target, required _i4.VestingInfo schedule}) { - return VestedTransfer(target: target, schedule: schedule); - } - - ForceVestedTransfer forceVestedTransfer({ - required _i3.MultiAddress source, - required _i3.MultiAddress target, - required _i4.VestingInfo schedule, - }) { - return ForceVestedTransfer(source: source, target: target, schedule: schedule); - } - - MergeSchedules mergeSchedules({required int schedule1Index, required int schedule2Index}) { - return MergeSchedules(schedule1Index: schedule1Index, schedule2Index: schedule2Index); - } - - ForceRemoveVestingSchedule forceRemoveVestingSchedule({ - required _i3.MultiAddress target, - required int scheduleIndex, - }) { - return ForceRemoveVestingSchedule(target: target, scheduleIndex: scheduleIndex); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return const Vest(); - case 1: - return VestOther._decode(input); - case 2: - return VestedTransfer._decode(input); - case 3: - return ForceVestedTransfer._decode(input); - case 4: - return MergeSchedules._decode(input); - case 5: - return ForceRemoveVestingSchedule._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case Vest: - (value as Vest).encodeTo(output); - break; - case VestOther: - (value as VestOther).encodeTo(output); - break; - case VestedTransfer: - (value as VestedTransfer).encodeTo(output); - break; - case ForceVestedTransfer: - (value as ForceVestedTransfer).encodeTo(output); - break; - case MergeSchedules: - (value as MergeSchedules).encodeTo(output); - break; - case ForceRemoveVestingSchedule: - (value as ForceRemoveVestingSchedule).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case Vest: - return 1; - case VestOther: - return (value as VestOther)._sizeHint(); - case VestedTransfer: - return (value as VestedTransfer)._sizeHint(); - case ForceVestedTransfer: - return (value as ForceVestedTransfer)._sizeHint(); - case MergeSchedules: - return (value as MergeSchedules)._sizeHint(); - case ForceRemoveVestingSchedule: - return (value as ForceRemoveVestingSchedule)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// Unlock any vested funds of the sender account. -/// -/// The dispatch origin for this call must be _Signed_ and the sender must have funds still -/// locked under this pallet. -/// -/// Emits either `VestingCompleted` or `VestingUpdated`. -/// -/// ## Complexity -/// - `O(1)`. -class Vest extends Call { - const Vest(); - - @override - Map toJson() => {'vest': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - } - - @override - bool operator ==(Object other) => other is Vest; - - @override - int get hashCode => runtimeType.hashCode; -} - -/// Unlock any vested funds of a `target` account. -/// -/// The dispatch origin for this call must be _Signed_. -/// -/// - `target`: The account whose vested funds should be unlocked. Must have funds still -/// locked under this pallet. -/// -/// Emits either `VestingCompleted` or `VestingUpdated`. -/// -/// ## Complexity -/// - `O(1)`. -class VestOther extends Call { - const VestOther({required this.target}); - - factory VestOther._decode(_i1.Input input) { - return VestOther(target: _i3.MultiAddress.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress target; - - @override - Map>> toJson() => { - 'vest_other': {'target': target.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(target); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i3.MultiAddress.codec.encodeTo(target, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is VestOther && other.target == target; - - @override - int get hashCode => target.hashCode; -} - -/// Create a vested transfer. -/// -/// The dispatch origin for this call must be _Signed_. -/// -/// - `target`: The account receiving the vested funds. -/// - `schedule`: The vesting schedule attached to the transfer. -/// -/// Emits `VestingCreated`. -/// -/// NOTE: This will unlock all schedules through the current block. -/// -/// ## Complexity -/// - `O(1)`. -class VestedTransfer extends Call { - const VestedTransfer({required this.target, required this.schedule}); - - factory VestedTransfer._decode(_i1.Input input) { - return VestedTransfer(target: _i3.MultiAddress.codec.decode(input), schedule: _i4.VestingInfo.codec.decode(input)); - } - - /// AccountIdLookupOf - final _i3.MultiAddress target; - - /// VestingInfo, BlockNumberFor> - final _i4.VestingInfo schedule; - - @override - Map>> toJson() => { - 'vested_transfer': {'target': target.toJson(), 'schedule': schedule.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(target); - size = size + _i4.VestingInfo.codec.sizeHint(schedule); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i3.MultiAddress.codec.encodeTo(target, output); - _i4.VestingInfo.codec.encodeTo(schedule, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is VestedTransfer && other.target == target && other.schedule == schedule; - - @override - int get hashCode => Object.hash(target, schedule); -} - -/// Force a vested transfer. -/// -/// The dispatch origin for this call must be _Root_. -/// -/// - `source`: The account whose funds should be transferred. -/// - `target`: The account that should be transferred the vested funds. -/// - `schedule`: The vesting schedule attached to the transfer. -/// -/// Emits `VestingCreated`. -/// -/// NOTE: This will unlock all schedules through the current block. -/// -/// ## Complexity -/// - `O(1)`. -class ForceVestedTransfer extends Call { - const ForceVestedTransfer({required this.source, required this.target, required this.schedule}); - - factory ForceVestedTransfer._decode(_i1.Input input) { - return ForceVestedTransfer( - source: _i3.MultiAddress.codec.decode(input), - target: _i3.MultiAddress.codec.decode(input), - schedule: _i4.VestingInfo.codec.decode(input), - ); - } - - /// AccountIdLookupOf - final _i3.MultiAddress source; - - /// AccountIdLookupOf - final _i3.MultiAddress target; - - /// VestingInfo, BlockNumberFor> - final _i4.VestingInfo schedule; - - @override - Map>> toJson() => { - 'force_vested_transfer': {'source': source.toJson(), 'target': target.toJson(), 'schedule': schedule.toJson()}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(source); - size = size + _i3.MultiAddress.codec.sizeHint(target); - size = size + _i4.VestingInfo.codec.sizeHint(schedule); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i3.MultiAddress.codec.encodeTo(source, output); - _i3.MultiAddress.codec.encodeTo(target, output); - _i4.VestingInfo.codec.encodeTo(schedule, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ForceVestedTransfer && other.source == source && other.target == target && other.schedule == schedule; - - @override - int get hashCode => Object.hash(source, target, schedule); -} - -/// Merge two vesting schedules together, creating a new vesting schedule that unlocks over -/// the highest possible start and end blocks. If both schedules have already started the -/// current block will be used as the schedule start; with the caveat that if one schedule -/// is finished by the current block, the other will be treated as the new merged schedule, -/// unmodified. -/// -/// NOTE: If `schedule1_index == schedule2_index` this is a no-op. -/// NOTE: This will unlock all schedules through the current block prior to merging. -/// NOTE: If both schedules have ended by the current block, no new schedule will be created -/// and both will be removed. -/// -/// Merged schedule attributes: -/// - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block, -/// current_block)`. -/// - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`. -/// - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`. -/// -/// The dispatch origin for this call must be _Signed_. -/// -/// - `schedule1_index`: index of the first schedule to merge. -/// - `schedule2_index`: index of the second schedule to merge. -class MergeSchedules extends Call { - const MergeSchedules({required this.schedule1Index, required this.schedule2Index}); - - factory MergeSchedules._decode(_i1.Input input) { - return MergeSchedules( - schedule1Index: _i1.U32Codec.codec.decode(input), - schedule2Index: _i1.U32Codec.codec.decode(input), - ); - } - - /// u32 - final int schedule1Index; - - /// u32 - final int schedule2Index; - - @override - Map> toJson() => { - 'merge_schedules': {'schedule1Index': schedule1Index, 'schedule2Index': schedule2Index}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(schedule1Index); - size = size + _i1.U32Codec.codec.sizeHint(schedule2Index); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U32Codec.codec.encodeTo(schedule1Index, output); - _i1.U32Codec.codec.encodeTo(schedule2Index, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is MergeSchedules && other.schedule1Index == schedule1Index && other.schedule2Index == schedule2Index; - - @override - int get hashCode => Object.hash(schedule1Index, schedule2Index); -} - -/// Force remove a vesting schedule -/// -/// The dispatch origin for this call must be _Root_. -/// -/// - `target`: An account that has a vesting schedule -/// - `schedule_index`: The vesting schedule index that should be removed -class ForceRemoveVestingSchedule extends Call { - const ForceRemoveVestingSchedule({required this.target, required this.scheduleIndex}); - - factory ForceRemoveVestingSchedule._decode(_i1.Input input) { - return ForceRemoveVestingSchedule( - target: _i3.MultiAddress.codec.decode(input), - scheduleIndex: _i1.U32Codec.codec.decode(input), - ); - } - - /// ::Source - final _i3.MultiAddress target; - - /// u32 - final int scheduleIndex; - - @override - Map> toJson() => { - 'force_remove_vesting_schedule': {'target': target.toJson(), 'scheduleIndex': scheduleIndex}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i3.MultiAddress.codec.sizeHint(target); - size = size + _i1.U32Codec.codec.sizeHint(scheduleIndex); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i3.MultiAddress.codec.encodeTo(target, output); - _i1.U32Codec.codec.encodeTo(scheduleIndex, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ForceRemoveVestingSchedule && other.target == target && other.scheduleIndex == scheduleIndex; - - @override - int get hashCode => Object.hash(target, scheduleIndex); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/error.dart deleted file mode 100644 index 209ccc88..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/error.dart +++ /dev/null @@ -1,68 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// Error for the vesting pallet. -enum Error { - /// The account given is not vesting. - notVesting('NotVesting', 0), - - /// The account already has `MaxVestingSchedules` count of schedules and thus - /// cannot add another one. Consider merging existing schedules in order to add another. - atMaxVestingSchedules('AtMaxVestingSchedules', 1), - - /// Amount being transferred is too low to create a vesting schedule. - amountLow('AmountLow', 2), - - /// An index was out of bounds of the vesting schedules. - scheduleIndexOutOfBounds('ScheduleIndexOutOfBounds', 3), - - /// Failed to create a new schedule because some parameter was invalid. - invalidScheduleParams('InvalidScheduleParams', 4); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.notVesting; - case 1: - return Error.atMaxVestingSchedules; - case 2: - return Error.amountLow; - case 3: - return Error.scheduleIndexOutOfBounds; - case 4: - return Error.invalidScheduleParams; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/event.dart deleted file mode 100644 index 7062b7e1..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_vesting/pallet/event.dart +++ /dev/null @@ -1,167 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../sp_core/crypto/account_id32.dart' as _i3; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - VestingUpdated vestingUpdated({required _i3.AccountId32 account, required BigInt unvested}) { - return VestingUpdated(account: account, unvested: unvested); - } - - VestingCompleted vestingCompleted({required _i3.AccountId32 account}) { - return VestingCompleted(account: account); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return VestingUpdated._decode(input); - case 1: - return VestingCompleted._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case VestingUpdated: - (value as VestingUpdated).encodeTo(output); - break; - case VestingCompleted: - (value as VestingCompleted).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case VestingUpdated: - return (value as VestingUpdated)._sizeHint(); - case VestingCompleted: - return (value as VestingCompleted)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -/// The amount vested has been updated. This could indicate a change in funds available. -/// The balance given is the amount which is left unvested (and thus locked). -class VestingUpdated extends Event { - const VestingUpdated({required this.account, required this.unvested}); - - factory VestingUpdated._decode(_i1.Input input) { - return VestingUpdated( - account: const _i1.U8ArrayCodec(32).decode(input), - unvested: _i1.U128Codec.codec.decode(input), - ); - } - - /// T::AccountId - final _i3.AccountId32 account; - - /// BalanceOf - final BigInt unvested; - - @override - Map> toJson() => { - 'VestingUpdated': {'account': account.toList(), 'unvested': unvested}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(account); - size = size + _i1.U128Codec.codec.sizeHint(unvested); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); - _i1.U128Codec.codec.encodeTo(unvested, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is VestingUpdated && _i4.listsEqual(other.account, account) && other.unvested == unvested; - - @override - int get hashCode => Object.hash(account, unvested); -} - -/// An \[account\] has become fully vested. -class VestingCompleted extends Event { - const VestingCompleted({required this.account}); - - factory VestingCompleted._decode(_i1.Input input) { - return VestingCompleted(account: const _i1.U8ArrayCodec(32).decode(input)); - } - - /// T::AccountId - final _i3.AccountId32 account; - - @override - Map>> toJson() => { - 'VestingCompleted': {'account': account.toList()}, - }; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(account); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || other is VestingCompleted && _i4.listsEqual(other.account, account); - - @override - int get hashCode => account.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_vesting/releases.dart b/quantus_sdk/lib/generated/resonance/types/pallet_vesting/releases.dart deleted file mode 100644 index ba162240..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_vesting/releases.dart +++ /dev/null @@ -1,48 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum Releases { - v0('V0', 0), - v1('V1', 1); - - const Releases(this.variantName, this.codecIndex); - - factory Releases.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ReleasesCodec codec = $ReleasesCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ReleasesCodec with _i1.Codec { - const $ReleasesCodec(); - - @override - Releases decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Releases.v0; - case 1: - return Releases.v1; - default: - throw Exception('Releases: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Releases value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_vesting/vesting_info/vesting_info.dart b/quantus_sdk/lib/generated/resonance/types/pallet_vesting/vesting_info/vesting_info.dart deleted file mode 100644 index ee152efa..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_vesting/vesting_info/vesting_info.dart +++ /dev/null @@ -1,69 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -class VestingInfo { - const VestingInfo({required this.locked, required this.perBlock, required this.startingBlock}); - - factory VestingInfo.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Balance - final BigInt locked; - - /// Balance - final BigInt perBlock; - - /// BlockNumber - final int startingBlock; - - static const $VestingInfoCodec codec = $VestingInfoCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'locked': locked, 'perBlock': perBlock, 'startingBlock': startingBlock}; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is VestingInfo && - other.locked == locked && - other.perBlock == perBlock && - other.startingBlock == startingBlock; - - @override - int get hashCode => Object.hash(locked, perBlock, startingBlock); -} - -class $VestingInfoCodec with _i1.Codec { - const $VestingInfoCodec(); - - @override - void encodeTo(VestingInfo obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.locked, output); - _i1.U128Codec.codec.encodeTo(obj.perBlock, output); - _i1.U32Codec.codec.encodeTo(obj.startingBlock, output); - } - - @override - VestingInfo decode(_i1.Input input) { - return VestingInfo( - locked: _i1.U128Codec.codec.decode(input), - perBlock: _i1.U128Codec.codec.decode(input), - startingBlock: _i1.U32Codec.codec.decode(input), - ); - } - - @override - int sizeHint(VestingInfo obj) { - int size = 0; - size = size + _i1.U128Codec.codec.sizeHint(obj.locked); - size = size + _i1.U128Codec.codec.sizeHint(obj.perBlock); - size = size + _i1.U32Codec.codec.sizeHint(obj.startingBlock); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/call.dart b/quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/call.dart deleted file mode 100644 index 2f7ff1ab..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/call.dart +++ /dev/null @@ -1,117 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i3; - -/// Contains a variant per dispatchable extrinsic that this pallet has. -abstract class Call { - const Call(); - - factory Call.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $CallCodec codec = $CallCodec(); - - static const $Call values = $Call(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Call { - const $Call(); - - VerifyWormholeProof verifyWormholeProof({required List proofBytes, required int blockNumber}) { - return VerifyWormholeProof(proofBytes: proofBytes, blockNumber: blockNumber); - } -} - -class $CallCodec with _i1.Codec { - const $CallCodec(); - - @override - Call decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return VerifyWormholeProof._decode(input); - default: - throw Exception('Call: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Call value, _i1.Output output) { - switch (value.runtimeType) { - case VerifyWormholeProof: - (value as VerifyWormholeProof).encodeTo(output); - break; - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Call value) { - switch (value.runtimeType) { - case VerifyWormholeProof: - return (value as VerifyWormholeProof)._sizeHint(); - default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class VerifyWormholeProof extends Call { - const VerifyWormholeProof({required this.proofBytes, required this.blockNumber}); - - factory VerifyWormholeProof._decode(_i1.Input input) { - return VerifyWormholeProof( - proofBytes: _i1.U8SequenceCodec.codec.decode(input), - blockNumber: _i1.U32Codec.codec.decode(input), - ); - } - - /// Vec - final List proofBytes; - - /// BlockNumberFor - final int blockNumber; - - @override - Map> toJson() => { - 'verify_wormhole_proof': {'proofBytes': proofBytes, 'blockNumber': blockNumber}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8SequenceCodec.codec.sizeHint(proofBytes); - size = size + _i1.U32Codec.codec.sizeHint(blockNumber); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U8SequenceCodec.codec.encodeTo(proofBytes, output); - _i1.U32Codec.codec.encodeTo(blockNumber, output); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is VerifyWormholeProof && _i3.listsEqual(other.proofBytes, proofBytes) && other.blockNumber == blockNumber; - - @override - int get hashCode => Object.hash(proofBytes, blockNumber); -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/error.dart b/quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/error.dart deleted file mode 100644 index 5392e97d..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/error.dart +++ /dev/null @@ -1,73 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - invalidProof('InvalidProof', 0), - proofDeserializationFailed('ProofDeserializationFailed', 1), - verificationFailed('VerificationFailed', 2), - invalidPublicInputs('InvalidPublicInputs', 3), - nullifierAlreadyUsed('NullifierAlreadyUsed', 4), - verifierNotAvailable('VerifierNotAvailable', 5), - invalidStorageRoot('InvalidStorageRoot', 6), - storageRootMismatch('StorageRootMismatch', 7), - blockNotFound('BlockNotFound', 8), - invalidBlockNumber('InvalidBlockNumber', 9); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.invalidProof; - case 1: - return Error.proofDeserializationFailed; - case 2: - return Error.verificationFailed; - case 3: - return Error.invalidPublicInputs; - case 4: - return Error.nullifierAlreadyUsed; - case 5: - return Error.verifierNotAvailable; - case 6: - return Error.invalidStorageRoot; - case 7: - return Error.storageRootMismatch; - case 8: - return Error.blockNotFound; - case 9: - return Error.invalidBlockNumber; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/event.dart b/quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/event.dart deleted file mode 100644 index 55b87d33..00000000 --- a/quantus_sdk/lib/generated/resonance/types/pallet_wormhole/pallet/event.dart +++ /dev/null @@ -1,106 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Event` enum of this pallet -abstract class Event { - const Event(); - - factory Event.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EventCodec codec = $EventCodec(); - - static const $Event values = $Event(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $Event { - const $Event(); - - ProofVerified proofVerified({required BigInt exitAmount}) { - return ProofVerified(exitAmount: exitAmount); - } -} - -class $EventCodec with _i1.Codec { - const $EventCodec(); - - @override - Event decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return ProofVerified._decode(input); - default: - throw Exception('Event: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Event value, _i1.Output output) { - switch (value.runtimeType) { - case ProofVerified: - (value as ProofVerified).encodeTo(output); - break; - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Event value) { - switch (value.runtimeType) { - case ProofVerified: - return (value as ProofVerified)._sizeHint(); - default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class ProofVerified extends Event { - const ProofVerified({required this.exitAmount}); - - factory ProofVerified._decode(_i1.Input input) { - return ProofVerified(exitAmount: _i1.U128Codec.codec.decode(input)); - } - - /// BalanceOf - final BigInt exitAmount; - - @override - Map> toJson() => { - 'ProofVerified': {'exitAmount': exitAmount}, - }; - - int _sizeHint() { - int size = 1; - size = size + _i1.U128Codec.codec.sizeHint(exitAmount); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U128Codec.codec.encodeTo(exitAmount, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is ProofVerified && other.exitAmount == exitAmount; - - @override - int get hashCode => exitAmount.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/poseidon_resonance/poseidon_hasher.dart b/quantus_sdk/lib/generated/resonance/types/poseidon_resonance/poseidon_hasher.dart deleted file mode 100644 index 50302afc..00000000 --- a/quantus_sdk/lib/generated/resonance/types/poseidon_resonance/poseidon_hasher.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef PoseidonHasher = dynamic; - -class PoseidonHasherCodec with _i1.Codec { - const PoseidonHasherCodec(); - - @override - PoseidonHasher decode(_i1.Input input) { - return _i1.NullCodec.codec.decode(input); - } - - @override - void encodeTo(PoseidonHasher value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(PoseidonHasher value) { - return _i1.NullCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/primitive_types/h256.dart b/quantus_sdk/lib/generated/resonance/types/primitive_types/h256.dart deleted file mode 100644 index 3a26f8c3..00000000 --- a/quantus_sdk/lib/generated/resonance/types/primitive_types/h256.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef H256 = List; - -class H256Codec with _i1.Codec { - const H256Codec(); - - @override - H256 decode(_i1.Input input) { - return const _i1.U8ArrayCodec(32).decode(input); - } - - @override - void encodeTo(H256 value, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(value, output); - } - - @override - int sizeHint(H256 value) { - return const _i1.U8ArrayCodec(32).sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/primitive_types/u512.dart b/quantus_sdk/lib/generated/resonance/types/primitive_types/u512.dart deleted file mode 100644 index 92988381..00000000 --- a/quantus_sdk/lib/generated/resonance/types/primitive_types/u512.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef U512 = List; - -class U512Codec with _i1.Codec { - const U512Codec(); - - @override - U512 decode(_i1.Input input) { - return const _i1.U64ArrayCodec(8).decode(input); - } - - @override - void encodeTo(U512 value, _i1.Output output) { - const _i1.U64ArrayCodec(8).encodeTo(value, output); - } - - @override - int sizeHint(U512 value) { - return const _i1.U64ArrayCodec(8).sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/qp_scheduler/block_number_or_timestamp.dart b/quantus_sdk/lib/generated/resonance/types/qp_scheduler/block_number_or_timestamp.dart deleted file mode 100644 index 72570de7..00000000 --- a/quantus_sdk/lib/generated/resonance/types/qp_scheduler/block_number_or_timestamp.dart +++ /dev/null @@ -1,145 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -abstract class BlockNumberOrTimestamp { - const BlockNumberOrTimestamp(); - - factory BlockNumberOrTimestamp.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $BlockNumberOrTimestampCodec codec = $BlockNumberOrTimestampCodec(); - - static const $BlockNumberOrTimestamp values = $BlockNumberOrTimestamp(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $BlockNumberOrTimestamp { - const $BlockNumberOrTimestamp(); - - BlockNumber blockNumber(int value0) { - return BlockNumber(value0); - } - - Timestamp timestamp(BigInt value0) { - return Timestamp(value0); - } -} - -class $BlockNumberOrTimestampCodec with _i1.Codec { - const $BlockNumberOrTimestampCodec(); - - @override - BlockNumberOrTimestamp decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return BlockNumber._decode(input); - case 1: - return Timestamp._decode(input); - default: - throw Exception('BlockNumberOrTimestamp: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(BlockNumberOrTimestamp value, _i1.Output output) { - switch (value.runtimeType) { - case BlockNumber: - (value as BlockNumber).encodeTo(output); - break; - case Timestamp: - (value as Timestamp).encodeTo(output); - break; - default: - throw Exception('BlockNumberOrTimestamp: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(BlockNumberOrTimestamp value) { - switch (value.runtimeType) { - case BlockNumber: - return (value as BlockNumber)._sizeHint(); - case Timestamp: - return (value as Timestamp)._sizeHint(); - default: - throw Exception('BlockNumberOrTimestamp: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class BlockNumber extends BlockNumberOrTimestamp { - const BlockNumber(this.value0); - - factory BlockNumber._decode(_i1.Input input) { - return BlockNumber(_i1.U32Codec.codec.decode(input)); - } - - /// BlockNumber - final int value0; - - @override - Map toJson() => {'BlockNumber': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Timestamp extends BlockNumberOrTimestamp { - const Timestamp(this.value0); - - factory Timestamp._decode(_i1.Input input) { - return Timestamp(_i1.U64Codec.codec.decode(input)); - } - - /// Moment - final BigInt value0; - - @override - Map toJson() => {'Timestamp': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U64Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/qp_scheduler/dispatch_time.dart b/quantus_sdk/lib/generated/resonance/types/qp_scheduler/dispatch_time.dart deleted file mode 100644 index ba19d5d2..00000000 --- a/quantus_sdk/lib/generated/resonance/types/qp_scheduler/dispatch_time.dart +++ /dev/null @@ -1,147 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import 'block_number_or_timestamp.dart' as _i3; - -abstract class DispatchTime { - const DispatchTime(); - - factory DispatchTime.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $DispatchTimeCodec codec = $DispatchTimeCodec(); - - static const $DispatchTime values = $DispatchTime(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $DispatchTime { - const $DispatchTime(); - - At at(int value0) { - return At(value0); - } - - After after(_i3.BlockNumberOrTimestamp value0) { - return After(value0); - } -} - -class $DispatchTimeCodec with _i1.Codec { - const $DispatchTimeCodec(); - - @override - DispatchTime decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return At._decode(input); - case 1: - return After._decode(input); - default: - throw Exception('DispatchTime: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(DispatchTime value, _i1.Output output) { - switch (value.runtimeType) { - case At: - (value as At).encodeTo(output); - break; - case After: - (value as After).encodeTo(output); - break; - default: - throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(DispatchTime value) { - switch (value.runtimeType) { - case At: - return (value as At)._sizeHint(); - case After: - return (value as After)._sizeHint(); - default: - throw Exception('DispatchTime: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class At extends DispatchTime { - const At(this.value0); - - factory At._decode(_i1.Input input) { - return At(_i1.U32Codec.codec.decode(input)); - } - - /// BlockNumber - final int value0; - - @override - Map toJson() => {'At': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U32Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class After extends DispatchTime { - const After(this.value0); - - factory After._decode(_i1.Input input) { - return After(_i3.BlockNumberOrTimestamp.codec.decode(input)); - } - - /// BlockNumberOrTimestamp - final _i3.BlockNumberOrTimestamp value0; - - @override - Map> toJson() => {'After': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i3.BlockNumberOrTimestamp.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/governance/definitions/preimage_deposit.dart b/quantus_sdk/lib/generated/resonance/types/quantus_runtime/governance/definitions/preimage_deposit.dart deleted file mode 100644 index 6bbcc7ef..00000000 --- a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/governance/definitions/preimage_deposit.dart +++ /dev/null @@ -1,50 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -class PreimageDeposit { - const PreimageDeposit({required this.amount}); - - factory PreimageDeposit.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Balance - final BigInt amount; - - static const $PreimageDepositCodec codec = $PreimageDepositCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'amount': amount}; - - @override - bool operator ==(Object other) => identical(this, other) || other is PreimageDeposit && other.amount == amount; - - @override - int get hashCode => amount.hashCode; -} - -class $PreimageDepositCodec with _i1.Codec { - const $PreimageDepositCodec(); - - @override - void encodeTo(PreimageDeposit obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.amount, output); - } - - @override - PreimageDeposit decode(_i1.Input input) { - return PreimageDeposit(amount: _i1.U128Codec.codec.decode(input)); - } - - @override - int sizeHint(PreimageDeposit obj) { - int size = 0; - size = size + _i1.U128Codec.codec.sizeHint(obj.amount); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart b/quantus_sdk/lib/generated/resonance/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart deleted file mode 100644 index 4608d712..00000000 --- a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart +++ /dev/null @@ -1,54 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum Origin { - treasurer('Treasurer', 0), - smallSpender('SmallSpender', 1), - mediumSpender('MediumSpender', 2), - bigSpender('BigSpender', 3); - - const Origin(this.variantName, this.codecIndex); - - factory Origin.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $OriginCodec codec = $OriginCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $OriginCodec with _i1.Codec { - const $OriginCodec(); - - @override - Origin decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Origin.treasurer; - case 1: - return Origin.smallSpender; - case 2: - return Origin.mediumSpender; - case 3: - return Origin.bigSpender; - default: - throw Exception('Origin: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Origin value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/origin_caller.dart b/quantus_sdk/lib/generated/resonance/types/quantus_runtime/origin_caller.dart deleted file mode 100644 index a8d62c6e..00000000 --- a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/origin_caller.dart +++ /dev/null @@ -1,148 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../frame_support/dispatch/raw_origin.dart' as _i3; -import 'governance/origins/pallet_custom_origins/origin.dart' as _i4; - -abstract class OriginCaller { - const OriginCaller(); - - factory OriginCaller.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $OriginCallerCodec codec = $OriginCallerCodec(); - - static const $OriginCaller values = $OriginCaller(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $OriginCaller { - const $OriginCaller(); - - System system(_i3.RawOrigin value0) { - return System(value0); - } - - Origins origins(_i4.Origin value0) { - return Origins(value0); - } -} - -class $OriginCallerCodec with _i1.Codec { - const $OriginCallerCodec(); - - @override - OriginCaller decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return System._decode(input); - case 19: - return Origins._decode(input); - default: - throw Exception('OriginCaller: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(OriginCaller value, _i1.Output output) { - switch (value.runtimeType) { - case System: - (value as System).encodeTo(output); - break; - case Origins: - (value as Origins).encodeTo(output); - break; - default: - throw Exception('OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(OriginCaller value) { - switch (value.runtimeType) { - case System: - return (value as System)._sizeHint(); - case Origins: - return (value as Origins)._sizeHint(); - default: - throw Exception('OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class System extends OriginCaller { - const System(this.value0); - - factory System._decode(_i1.Input input) { - return System(_i3.RawOrigin.codec.decode(input)); - } - - /// frame_system::Origin - final _i3.RawOrigin value0; - - @override - Map> toJson() => {'system': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i3.RawOrigin.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Origins extends OriginCaller { - const Origins(this.value0); - - factory Origins._decode(_i1.Input input) { - return Origins(_i4.Origin.codec.decode(input)); - } - - /// pallet_custom_origins::Origin - final _i4.Origin value0; - - @override - Map toJson() => {'Origins': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i4.Origin.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(19, output); - _i4.Origin.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Origins && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime.dart b/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime.dart deleted file mode 100644 index f16a6bb0..00000000 --- a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef Runtime = dynamic; - -class RuntimeCodec with _i1.Codec { - const RuntimeCodec(); - - @override - Runtime decode(_i1.Input input) { - return _i1.NullCodec.codec.decode(input); - } - - @override - void encodeTo(Runtime value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(Runtime value) { - return _i1.NullCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_call.dart b/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_call.dart deleted file mode 100644 index 782ed90b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_call.dart +++ /dev/null @@ -1,854 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../frame_system/pallet/call.dart' as _i3; -import '../pallet_assets/pallet/call.dart' as _i20; -import '../pallet_balances/pallet/call.dart' as _i5; -import '../pallet_conviction_voting/pallet/call.dart' as _i14; -import '../pallet_merkle_airdrop/pallet/call.dart' as _i17; -import '../pallet_preimage/pallet/call.dart' as _i9; -import '../pallet_ranked_collective/pallet/call.dart' as _i15; -import '../pallet_recovery/pallet/call.dart' as _i19; -import '../pallet_referenda/pallet/call_1.dart' as _i12; -import '../pallet_referenda/pallet/call_2.dart' as _i16; -import '../pallet_reversible_transfers/pallet/call.dart' as _i13; -import '../pallet_scheduler/pallet/call.dart' as _i10; -import '../pallet_sudo/pallet/call.dart' as _i6; -import '../pallet_timestamp/pallet/call.dart' as _i4; -import '../pallet_treasury/pallet/call.dart' as _i18; -import '../pallet_utility/pallet/call.dart' as _i11; -import '../pallet_vesting/pallet/call.dart' as _i8; -import '../pallet_wormhole/pallet/call.dart' as _i7; - -abstract class RuntimeCall { - const RuntimeCall(); - - factory RuntimeCall.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $RuntimeCallCodec codec = $RuntimeCallCodec(); - - static const $RuntimeCall values = $RuntimeCall(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $RuntimeCall { - const $RuntimeCall(); - - System system(_i3.Call value0) { - return System(value0); - } - - Timestamp timestamp(_i4.Call value0) { - return Timestamp(value0); - } - - Balances balances(_i5.Call value0) { - return Balances(value0); - } - - Sudo sudo(_i6.Call value0) { - return Sudo(value0); - } - - Wormhole wormhole(_i7.Call value0) { - return Wormhole(value0); - } - - Vesting vesting(_i8.Call value0) { - return Vesting(value0); - } - - Preimage preimage(_i9.Call value0) { - return Preimage(value0); - } - - Scheduler scheduler(_i10.Call value0) { - return Scheduler(value0); - } - - Utility utility(_i11.Call value0) { - return Utility(value0); - } - - Referenda referenda(_i12.Call value0) { - return Referenda(value0); - } - - ReversibleTransfers reversibleTransfers(_i13.Call value0) { - return ReversibleTransfers(value0); - } - - ConvictionVoting convictionVoting(_i14.Call value0) { - return ConvictionVoting(value0); - } - - TechCollective techCollective(_i15.Call value0) { - return TechCollective(value0); - } - - TechReferenda techReferenda(_i16.Call value0) { - return TechReferenda(value0); - } - - MerkleAirdrop merkleAirdrop(_i17.Call value0) { - return MerkleAirdrop(value0); - } - - TreasuryPallet treasuryPallet(_i18.Call value0) { - return TreasuryPallet(value0); - } - - Recovery recovery(_i19.Call value0) { - return Recovery(value0); - } - - Assets assets(_i20.Call value0) { - return Assets(value0); - } -} - -class $RuntimeCallCodec with _i1.Codec { - const $RuntimeCallCodec(); - - @override - RuntimeCall decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return System._decode(input); - case 1: - return Timestamp._decode(input); - case 2: - return Balances._decode(input); - case 4: - return Sudo._decode(input); - case 6: - return Wormhole._decode(input); - case 8: - return Vesting._decode(input); - case 9: - return Preimage._decode(input); - case 10: - return Scheduler._decode(input); - case 11: - return Utility._decode(input); - case 12: - return Referenda._decode(input); - case 13: - return ReversibleTransfers._decode(input); - case 14: - return ConvictionVoting._decode(input); - case 15: - return TechCollective._decode(input); - case 16: - return TechReferenda._decode(input); - case 17: - return MerkleAirdrop._decode(input); - case 18: - return TreasuryPallet._decode(input); - case 20: - return Recovery._decode(input); - case 21: - return Assets._decode(input); - default: - throw Exception('RuntimeCall: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(RuntimeCall value, _i1.Output output) { - switch (value.runtimeType) { - case System: - (value as System).encodeTo(output); - break; - case Timestamp: - (value as Timestamp).encodeTo(output); - break; - case Balances: - (value as Balances).encodeTo(output); - break; - case Sudo: - (value as Sudo).encodeTo(output); - break; - case Wormhole: - (value as Wormhole).encodeTo(output); - break; - case Vesting: - (value as Vesting).encodeTo(output); - break; - case Preimage: - (value as Preimage).encodeTo(output); - break; - case Scheduler: - (value as Scheduler).encodeTo(output); - break; - case Utility: - (value as Utility).encodeTo(output); - break; - case Referenda: - (value as Referenda).encodeTo(output); - break; - case ReversibleTransfers: - (value as ReversibleTransfers).encodeTo(output); - break; - case ConvictionVoting: - (value as ConvictionVoting).encodeTo(output); - break; - case TechCollective: - (value as TechCollective).encodeTo(output); - break; - case TechReferenda: - (value as TechReferenda).encodeTo(output); - break; - case MerkleAirdrop: - (value as MerkleAirdrop).encodeTo(output); - break; - case TreasuryPallet: - (value as TreasuryPallet).encodeTo(output); - break; - case Recovery: - (value as Recovery).encodeTo(output); - break; - case Assets: - (value as Assets).encodeTo(output); - break; - default: - throw Exception('RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(RuntimeCall value) { - switch (value.runtimeType) { - case System: - return (value as System)._sizeHint(); - case Timestamp: - return (value as Timestamp)._sizeHint(); - case Balances: - return (value as Balances)._sizeHint(); - case Sudo: - return (value as Sudo)._sizeHint(); - case Wormhole: - return (value as Wormhole)._sizeHint(); - case Vesting: - return (value as Vesting)._sizeHint(); - case Preimage: - return (value as Preimage)._sizeHint(); - case Scheduler: - return (value as Scheduler)._sizeHint(); - case Utility: - return (value as Utility)._sizeHint(); - case Referenda: - return (value as Referenda)._sizeHint(); - case ReversibleTransfers: - return (value as ReversibleTransfers)._sizeHint(); - case ConvictionVoting: - return (value as ConvictionVoting)._sizeHint(); - case TechCollective: - return (value as TechCollective)._sizeHint(); - case TechReferenda: - return (value as TechReferenda)._sizeHint(); - case MerkleAirdrop: - return (value as MerkleAirdrop)._sizeHint(); - case TreasuryPallet: - return (value as TreasuryPallet)._sizeHint(); - case Recovery: - return (value as Recovery)._sizeHint(); - case Assets: - return (value as Assets)._sizeHint(); - default: - throw Exception('RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class System extends RuntimeCall { - const System(this.value0); - - factory System._decode(_i1.Input input) { - return System(_i3.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i3.Call value0; - - @override - Map>> toJson() => {'System': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i3.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Timestamp extends RuntimeCall { - const Timestamp(this.value0); - - factory Timestamp._decode(_i1.Input input) { - return Timestamp(_i4.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i4.Call value0; - - @override - Map>> toJson() => {'Timestamp': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i4.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Balances extends RuntimeCall { - const Balances(this.value0); - - factory Balances._decode(_i1.Input input) { - return Balances(_i5.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i5.Call value0; - - @override - Map>> toJson() => {'Balances': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i5.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Sudo extends RuntimeCall { - const Sudo(this.value0); - - factory Sudo._decode(_i1.Input input) { - return Sudo(_i6.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i6.Call value0; - - @override - Map> toJson() => {'Sudo': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i6.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i6.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Sudo && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Wormhole extends RuntimeCall { - const Wormhole(this.value0); - - factory Wormhole._decode(_i1.Input input) { - return Wormhole(_i7.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i7.Call value0; - - @override - Map>> toJson() => {'Wormhole': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i7.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i7.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; -} - -class Vesting extends RuntimeCall { - const Vesting(this.value0); - - factory Vesting._decode(_i1.Input input) { - return Vesting(_i8.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i8.Call value0; - - @override - Map> toJson() => {'Vesting': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i8.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i8.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Vesting && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Preimage extends RuntimeCall { - const Preimage(this.value0); - - factory Preimage._decode(_i1.Input input) { - return Preimage(_i9.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i9.Call value0; - - @override - Map>>> toJson() => {'Preimage': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i9.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i9.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Preimage && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Scheduler extends RuntimeCall { - const Scheduler(this.value0); - - factory Scheduler._decode(_i1.Input input) { - return Scheduler(_i10.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i10.Call value0; - - @override - Map>> toJson() => {'Scheduler': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i10.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i10.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Scheduler && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Utility extends RuntimeCall { - const Utility(this.value0); - - factory Utility._decode(_i1.Input input) { - return Utility(_i11.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i11.Call value0; - - @override - Map>> toJson() => {'Utility': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i11.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i11.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Utility && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Referenda extends RuntimeCall { - const Referenda(this.value0); - - factory Referenda._decode(_i1.Input input) { - return Referenda(_i12.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i12.Call value0; - - @override - Map>> toJson() => {'Referenda': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i12.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); - _i12.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Referenda && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class ReversibleTransfers extends RuntimeCall { - const ReversibleTransfers(this.value0); - - factory ReversibleTransfers._decode(_i1.Input input) { - return ReversibleTransfers(_i13.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i13.Call value0; - - @override - Map>> toJson() => {'ReversibleTransfers': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i13.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - _i13.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is ReversibleTransfers && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class ConvictionVoting extends RuntimeCall { - const ConvictionVoting(this.value0); - - factory ConvictionVoting._decode(_i1.Input input) { - return ConvictionVoting(_i14.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i14.Call value0; - - @override - Map>> toJson() => {'ConvictionVoting': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i14.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - _i14.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is ConvictionVoting && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class TechCollective extends RuntimeCall { - const TechCollective(this.value0); - - factory TechCollective._decode(_i1.Input input) { - return TechCollective(_i15.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i15.Call value0; - - @override - Map>> toJson() => {'TechCollective': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i15.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - _i15.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is TechCollective && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class TechReferenda extends RuntimeCall { - const TechReferenda(this.value0); - - factory TechReferenda._decode(_i1.Input input) { - return TechReferenda(_i16.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i16.Call value0; - - @override - Map>> toJson() => {'TechReferenda': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i16.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(16, output); - _i16.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is TechReferenda && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class MerkleAirdrop extends RuntimeCall { - const MerkleAirdrop(this.value0); - - factory MerkleAirdrop._decode(_i1.Input input) { - return MerkleAirdrop(_i17.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i17.Call value0; - - @override - Map>> toJson() => {'MerkleAirdrop': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i17.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(17, output); - _i17.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is MerkleAirdrop && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class TreasuryPallet extends RuntimeCall { - const TreasuryPallet(this.value0); - - factory TreasuryPallet._decode(_i1.Input input) { - return TreasuryPallet(_i18.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i18.Call value0; - - @override - Map>> toJson() => {'TreasuryPallet': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i18.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(18, output); - _i18.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is TreasuryPallet && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Recovery extends RuntimeCall { - const Recovery(this.value0); - - factory Recovery._decode(_i1.Input input) { - return Recovery(_i19.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i19.Call value0; - - @override - Map> toJson() => {'Recovery': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i19.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(20, output); - _i19.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Recovery && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Assets extends RuntimeCall { - const Assets(this.value0); - - factory Assets._decode(_i1.Input input) { - return Assets(_i20.Call.codec.decode(input)); - } - - /// self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch - ///::CallableCallFor - final _i20.Call value0; - - @override - Map>> toJson() => {'Assets': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i20.Call.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(21, output); - _i20.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Assets && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_event.dart b/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_event.dart deleted file mode 100644 index 07d18595..00000000 --- a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_event.dart +++ /dev/null @@ -1,922 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../frame_system/pallet/event.dart' as _i3; -import '../pallet_assets/pallet/event.dart' as _i22; -import '../pallet_balances/pallet/event.dart' as _i4; -import '../pallet_conviction_voting/pallet/event.dart' as _i16; -import '../pallet_merkle_airdrop/pallet/event.dart' as _i19; -import '../pallet_mining_rewards/pallet/event.dart' as _i9; -import '../pallet_preimage/pallet/event.dart' as _i11; -import '../pallet_qpow/pallet/event.dart' as _i7; -import '../pallet_ranked_collective/pallet/event.dart' as _i17; -import '../pallet_recovery/pallet/event.dart' as _i21; -import '../pallet_referenda/pallet/event_1.dart' as _i14; -import '../pallet_referenda/pallet/event_2.dart' as _i18; -import '../pallet_reversible_transfers/pallet/event.dart' as _i15; -import '../pallet_scheduler/pallet/event.dart' as _i12; -import '../pallet_sudo/pallet/event.dart' as _i6; -import '../pallet_transaction_payment/pallet/event.dart' as _i5; -import '../pallet_treasury/pallet/event.dart' as _i20; -import '../pallet_utility/pallet/event.dart' as _i13; -import '../pallet_vesting/pallet/event.dart' as _i10; -import '../pallet_wormhole/pallet/event.dart' as _i8; - -abstract class RuntimeEvent { - const RuntimeEvent(); - - factory RuntimeEvent.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $RuntimeEventCodec codec = $RuntimeEventCodec(); - - static const $RuntimeEvent values = $RuntimeEvent(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map> toJson(); -} - -class $RuntimeEvent { - const $RuntimeEvent(); - - System system(_i3.Event value0) { - return System(value0); - } - - Balances balances(_i4.Event value0) { - return Balances(value0); - } - - TransactionPayment transactionPayment(_i5.Event value0) { - return TransactionPayment(value0); - } - - Sudo sudo(_i6.Event value0) { - return Sudo(value0); - } - - QPoW qPoW(_i7.Event value0) { - return QPoW(value0); - } - - Wormhole wormhole(_i8.Event value0) { - return Wormhole(value0); - } - - MiningRewards miningRewards(_i9.Event value0) { - return MiningRewards(value0); - } - - Vesting vesting(_i10.Event value0) { - return Vesting(value0); - } - - Preimage preimage(_i11.Event value0) { - return Preimage(value0); - } - - Scheduler scheduler(_i12.Event value0) { - return Scheduler(value0); - } - - Utility utility(_i13.Event value0) { - return Utility(value0); - } - - Referenda referenda(_i14.Event value0) { - return Referenda(value0); - } - - ReversibleTransfers reversibleTransfers(_i15.Event value0) { - return ReversibleTransfers(value0); - } - - ConvictionVoting convictionVoting(_i16.Event value0) { - return ConvictionVoting(value0); - } - - TechCollective techCollective(_i17.Event value0) { - return TechCollective(value0); - } - - TechReferenda techReferenda(_i18.Event value0) { - return TechReferenda(value0); - } - - MerkleAirdrop merkleAirdrop(_i19.Event value0) { - return MerkleAirdrop(value0); - } - - TreasuryPallet treasuryPallet(_i20.Event value0) { - return TreasuryPallet(value0); - } - - Recovery recovery(_i21.Event value0) { - return Recovery(value0); - } - - Assets assets(_i22.Event value0) { - return Assets(value0); - } -} - -class $RuntimeEventCodec with _i1.Codec { - const $RuntimeEventCodec(); - - @override - RuntimeEvent decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return System._decode(input); - case 2: - return Balances._decode(input); - case 3: - return TransactionPayment._decode(input); - case 4: - return Sudo._decode(input); - case 5: - return QPoW._decode(input); - case 6: - return Wormhole._decode(input); - case 7: - return MiningRewards._decode(input); - case 8: - return Vesting._decode(input); - case 9: - return Preimage._decode(input); - case 10: - return Scheduler._decode(input); - case 11: - return Utility._decode(input); - case 12: - return Referenda._decode(input); - case 13: - return ReversibleTransfers._decode(input); - case 14: - return ConvictionVoting._decode(input); - case 15: - return TechCollective._decode(input); - case 16: - return TechReferenda._decode(input); - case 17: - return MerkleAirdrop._decode(input); - case 18: - return TreasuryPallet._decode(input); - case 20: - return Recovery._decode(input); - case 21: - return Assets._decode(input); - default: - throw Exception('RuntimeEvent: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(RuntimeEvent value, _i1.Output output) { - switch (value.runtimeType) { - case System: - (value as System).encodeTo(output); - break; - case Balances: - (value as Balances).encodeTo(output); - break; - case TransactionPayment: - (value as TransactionPayment).encodeTo(output); - break; - case Sudo: - (value as Sudo).encodeTo(output); - break; - case QPoW: - (value as QPoW).encodeTo(output); - break; - case Wormhole: - (value as Wormhole).encodeTo(output); - break; - case MiningRewards: - (value as MiningRewards).encodeTo(output); - break; - case Vesting: - (value as Vesting).encodeTo(output); - break; - case Preimage: - (value as Preimage).encodeTo(output); - break; - case Scheduler: - (value as Scheduler).encodeTo(output); - break; - case Utility: - (value as Utility).encodeTo(output); - break; - case Referenda: - (value as Referenda).encodeTo(output); - break; - case ReversibleTransfers: - (value as ReversibleTransfers).encodeTo(output); - break; - case ConvictionVoting: - (value as ConvictionVoting).encodeTo(output); - break; - case TechCollective: - (value as TechCollective).encodeTo(output); - break; - case TechReferenda: - (value as TechReferenda).encodeTo(output); - break; - case MerkleAirdrop: - (value as MerkleAirdrop).encodeTo(output); - break; - case TreasuryPallet: - (value as TreasuryPallet).encodeTo(output); - break; - case Recovery: - (value as Recovery).encodeTo(output); - break; - case Assets: - (value as Assets).encodeTo(output); - break; - default: - throw Exception('RuntimeEvent: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(RuntimeEvent value) { - switch (value.runtimeType) { - case System: - return (value as System)._sizeHint(); - case Balances: - return (value as Balances)._sizeHint(); - case TransactionPayment: - return (value as TransactionPayment)._sizeHint(); - case Sudo: - return (value as Sudo)._sizeHint(); - case QPoW: - return (value as QPoW)._sizeHint(); - case Wormhole: - return (value as Wormhole)._sizeHint(); - case MiningRewards: - return (value as MiningRewards)._sizeHint(); - case Vesting: - return (value as Vesting)._sizeHint(); - case Preimage: - return (value as Preimage)._sizeHint(); - case Scheduler: - return (value as Scheduler)._sizeHint(); - case Utility: - return (value as Utility)._sizeHint(); - case Referenda: - return (value as Referenda)._sizeHint(); - case ReversibleTransfers: - return (value as ReversibleTransfers)._sizeHint(); - case ConvictionVoting: - return (value as ConvictionVoting)._sizeHint(); - case TechCollective: - return (value as TechCollective)._sizeHint(); - case TechReferenda: - return (value as TechReferenda)._sizeHint(); - case MerkleAirdrop: - return (value as MerkleAirdrop)._sizeHint(); - case TreasuryPallet: - return (value as TreasuryPallet)._sizeHint(); - case Recovery: - return (value as Recovery)._sizeHint(); - case Assets: - return (value as Assets)._sizeHint(); - default: - throw Exception('RuntimeEvent: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class System extends RuntimeEvent { - const System(this.value0); - - factory System._decode(_i1.Input input) { - return System(_i3.Event.codec.decode(input)); - } - - /// frame_system::Event - final _i3.Event value0; - - @override - Map> toJson() => {'System': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i3.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Balances extends RuntimeEvent { - const Balances(this.value0); - - factory Balances._decode(_i1.Input input) { - return Balances(_i4.Event.codec.decode(input)); - } - - /// pallet_balances::Event - final _i4.Event value0; - - @override - Map>> toJson() => {'Balances': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i4.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class TransactionPayment extends RuntimeEvent { - const TransactionPayment(this.value0); - - factory TransactionPayment._decode(_i1.Input input) { - return TransactionPayment(_i5.Event.codec.decode(input)); - } - - /// pallet_transaction_payment::Event - final _i5.Event value0; - - @override - Map>> toJson() => {'TransactionPayment': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i5.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Sudo extends RuntimeEvent { - const Sudo(this.value0); - - factory Sudo._decode(_i1.Input input) { - return Sudo(_i6.Event.codec.decode(input)); - } - - /// pallet_sudo::Event - final _i6.Event value0; - - @override - Map> toJson() => {'Sudo': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i6.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i6.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Sudo && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class QPoW extends RuntimeEvent { - const QPoW(this.value0); - - factory QPoW._decode(_i1.Input input) { - return QPoW(_i7.Event.codec.decode(input)); - } - - /// pallet_qpow::Event - final _i7.Event value0; - - @override - Map>> toJson() => {'QPoW': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i7.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i7.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is QPoW && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Wormhole extends RuntimeEvent { - const Wormhole(this.value0); - - factory Wormhole._decode(_i1.Input input) { - return Wormhole(_i8.Event.codec.decode(input)); - } - - /// pallet_wormhole::Event - final _i8.Event value0; - - @override - Map>> toJson() => {'Wormhole': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i8.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i8.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Wormhole && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class MiningRewards extends RuntimeEvent { - const MiningRewards(this.value0); - - factory MiningRewards._decode(_i1.Input input) { - return MiningRewards(_i9.Event.codec.decode(input)); - } - - /// pallet_mining_rewards::Event - final _i9.Event value0; - - @override - Map>> toJson() => {'MiningRewards': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i9.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i9.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is MiningRewards && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Vesting extends RuntimeEvent { - const Vesting(this.value0); - - factory Vesting._decode(_i1.Input input) { - return Vesting(_i10.Event.codec.decode(input)); - } - - /// pallet_vesting::Event - final _i10.Event value0; - - @override - Map>> toJson() => {'Vesting': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i10.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - _i10.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Vesting && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Preimage extends RuntimeEvent { - const Preimage(this.value0); - - factory Preimage._decode(_i1.Input input) { - return Preimage(_i11.Event.codec.decode(input)); - } - - /// pallet_preimage::Event - final _i11.Event value0; - - @override - Map>>> toJson() => {'Preimage': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i11.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i11.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Preimage && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Scheduler extends RuntimeEvent { - const Scheduler(this.value0); - - factory Scheduler._decode(_i1.Input input) { - return Scheduler(_i12.Event.codec.decode(input)); - } - - /// pallet_scheduler::Event - final _i12.Event value0; - - @override - Map>> toJson() => {'Scheduler': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i12.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i12.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Scheduler && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Utility extends RuntimeEvent { - const Utility(this.value0); - - factory Utility._decode(_i1.Input input) { - return Utility(_i13.Event.codec.decode(input)); - } - - /// pallet_utility::Event - final _i13.Event value0; - - @override - Map> toJson() => {'Utility': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i13.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i13.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Utility && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Referenda extends RuntimeEvent { - const Referenda(this.value0); - - factory Referenda._decode(_i1.Input input) { - return Referenda(_i14.Event.codec.decode(input)); - } - - /// pallet_referenda::Event - final _i14.Event value0; - - @override - Map>> toJson() => {'Referenda': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i14.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); - _i14.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Referenda && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class ReversibleTransfers extends RuntimeEvent { - const ReversibleTransfers(this.value0); - - factory ReversibleTransfers._decode(_i1.Input input) { - return ReversibleTransfers(_i15.Event.codec.decode(input)); - } - - /// pallet_reversible_transfers::Event - final _i15.Event value0; - - @override - Map>> toJson() => {'ReversibleTransfers': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i15.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - _i15.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is ReversibleTransfers && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class ConvictionVoting extends RuntimeEvent { - const ConvictionVoting(this.value0); - - factory ConvictionVoting._decode(_i1.Input input) { - return ConvictionVoting(_i16.Event.codec.decode(input)); - } - - /// pallet_conviction_voting::Event - final _i16.Event value0; - - @override - Map> toJson() => {'ConvictionVoting': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i16.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - _i16.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is ConvictionVoting && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class TechCollective extends RuntimeEvent { - const TechCollective(this.value0); - - factory TechCollective._decode(_i1.Input input) { - return TechCollective(_i17.Event.codec.decode(input)); - } - - /// pallet_ranked_collective::Event - final _i17.Event value0; - - @override - Map>> toJson() => {'TechCollective': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i17.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - _i17.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is TechCollective && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class TechReferenda extends RuntimeEvent { - const TechReferenda(this.value0); - - factory TechReferenda._decode(_i1.Input input) { - return TechReferenda(_i18.Event.codec.decode(input)); - } - - /// pallet_referenda::Event - final _i18.Event value0; - - @override - Map>> toJson() => {'TechReferenda': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i18.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(16, output); - _i18.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is TechReferenda && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class MerkleAirdrop extends RuntimeEvent { - const MerkleAirdrop(this.value0); - - factory MerkleAirdrop._decode(_i1.Input input) { - return MerkleAirdrop(_i19.Event.codec.decode(input)); - } - - /// pallet_merkle_airdrop::Event - final _i19.Event value0; - - @override - Map>> toJson() => {'MerkleAirdrop': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i19.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(17, output); - _i19.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is MerkleAirdrop && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class TreasuryPallet extends RuntimeEvent { - const TreasuryPallet(this.value0); - - factory TreasuryPallet._decode(_i1.Input input) { - return TreasuryPallet(_i20.Event.codec.decode(input)); - } - - /// pallet_treasury::Event - final _i20.Event value0; - - @override - Map>> toJson() => {'TreasuryPallet': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i20.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(18, output); - _i20.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is TreasuryPallet && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Recovery extends RuntimeEvent { - const Recovery(this.value0); - - factory Recovery._decode(_i1.Input input) { - return Recovery(_i21.Event.codec.decode(input)); - } - - /// pallet_recovery::Event - final _i21.Event value0; - - @override - Map>>> toJson() => {'Recovery': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i21.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(20, output); - _i21.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Recovery && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class Assets extends RuntimeEvent { - const Assets(this.value0); - - factory Assets._decode(_i1.Input input) { - return Assets(_i22.Event.codec.decode(input)); - } - - /// pallet_assets::Event - final _i22.Event value0; - - @override - Map>> toJson() => {'Assets': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i22.Event.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(21, output); - _i22.Event.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Assets && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_freeze_reason.dart b/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_freeze_reason.dart deleted file mode 100644 index 5e4c8b0d..00000000 --- a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_freeze_reason.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef RuntimeFreezeReason = dynamic; - -class RuntimeFreezeReasonCodec with _i1.Codec { - const RuntimeFreezeReasonCodec(); - - @override - RuntimeFreezeReason decode(_i1.Input input) { - return _i1.NullCodec.codec.decode(input); - } - - @override - void encodeTo(RuntimeFreezeReason value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(RuntimeFreezeReason value) { - return _i1.NullCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_hold_reason.dart b/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_hold_reason.dart deleted file mode 100644 index 813bf00d..00000000 --- a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/runtime_hold_reason.dart +++ /dev/null @@ -1,148 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../pallet_preimage/pallet/hold_reason.dart' as _i3; -import '../pallet_reversible_transfers/pallet/hold_reason.dart' as _i4; - -abstract class RuntimeHoldReason { - const RuntimeHoldReason(); - - factory RuntimeHoldReason.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $RuntimeHoldReasonCodec codec = $RuntimeHoldReasonCodec(); - - static const $RuntimeHoldReason values = $RuntimeHoldReason(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $RuntimeHoldReason { - const $RuntimeHoldReason(); - - Preimage preimage(_i3.HoldReason value0) { - return Preimage(value0); - } - - ReversibleTransfers reversibleTransfers(_i4.HoldReason value0) { - return ReversibleTransfers(value0); - } -} - -class $RuntimeHoldReasonCodec with _i1.Codec { - const $RuntimeHoldReasonCodec(); - - @override - RuntimeHoldReason decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 9: - return Preimage._decode(input); - case 13: - return ReversibleTransfers._decode(input); - default: - throw Exception('RuntimeHoldReason: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(RuntimeHoldReason value, _i1.Output output) { - switch (value.runtimeType) { - case Preimage: - (value as Preimage).encodeTo(output); - break; - case ReversibleTransfers: - (value as ReversibleTransfers).encodeTo(output); - break; - default: - throw Exception('RuntimeHoldReason: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(RuntimeHoldReason value) { - switch (value.runtimeType) { - case Preimage: - return (value as Preimage)._sizeHint(); - case ReversibleTransfers: - return (value as ReversibleTransfers)._sizeHint(); - default: - throw Exception('RuntimeHoldReason: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Preimage extends RuntimeHoldReason { - const Preimage(this.value0); - - factory Preimage._decode(_i1.Input input) { - return Preimage(_i3.HoldReason.codec.decode(input)); - } - - /// pallet_preimage::HoldReason - final _i3.HoldReason value0; - - @override - Map toJson() => {'Preimage': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i3.HoldReason.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i3.HoldReason.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Preimage && other.value0 == value0; - - @override - int get hashCode => value0.hashCode; -} - -class ReversibleTransfers extends RuntimeHoldReason { - const ReversibleTransfers(this.value0); - - factory ReversibleTransfers._decode(_i1.Input input) { - return ReversibleTransfers(_i4.HoldReason.codec.decode(input)); - } - - /// pallet_reversible_transfers::HoldReason - final _i4.HoldReason value0; - - @override - Map toJson() => {'ReversibleTransfers': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i4.HoldReason.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - _i4.HoldReason.codec.encodeTo(value0, output); - } - - @override - 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/resonance/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart b/quantus_sdk/lib/generated/resonance/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart deleted file mode 100644 index 1f05a1bb..00000000 --- a/quantus_sdk/lib/generated/resonance/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef ReversibleTransactionExtension = dynamic; - -class ReversibleTransactionExtensionCodec with _i1.Codec { - const ReversibleTransactionExtensionCodec(); - - @override - ReversibleTransactionExtension decode(_i1.Input input) { - return _i1.NullCodec.codec.decode(input); - } - - @override - void encodeTo(ReversibleTransactionExtension value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(ReversibleTransactionExtension value) { - return _i1.NullCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/arithmetic_error.dart b/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/arithmetic_error.dart deleted file mode 100644 index 74316759..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/arithmetic_error.dart +++ /dev/null @@ -1,51 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum ArithmeticError { - underflow('Underflow', 0), - overflow('Overflow', 1), - divisionByZero('DivisionByZero', 2); - - const ArithmeticError(this.variantName, this.codecIndex); - - factory ArithmeticError.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ArithmeticErrorCodec codec = $ArithmeticErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ArithmeticErrorCodec with _i1.Codec { - const $ArithmeticErrorCodec(); - - @override - ArithmeticError decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return ArithmeticError.underflow; - case 1: - return ArithmeticError.overflow; - case 2: - return ArithmeticError.divisionByZero; - default: - throw Exception('ArithmeticError: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(ArithmeticError value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/fixed_point/fixed_i64.dart b/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/fixed_point/fixed_i64.dart deleted file mode 100644 index e542ca16..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/fixed_point/fixed_i64.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef FixedI64 = BigInt; - -class FixedI64Codec with _i1.Codec { - const FixedI64Codec(); - - @override - FixedI64 decode(_i1.Input input) { - return _i1.I64Codec.codec.decode(input); - } - - @override - void encodeTo(FixedI64 value, _i1.Output output) { - _i1.I64Codec.codec.encodeTo(value, output); - } - - @override - int sizeHint(FixedI64 value) { - return _i1.I64Codec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/fixed_point/fixed_u128.dart b/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/fixed_point/fixed_u128.dart deleted file mode 100644 index 87a788a0..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/fixed_point/fixed_u128.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef FixedU128 = BigInt; - -class FixedU128Codec with _i1.Codec { - const FixedU128Codec(); - - @override - FixedU128 decode(_i1.Input input) { - return _i1.U128Codec.codec.decode(input); - } - - @override - void encodeTo(FixedU128 value, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(value, output); - } - - @override - int sizeHint(FixedU128 value) { - return _i1.U128Codec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/per_things/perbill.dart b/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/per_things/perbill.dart deleted file mode 100644 index 0f88314b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/per_things/perbill.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef Perbill = int; - -class PerbillCodec with _i1.Codec { - const PerbillCodec(); - - @override - Perbill decode(_i1.Input input) { - return _i1.U32Codec.codec.decode(input); - } - - @override - void encodeTo(Perbill value, _i1.Output output) { - _i1.U32Codec.codec.encodeTo(value, output); - } - - @override - int sizeHint(Perbill value) { - return _i1.U32Codec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/per_things/permill.dart b/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/per_things/permill.dart deleted file mode 100644 index 7411f90d..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_arithmetic/per_things/permill.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef Permill = int; - -class PermillCodec with _i1.Codec { - const PermillCodec(); - - @override - Permill decode(_i1.Input input) { - return _i1.U32Codec.codec.decode(input); - } - - @override - void encodeTo(Permill value, _i1.Output output) { - _i1.U32Codec.codec.encodeTo(value, output); - } - - @override - int sizeHint(Permill value) { - return _i1.U32Codec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_core/crypto/account_id32.dart b/quantus_sdk/lib/generated/resonance/types/sp_core/crypto/account_id32.dart deleted file mode 100644 index 93fbda9f..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_core/crypto/account_id32.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef AccountId32 = List; - -class AccountId32Codec with _i1.Codec { - const AccountId32Codec(); - - @override - AccountId32 decode(_i1.Input input) { - return const _i1.U8ArrayCodec(32).decode(input); - } - - @override - void encodeTo(AccountId32 value, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(value, output); - } - - @override - int sizeHint(AccountId32 value) { - return const _i1.U8ArrayCodec(32).sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_runtime/dispatch_error.dart b/quantus_sdk/lib/generated/resonance/types/sp_runtime/dispatch_error.dart deleted file mode 100644 index 715b1735..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_runtime/dispatch_error.dart +++ /dev/null @@ -1,557 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -import '../sp_arithmetic/arithmetic_error.dart' as _i5; -import 'module_error.dart' as _i3; -import 'proving_trie/trie_error.dart' as _i7; -import 'token_error.dart' as _i4; -import 'transactional_error.dart' as _i6; - -abstract class DispatchError { - const DispatchError(); - - factory DispatchError.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $DispatchErrorCodec codec = $DispatchErrorCodec(); - - static const $DispatchError values = $DispatchError(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $DispatchError { - const $DispatchError(); - - Other other() { - return Other(); - } - - CannotLookup cannotLookup() { - return CannotLookup(); - } - - BadOrigin badOrigin() { - return BadOrigin(); - } - - Module module(_i3.ModuleError value0) { - return Module(value0); - } - - ConsumerRemaining consumerRemaining() { - return ConsumerRemaining(); - } - - NoProviders noProviders() { - return NoProviders(); - } - - TooManyConsumers tooManyConsumers() { - return TooManyConsumers(); - } - - Token token(_i4.TokenError value0) { - return Token(value0); - } - - Arithmetic arithmetic(_i5.ArithmeticError value0) { - return Arithmetic(value0); - } - - Transactional transactional(_i6.TransactionalError value0) { - return Transactional(value0); - } - - Exhausted exhausted() { - return Exhausted(); - } - - Corruption corruption() { - return Corruption(); - } - - Unavailable unavailable() { - return Unavailable(); - } - - RootNotAllowed rootNotAllowed() { - return RootNotAllowed(); - } - - Trie trie(_i7.TrieError value0) { - return Trie(value0); - } -} - -class $DispatchErrorCodec with _i1.Codec { - const $DispatchErrorCodec(); - - @override - DispatchError decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return const Other(); - case 1: - return const CannotLookup(); - case 2: - return const BadOrigin(); - case 3: - return Module._decode(input); - case 4: - return const ConsumerRemaining(); - case 5: - return const NoProviders(); - case 6: - return const TooManyConsumers(); - case 7: - return Token._decode(input); - case 8: - return Arithmetic._decode(input); - case 9: - return Transactional._decode(input); - case 10: - return const Exhausted(); - case 11: - return const Corruption(); - case 12: - return const Unavailable(); - case 13: - return const RootNotAllowed(); - case 14: - return Trie._decode(input); - default: - throw Exception('DispatchError: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(DispatchError value, _i1.Output output) { - switch (value.runtimeType) { - case Other: - (value as Other).encodeTo(output); - break; - case CannotLookup: - (value as CannotLookup).encodeTo(output); - break; - case BadOrigin: - (value as BadOrigin).encodeTo(output); - break; - case Module: - (value as Module).encodeTo(output); - break; - case ConsumerRemaining: - (value as ConsumerRemaining).encodeTo(output); - break; - case NoProviders: - (value as NoProviders).encodeTo(output); - break; - case TooManyConsumers: - (value as TooManyConsumers).encodeTo(output); - break; - case Token: - (value as Token).encodeTo(output); - break; - case Arithmetic: - (value as Arithmetic).encodeTo(output); - break; - case Transactional: - (value as Transactional).encodeTo(output); - break; - case Exhausted: - (value as Exhausted).encodeTo(output); - break; - case Corruption: - (value as Corruption).encodeTo(output); - break; - case Unavailable: - (value as Unavailable).encodeTo(output); - break; - case RootNotAllowed: - (value as RootNotAllowed).encodeTo(output); - break; - case Trie: - (value as Trie).encodeTo(output); - break; - default: - throw Exception('DispatchError: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(DispatchError value) { - switch (value.runtimeType) { - case Other: - return 1; - case CannotLookup: - return 1; - case BadOrigin: - return 1; - case Module: - return (value as Module)._sizeHint(); - case ConsumerRemaining: - return 1; - case NoProviders: - return 1; - case TooManyConsumers: - return 1; - case Token: - return (value as Token)._sizeHint(); - case Arithmetic: - return (value as Arithmetic)._sizeHint(); - case Transactional: - return (value as Transactional)._sizeHint(); - case Exhausted: - return 1; - case Corruption: - return 1; - case Unavailable: - return 1; - case RootNotAllowed: - return 1; - case Trie: - return (value as Trie)._sizeHint(); - default: - throw Exception('DispatchError: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Other extends DispatchError { - const Other(); - - @override - Map toJson() => {'Other': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - } - - @override - bool operator ==(Object other) => other is Other; - - @override - int get hashCode => runtimeType.hashCode; -} - -class CannotLookup extends DispatchError { - const CannotLookup(); - - @override - Map toJson() => {'CannotLookup': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - } - - @override - bool operator ==(Object other) => other is CannotLookup; - - @override - int get hashCode => runtimeType.hashCode; -} - -class BadOrigin extends DispatchError { - const BadOrigin(); - - @override - Map toJson() => {'BadOrigin': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - } - - @override - bool operator ==(Object other) => other is BadOrigin; - - @override - int get hashCode => runtimeType.hashCode; -} - -class Module extends DispatchError { - const Module(this.value0); - - factory Module._decode(_i1.Input input) { - return Module(_i3.ModuleError.codec.decode(input)); - } - - /// ModuleError - final _i3.ModuleError value0; - - @override - Map> toJson() => {'Module': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i3.ModuleError.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class ConsumerRemaining extends DispatchError { - const ConsumerRemaining(); - - @override - Map toJson() => {'ConsumerRemaining': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - } - - @override - bool operator ==(Object other) => other is ConsumerRemaining; - - @override - int get hashCode => runtimeType.hashCode; -} - -class NoProviders extends DispatchError { - const NoProviders(); - - @override - Map toJson() => {'NoProviders': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - } - - @override - bool operator ==(Object other) => other is NoProviders; - - @override - int get hashCode => runtimeType.hashCode; -} - -class TooManyConsumers extends DispatchError { - const TooManyConsumers(); - - @override - Map toJson() => {'TooManyConsumers': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - } - - @override - bool operator ==(Object other) => other is TooManyConsumers; - - @override - int get hashCode => runtimeType.hashCode; -} - -class Token extends DispatchError { - const Token(this.value0); - - factory Token._decode(_i1.Input input) { - return Token(_i4.TokenError.codec.decode(input)); - } - - /// TokenError - final _i4.TokenError value0; - - @override - Map toJson() => {'Token': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i4.TokenError.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Arithmetic extends DispatchError { - const Arithmetic(this.value0); - - factory Arithmetic._decode(_i1.Input input) { - return Arithmetic(_i5.ArithmeticError.codec.decode(input)); - } - - /// ArithmeticError - final _i5.ArithmeticError value0; - - @override - Map toJson() => {'Arithmetic': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i5.ArithmeticError.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Transactional extends DispatchError { - const Transactional(this.value0); - - factory Transactional._decode(_i1.Input input) { - return Transactional(_i6.TransactionalError.codec.decode(input)); - } - - /// TransactionalError - final _i6.TransactionalError value0; - - @override - Map toJson() => {'Transactional': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i6.TransactionalError.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Exhausted extends DispatchError { - const Exhausted(); - - @override - Map toJson() => {'Exhausted': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - } - - @override - bool operator ==(Object other) => other is Exhausted; - - @override - int get hashCode => runtimeType.hashCode; -} - -class Corruption extends DispatchError { - const Corruption(); - - @override - Map toJson() => {'Corruption': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - } - - @override - bool operator ==(Object other) => other is Corruption; - - @override - int get hashCode => runtimeType.hashCode; -} - -class Unavailable extends DispatchError { - const Unavailable(); - - @override - Map toJson() => {'Unavailable': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(12, output); - } - - @override - bool operator ==(Object other) => other is Unavailable; - - @override - int get hashCode => runtimeType.hashCode; -} - -class RootNotAllowed extends DispatchError { - const RootNotAllowed(); - - @override - Map toJson() => {'RootNotAllowed': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - } - - @override - bool operator ==(Object other) => other is RootNotAllowed; - - @override - int get hashCode => runtimeType.hashCode; -} - -class Trie extends DispatchError { - const Trie(this.value0); - - factory Trie._decode(_i1.Input input) { - return Trie(_i7.TrieError.codec.decode(input)); - } - - /// TrieError - final _i7.TrieError value0; - - @override - Map toJson() => {'Trie': value0.toJson()}; - - int _sizeHint() { - int size = 1; - size = size + _i7.TrieError.codec.sizeHint(value0); - return size; - } - - 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; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_runtime/dispatch_error_with_post_info.dart b/quantus_sdk/lib/generated/resonance/types/sp_runtime/dispatch_error_with_post_info.dart deleted file mode 100644 index cc35e8e0..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_runtime/dispatch_error_with_post_info.dart +++ /dev/null @@ -1,63 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i4; - -import 'package:polkadart/scale_codec.dart' as _i1; - -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}); - - factory DispatchErrorWithPostInfo.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Info - final _i2.PostDispatchInfo postInfo; - - /// DispatchError - final _i3.DispatchError error; - - static const $DispatchErrorWithPostInfoCodec codec = $DispatchErrorWithPostInfoCodec(); - - _i4.Uint8List encode() { - return codec.encode(this); - } - - 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; - - @override - int get hashCode => Object.hash(postInfo, error); -} - -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); - } - - @override - DispatchErrorWithPostInfo decode(_i1.Input input) { - return DispatchErrorWithPostInfo( - postInfo: _i2.PostDispatchInfo.codec.decode(input), - error: _i3.DispatchError.codec.decode(input), - ); - } - - @override - int sizeHint(DispatchErrorWithPostInfo obj) { - int size = 0; - size = size + _i2.PostDispatchInfo.codec.sizeHint(obj.postInfo); - size = size + _i3.DispatchError.codec.sizeHint(obj.error); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/digest/digest.dart b/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/digest/digest.dart deleted file mode 100644 index 1aa48457..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/digest/digest.dart +++ /dev/null @@ -1,53 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i3; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import 'digest_item.dart' as _i2; - -class Digest { - const Digest({required this.logs}); - - factory Digest.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Vec - final List<_i2.DigestItem> logs; - - static const $DigestCodec codec = $DigestCodec(); - - _i3.Uint8List encode() { - return codec.encode(this); - } - - 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); - - @override - int get hashCode => logs.hashCode; -} - -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); - } - - @override - Digest decode(_i1.Input 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); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/digest/digest_item.dart b/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/digest/digest_item.dart deleted file mode 100644 index 4ac2501d..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/digest/digest_item.dart +++ /dev/null @@ -1,285 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i3; - -abstract class DigestItem { - const DigestItem(); - - factory DigestItem.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $DigestItemCodec codec = $DigestItemCodec(); - - static const $DigestItem values = $DigestItem(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $DigestItem { - const $DigestItem(); - - PreRuntime preRuntime(List value0, List value1) { - return PreRuntime(value0, value1); - } - - Consensus consensus(List value0, List value1) { - return Consensus(value0, value1); - } - - Seal seal(List value0, List value1) { - return Seal(value0, value1); - } - - Other other(List value0) { - return Other(value0); - } - - RuntimeEnvironmentUpdated runtimeEnvironmentUpdated() { - return RuntimeEnvironmentUpdated(); - } -} - -class $DigestItemCodec with _i1.Codec { - const $DigestItemCodec(); - - @override - DigestItem decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 6: - return PreRuntime._decode(input); - case 4: - return Consensus._decode(input); - case 5: - return Seal._decode(input); - case 0: - return Other._decode(input); - case 8: - return const RuntimeEnvironmentUpdated(); - default: - throw Exception('DigestItem: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(DigestItem value, _i1.Output output) { - switch (value.runtimeType) { - case PreRuntime: - (value as PreRuntime).encodeTo(output); - break; - case Consensus: - (value as Consensus).encodeTo(output); - break; - case Seal: - (value as Seal).encodeTo(output); - break; - case Other: - (value as Other).encodeTo(output); - break; - case RuntimeEnvironmentUpdated: - (value as RuntimeEnvironmentUpdated).encodeTo(output); - break; - default: - throw Exception('DigestItem: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(DigestItem value) { - switch (value.runtimeType) { - case PreRuntime: - return (value as PreRuntime)._sizeHint(); - case Consensus: - return (value as Consensus)._sizeHint(); - case Seal: - return (value as Seal)._sizeHint(); - case Other: - return (value as Other)._sizeHint(); - case RuntimeEnvironmentUpdated: - return 1; - default: - throw Exception('DigestItem: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class PreRuntime extends DigestItem { - 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)); - } - - /// ConsensusEngineId - final List value0; - - /// Vec - final List value1; - - @override - Map>> toJson() => { - 'PreRuntime': [value0.toList(), value1], - }; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(4).sizeHint(value0); - size = size + _i1.U8SequenceCodec.codec.sizeHint(value1); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => Object.hash(value0, value1); -} - -class Consensus extends DigestItem { - 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)); - } - - /// ConsensusEngineId - final List value0; - - /// Vec - final List value1; - - @override - Map>> toJson() => { - 'Consensus': [value0.toList(), value1], - }; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(4).sizeHint(value0); - size = size + _i1.U8SequenceCodec.codec.sizeHint(value1); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => Object.hash(value0, value1); -} - -class Seal extends DigestItem { - 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)); - } - - /// ConsensusEngineId - final List value0; - - /// Vec - final List value1; - - @override - Map>> toJson() => { - 'Seal': [value0.toList(), value1], - }; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(4).sizeHint(value0); - size = size + _i1.U8SequenceCodec.codec.sizeHint(value1); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => Object.hash(value0, value1); -} - -class Other extends DigestItem { - const Other(this.value0); - - factory Other._decode(_i1.Input input) { - return Other(_i1.U8SequenceCodec.codec.decode(input)); - } - - /// Vec - final List value0; - - @override - Map> toJson() => {'Other': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8SequenceCodec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => value0.hashCode; -} - -class RuntimeEnvironmentUpdated extends DigestItem { - const RuntimeEnvironmentUpdated(); - - @override - Map toJson() => {'RuntimeEnvironmentUpdated': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); - } - - @override - bool operator ==(Object other) => other is RuntimeEnvironmentUpdated; - - @override - int get hashCode => runtimeType.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/era/era.dart b/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/era/era.dart deleted file mode 100644 index 97172381..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/era/era.dart +++ /dev/null @@ -1,10544 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -abstract class Era { - const Era(); - - factory Era.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $EraCodec codec = $EraCodec(); - - static const $Era values = $Era(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $Era { - const $Era(); - - Immortal immortal() { - return Immortal(); - } - - Mortal1 mortal1(int value0) { - return Mortal1(value0); - } - - Mortal2 mortal2(int value0) { - return Mortal2(value0); - } - - Mortal3 mortal3(int value0) { - return Mortal3(value0); - } - - Mortal4 mortal4(int value0) { - return Mortal4(value0); - } - - Mortal5 mortal5(int value0) { - return Mortal5(value0); - } - - Mortal6 mortal6(int value0) { - return Mortal6(value0); - } - - Mortal7 mortal7(int value0) { - return Mortal7(value0); - } - - Mortal8 mortal8(int value0) { - return Mortal8(value0); - } - - Mortal9 mortal9(int value0) { - return Mortal9(value0); - } - - Mortal10 mortal10(int value0) { - return Mortal10(value0); - } - - Mortal11 mortal11(int value0) { - return Mortal11(value0); - } - - Mortal12 mortal12(int value0) { - return Mortal12(value0); - } - - Mortal13 mortal13(int value0) { - return Mortal13(value0); - } - - Mortal14 mortal14(int value0) { - return Mortal14(value0); - } - - Mortal15 mortal15(int value0) { - return Mortal15(value0); - } - - Mortal16 mortal16(int value0) { - return Mortal16(value0); - } - - Mortal17 mortal17(int value0) { - return Mortal17(value0); - } - - Mortal18 mortal18(int value0) { - return Mortal18(value0); - } - - Mortal19 mortal19(int value0) { - return Mortal19(value0); - } - - Mortal20 mortal20(int value0) { - return Mortal20(value0); - } - - Mortal21 mortal21(int value0) { - return Mortal21(value0); - } - - Mortal22 mortal22(int value0) { - return Mortal22(value0); - } - - Mortal23 mortal23(int value0) { - return Mortal23(value0); - } - - Mortal24 mortal24(int value0) { - return Mortal24(value0); - } - - Mortal25 mortal25(int value0) { - return Mortal25(value0); - } - - Mortal26 mortal26(int value0) { - return Mortal26(value0); - } - - Mortal27 mortal27(int value0) { - return Mortal27(value0); - } - - Mortal28 mortal28(int value0) { - return Mortal28(value0); - } - - Mortal29 mortal29(int value0) { - return Mortal29(value0); - } - - Mortal30 mortal30(int value0) { - return Mortal30(value0); - } - - Mortal31 mortal31(int value0) { - return Mortal31(value0); - } - - Mortal32 mortal32(int value0) { - return Mortal32(value0); - } - - Mortal33 mortal33(int value0) { - return Mortal33(value0); - } - - Mortal34 mortal34(int value0) { - return Mortal34(value0); - } - - Mortal35 mortal35(int value0) { - return Mortal35(value0); - } - - Mortal36 mortal36(int value0) { - return Mortal36(value0); - } - - Mortal37 mortal37(int value0) { - return Mortal37(value0); - } - - Mortal38 mortal38(int value0) { - return Mortal38(value0); - } - - Mortal39 mortal39(int value0) { - return Mortal39(value0); - } - - Mortal40 mortal40(int value0) { - return Mortal40(value0); - } - - Mortal41 mortal41(int value0) { - return Mortal41(value0); - } - - Mortal42 mortal42(int value0) { - return Mortal42(value0); - } - - Mortal43 mortal43(int value0) { - return Mortal43(value0); - } - - Mortal44 mortal44(int value0) { - return Mortal44(value0); - } - - Mortal45 mortal45(int value0) { - return Mortal45(value0); - } - - Mortal46 mortal46(int value0) { - return Mortal46(value0); - } - - Mortal47 mortal47(int value0) { - return Mortal47(value0); - } - - Mortal48 mortal48(int value0) { - return Mortal48(value0); - } - - Mortal49 mortal49(int value0) { - return Mortal49(value0); - } - - Mortal50 mortal50(int value0) { - return Mortal50(value0); - } - - Mortal51 mortal51(int value0) { - return Mortal51(value0); - } - - Mortal52 mortal52(int value0) { - return Mortal52(value0); - } - - Mortal53 mortal53(int value0) { - return Mortal53(value0); - } - - Mortal54 mortal54(int value0) { - return Mortal54(value0); - } - - Mortal55 mortal55(int value0) { - return Mortal55(value0); - } - - Mortal56 mortal56(int value0) { - return Mortal56(value0); - } - - Mortal57 mortal57(int value0) { - return Mortal57(value0); - } - - Mortal58 mortal58(int value0) { - return Mortal58(value0); - } - - Mortal59 mortal59(int value0) { - return Mortal59(value0); - } - - Mortal60 mortal60(int value0) { - return Mortal60(value0); - } - - Mortal61 mortal61(int value0) { - return Mortal61(value0); - } - - Mortal62 mortal62(int value0) { - return Mortal62(value0); - } - - Mortal63 mortal63(int value0) { - return Mortal63(value0); - } - - Mortal64 mortal64(int value0) { - return Mortal64(value0); - } - - Mortal65 mortal65(int value0) { - return Mortal65(value0); - } - - Mortal66 mortal66(int value0) { - return Mortal66(value0); - } - - Mortal67 mortal67(int value0) { - return Mortal67(value0); - } - - Mortal68 mortal68(int value0) { - return Mortal68(value0); - } - - Mortal69 mortal69(int value0) { - return Mortal69(value0); - } - - Mortal70 mortal70(int value0) { - return Mortal70(value0); - } - - Mortal71 mortal71(int value0) { - return Mortal71(value0); - } - - Mortal72 mortal72(int value0) { - return Mortal72(value0); - } - - Mortal73 mortal73(int value0) { - return Mortal73(value0); - } - - Mortal74 mortal74(int value0) { - return Mortal74(value0); - } - - Mortal75 mortal75(int value0) { - return Mortal75(value0); - } - - Mortal76 mortal76(int value0) { - return Mortal76(value0); - } - - Mortal77 mortal77(int value0) { - return Mortal77(value0); - } - - Mortal78 mortal78(int value0) { - return Mortal78(value0); - } - - Mortal79 mortal79(int value0) { - return Mortal79(value0); - } - - Mortal80 mortal80(int value0) { - return Mortal80(value0); - } - - Mortal81 mortal81(int value0) { - return Mortal81(value0); - } - - Mortal82 mortal82(int value0) { - return Mortal82(value0); - } - - Mortal83 mortal83(int value0) { - return Mortal83(value0); - } - - Mortal84 mortal84(int value0) { - return Mortal84(value0); - } - - Mortal85 mortal85(int value0) { - return Mortal85(value0); - } - - Mortal86 mortal86(int value0) { - return Mortal86(value0); - } - - Mortal87 mortal87(int value0) { - return Mortal87(value0); - } - - Mortal88 mortal88(int value0) { - return Mortal88(value0); - } - - Mortal89 mortal89(int value0) { - return Mortal89(value0); - } - - Mortal90 mortal90(int value0) { - return Mortal90(value0); - } - - Mortal91 mortal91(int value0) { - return Mortal91(value0); - } - - Mortal92 mortal92(int value0) { - return Mortal92(value0); - } - - Mortal93 mortal93(int value0) { - return Mortal93(value0); - } - - Mortal94 mortal94(int value0) { - return Mortal94(value0); - } - - Mortal95 mortal95(int value0) { - return Mortal95(value0); - } - - Mortal96 mortal96(int value0) { - return Mortal96(value0); - } - - Mortal97 mortal97(int value0) { - return Mortal97(value0); - } - - Mortal98 mortal98(int value0) { - return Mortal98(value0); - } - - Mortal99 mortal99(int value0) { - return Mortal99(value0); - } - - Mortal100 mortal100(int value0) { - return Mortal100(value0); - } - - Mortal101 mortal101(int value0) { - return Mortal101(value0); - } - - Mortal102 mortal102(int value0) { - return Mortal102(value0); - } - - Mortal103 mortal103(int value0) { - return Mortal103(value0); - } - - Mortal104 mortal104(int value0) { - return Mortal104(value0); - } - - Mortal105 mortal105(int value0) { - return Mortal105(value0); - } - - Mortal106 mortal106(int value0) { - return Mortal106(value0); - } - - Mortal107 mortal107(int value0) { - return Mortal107(value0); - } - - Mortal108 mortal108(int value0) { - return Mortal108(value0); - } - - Mortal109 mortal109(int value0) { - return Mortal109(value0); - } - - Mortal110 mortal110(int value0) { - return Mortal110(value0); - } - - Mortal111 mortal111(int value0) { - return Mortal111(value0); - } - - Mortal112 mortal112(int value0) { - return Mortal112(value0); - } - - Mortal113 mortal113(int value0) { - return Mortal113(value0); - } - - Mortal114 mortal114(int value0) { - return Mortal114(value0); - } - - Mortal115 mortal115(int value0) { - return Mortal115(value0); - } - - Mortal116 mortal116(int value0) { - return Mortal116(value0); - } - - Mortal117 mortal117(int value0) { - return Mortal117(value0); - } - - Mortal118 mortal118(int value0) { - return Mortal118(value0); - } - - Mortal119 mortal119(int value0) { - return Mortal119(value0); - } - - Mortal120 mortal120(int value0) { - return Mortal120(value0); - } - - Mortal121 mortal121(int value0) { - return Mortal121(value0); - } - - Mortal122 mortal122(int value0) { - return Mortal122(value0); - } - - Mortal123 mortal123(int value0) { - return Mortal123(value0); - } - - Mortal124 mortal124(int value0) { - return Mortal124(value0); - } - - Mortal125 mortal125(int value0) { - return Mortal125(value0); - } - - Mortal126 mortal126(int value0) { - return Mortal126(value0); - } - - Mortal127 mortal127(int value0) { - return Mortal127(value0); - } - - Mortal128 mortal128(int value0) { - return Mortal128(value0); - } - - Mortal129 mortal129(int value0) { - return Mortal129(value0); - } - - Mortal130 mortal130(int value0) { - return Mortal130(value0); - } - - Mortal131 mortal131(int value0) { - return Mortal131(value0); - } - - Mortal132 mortal132(int value0) { - return Mortal132(value0); - } - - Mortal133 mortal133(int value0) { - return Mortal133(value0); - } - - Mortal134 mortal134(int value0) { - return Mortal134(value0); - } - - Mortal135 mortal135(int value0) { - return Mortal135(value0); - } - - Mortal136 mortal136(int value0) { - return Mortal136(value0); - } - - Mortal137 mortal137(int value0) { - return Mortal137(value0); - } - - Mortal138 mortal138(int value0) { - return Mortal138(value0); - } - - Mortal139 mortal139(int value0) { - return Mortal139(value0); - } - - Mortal140 mortal140(int value0) { - return Mortal140(value0); - } - - Mortal141 mortal141(int value0) { - return Mortal141(value0); - } - - Mortal142 mortal142(int value0) { - return Mortal142(value0); - } - - Mortal143 mortal143(int value0) { - return Mortal143(value0); - } - - Mortal144 mortal144(int value0) { - return Mortal144(value0); - } - - Mortal145 mortal145(int value0) { - return Mortal145(value0); - } - - Mortal146 mortal146(int value0) { - return Mortal146(value0); - } - - Mortal147 mortal147(int value0) { - return Mortal147(value0); - } - - Mortal148 mortal148(int value0) { - return Mortal148(value0); - } - - Mortal149 mortal149(int value0) { - return Mortal149(value0); - } - - Mortal150 mortal150(int value0) { - return Mortal150(value0); - } - - Mortal151 mortal151(int value0) { - return Mortal151(value0); - } - - Mortal152 mortal152(int value0) { - return Mortal152(value0); - } - - Mortal153 mortal153(int value0) { - return Mortal153(value0); - } - - Mortal154 mortal154(int value0) { - return Mortal154(value0); - } - - Mortal155 mortal155(int value0) { - return Mortal155(value0); - } - - Mortal156 mortal156(int value0) { - return Mortal156(value0); - } - - Mortal157 mortal157(int value0) { - return Mortal157(value0); - } - - Mortal158 mortal158(int value0) { - return Mortal158(value0); - } - - Mortal159 mortal159(int value0) { - return Mortal159(value0); - } - - Mortal160 mortal160(int value0) { - return Mortal160(value0); - } - - Mortal161 mortal161(int value0) { - return Mortal161(value0); - } - - Mortal162 mortal162(int value0) { - return Mortal162(value0); - } - - Mortal163 mortal163(int value0) { - return Mortal163(value0); - } - - Mortal164 mortal164(int value0) { - return Mortal164(value0); - } - - Mortal165 mortal165(int value0) { - return Mortal165(value0); - } - - Mortal166 mortal166(int value0) { - return Mortal166(value0); - } - - Mortal167 mortal167(int value0) { - return Mortal167(value0); - } - - Mortal168 mortal168(int value0) { - return Mortal168(value0); - } - - Mortal169 mortal169(int value0) { - return Mortal169(value0); - } - - Mortal170 mortal170(int value0) { - return Mortal170(value0); - } - - Mortal171 mortal171(int value0) { - return Mortal171(value0); - } - - Mortal172 mortal172(int value0) { - return Mortal172(value0); - } - - Mortal173 mortal173(int value0) { - return Mortal173(value0); - } - - Mortal174 mortal174(int value0) { - return Mortal174(value0); - } - - Mortal175 mortal175(int value0) { - return Mortal175(value0); - } - - Mortal176 mortal176(int value0) { - return Mortal176(value0); - } - - Mortal177 mortal177(int value0) { - return Mortal177(value0); - } - - Mortal178 mortal178(int value0) { - return Mortal178(value0); - } - - Mortal179 mortal179(int value0) { - return Mortal179(value0); - } - - Mortal180 mortal180(int value0) { - return Mortal180(value0); - } - - Mortal181 mortal181(int value0) { - return Mortal181(value0); - } - - Mortal182 mortal182(int value0) { - return Mortal182(value0); - } - - Mortal183 mortal183(int value0) { - return Mortal183(value0); - } - - Mortal184 mortal184(int value0) { - return Mortal184(value0); - } - - Mortal185 mortal185(int value0) { - return Mortal185(value0); - } - - Mortal186 mortal186(int value0) { - return Mortal186(value0); - } - - Mortal187 mortal187(int value0) { - return Mortal187(value0); - } - - Mortal188 mortal188(int value0) { - return Mortal188(value0); - } - - Mortal189 mortal189(int value0) { - return Mortal189(value0); - } - - Mortal190 mortal190(int value0) { - return Mortal190(value0); - } - - Mortal191 mortal191(int value0) { - return Mortal191(value0); - } - - Mortal192 mortal192(int value0) { - return Mortal192(value0); - } - - Mortal193 mortal193(int value0) { - return Mortal193(value0); - } - - Mortal194 mortal194(int value0) { - return Mortal194(value0); - } - - Mortal195 mortal195(int value0) { - return Mortal195(value0); - } - - Mortal196 mortal196(int value0) { - return Mortal196(value0); - } - - Mortal197 mortal197(int value0) { - return Mortal197(value0); - } - - Mortal198 mortal198(int value0) { - return Mortal198(value0); - } - - Mortal199 mortal199(int value0) { - return Mortal199(value0); - } - - Mortal200 mortal200(int value0) { - return Mortal200(value0); - } - - Mortal201 mortal201(int value0) { - return Mortal201(value0); - } - - Mortal202 mortal202(int value0) { - return Mortal202(value0); - } - - Mortal203 mortal203(int value0) { - return Mortal203(value0); - } - - Mortal204 mortal204(int value0) { - return Mortal204(value0); - } - - Mortal205 mortal205(int value0) { - return Mortal205(value0); - } - - Mortal206 mortal206(int value0) { - return Mortal206(value0); - } - - Mortal207 mortal207(int value0) { - return Mortal207(value0); - } - - Mortal208 mortal208(int value0) { - return Mortal208(value0); - } - - Mortal209 mortal209(int value0) { - return Mortal209(value0); - } - - Mortal210 mortal210(int value0) { - return Mortal210(value0); - } - - Mortal211 mortal211(int value0) { - return Mortal211(value0); - } - - Mortal212 mortal212(int value0) { - return Mortal212(value0); - } - - Mortal213 mortal213(int value0) { - return Mortal213(value0); - } - - Mortal214 mortal214(int value0) { - return Mortal214(value0); - } - - Mortal215 mortal215(int value0) { - return Mortal215(value0); - } - - Mortal216 mortal216(int value0) { - return Mortal216(value0); - } - - Mortal217 mortal217(int value0) { - return Mortal217(value0); - } - - Mortal218 mortal218(int value0) { - return Mortal218(value0); - } - - Mortal219 mortal219(int value0) { - return Mortal219(value0); - } - - Mortal220 mortal220(int value0) { - return Mortal220(value0); - } - - Mortal221 mortal221(int value0) { - return Mortal221(value0); - } - - Mortal222 mortal222(int value0) { - return Mortal222(value0); - } - - Mortal223 mortal223(int value0) { - return Mortal223(value0); - } - - Mortal224 mortal224(int value0) { - return Mortal224(value0); - } - - Mortal225 mortal225(int value0) { - return Mortal225(value0); - } - - Mortal226 mortal226(int value0) { - return Mortal226(value0); - } - - Mortal227 mortal227(int value0) { - return Mortal227(value0); - } - - Mortal228 mortal228(int value0) { - return Mortal228(value0); - } - - Mortal229 mortal229(int value0) { - return Mortal229(value0); - } - - Mortal230 mortal230(int value0) { - return Mortal230(value0); - } - - Mortal231 mortal231(int value0) { - return Mortal231(value0); - } - - Mortal232 mortal232(int value0) { - return Mortal232(value0); - } - - Mortal233 mortal233(int value0) { - return Mortal233(value0); - } - - Mortal234 mortal234(int value0) { - return Mortal234(value0); - } - - Mortal235 mortal235(int value0) { - return Mortal235(value0); - } - - Mortal236 mortal236(int value0) { - return Mortal236(value0); - } - - Mortal237 mortal237(int value0) { - return Mortal237(value0); - } - - Mortal238 mortal238(int value0) { - return Mortal238(value0); - } - - Mortal239 mortal239(int value0) { - return Mortal239(value0); - } - - Mortal240 mortal240(int value0) { - return Mortal240(value0); - } - - Mortal241 mortal241(int value0) { - return Mortal241(value0); - } - - Mortal242 mortal242(int value0) { - return Mortal242(value0); - } - - Mortal243 mortal243(int value0) { - return Mortal243(value0); - } - - Mortal244 mortal244(int value0) { - return Mortal244(value0); - } - - Mortal245 mortal245(int value0) { - return Mortal245(value0); - } - - Mortal246 mortal246(int value0) { - return Mortal246(value0); - } - - Mortal247 mortal247(int value0) { - return Mortal247(value0); - } - - Mortal248 mortal248(int value0) { - return Mortal248(value0); - } - - Mortal249 mortal249(int value0) { - return Mortal249(value0); - } - - Mortal250 mortal250(int value0) { - return Mortal250(value0); - } - - Mortal251 mortal251(int value0) { - return Mortal251(value0); - } - - Mortal252 mortal252(int value0) { - return Mortal252(value0); - } - - Mortal253 mortal253(int value0) { - return Mortal253(value0); - } - - Mortal254 mortal254(int value0) { - return Mortal254(value0); - } - - Mortal255 mortal255(int value0) { - return Mortal255(value0); - } -} - -class $EraCodec with _i1.Codec { - const $EraCodec(); - - @override - Era decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return const Immortal(); - case 1: - return Mortal1._decode(input); - case 2: - return Mortal2._decode(input); - case 3: - return Mortal3._decode(input); - case 4: - return Mortal4._decode(input); - case 5: - return Mortal5._decode(input); - case 6: - return Mortal6._decode(input); - case 7: - return Mortal7._decode(input); - case 8: - return Mortal8._decode(input); - case 9: - return Mortal9._decode(input); - case 10: - return Mortal10._decode(input); - case 11: - return Mortal11._decode(input); - case 12: - return Mortal12._decode(input); - case 13: - return Mortal13._decode(input); - case 14: - return Mortal14._decode(input); - case 15: - return Mortal15._decode(input); - case 16: - return Mortal16._decode(input); - case 17: - return Mortal17._decode(input); - case 18: - return Mortal18._decode(input); - case 19: - return Mortal19._decode(input); - case 20: - return Mortal20._decode(input); - case 21: - return Mortal21._decode(input); - case 22: - return Mortal22._decode(input); - case 23: - return Mortal23._decode(input); - case 24: - return Mortal24._decode(input); - case 25: - return Mortal25._decode(input); - case 26: - return Mortal26._decode(input); - case 27: - return Mortal27._decode(input); - case 28: - return Mortal28._decode(input); - case 29: - return Mortal29._decode(input); - case 30: - return Mortal30._decode(input); - case 31: - return Mortal31._decode(input); - case 32: - return Mortal32._decode(input); - case 33: - return Mortal33._decode(input); - case 34: - return Mortal34._decode(input); - case 35: - return Mortal35._decode(input); - case 36: - return Mortal36._decode(input); - case 37: - return Mortal37._decode(input); - case 38: - return Mortal38._decode(input); - case 39: - return Mortal39._decode(input); - case 40: - return Mortal40._decode(input); - case 41: - return Mortal41._decode(input); - case 42: - return Mortal42._decode(input); - case 43: - return Mortal43._decode(input); - case 44: - return Mortal44._decode(input); - case 45: - return Mortal45._decode(input); - case 46: - return Mortal46._decode(input); - case 47: - return Mortal47._decode(input); - case 48: - return Mortal48._decode(input); - case 49: - return Mortal49._decode(input); - case 50: - return Mortal50._decode(input); - case 51: - return Mortal51._decode(input); - case 52: - return Mortal52._decode(input); - case 53: - return Mortal53._decode(input); - case 54: - return Mortal54._decode(input); - case 55: - return Mortal55._decode(input); - case 56: - return Mortal56._decode(input); - case 57: - return Mortal57._decode(input); - case 58: - return Mortal58._decode(input); - case 59: - return Mortal59._decode(input); - case 60: - return Mortal60._decode(input); - case 61: - return Mortal61._decode(input); - case 62: - return Mortal62._decode(input); - case 63: - return Mortal63._decode(input); - case 64: - return Mortal64._decode(input); - case 65: - return Mortal65._decode(input); - case 66: - return Mortal66._decode(input); - case 67: - return Mortal67._decode(input); - case 68: - return Mortal68._decode(input); - case 69: - return Mortal69._decode(input); - case 70: - return Mortal70._decode(input); - case 71: - return Mortal71._decode(input); - case 72: - return Mortal72._decode(input); - case 73: - return Mortal73._decode(input); - case 74: - return Mortal74._decode(input); - case 75: - return Mortal75._decode(input); - case 76: - return Mortal76._decode(input); - case 77: - return Mortal77._decode(input); - case 78: - return Mortal78._decode(input); - case 79: - return Mortal79._decode(input); - case 80: - return Mortal80._decode(input); - case 81: - return Mortal81._decode(input); - case 82: - return Mortal82._decode(input); - case 83: - return Mortal83._decode(input); - case 84: - return Mortal84._decode(input); - case 85: - return Mortal85._decode(input); - case 86: - return Mortal86._decode(input); - case 87: - return Mortal87._decode(input); - case 88: - return Mortal88._decode(input); - case 89: - return Mortal89._decode(input); - case 90: - return Mortal90._decode(input); - case 91: - return Mortal91._decode(input); - case 92: - return Mortal92._decode(input); - case 93: - return Mortal93._decode(input); - case 94: - return Mortal94._decode(input); - case 95: - return Mortal95._decode(input); - case 96: - return Mortal96._decode(input); - case 97: - return Mortal97._decode(input); - case 98: - return Mortal98._decode(input); - case 99: - return Mortal99._decode(input); - case 100: - return Mortal100._decode(input); - case 101: - return Mortal101._decode(input); - case 102: - return Mortal102._decode(input); - case 103: - return Mortal103._decode(input); - case 104: - return Mortal104._decode(input); - case 105: - return Mortal105._decode(input); - case 106: - return Mortal106._decode(input); - case 107: - return Mortal107._decode(input); - case 108: - return Mortal108._decode(input); - case 109: - return Mortal109._decode(input); - case 110: - return Mortal110._decode(input); - case 111: - return Mortal111._decode(input); - case 112: - return Mortal112._decode(input); - case 113: - return Mortal113._decode(input); - case 114: - return Mortal114._decode(input); - case 115: - return Mortal115._decode(input); - case 116: - return Mortal116._decode(input); - case 117: - return Mortal117._decode(input); - case 118: - return Mortal118._decode(input); - case 119: - return Mortal119._decode(input); - case 120: - return Mortal120._decode(input); - case 121: - return Mortal121._decode(input); - case 122: - return Mortal122._decode(input); - case 123: - return Mortal123._decode(input); - case 124: - return Mortal124._decode(input); - case 125: - return Mortal125._decode(input); - case 126: - return Mortal126._decode(input); - case 127: - return Mortal127._decode(input); - case 128: - return Mortal128._decode(input); - case 129: - return Mortal129._decode(input); - case 130: - return Mortal130._decode(input); - case 131: - return Mortal131._decode(input); - case 132: - return Mortal132._decode(input); - case 133: - return Mortal133._decode(input); - case 134: - return Mortal134._decode(input); - case 135: - return Mortal135._decode(input); - case 136: - return Mortal136._decode(input); - case 137: - return Mortal137._decode(input); - case 138: - return Mortal138._decode(input); - case 139: - return Mortal139._decode(input); - case 140: - return Mortal140._decode(input); - case 141: - return Mortal141._decode(input); - case 142: - return Mortal142._decode(input); - case 143: - return Mortal143._decode(input); - case 144: - return Mortal144._decode(input); - case 145: - return Mortal145._decode(input); - case 146: - return Mortal146._decode(input); - case 147: - return Mortal147._decode(input); - case 148: - return Mortal148._decode(input); - case 149: - return Mortal149._decode(input); - case 150: - return Mortal150._decode(input); - case 151: - return Mortal151._decode(input); - case 152: - return Mortal152._decode(input); - case 153: - return Mortal153._decode(input); - case 154: - return Mortal154._decode(input); - case 155: - return Mortal155._decode(input); - case 156: - return Mortal156._decode(input); - case 157: - return Mortal157._decode(input); - case 158: - return Mortal158._decode(input); - case 159: - return Mortal159._decode(input); - case 160: - return Mortal160._decode(input); - case 161: - return Mortal161._decode(input); - case 162: - return Mortal162._decode(input); - case 163: - return Mortal163._decode(input); - case 164: - return Mortal164._decode(input); - case 165: - return Mortal165._decode(input); - case 166: - return Mortal166._decode(input); - case 167: - return Mortal167._decode(input); - case 168: - return Mortal168._decode(input); - case 169: - return Mortal169._decode(input); - case 170: - return Mortal170._decode(input); - case 171: - return Mortal171._decode(input); - case 172: - return Mortal172._decode(input); - case 173: - return Mortal173._decode(input); - case 174: - return Mortal174._decode(input); - case 175: - return Mortal175._decode(input); - case 176: - return Mortal176._decode(input); - case 177: - return Mortal177._decode(input); - case 178: - return Mortal178._decode(input); - case 179: - return Mortal179._decode(input); - case 180: - return Mortal180._decode(input); - case 181: - return Mortal181._decode(input); - case 182: - return Mortal182._decode(input); - case 183: - return Mortal183._decode(input); - case 184: - return Mortal184._decode(input); - case 185: - return Mortal185._decode(input); - case 186: - return Mortal186._decode(input); - case 187: - return Mortal187._decode(input); - case 188: - return Mortal188._decode(input); - case 189: - return Mortal189._decode(input); - case 190: - return Mortal190._decode(input); - case 191: - return Mortal191._decode(input); - case 192: - return Mortal192._decode(input); - case 193: - return Mortal193._decode(input); - case 194: - return Mortal194._decode(input); - case 195: - return Mortal195._decode(input); - case 196: - return Mortal196._decode(input); - case 197: - return Mortal197._decode(input); - case 198: - return Mortal198._decode(input); - case 199: - return Mortal199._decode(input); - case 200: - return Mortal200._decode(input); - case 201: - return Mortal201._decode(input); - case 202: - return Mortal202._decode(input); - case 203: - return Mortal203._decode(input); - case 204: - return Mortal204._decode(input); - case 205: - return Mortal205._decode(input); - case 206: - return Mortal206._decode(input); - case 207: - return Mortal207._decode(input); - case 208: - return Mortal208._decode(input); - case 209: - return Mortal209._decode(input); - case 210: - return Mortal210._decode(input); - case 211: - return Mortal211._decode(input); - case 212: - return Mortal212._decode(input); - case 213: - return Mortal213._decode(input); - case 214: - return Mortal214._decode(input); - case 215: - return Mortal215._decode(input); - case 216: - return Mortal216._decode(input); - case 217: - return Mortal217._decode(input); - case 218: - return Mortal218._decode(input); - case 219: - return Mortal219._decode(input); - case 220: - return Mortal220._decode(input); - case 221: - return Mortal221._decode(input); - case 222: - return Mortal222._decode(input); - case 223: - return Mortal223._decode(input); - case 224: - return Mortal224._decode(input); - case 225: - return Mortal225._decode(input); - case 226: - return Mortal226._decode(input); - case 227: - return Mortal227._decode(input); - case 228: - return Mortal228._decode(input); - case 229: - return Mortal229._decode(input); - case 230: - return Mortal230._decode(input); - case 231: - return Mortal231._decode(input); - case 232: - return Mortal232._decode(input); - case 233: - return Mortal233._decode(input); - case 234: - return Mortal234._decode(input); - case 235: - return Mortal235._decode(input); - case 236: - return Mortal236._decode(input); - case 237: - return Mortal237._decode(input); - case 238: - return Mortal238._decode(input); - case 239: - return Mortal239._decode(input); - case 240: - return Mortal240._decode(input); - case 241: - return Mortal241._decode(input); - case 242: - return Mortal242._decode(input); - case 243: - return Mortal243._decode(input); - case 244: - return Mortal244._decode(input); - case 245: - return Mortal245._decode(input); - case 246: - return Mortal246._decode(input); - case 247: - return Mortal247._decode(input); - case 248: - return Mortal248._decode(input); - case 249: - return Mortal249._decode(input); - case 250: - return Mortal250._decode(input); - case 251: - return Mortal251._decode(input); - case 252: - return Mortal252._decode(input); - case 253: - return Mortal253._decode(input); - case 254: - return Mortal254._decode(input); - case 255: - return Mortal255._decode(input); - default: - throw Exception('Era: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Era value, _i1.Output output) { - switch (value.runtimeType) { - case Immortal: - (value as Immortal).encodeTo(output); - break; - case Mortal1: - (value as Mortal1).encodeTo(output); - break; - case Mortal2: - (value as Mortal2).encodeTo(output); - break; - case Mortal3: - (value as Mortal3).encodeTo(output); - break; - case Mortal4: - (value as Mortal4).encodeTo(output); - break; - case Mortal5: - (value as Mortal5).encodeTo(output); - break; - case Mortal6: - (value as Mortal6).encodeTo(output); - break; - case Mortal7: - (value as Mortal7).encodeTo(output); - break; - case Mortal8: - (value as Mortal8).encodeTo(output); - break; - case Mortal9: - (value as Mortal9).encodeTo(output); - break; - case Mortal10: - (value as Mortal10).encodeTo(output); - break; - case Mortal11: - (value as Mortal11).encodeTo(output); - break; - case Mortal12: - (value as Mortal12).encodeTo(output); - break; - case Mortal13: - (value as Mortal13).encodeTo(output); - break; - case Mortal14: - (value as Mortal14).encodeTo(output); - break; - case Mortal15: - (value as Mortal15).encodeTo(output); - break; - case Mortal16: - (value as Mortal16).encodeTo(output); - break; - case Mortal17: - (value as Mortal17).encodeTo(output); - break; - case Mortal18: - (value as Mortal18).encodeTo(output); - break; - case Mortal19: - (value as Mortal19).encodeTo(output); - break; - case Mortal20: - (value as Mortal20).encodeTo(output); - break; - case Mortal21: - (value as Mortal21).encodeTo(output); - break; - case Mortal22: - (value as Mortal22).encodeTo(output); - break; - case Mortal23: - (value as Mortal23).encodeTo(output); - break; - case Mortal24: - (value as Mortal24).encodeTo(output); - break; - case Mortal25: - (value as Mortal25).encodeTo(output); - break; - case Mortal26: - (value as Mortal26).encodeTo(output); - break; - case Mortal27: - (value as Mortal27).encodeTo(output); - break; - case Mortal28: - (value as Mortal28).encodeTo(output); - break; - case Mortal29: - (value as Mortal29).encodeTo(output); - break; - case Mortal30: - (value as Mortal30).encodeTo(output); - break; - case Mortal31: - (value as Mortal31).encodeTo(output); - break; - case Mortal32: - (value as Mortal32).encodeTo(output); - break; - case Mortal33: - (value as Mortal33).encodeTo(output); - break; - case Mortal34: - (value as Mortal34).encodeTo(output); - break; - case Mortal35: - (value as Mortal35).encodeTo(output); - break; - case Mortal36: - (value as Mortal36).encodeTo(output); - break; - case Mortal37: - (value as Mortal37).encodeTo(output); - break; - case Mortal38: - (value as Mortal38).encodeTo(output); - break; - case Mortal39: - (value as Mortal39).encodeTo(output); - break; - case Mortal40: - (value as Mortal40).encodeTo(output); - break; - case Mortal41: - (value as Mortal41).encodeTo(output); - break; - case Mortal42: - (value as Mortal42).encodeTo(output); - break; - case Mortal43: - (value as Mortal43).encodeTo(output); - break; - case Mortal44: - (value as Mortal44).encodeTo(output); - break; - case Mortal45: - (value as Mortal45).encodeTo(output); - break; - case Mortal46: - (value as Mortal46).encodeTo(output); - break; - case Mortal47: - (value as Mortal47).encodeTo(output); - break; - case Mortal48: - (value as Mortal48).encodeTo(output); - break; - case Mortal49: - (value as Mortal49).encodeTo(output); - break; - case Mortal50: - (value as Mortal50).encodeTo(output); - break; - case Mortal51: - (value as Mortal51).encodeTo(output); - break; - case Mortal52: - (value as Mortal52).encodeTo(output); - break; - case Mortal53: - (value as Mortal53).encodeTo(output); - break; - case Mortal54: - (value as Mortal54).encodeTo(output); - break; - case Mortal55: - (value as Mortal55).encodeTo(output); - break; - case Mortal56: - (value as Mortal56).encodeTo(output); - break; - case Mortal57: - (value as Mortal57).encodeTo(output); - break; - case Mortal58: - (value as Mortal58).encodeTo(output); - break; - case Mortal59: - (value as Mortal59).encodeTo(output); - break; - case Mortal60: - (value as Mortal60).encodeTo(output); - break; - case Mortal61: - (value as Mortal61).encodeTo(output); - break; - case Mortal62: - (value as Mortal62).encodeTo(output); - break; - case Mortal63: - (value as Mortal63).encodeTo(output); - break; - case Mortal64: - (value as Mortal64).encodeTo(output); - break; - case Mortal65: - (value as Mortal65).encodeTo(output); - break; - case Mortal66: - (value as Mortal66).encodeTo(output); - break; - case Mortal67: - (value as Mortal67).encodeTo(output); - break; - case Mortal68: - (value as Mortal68).encodeTo(output); - break; - case Mortal69: - (value as Mortal69).encodeTo(output); - break; - case Mortal70: - (value as Mortal70).encodeTo(output); - break; - case Mortal71: - (value as Mortal71).encodeTo(output); - break; - case Mortal72: - (value as Mortal72).encodeTo(output); - break; - case Mortal73: - (value as Mortal73).encodeTo(output); - break; - case Mortal74: - (value as Mortal74).encodeTo(output); - break; - case Mortal75: - (value as Mortal75).encodeTo(output); - break; - case Mortal76: - (value as Mortal76).encodeTo(output); - break; - case Mortal77: - (value as Mortal77).encodeTo(output); - break; - case Mortal78: - (value as Mortal78).encodeTo(output); - break; - case Mortal79: - (value as Mortal79).encodeTo(output); - break; - case Mortal80: - (value as Mortal80).encodeTo(output); - break; - case Mortal81: - (value as Mortal81).encodeTo(output); - break; - case Mortal82: - (value as Mortal82).encodeTo(output); - break; - case Mortal83: - (value as Mortal83).encodeTo(output); - break; - case Mortal84: - (value as Mortal84).encodeTo(output); - break; - case Mortal85: - (value as Mortal85).encodeTo(output); - break; - case Mortal86: - (value as Mortal86).encodeTo(output); - break; - case Mortal87: - (value as Mortal87).encodeTo(output); - break; - case Mortal88: - (value as Mortal88).encodeTo(output); - break; - case Mortal89: - (value as Mortal89).encodeTo(output); - break; - case Mortal90: - (value as Mortal90).encodeTo(output); - break; - case Mortal91: - (value as Mortal91).encodeTo(output); - break; - case Mortal92: - (value as Mortal92).encodeTo(output); - break; - case Mortal93: - (value as Mortal93).encodeTo(output); - break; - case Mortal94: - (value as Mortal94).encodeTo(output); - break; - case Mortal95: - (value as Mortal95).encodeTo(output); - break; - case Mortal96: - (value as Mortal96).encodeTo(output); - break; - case Mortal97: - (value as Mortal97).encodeTo(output); - break; - case Mortal98: - (value as Mortal98).encodeTo(output); - break; - case Mortal99: - (value as Mortal99).encodeTo(output); - break; - case Mortal100: - (value as Mortal100).encodeTo(output); - break; - case Mortal101: - (value as Mortal101).encodeTo(output); - break; - case Mortal102: - (value as Mortal102).encodeTo(output); - break; - case Mortal103: - (value as Mortal103).encodeTo(output); - break; - case Mortal104: - (value as Mortal104).encodeTo(output); - break; - case Mortal105: - (value as Mortal105).encodeTo(output); - break; - case Mortal106: - (value as Mortal106).encodeTo(output); - break; - case Mortal107: - (value as Mortal107).encodeTo(output); - break; - case Mortal108: - (value as Mortal108).encodeTo(output); - break; - case Mortal109: - (value as Mortal109).encodeTo(output); - break; - case Mortal110: - (value as Mortal110).encodeTo(output); - break; - case Mortal111: - (value as Mortal111).encodeTo(output); - break; - case Mortal112: - (value as Mortal112).encodeTo(output); - break; - case Mortal113: - (value as Mortal113).encodeTo(output); - break; - case Mortal114: - (value as Mortal114).encodeTo(output); - break; - case Mortal115: - (value as Mortal115).encodeTo(output); - break; - case Mortal116: - (value as Mortal116).encodeTo(output); - break; - case Mortal117: - (value as Mortal117).encodeTo(output); - break; - case Mortal118: - (value as Mortal118).encodeTo(output); - break; - case Mortal119: - (value as Mortal119).encodeTo(output); - break; - case Mortal120: - (value as Mortal120).encodeTo(output); - break; - case Mortal121: - (value as Mortal121).encodeTo(output); - break; - case Mortal122: - (value as Mortal122).encodeTo(output); - break; - case Mortal123: - (value as Mortal123).encodeTo(output); - break; - case Mortal124: - (value as Mortal124).encodeTo(output); - break; - case Mortal125: - (value as Mortal125).encodeTo(output); - break; - case Mortal126: - (value as Mortal126).encodeTo(output); - break; - case Mortal127: - (value as Mortal127).encodeTo(output); - break; - case Mortal128: - (value as Mortal128).encodeTo(output); - break; - case Mortal129: - (value as Mortal129).encodeTo(output); - break; - case Mortal130: - (value as Mortal130).encodeTo(output); - break; - case Mortal131: - (value as Mortal131).encodeTo(output); - break; - case Mortal132: - (value as Mortal132).encodeTo(output); - break; - case Mortal133: - (value as Mortal133).encodeTo(output); - break; - case Mortal134: - (value as Mortal134).encodeTo(output); - break; - case Mortal135: - (value as Mortal135).encodeTo(output); - break; - case Mortal136: - (value as Mortal136).encodeTo(output); - break; - case Mortal137: - (value as Mortal137).encodeTo(output); - break; - case Mortal138: - (value as Mortal138).encodeTo(output); - break; - case Mortal139: - (value as Mortal139).encodeTo(output); - break; - case Mortal140: - (value as Mortal140).encodeTo(output); - break; - case Mortal141: - (value as Mortal141).encodeTo(output); - break; - case Mortal142: - (value as Mortal142).encodeTo(output); - break; - case Mortal143: - (value as Mortal143).encodeTo(output); - break; - case Mortal144: - (value as Mortal144).encodeTo(output); - break; - case Mortal145: - (value as Mortal145).encodeTo(output); - break; - case Mortal146: - (value as Mortal146).encodeTo(output); - break; - case Mortal147: - (value as Mortal147).encodeTo(output); - break; - case Mortal148: - (value as Mortal148).encodeTo(output); - break; - case Mortal149: - (value as Mortal149).encodeTo(output); - break; - case Mortal150: - (value as Mortal150).encodeTo(output); - break; - case Mortal151: - (value as Mortal151).encodeTo(output); - break; - case Mortal152: - (value as Mortal152).encodeTo(output); - break; - case Mortal153: - (value as Mortal153).encodeTo(output); - break; - case Mortal154: - (value as Mortal154).encodeTo(output); - break; - case Mortal155: - (value as Mortal155).encodeTo(output); - break; - case Mortal156: - (value as Mortal156).encodeTo(output); - break; - case Mortal157: - (value as Mortal157).encodeTo(output); - break; - case Mortal158: - (value as Mortal158).encodeTo(output); - break; - case Mortal159: - (value as Mortal159).encodeTo(output); - break; - case Mortal160: - (value as Mortal160).encodeTo(output); - break; - case Mortal161: - (value as Mortal161).encodeTo(output); - break; - case Mortal162: - (value as Mortal162).encodeTo(output); - break; - case Mortal163: - (value as Mortal163).encodeTo(output); - break; - case Mortal164: - (value as Mortal164).encodeTo(output); - break; - case Mortal165: - (value as Mortal165).encodeTo(output); - break; - case Mortal166: - (value as Mortal166).encodeTo(output); - break; - case Mortal167: - (value as Mortal167).encodeTo(output); - break; - case Mortal168: - (value as Mortal168).encodeTo(output); - break; - case Mortal169: - (value as Mortal169).encodeTo(output); - break; - case Mortal170: - (value as Mortal170).encodeTo(output); - break; - case Mortal171: - (value as Mortal171).encodeTo(output); - break; - case Mortal172: - (value as Mortal172).encodeTo(output); - break; - case Mortal173: - (value as Mortal173).encodeTo(output); - break; - case Mortal174: - (value as Mortal174).encodeTo(output); - break; - case Mortal175: - (value as Mortal175).encodeTo(output); - break; - case Mortal176: - (value as Mortal176).encodeTo(output); - break; - case Mortal177: - (value as Mortal177).encodeTo(output); - break; - case Mortal178: - (value as Mortal178).encodeTo(output); - break; - case Mortal179: - (value as Mortal179).encodeTo(output); - break; - case Mortal180: - (value as Mortal180).encodeTo(output); - break; - case Mortal181: - (value as Mortal181).encodeTo(output); - break; - case Mortal182: - (value as Mortal182).encodeTo(output); - break; - case Mortal183: - (value as Mortal183).encodeTo(output); - break; - case Mortal184: - (value as Mortal184).encodeTo(output); - break; - case Mortal185: - (value as Mortal185).encodeTo(output); - break; - case Mortal186: - (value as Mortal186).encodeTo(output); - break; - case Mortal187: - (value as Mortal187).encodeTo(output); - break; - case Mortal188: - (value as Mortal188).encodeTo(output); - break; - case Mortal189: - (value as Mortal189).encodeTo(output); - break; - case Mortal190: - (value as Mortal190).encodeTo(output); - break; - case Mortal191: - (value as Mortal191).encodeTo(output); - break; - case Mortal192: - (value as Mortal192).encodeTo(output); - break; - case Mortal193: - (value as Mortal193).encodeTo(output); - break; - case Mortal194: - (value as Mortal194).encodeTo(output); - break; - case Mortal195: - (value as Mortal195).encodeTo(output); - break; - case Mortal196: - (value as Mortal196).encodeTo(output); - break; - case Mortal197: - (value as Mortal197).encodeTo(output); - break; - case Mortal198: - (value as Mortal198).encodeTo(output); - break; - case Mortal199: - (value as Mortal199).encodeTo(output); - break; - case Mortal200: - (value as Mortal200).encodeTo(output); - break; - case Mortal201: - (value as Mortal201).encodeTo(output); - break; - case Mortal202: - (value as Mortal202).encodeTo(output); - break; - case Mortal203: - (value as Mortal203).encodeTo(output); - break; - case Mortal204: - (value as Mortal204).encodeTo(output); - break; - case Mortal205: - (value as Mortal205).encodeTo(output); - break; - case Mortal206: - (value as Mortal206).encodeTo(output); - break; - case Mortal207: - (value as Mortal207).encodeTo(output); - break; - case Mortal208: - (value as Mortal208).encodeTo(output); - break; - case Mortal209: - (value as Mortal209).encodeTo(output); - break; - case Mortal210: - (value as Mortal210).encodeTo(output); - break; - case Mortal211: - (value as Mortal211).encodeTo(output); - break; - case Mortal212: - (value as Mortal212).encodeTo(output); - break; - case Mortal213: - (value as Mortal213).encodeTo(output); - break; - case Mortal214: - (value as Mortal214).encodeTo(output); - break; - case Mortal215: - (value as Mortal215).encodeTo(output); - break; - case Mortal216: - (value as Mortal216).encodeTo(output); - break; - case Mortal217: - (value as Mortal217).encodeTo(output); - break; - case Mortal218: - (value as Mortal218).encodeTo(output); - break; - case Mortal219: - (value as Mortal219).encodeTo(output); - break; - case Mortal220: - (value as Mortal220).encodeTo(output); - break; - case Mortal221: - (value as Mortal221).encodeTo(output); - break; - case Mortal222: - (value as Mortal222).encodeTo(output); - break; - case Mortal223: - (value as Mortal223).encodeTo(output); - break; - case Mortal224: - (value as Mortal224).encodeTo(output); - break; - case Mortal225: - (value as Mortal225).encodeTo(output); - break; - case Mortal226: - (value as Mortal226).encodeTo(output); - break; - case Mortal227: - (value as Mortal227).encodeTo(output); - break; - case Mortal228: - (value as Mortal228).encodeTo(output); - break; - case Mortal229: - (value as Mortal229).encodeTo(output); - break; - case Mortal230: - (value as Mortal230).encodeTo(output); - break; - case Mortal231: - (value as Mortal231).encodeTo(output); - break; - case Mortal232: - (value as Mortal232).encodeTo(output); - break; - case Mortal233: - (value as Mortal233).encodeTo(output); - break; - case Mortal234: - (value as Mortal234).encodeTo(output); - break; - case Mortal235: - (value as Mortal235).encodeTo(output); - break; - case Mortal236: - (value as Mortal236).encodeTo(output); - break; - case Mortal237: - (value as Mortal237).encodeTo(output); - break; - case Mortal238: - (value as Mortal238).encodeTo(output); - break; - case Mortal239: - (value as Mortal239).encodeTo(output); - break; - case Mortal240: - (value as Mortal240).encodeTo(output); - break; - case Mortal241: - (value as Mortal241).encodeTo(output); - break; - case Mortal242: - (value as Mortal242).encodeTo(output); - break; - case Mortal243: - (value as Mortal243).encodeTo(output); - break; - case Mortal244: - (value as Mortal244).encodeTo(output); - break; - case Mortal245: - (value as Mortal245).encodeTo(output); - break; - case Mortal246: - (value as Mortal246).encodeTo(output); - break; - case Mortal247: - (value as Mortal247).encodeTo(output); - break; - case Mortal248: - (value as Mortal248).encodeTo(output); - break; - case Mortal249: - (value as Mortal249).encodeTo(output); - break; - case Mortal250: - (value as Mortal250).encodeTo(output); - break; - case Mortal251: - (value as Mortal251).encodeTo(output); - break; - case Mortal252: - (value as Mortal252).encodeTo(output); - break; - case Mortal253: - (value as Mortal253).encodeTo(output); - break; - case Mortal254: - (value as Mortal254).encodeTo(output); - break; - case Mortal255: - (value as Mortal255).encodeTo(output); - break; - default: - throw Exception('Era: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(Era value) { - switch (value.runtimeType) { - case Immortal: - return 1; - case Mortal1: - return (value as Mortal1)._sizeHint(); - case Mortal2: - return (value as Mortal2)._sizeHint(); - case Mortal3: - return (value as Mortal3)._sizeHint(); - case Mortal4: - return (value as Mortal4)._sizeHint(); - case Mortal5: - return (value as Mortal5)._sizeHint(); - case Mortal6: - return (value as Mortal6)._sizeHint(); - case Mortal7: - return (value as Mortal7)._sizeHint(); - case Mortal8: - return (value as Mortal8)._sizeHint(); - case Mortal9: - return (value as Mortal9)._sizeHint(); - case Mortal10: - return (value as Mortal10)._sizeHint(); - case Mortal11: - return (value as Mortal11)._sizeHint(); - case Mortal12: - return (value as Mortal12)._sizeHint(); - case Mortal13: - return (value as Mortal13)._sizeHint(); - case Mortal14: - return (value as Mortal14)._sizeHint(); - case Mortal15: - return (value as Mortal15)._sizeHint(); - case Mortal16: - return (value as Mortal16)._sizeHint(); - case Mortal17: - return (value as Mortal17)._sizeHint(); - case Mortal18: - return (value as Mortal18)._sizeHint(); - case Mortal19: - return (value as Mortal19)._sizeHint(); - case Mortal20: - return (value as Mortal20)._sizeHint(); - case Mortal21: - return (value as Mortal21)._sizeHint(); - case Mortal22: - return (value as Mortal22)._sizeHint(); - case Mortal23: - return (value as Mortal23)._sizeHint(); - case Mortal24: - return (value as Mortal24)._sizeHint(); - case Mortal25: - return (value as Mortal25)._sizeHint(); - case Mortal26: - return (value as Mortal26)._sizeHint(); - case Mortal27: - return (value as Mortal27)._sizeHint(); - case Mortal28: - return (value as Mortal28)._sizeHint(); - case Mortal29: - return (value as Mortal29)._sizeHint(); - case Mortal30: - return (value as Mortal30)._sizeHint(); - case Mortal31: - return (value as Mortal31)._sizeHint(); - case Mortal32: - return (value as Mortal32)._sizeHint(); - case Mortal33: - return (value as Mortal33)._sizeHint(); - case Mortal34: - return (value as Mortal34)._sizeHint(); - case Mortal35: - return (value as Mortal35)._sizeHint(); - case Mortal36: - return (value as Mortal36)._sizeHint(); - case Mortal37: - return (value as Mortal37)._sizeHint(); - case Mortal38: - return (value as Mortal38)._sizeHint(); - case Mortal39: - return (value as Mortal39)._sizeHint(); - case Mortal40: - return (value as Mortal40)._sizeHint(); - case Mortal41: - return (value as Mortal41)._sizeHint(); - case Mortal42: - return (value as Mortal42)._sizeHint(); - case Mortal43: - return (value as Mortal43)._sizeHint(); - case Mortal44: - return (value as Mortal44)._sizeHint(); - case Mortal45: - return (value as Mortal45)._sizeHint(); - case Mortal46: - return (value as Mortal46)._sizeHint(); - case Mortal47: - return (value as Mortal47)._sizeHint(); - case Mortal48: - return (value as Mortal48)._sizeHint(); - case Mortal49: - return (value as Mortal49)._sizeHint(); - case Mortal50: - return (value as Mortal50)._sizeHint(); - case Mortal51: - return (value as Mortal51)._sizeHint(); - case Mortal52: - return (value as Mortal52)._sizeHint(); - case Mortal53: - return (value as Mortal53)._sizeHint(); - case Mortal54: - return (value as Mortal54)._sizeHint(); - case Mortal55: - return (value as Mortal55)._sizeHint(); - case Mortal56: - return (value as Mortal56)._sizeHint(); - case Mortal57: - return (value as Mortal57)._sizeHint(); - case Mortal58: - return (value as Mortal58)._sizeHint(); - case Mortal59: - return (value as Mortal59)._sizeHint(); - case Mortal60: - return (value as Mortal60)._sizeHint(); - case Mortal61: - return (value as Mortal61)._sizeHint(); - case Mortal62: - return (value as Mortal62)._sizeHint(); - case Mortal63: - return (value as Mortal63)._sizeHint(); - case Mortal64: - return (value as Mortal64)._sizeHint(); - case Mortal65: - return (value as Mortal65)._sizeHint(); - case Mortal66: - return (value as Mortal66)._sizeHint(); - case Mortal67: - return (value as Mortal67)._sizeHint(); - case Mortal68: - return (value as Mortal68)._sizeHint(); - case Mortal69: - return (value as Mortal69)._sizeHint(); - case Mortal70: - return (value as Mortal70)._sizeHint(); - case Mortal71: - return (value as Mortal71)._sizeHint(); - case Mortal72: - return (value as Mortal72)._sizeHint(); - case Mortal73: - return (value as Mortal73)._sizeHint(); - case Mortal74: - return (value as Mortal74)._sizeHint(); - case Mortal75: - return (value as Mortal75)._sizeHint(); - case Mortal76: - return (value as Mortal76)._sizeHint(); - case Mortal77: - return (value as Mortal77)._sizeHint(); - case Mortal78: - return (value as Mortal78)._sizeHint(); - case Mortal79: - return (value as Mortal79)._sizeHint(); - case Mortal80: - return (value as Mortal80)._sizeHint(); - case Mortal81: - return (value as Mortal81)._sizeHint(); - case Mortal82: - return (value as Mortal82)._sizeHint(); - case Mortal83: - return (value as Mortal83)._sizeHint(); - case Mortal84: - return (value as Mortal84)._sizeHint(); - case Mortal85: - return (value as Mortal85)._sizeHint(); - case Mortal86: - return (value as Mortal86)._sizeHint(); - case Mortal87: - return (value as Mortal87)._sizeHint(); - case Mortal88: - return (value as Mortal88)._sizeHint(); - case Mortal89: - return (value as Mortal89)._sizeHint(); - case Mortal90: - return (value as Mortal90)._sizeHint(); - case Mortal91: - return (value as Mortal91)._sizeHint(); - case Mortal92: - return (value as Mortal92)._sizeHint(); - case Mortal93: - return (value as Mortal93)._sizeHint(); - case Mortal94: - return (value as Mortal94)._sizeHint(); - case Mortal95: - return (value as Mortal95)._sizeHint(); - case Mortal96: - return (value as Mortal96)._sizeHint(); - case Mortal97: - return (value as Mortal97)._sizeHint(); - case Mortal98: - return (value as Mortal98)._sizeHint(); - case Mortal99: - return (value as Mortal99)._sizeHint(); - case Mortal100: - return (value as Mortal100)._sizeHint(); - case Mortal101: - return (value as Mortal101)._sizeHint(); - case Mortal102: - return (value as Mortal102)._sizeHint(); - case Mortal103: - return (value as Mortal103)._sizeHint(); - case Mortal104: - return (value as Mortal104)._sizeHint(); - case Mortal105: - return (value as Mortal105)._sizeHint(); - case Mortal106: - return (value as Mortal106)._sizeHint(); - case Mortal107: - return (value as Mortal107)._sizeHint(); - case Mortal108: - return (value as Mortal108)._sizeHint(); - case Mortal109: - return (value as Mortal109)._sizeHint(); - case Mortal110: - return (value as Mortal110)._sizeHint(); - case Mortal111: - return (value as Mortal111)._sizeHint(); - case Mortal112: - return (value as Mortal112)._sizeHint(); - case Mortal113: - return (value as Mortal113)._sizeHint(); - case Mortal114: - return (value as Mortal114)._sizeHint(); - case Mortal115: - return (value as Mortal115)._sizeHint(); - case Mortal116: - return (value as Mortal116)._sizeHint(); - case Mortal117: - return (value as Mortal117)._sizeHint(); - case Mortal118: - return (value as Mortal118)._sizeHint(); - case Mortal119: - return (value as Mortal119)._sizeHint(); - case Mortal120: - return (value as Mortal120)._sizeHint(); - case Mortal121: - return (value as Mortal121)._sizeHint(); - case Mortal122: - return (value as Mortal122)._sizeHint(); - case Mortal123: - return (value as Mortal123)._sizeHint(); - case Mortal124: - return (value as Mortal124)._sizeHint(); - case Mortal125: - return (value as Mortal125)._sizeHint(); - case Mortal126: - return (value as Mortal126)._sizeHint(); - case Mortal127: - return (value as Mortal127)._sizeHint(); - case Mortal128: - return (value as Mortal128)._sizeHint(); - case Mortal129: - return (value as Mortal129)._sizeHint(); - case Mortal130: - return (value as Mortal130)._sizeHint(); - case Mortal131: - return (value as Mortal131)._sizeHint(); - case Mortal132: - return (value as Mortal132)._sizeHint(); - case Mortal133: - return (value as Mortal133)._sizeHint(); - case Mortal134: - return (value as Mortal134)._sizeHint(); - case Mortal135: - return (value as Mortal135)._sizeHint(); - case Mortal136: - return (value as Mortal136)._sizeHint(); - case Mortal137: - return (value as Mortal137)._sizeHint(); - case Mortal138: - return (value as Mortal138)._sizeHint(); - case Mortal139: - return (value as Mortal139)._sizeHint(); - case Mortal140: - return (value as Mortal140)._sizeHint(); - case Mortal141: - return (value as Mortal141)._sizeHint(); - case Mortal142: - return (value as Mortal142)._sizeHint(); - case Mortal143: - return (value as Mortal143)._sizeHint(); - case Mortal144: - return (value as Mortal144)._sizeHint(); - case Mortal145: - return (value as Mortal145)._sizeHint(); - case Mortal146: - return (value as Mortal146)._sizeHint(); - case Mortal147: - return (value as Mortal147)._sizeHint(); - case Mortal148: - return (value as Mortal148)._sizeHint(); - case Mortal149: - return (value as Mortal149)._sizeHint(); - case Mortal150: - return (value as Mortal150)._sizeHint(); - case Mortal151: - return (value as Mortal151)._sizeHint(); - case Mortal152: - return (value as Mortal152)._sizeHint(); - case Mortal153: - return (value as Mortal153)._sizeHint(); - case Mortal154: - return (value as Mortal154)._sizeHint(); - case Mortal155: - return (value as Mortal155)._sizeHint(); - case Mortal156: - return (value as Mortal156)._sizeHint(); - case Mortal157: - return (value as Mortal157)._sizeHint(); - case Mortal158: - return (value as Mortal158)._sizeHint(); - case Mortal159: - return (value as Mortal159)._sizeHint(); - case Mortal160: - return (value as Mortal160)._sizeHint(); - case Mortal161: - return (value as Mortal161)._sizeHint(); - case Mortal162: - return (value as Mortal162)._sizeHint(); - case Mortal163: - return (value as Mortal163)._sizeHint(); - case Mortal164: - return (value as Mortal164)._sizeHint(); - case Mortal165: - return (value as Mortal165)._sizeHint(); - case Mortal166: - return (value as Mortal166)._sizeHint(); - case Mortal167: - return (value as Mortal167)._sizeHint(); - case Mortal168: - return (value as Mortal168)._sizeHint(); - case Mortal169: - return (value as Mortal169)._sizeHint(); - case Mortal170: - return (value as Mortal170)._sizeHint(); - case Mortal171: - return (value as Mortal171)._sizeHint(); - case Mortal172: - return (value as Mortal172)._sizeHint(); - case Mortal173: - return (value as Mortal173)._sizeHint(); - case Mortal174: - return (value as Mortal174)._sizeHint(); - case Mortal175: - return (value as Mortal175)._sizeHint(); - case Mortal176: - return (value as Mortal176)._sizeHint(); - case Mortal177: - return (value as Mortal177)._sizeHint(); - case Mortal178: - return (value as Mortal178)._sizeHint(); - case Mortal179: - return (value as Mortal179)._sizeHint(); - case Mortal180: - return (value as Mortal180)._sizeHint(); - case Mortal181: - return (value as Mortal181)._sizeHint(); - case Mortal182: - return (value as Mortal182)._sizeHint(); - case Mortal183: - return (value as Mortal183)._sizeHint(); - case Mortal184: - return (value as Mortal184)._sizeHint(); - case Mortal185: - return (value as Mortal185)._sizeHint(); - case Mortal186: - return (value as Mortal186)._sizeHint(); - case Mortal187: - return (value as Mortal187)._sizeHint(); - case Mortal188: - return (value as Mortal188)._sizeHint(); - case Mortal189: - return (value as Mortal189)._sizeHint(); - case Mortal190: - return (value as Mortal190)._sizeHint(); - case Mortal191: - return (value as Mortal191)._sizeHint(); - case Mortal192: - return (value as Mortal192)._sizeHint(); - case Mortal193: - return (value as Mortal193)._sizeHint(); - case Mortal194: - return (value as Mortal194)._sizeHint(); - case Mortal195: - return (value as Mortal195)._sizeHint(); - case Mortal196: - return (value as Mortal196)._sizeHint(); - case Mortal197: - return (value as Mortal197)._sizeHint(); - case Mortal198: - return (value as Mortal198)._sizeHint(); - case Mortal199: - return (value as Mortal199)._sizeHint(); - case Mortal200: - return (value as Mortal200)._sizeHint(); - case Mortal201: - return (value as Mortal201)._sizeHint(); - case Mortal202: - return (value as Mortal202)._sizeHint(); - case Mortal203: - return (value as Mortal203)._sizeHint(); - case Mortal204: - return (value as Mortal204)._sizeHint(); - case Mortal205: - return (value as Mortal205)._sizeHint(); - case Mortal206: - return (value as Mortal206)._sizeHint(); - case Mortal207: - return (value as Mortal207)._sizeHint(); - case Mortal208: - return (value as Mortal208)._sizeHint(); - case Mortal209: - return (value as Mortal209)._sizeHint(); - case Mortal210: - return (value as Mortal210)._sizeHint(); - case Mortal211: - return (value as Mortal211)._sizeHint(); - case Mortal212: - return (value as Mortal212)._sizeHint(); - case Mortal213: - return (value as Mortal213)._sizeHint(); - case Mortal214: - return (value as Mortal214)._sizeHint(); - case Mortal215: - return (value as Mortal215)._sizeHint(); - case Mortal216: - return (value as Mortal216)._sizeHint(); - case Mortal217: - return (value as Mortal217)._sizeHint(); - case Mortal218: - return (value as Mortal218)._sizeHint(); - case Mortal219: - return (value as Mortal219)._sizeHint(); - case Mortal220: - return (value as Mortal220)._sizeHint(); - case Mortal221: - return (value as Mortal221)._sizeHint(); - case Mortal222: - return (value as Mortal222)._sizeHint(); - case Mortal223: - return (value as Mortal223)._sizeHint(); - case Mortal224: - return (value as Mortal224)._sizeHint(); - case Mortal225: - return (value as Mortal225)._sizeHint(); - case Mortal226: - return (value as Mortal226)._sizeHint(); - case Mortal227: - return (value as Mortal227)._sizeHint(); - case Mortal228: - return (value as Mortal228)._sizeHint(); - case Mortal229: - return (value as Mortal229)._sizeHint(); - case Mortal230: - return (value as Mortal230)._sizeHint(); - case Mortal231: - return (value as Mortal231)._sizeHint(); - case Mortal232: - return (value as Mortal232)._sizeHint(); - case Mortal233: - return (value as Mortal233)._sizeHint(); - case Mortal234: - return (value as Mortal234)._sizeHint(); - case Mortal235: - return (value as Mortal235)._sizeHint(); - case Mortal236: - return (value as Mortal236)._sizeHint(); - case Mortal237: - return (value as Mortal237)._sizeHint(); - case Mortal238: - return (value as Mortal238)._sizeHint(); - case Mortal239: - return (value as Mortal239)._sizeHint(); - case Mortal240: - return (value as Mortal240)._sizeHint(); - case Mortal241: - return (value as Mortal241)._sizeHint(); - case Mortal242: - return (value as Mortal242)._sizeHint(); - case Mortal243: - return (value as Mortal243)._sizeHint(); - case Mortal244: - return (value as Mortal244)._sizeHint(); - case Mortal245: - return (value as Mortal245)._sizeHint(); - case Mortal246: - return (value as Mortal246)._sizeHint(); - case Mortal247: - return (value as Mortal247)._sizeHint(); - case Mortal248: - return (value as Mortal248)._sizeHint(); - case Mortal249: - return (value as Mortal249)._sizeHint(); - case Mortal250: - return (value as Mortal250)._sizeHint(); - case Mortal251: - return (value as Mortal251)._sizeHint(); - case Mortal252: - return (value as Mortal252)._sizeHint(); - case Mortal253: - return (value as Mortal253)._sizeHint(); - case Mortal254: - return (value as Mortal254)._sizeHint(); - case Mortal255: - return (value as Mortal255)._sizeHint(); - default: - throw Exception('Era: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Immortal extends Era { - const Immortal(); - - @override - Map toJson() => {'Immortal': null}; - - void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - } - - @override - bool operator ==(Object other) => other is Immortal; - - @override - int get hashCode => runtimeType.hashCode; -} - -class Mortal1 extends Era { - const Mortal1(this.value0); - - factory Mortal1._decode(_i1.Input input) { - return Mortal1(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal1': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal2 extends Era { - const Mortal2(this.value0); - - factory Mortal2._decode(_i1.Input input) { - return Mortal2(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal2': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal3 extends Era { - const Mortal3(this.value0); - - factory Mortal3._decode(_i1.Input input) { - return Mortal3(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal3': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal4 extends Era { - const Mortal4(this.value0); - - factory Mortal4._decode(_i1.Input input) { - return Mortal4(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal4': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal5 extends Era { - const Mortal5(this.value0); - - factory Mortal5._decode(_i1.Input input) { - return Mortal5(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal5': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal6 extends Era { - const Mortal6(this.value0); - - factory Mortal6._decode(_i1.Input input) { - return Mortal6(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal6': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal7 extends Era { - const Mortal7(this.value0); - - factory Mortal7._decode(_i1.Input input) { - return Mortal7(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal7': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal8 extends Era { - const Mortal8(this.value0); - - factory Mortal8._decode(_i1.Input input) { - return Mortal8(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal8': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal9 extends Era { - const Mortal9(this.value0); - - factory Mortal9._decode(_i1.Input input) { - return Mortal9(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal9': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal10 extends Era { - const Mortal10(this.value0); - - factory Mortal10._decode(_i1.Input input) { - return Mortal10(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal10': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal11 extends Era { - const Mortal11(this.value0); - - factory Mortal11._decode(_i1.Input input) { - return Mortal11(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal11': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal12 extends Era { - const Mortal12(this.value0); - - factory Mortal12._decode(_i1.Input input) { - return Mortal12(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal12': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal13 extends Era { - const Mortal13(this.value0); - - factory Mortal13._decode(_i1.Input input) { - return Mortal13(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal13': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal14 extends Era { - const Mortal14(this.value0); - - factory Mortal14._decode(_i1.Input input) { - return Mortal14(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal14': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal15 extends Era { - const Mortal15(this.value0); - - factory Mortal15._decode(_i1.Input input) { - return Mortal15(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal15': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal16 extends Era { - const Mortal16(this.value0); - - factory Mortal16._decode(_i1.Input input) { - return Mortal16(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal16': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal17 extends Era { - const Mortal17(this.value0); - - factory Mortal17._decode(_i1.Input input) { - return Mortal17(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal17': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal18 extends Era { - const Mortal18(this.value0); - - factory Mortal18._decode(_i1.Input input) { - return Mortal18(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal18': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal19 extends Era { - const Mortal19(this.value0); - - factory Mortal19._decode(_i1.Input input) { - return Mortal19(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal19': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal20 extends Era { - const Mortal20(this.value0); - - factory Mortal20._decode(_i1.Input input) { - return Mortal20(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal20': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal21 extends Era { - const Mortal21(this.value0); - - factory Mortal21._decode(_i1.Input input) { - return Mortal21(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal21': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal22 extends Era { - const Mortal22(this.value0); - - factory Mortal22._decode(_i1.Input input) { - return Mortal22(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal22': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal23 extends Era { - const Mortal23(this.value0); - - factory Mortal23._decode(_i1.Input input) { - return Mortal23(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal23': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal24 extends Era { - const Mortal24(this.value0); - - factory Mortal24._decode(_i1.Input input) { - return Mortal24(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal24': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal25 extends Era { - const Mortal25(this.value0); - - factory Mortal25._decode(_i1.Input input) { - return Mortal25(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal25': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal26 extends Era { - const Mortal26(this.value0); - - factory Mortal26._decode(_i1.Input input) { - return Mortal26(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal26': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal27 extends Era { - const Mortal27(this.value0); - - factory Mortal27._decode(_i1.Input input) { - return Mortal27(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal27': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal28 extends Era { - const Mortal28(this.value0); - - factory Mortal28._decode(_i1.Input input) { - return Mortal28(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal28': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal29 extends Era { - const Mortal29(this.value0); - - factory Mortal29._decode(_i1.Input input) { - return Mortal29(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal29': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal30 extends Era { - const Mortal30(this.value0); - - factory Mortal30._decode(_i1.Input input) { - return Mortal30(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal30': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal31 extends Era { - const Mortal31(this.value0); - - factory Mortal31._decode(_i1.Input input) { - return Mortal31(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal31': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal32 extends Era { - const Mortal32(this.value0); - - factory Mortal32._decode(_i1.Input input) { - return Mortal32(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal32': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal33 extends Era { - const Mortal33(this.value0); - - factory Mortal33._decode(_i1.Input input) { - return Mortal33(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal33': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal34 extends Era { - const Mortal34(this.value0); - - factory Mortal34._decode(_i1.Input input) { - return Mortal34(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal34': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal35 extends Era { - const Mortal35(this.value0); - - factory Mortal35._decode(_i1.Input input) { - return Mortal35(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal35': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal36 extends Era { - const Mortal36(this.value0); - - factory Mortal36._decode(_i1.Input input) { - return Mortal36(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal36': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal37 extends Era { - const Mortal37(this.value0); - - factory Mortal37._decode(_i1.Input input) { - return Mortal37(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal37': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal38 extends Era { - const Mortal38(this.value0); - - factory Mortal38._decode(_i1.Input input) { - return Mortal38(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal38': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal39 extends Era { - const Mortal39(this.value0); - - factory Mortal39._decode(_i1.Input input) { - return Mortal39(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal39': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal40 extends Era { - const Mortal40(this.value0); - - factory Mortal40._decode(_i1.Input input) { - return Mortal40(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal40': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal41 extends Era { - const Mortal41(this.value0); - - factory Mortal41._decode(_i1.Input input) { - return Mortal41(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal41': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal42 extends Era { - const Mortal42(this.value0); - - factory Mortal42._decode(_i1.Input input) { - return Mortal42(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal42': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal43 extends Era { - const Mortal43(this.value0); - - factory Mortal43._decode(_i1.Input input) { - return Mortal43(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal43': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal44 extends Era { - const Mortal44(this.value0); - - factory Mortal44._decode(_i1.Input input) { - return Mortal44(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal44': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal45 extends Era { - const Mortal45(this.value0); - - factory Mortal45._decode(_i1.Input input) { - return Mortal45(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal45': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal46 extends Era { - const Mortal46(this.value0); - - factory Mortal46._decode(_i1.Input input) { - return Mortal46(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal46': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal47 extends Era { - const Mortal47(this.value0); - - factory Mortal47._decode(_i1.Input input) { - return Mortal47(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal47': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal48 extends Era { - const Mortal48(this.value0); - - factory Mortal48._decode(_i1.Input input) { - return Mortal48(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal48': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal49 extends Era { - const Mortal49(this.value0); - - factory Mortal49._decode(_i1.Input input) { - return Mortal49(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal49': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal50 extends Era { - const Mortal50(this.value0); - - factory Mortal50._decode(_i1.Input input) { - return Mortal50(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal50': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal51 extends Era { - const Mortal51(this.value0); - - factory Mortal51._decode(_i1.Input input) { - return Mortal51(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal51': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal52 extends Era { - const Mortal52(this.value0); - - factory Mortal52._decode(_i1.Input input) { - return Mortal52(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal52': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal53 extends Era { - const Mortal53(this.value0); - - factory Mortal53._decode(_i1.Input input) { - return Mortal53(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal53': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal54 extends Era { - const Mortal54(this.value0); - - factory Mortal54._decode(_i1.Input input) { - return Mortal54(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal54': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal55 extends Era { - const Mortal55(this.value0); - - factory Mortal55._decode(_i1.Input input) { - return Mortal55(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal55': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal56 extends Era { - const Mortal56(this.value0); - - factory Mortal56._decode(_i1.Input input) { - return Mortal56(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal56': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal57 extends Era { - const Mortal57(this.value0); - - factory Mortal57._decode(_i1.Input input) { - return Mortal57(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal57': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal58 extends Era { - const Mortal58(this.value0); - - factory Mortal58._decode(_i1.Input input) { - return Mortal58(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal58': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal59 extends Era { - const Mortal59(this.value0); - - factory Mortal59._decode(_i1.Input input) { - return Mortal59(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal59': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal60 extends Era { - const Mortal60(this.value0); - - factory Mortal60._decode(_i1.Input input) { - return Mortal60(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal60': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal61 extends Era { - const Mortal61(this.value0); - - factory Mortal61._decode(_i1.Input input) { - return Mortal61(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal61': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal62 extends Era { - const Mortal62(this.value0); - - factory Mortal62._decode(_i1.Input input) { - return Mortal62(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal62': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal63 extends Era { - const Mortal63(this.value0); - - factory Mortal63._decode(_i1.Input input) { - return Mortal63(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal63': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal64 extends Era { - const Mortal64(this.value0); - - factory Mortal64._decode(_i1.Input input) { - return Mortal64(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal64': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal65 extends Era { - const Mortal65(this.value0); - - factory Mortal65._decode(_i1.Input input) { - return Mortal65(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal65': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal66 extends Era { - const Mortal66(this.value0); - - factory Mortal66._decode(_i1.Input input) { - return Mortal66(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal66': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal67 extends Era { - const Mortal67(this.value0); - - factory Mortal67._decode(_i1.Input input) { - return Mortal67(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal67': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal68 extends Era { - const Mortal68(this.value0); - - factory Mortal68._decode(_i1.Input input) { - return Mortal68(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal68': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal69 extends Era { - const Mortal69(this.value0); - - factory Mortal69._decode(_i1.Input input) { - return Mortal69(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal69': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal70 extends Era { - const Mortal70(this.value0); - - factory Mortal70._decode(_i1.Input input) { - return Mortal70(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal70': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal71 extends Era { - const Mortal71(this.value0); - - factory Mortal71._decode(_i1.Input input) { - return Mortal71(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal71': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal72 extends Era { - const Mortal72(this.value0); - - factory Mortal72._decode(_i1.Input input) { - return Mortal72(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal72': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal73 extends Era { - const Mortal73(this.value0); - - factory Mortal73._decode(_i1.Input input) { - return Mortal73(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal73': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal74 extends Era { - const Mortal74(this.value0); - - factory Mortal74._decode(_i1.Input input) { - return Mortal74(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal74': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal75 extends Era { - const Mortal75(this.value0); - - factory Mortal75._decode(_i1.Input input) { - return Mortal75(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal75': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal76 extends Era { - const Mortal76(this.value0); - - factory Mortal76._decode(_i1.Input input) { - return Mortal76(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal76': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal77 extends Era { - const Mortal77(this.value0); - - factory Mortal77._decode(_i1.Input input) { - return Mortal77(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal77': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal78 extends Era { - const Mortal78(this.value0); - - factory Mortal78._decode(_i1.Input input) { - return Mortal78(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal78': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal79 extends Era { - const Mortal79(this.value0); - - factory Mortal79._decode(_i1.Input input) { - return Mortal79(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal79': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal80 extends Era { - const Mortal80(this.value0); - - factory Mortal80._decode(_i1.Input input) { - return Mortal80(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal80': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal81 extends Era { - const Mortal81(this.value0); - - factory Mortal81._decode(_i1.Input input) { - return Mortal81(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal81': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal82 extends Era { - const Mortal82(this.value0); - - factory Mortal82._decode(_i1.Input input) { - return Mortal82(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal82': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal83 extends Era { - const Mortal83(this.value0); - - factory Mortal83._decode(_i1.Input input) { - return Mortal83(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal83': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal84 extends Era { - const Mortal84(this.value0); - - factory Mortal84._decode(_i1.Input input) { - return Mortal84(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal84': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal85 extends Era { - const Mortal85(this.value0); - - factory Mortal85._decode(_i1.Input input) { - return Mortal85(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal85': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal86 extends Era { - const Mortal86(this.value0); - - factory Mortal86._decode(_i1.Input input) { - return Mortal86(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal86': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal87 extends Era { - const Mortal87(this.value0); - - factory Mortal87._decode(_i1.Input input) { - return Mortal87(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal87': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal88 extends Era { - const Mortal88(this.value0); - - factory Mortal88._decode(_i1.Input input) { - return Mortal88(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal88': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal89 extends Era { - const Mortal89(this.value0); - - factory Mortal89._decode(_i1.Input input) { - return Mortal89(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal89': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal90 extends Era { - const Mortal90(this.value0); - - factory Mortal90._decode(_i1.Input input) { - return Mortal90(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal90': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal91 extends Era { - const Mortal91(this.value0); - - factory Mortal91._decode(_i1.Input input) { - return Mortal91(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal91': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal92 extends Era { - const Mortal92(this.value0); - - factory Mortal92._decode(_i1.Input input) { - return Mortal92(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal92': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal93 extends Era { - const Mortal93(this.value0); - - factory Mortal93._decode(_i1.Input input) { - return Mortal93(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal93': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal94 extends Era { - const Mortal94(this.value0); - - factory Mortal94._decode(_i1.Input input) { - return Mortal94(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal94': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal95 extends Era { - const Mortal95(this.value0); - - factory Mortal95._decode(_i1.Input input) { - return Mortal95(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal95': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal96 extends Era { - const Mortal96(this.value0); - - factory Mortal96._decode(_i1.Input input) { - return Mortal96(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal96': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal97 extends Era { - const Mortal97(this.value0); - - factory Mortal97._decode(_i1.Input input) { - return Mortal97(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal97': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal98 extends Era { - const Mortal98(this.value0); - - factory Mortal98._decode(_i1.Input input) { - return Mortal98(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal98': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal99 extends Era { - const Mortal99(this.value0); - - factory Mortal99._decode(_i1.Input input) { - return Mortal99(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal99': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal100 extends Era { - const Mortal100(this.value0); - - factory Mortal100._decode(_i1.Input input) { - return Mortal100(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal100': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal101 extends Era { - const Mortal101(this.value0); - - factory Mortal101._decode(_i1.Input input) { - return Mortal101(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal101': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal102 extends Era { - const Mortal102(this.value0); - - factory Mortal102._decode(_i1.Input input) { - return Mortal102(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal102': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal103 extends Era { - const Mortal103(this.value0); - - factory Mortal103._decode(_i1.Input input) { - return Mortal103(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal103': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal104 extends Era { - const Mortal104(this.value0); - - factory Mortal104._decode(_i1.Input input) { - return Mortal104(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal104': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal105 extends Era { - const Mortal105(this.value0); - - factory Mortal105._decode(_i1.Input input) { - return Mortal105(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal105': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal106 extends Era { - const Mortal106(this.value0); - - factory Mortal106._decode(_i1.Input input) { - return Mortal106(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal106': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal107 extends Era { - const Mortal107(this.value0); - - factory Mortal107._decode(_i1.Input input) { - return Mortal107(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal107': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal108 extends Era { - const Mortal108(this.value0); - - factory Mortal108._decode(_i1.Input input) { - return Mortal108(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal108': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal109 extends Era { - const Mortal109(this.value0); - - factory Mortal109._decode(_i1.Input input) { - return Mortal109(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal109': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal110 extends Era { - const Mortal110(this.value0); - - factory Mortal110._decode(_i1.Input input) { - return Mortal110(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal110': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal111 extends Era { - const Mortal111(this.value0); - - factory Mortal111._decode(_i1.Input input) { - return Mortal111(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal111': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal112 extends Era { - const Mortal112(this.value0); - - factory Mortal112._decode(_i1.Input input) { - return Mortal112(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal112': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal113 extends Era { - const Mortal113(this.value0); - - factory Mortal113._decode(_i1.Input input) { - return Mortal113(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal113': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal114 extends Era { - const Mortal114(this.value0); - - factory Mortal114._decode(_i1.Input input) { - return Mortal114(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal114': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal115 extends Era { - const Mortal115(this.value0); - - factory Mortal115._decode(_i1.Input input) { - return Mortal115(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal115': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal116 extends Era { - const Mortal116(this.value0); - - factory Mortal116._decode(_i1.Input input) { - return Mortal116(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal116': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal117 extends Era { - const Mortal117(this.value0); - - factory Mortal117._decode(_i1.Input input) { - return Mortal117(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal117': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal118 extends Era { - const Mortal118(this.value0); - - factory Mortal118._decode(_i1.Input input) { - return Mortal118(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal118': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal119 extends Era { - const Mortal119(this.value0); - - factory Mortal119._decode(_i1.Input input) { - return Mortal119(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal119': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal120 extends Era { - const Mortal120(this.value0); - - factory Mortal120._decode(_i1.Input input) { - return Mortal120(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal120': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal121 extends Era { - const Mortal121(this.value0); - - factory Mortal121._decode(_i1.Input input) { - return Mortal121(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal121': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal122 extends Era { - const Mortal122(this.value0); - - factory Mortal122._decode(_i1.Input input) { - return Mortal122(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal122': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal123 extends Era { - const Mortal123(this.value0); - - factory Mortal123._decode(_i1.Input input) { - return Mortal123(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal123': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal124 extends Era { - const Mortal124(this.value0); - - factory Mortal124._decode(_i1.Input input) { - return Mortal124(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal124': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal125 extends Era { - const Mortal125(this.value0); - - factory Mortal125._decode(_i1.Input input) { - return Mortal125(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal125': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal126 extends Era { - const Mortal126(this.value0); - - factory Mortal126._decode(_i1.Input input) { - return Mortal126(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal126': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal127 extends Era { - const Mortal127(this.value0); - - factory Mortal127._decode(_i1.Input input) { - return Mortal127(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal127': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal128 extends Era { - const Mortal128(this.value0); - - factory Mortal128._decode(_i1.Input input) { - return Mortal128(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal128': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal129 extends Era { - const Mortal129(this.value0); - - factory Mortal129._decode(_i1.Input input) { - return Mortal129(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal129': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal130 extends Era { - const Mortal130(this.value0); - - factory Mortal130._decode(_i1.Input input) { - return Mortal130(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal130': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal131 extends Era { - const Mortal131(this.value0); - - factory Mortal131._decode(_i1.Input input) { - return Mortal131(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal131': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal132 extends Era { - const Mortal132(this.value0); - - factory Mortal132._decode(_i1.Input input) { - return Mortal132(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal132': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal133 extends Era { - const Mortal133(this.value0); - - factory Mortal133._decode(_i1.Input input) { - return Mortal133(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal133': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal134 extends Era { - const Mortal134(this.value0); - - factory Mortal134._decode(_i1.Input input) { - return Mortal134(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal134': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal135 extends Era { - const Mortal135(this.value0); - - factory Mortal135._decode(_i1.Input input) { - return Mortal135(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal135': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal136 extends Era { - const Mortal136(this.value0); - - factory Mortal136._decode(_i1.Input input) { - return Mortal136(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal136': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal137 extends Era { - const Mortal137(this.value0); - - factory Mortal137._decode(_i1.Input input) { - return Mortal137(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal137': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal138 extends Era { - const Mortal138(this.value0); - - factory Mortal138._decode(_i1.Input input) { - return Mortal138(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal138': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal139 extends Era { - const Mortal139(this.value0); - - factory Mortal139._decode(_i1.Input input) { - return Mortal139(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal139': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal140 extends Era { - const Mortal140(this.value0); - - factory Mortal140._decode(_i1.Input input) { - return Mortal140(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal140': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal141 extends Era { - const Mortal141(this.value0); - - factory Mortal141._decode(_i1.Input input) { - return Mortal141(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal141': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal142 extends Era { - const Mortal142(this.value0); - - factory Mortal142._decode(_i1.Input input) { - return Mortal142(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal142': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal143 extends Era { - const Mortal143(this.value0); - - factory Mortal143._decode(_i1.Input input) { - return Mortal143(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal143': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal144 extends Era { - const Mortal144(this.value0); - - factory Mortal144._decode(_i1.Input input) { - return Mortal144(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal144': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal145 extends Era { - const Mortal145(this.value0); - - factory Mortal145._decode(_i1.Input input) { - return Mortal145(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal145': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal146 extends Era { - const Mortal146(this.value0); - - factory Mortal146._decode(_i1.Input input) { - return Mortal146(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal146': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal147 extends Era { - const Mortal147(this.value0); - - factory Mortal147._decode(_i1.Input input) { - return Mortal147(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal147': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal148 extends Era { - const Mortal148(this.value0); - - factory Mortal148._decode(_i1.Input input) { - return Mortal148(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal148': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal149 extends Era { - const Mortal149(this.value0); - - factory Mortal149._decode(_i1.Input input) { - return Mortal149(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal149': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal150 extends Era { - const Mortal150(this.value0); - - factory Mortal150._decode(_i1.Input input) { - return Mortal150(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal150': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal151 extends Era { - const Mortal151(this.value0); - - factory Mortal151._decode(_i1.Input input) { - return Mortal151(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal151': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal152 extends Era { - const Mortal152(this.value0); - - factory Mortal152._decode(_i1.Input input) { - return Mortal152(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal152': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal153 extends Era { - const Mortal153(this.value0); - - factory Mortal153._decode(_i1.Input input) { - return Mortal153(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal153': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal154 extends Era { - const Mortal154(this.value0); - - factory Mortal154._decode(_i1.Input input) { - return Mortal154(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal154': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal155 extends Era { - const Mortal155(this.value0); - - factory Mortal155._decode(_i1.Input input) { - return Mortal155(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal155': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal156 extends Era { - const Mortal156(this.value0); - - factory Mortal156._decode(_i1.Input input) { - return Mortal156(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal156': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal157 extends Era { - const Mortal157(this.value0); - - factory Mortal157._decode(_i1.Input input) { - return Mortal157(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal157': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal158 extends Era { - const Mortal158(this.value0); - - factory Mortal158._decode(_i1.Input input) { - return Mortal158(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal158': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal159 extends Era { - const Mortal159(this.value0); - - factory Mortal159._decode(_i1.Input input) { - return Mortal159(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal159': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal160 extends Era { - const Mortal160(this.value0); - - factory Mortal160._decode(_i1.Input input) { - return Mortal160(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal160': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal161 extends Era { - const Mortal161(this.value0); - - factory Mortal161._decode(_i1.Input input) { - return Mortal161(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal161': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal162 extends Era { - const Mortal162(this.value0); - - factory Mortal162._decode(_i1.Input input) { - return Mortal162(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal162': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal163 extends Era { - const Mortal163(this.value0); - - factory Mortal163._decode(_i1.Input input) { - return Mortal163(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal163': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal164 extends Era { - const Mortal164(this.value0); - - factory Mortal164._decode(_i1.Input input) { - return Mortal164(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal164': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal165 extends Era { - const Mortal165(this.value0); - - factory Mortal165._decode(_i1.Input input) { - return Mortal165(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal165': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal166 extends Era { - const Mortal166(this.value0); - - factory Mortal166._decode(_i1.Input input) { - return Mortal166(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal166': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal167 extends Era { - const Mortal167(this.value0); - - factory Mortal167._decode(_i1.Input input) { - return Mortal167(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal167': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal168 extends Era { - const Mortal168(this.value0); - - factory Mortal168._decode(_i1.Input input) { - return Mortal168(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal168': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal169 extends Era { - const Mortal169(this.value0); - - factory Mortal169._decode(_i1.Input input) { - return Mortal169(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal169': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal170 extends Era { - const Mortal170(this.value0); - - factory Mortal170._decode(_i1.Input input) { - return Mortal170(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal170': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal171 extends Era { - const Mortal171(this.value0); - - factory Mortal171._decode(_i1.Input input) { - return Mortal171(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal171': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal172 extends Era { - const Mortal172(this.value0); - - factory Mortal172._decode(_i1.Input input) { - return Mortal172(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal172': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal173 extends Era { - const Mortal173(this.value0); - - factory Mortal173._decode(_i1.Input input) { - return Mortal173(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal173': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal174 extends Era { - const Mortal174(this.value0); - - factory Mortal174._decode(_i1.Input input) { - return Mortal174(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal174': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal175 extends Era { - const Mortal175(this.value0); - - factory Mortal175._decode(_i1.Input input) { - return Mortal175(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal175': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal176 extends Era { - const Mortal176(this.value0); - - factory Mortal176._decode(_i1.Input input) { - return Mortal176(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal176': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal177 extends Era { - const Mortal177(this.value0); - - factory Mortal177._decode(_i1.Input input) { - return Mortal177(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal177': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal178 extends Era { - const Mortal178(this.value0); - - factory Mortal178._decode(_i1.Input input) { - return Mortal178(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal178': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal179 extends Era { - const Mortal179(this.value0); - - factory Mortal179._decode(_i1.Input input) { - return Mortal179(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal179': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal180 extends Era { - const Mortal180(this.value0); - - factory Mortal180._decode(_i1.Input input) { - return Mortal180(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal180': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal181 extends Era { - const Mortal181(this.value0); - - factory Mortal181._decode(_i1.Input input) { - return Mortal181(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal181': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal182 extends Era { - const Mortal182(this.value0); - - factory Mortal182._decode(_i1.Input input) { - return Mortal182(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal182': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal183 extends Era { - const Mortal183(this.value0); - - factory Mortal183._decode(_i1.Input input) { - return Mortal183(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal183': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal184 extends Era { - const Mortal184(this.value0); - - factory Mortal184._decode(_i1.Input input) { - return Mortal184(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal184': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal185 extends Era { - const Mortal185(this.value0); - - factory Mortal185._decode(_i1.Input input) { - return Mortal185(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal185': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal186 extends Era { - const Mortal186(this.value0); - - factory Mortal186._decode(_i1.Input input) { - return Mortal186(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal186': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal187 extends Era { - const Mortal187(this.value0); - - factory Mortal187._decode(_i1.Input input) { - return Mortal187(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal187': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal188 extends Era { - const Mortal188(this.value0); - - factory Mortal188._decode(_i1.Input input) { - return Mortal188(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal188': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal189 extends Era { - const Mortal189(this.value0); - - factory Mortal189._decode(_i1.Input input) { - return Mortal189(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal189': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal190 extends Era { - const Mortal190(this.value0); - - factory Mortal190._decode(_i1.Input input) { - return Mortal190(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal190': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal191 extends Era { - const Mortal191(this.value0); - - factory Mortal191._decode(_i1.Input input) { - return Mortal191(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal191': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal192 extends Era { - const Mortal192(this.value0); - - factory Mortal192._decode(_i1.Input input) { - return Mortal192(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal192': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal193 extends Era { - const Mortal193(this.value0); - - factory Mortal193._decode(_i1.Input input) { - return Mortal193(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal193': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal194 extends Era { - const Mortal194(this.value0); - - factory Mortal194._decode(_i1.Input input) { - return Mortal194(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal194': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal195 extends Era { - const Mortal195(this.value0); - - factory Mortal195._decode(_i1.Input input) { - return Mortal195(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal195': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal196 extends Era { - const Mortal196(this.value0); - - factory Mortal196._decode(_i1.Input input) { - return Mortal196(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal196': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal197 extends Era { - const Mortal197(this.value0); - - factory Mortal197._decode(_i1.Input input) { - return Mortal197(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal197': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal198 extends Era { - const Mortal198(this.value0); - - factory Mortal198._decode(_i1.Input input) { - return Mortal198(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal198': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal199 extends Era { - const Mortal199(this.value0); - - factory Mortal199._decode(_i1.Input input) { - return Mortal199(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal199': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal200 extends Era { - const Mortal200(this.value0); - - factory Mortal200._decode(_i1.Input input) { - return Mortal200(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal200': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal201 extends Era { - const Mortal201(this.value0); - - factory Mortal201._decode(_i1.Input input) { - return Mortal201(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal201': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal202 extends Era { - const Mortal202(this.value0); - - factory Mortal202._decode(_i1.Input input) { - return Mortal202(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal202': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal203 extends Era { - const Mortal203(this.value0); - - factory Mortal203._decode(_i1.Input input) { - return Mortal203(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal203': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal204 extends Era { - const Mortal204(this.value0); - - factory Mortal204._decode(_i1.Input input) { - return Mortal204(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal204': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal205 extends Era { - const Mortal205(this.value0); - - factory Mortal205._decode(_i1.Input input) { - return Mortal205(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal205': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal206 extends Era { - const Mortal206(this.value0); - - factory Mortal206._decode(_i1.Input input) { - return Mortal206(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal206': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal207 extends Era { - const Mortal207(this.value0); - - factory Mortal207._decode(_i1.Input input) { - return Mortal207(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal207': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal208 extends Era { - const Mortal208(this.value0); - - factory Mortal208._decode(_i1.Input input) { - return Mortal208(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal208': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal209 extends Era { - const Mortal209(this.value0); - - factory Mortal209._decode(_i1.Input input) { - return Mortal209(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal209': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal210 extends Era { - const Mortal210(this.value0); - - factory Mortal210._decode(_i1.Input input) { - return Mortal210(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal210': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal211 extends Era { - const Mortal211(this.value0); - - factory Mortal211._decode(_i1.Input input) { - return Mortal211(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal211': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal212 extends Era { - const Mortal212(this.value0); - - factory Mortal212._decode(_i1.Input input) { - return Mortal212(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal212': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal213 extends Era { - const Mortal213(this.value0); - - factory Mortal213._decode(_i1.Input input) { - return Mortal213(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal213': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal214 extends Era { - const Mortal214(this.value0); - - factory Mortal214._decode(_i1.Input input) { - return Mortal214(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal214': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal215 extends Era { - const Mortal215(this.value0); - - factory Mortal215._decode(_i1.Input input) { - return Mortal215(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal215': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal216 extends Era { - const Mortal216(this.value0); - - factory Mortal216._decode(_i1.Input input) { - return Mortal216(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal216': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal217 extends Era { - const Mortal217(this.value0); - - factory Mortal217._decode(_i1.Input input) { - return Mortal217(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal217': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal218 extends Era { - const Mortal218(this.value0); - - factory Mortal218._decode(_i1.Input input) { - return Mortal218(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal218': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal219 extends Era { - const Mortal219(this.value0); - - factory Mortal219._decode(_i1.Input input) { - return Mortal219(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal219': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal220 extends Era { - const Mortal220(this.value0); - - factory Mortal220._decode(_i1.Input input) { - return Mortal220(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal220': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal221 extends Era { - const Mortal221(this.value0); - - factory Mortal221._decode(_i1.Input input) { - return Mortal221(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal221': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal222 extends Era { - const Mortal222(this.value0); - - factory Mortal222._decode(_i1.Input input) { - return Mortal222(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal222': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal223 extends Era { - const Mortal223(this.value0); - - factory Mortal223._decode(_i1.Input input) { - return Mortal223(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal223': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal224 extends Era { - const Mortal224(this.value0); - - factory Mortal224._decode(_i1.Input input) { - return Mortal224(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal224': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal225 extends Era { - const Mortal225(this.value0); - - factory Mortal225._decode(_i1.Input input) { - return Mortal225(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal225': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal226 extends Era { - const Mortal226(this.value0); - - factory Mortal226._decode(_i1.Input input) { - return Mortal226(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal226': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal227 extends Era { - const Mortal227(this.value0); - - factory Mortal227._decode(_i1.Input input) { - return Mortal227(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal227': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal228 extends Era { - const Mortal228(this.value0); - - factory Mortal228._decode(_i1.Input input) { - return Mortal228(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal228': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal229 extends Era { - const Mortal229(this.value0); - - factory Mortal229._decode(_i1.Input input) { - return Mortal229(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal229': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal230 extends Era { - const Mortal230(this.value0); - - factory Mortal230._decode(_i1.Input input) { - return Mortal230(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal230': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal231 extends Era { - const Mortal231(this.value0); - - factory Mortal231._decode(_i1.Input input) { - return Mortal231(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal231': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal232 extends Era { - const Mortal232(this.value0); - - factory Mortal232._decode(_i1.Input input) { - return Mortal232(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal232': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal233 extends Era { - const Mortal233(this.value0); - - factory Mortal233._decode(_i1.Input input) { - return Mortal233(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal233': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal234 extends Era { - const Mortal234(this.value0); - - factory Mortal234._decode(_i1.Input input) { - return Mortal234(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal234': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal235 extends Era { - const Mortal235(this.value0); - - factory Mortal235._decode(_i1.Input input) { - return Mortal235(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal235': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal236 extends Era { - const Mortal236(this.value0); - - factory Mortal236._decode(_i1.Input input) { - return Mortal236(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal236': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal237 extends Era { - const Mortal237(this.value0); - - factory Mortal237._decode(_i1.Input input) { - return Mortal237(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal237': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal238 extends Era { - const Mortal238(this.value0); - - factory Mortal238._decode(_i1.Input input) { - return Mortal238(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal238': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal239 extends Era { - const Mortal239(this.value0); - - factory Mortal239._decode(_i1.Input input) { - return Mortal239(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal239': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal240 extends Era { - const Mortal240(this.value0); - - factory Mortal240._decode(_i1.Input input) { - return Mortal240(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal240': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal241 extends Era { - const Mortal241(this.value0); - - factory Mortal241._decode(_i1.Input input) { - return Mortal241(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal241': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal242 extends Era { - const Mortal242(this.value0); - - factory Mortal242._decode(_i1.Input input) { - return Mortal242(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal242': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal243 extends Era { - const Mortal243(this.value0); - - factory Mortal243._decode(_i1.Input input) { - return Mortal243(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal243': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal244 extends Era { - const Mortal244(this.value0); - - factory Mortal244._decode(_i1.Input input) { - return Mortal244(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal244': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal245 extends Era { - const Mortal245(this.value0); - - factory Mortal245._decode(_i1.Input input) { - return Mortal245(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal245': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal246 extends Era { - const Mortal246(this.value0); - - factory Mortal246._decode(_i1.Input input) { - return Mortal246(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal246': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal247 extends Era { - const Mortal247(this.value0); - - factory Mortal247._decode(_i1.Input input) { - return Mortal247(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal247': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal248 extends Era { - const Mortal248(this.value0); - - factory Mortal248._decode(_i1.Input input) { - return Mortal248(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal248': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal249 extends Era { - const Mortal249(this.value0); - - factory Mortal249._decode(_i1.Input input) { - return Mortal249(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal249': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal250 extends Era { - const Mortal250(this.value0); - - factory Mortal250._decode(_i1.Input input) { - return Mortal250(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal250': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal251 extends Era { - const Mortal251(this.value0); - - factory Mortal251._decode(_i1.Input input) { - return Mortal251(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal251': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal252 extends Era { - const Mortal252(this.value0); - - factory Mortal252._decode(_i1.Input input) { - return Mortal252(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal252': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal253 extends Era { - const Mortal253(this.value0); - - factory Mortal253._decode(_i1.Input input) { - return Mortal253(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal253': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal254 extends Era { - const Mortal254(this.value0); - - factory Mortal254._decode(_i1.Input input) { - return Mortal254(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal254': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Mortal255 extends Era { - const Mortal255(this.value0); - - factory Mortal255._decode(_i1.Input input) { - return Mortal255(_i1.U8Codec.codec.decode(input)); - } - - final int value0; - - @override - Map toJson() => {'Mortal255': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8Codec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart b/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart deleted file mode 100644 index 23205b0a..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart +++ /dev/null @@ -1,23 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -typedef UncheckedExtrinsic = List; - -class UncheckedExtrinsicCodec with _i1.Codec { - const UncheckedExtrinsicCodec(); - - @override - UncheckedExtrinsic decode(_i1.Input input) { - return _i1.U8SequenceCodec.codec.decode(input); - } - - @override - void encodeTo(UncheckedExtrinsic value, _i1.Output output) { - _i1.U8SequenceCodec.codec.encodeTo(value, output); - } - - @override - int sizeHint(UncheckedExtrinsic value) { - return _i1.U8SequenceCodec.codec.sizeHint(value); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_runtime/module_error.dart b/quantus_sdk/lib/generated/resonance/types/sp_runtime/module_error.dart deleted file mode 100644 index d1980872..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_runtime/module_error.dart +++ /dev/null @@ -1,57 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -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}); - - factory ModuleError.decode(_i1.Input input) { - return codec.decode(input); - } - - /// u8 - final int index; - - /// [u8; MAX_MODULE_ERROR_ENCODED_SIZE] - final List error; - - static const $ModuleErrorCodec codec = $ModuleErrorCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - 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); - - @override - 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); - } - - @override - ModuleError decode(_i1.Input input) { - return ModuleError(index: _i1.U8Codec.codec.decode(input), error: const _i1.U8ArrayCodec(4).decode(input)); - } - - @override - int sizeHint(ModuleError obj) { - int size = 0; - size = size + _i1.U8Codec.codec.sizeHint(obj.index); - size = size + const _i1.U8ArrayCodec(4).sizeHint(obj.error); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_runtime/multiaddress/multi_address.dart b/quantus_sdk/lib/generated/resonance/types/sp_runtime/multiaddress/multi_address.dart deleted file mode 100644 index 0466c0f0..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_runtime/multiaddress/multi_address.dart +++ /dev/null @@ -1,276 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i4; - -import '../../sp_core/crypto/account_id32.dart' as _i3; - -abstract class MultiAddress { - const MultiAddress(); - - factory MultiAddress.decode(_i1.Input input) { - return codec.decode(input); - } - - static const $MultiAddressCodec codec = $MultiAddressCodec(); - - static const $MultiAddress values = $MultiAddress(); - - _i2.Uint8List encode() { - final output = _i1.ByteOutput(codec.sizeHint(this)); - codec.encodeTo(this, output); - return output.toBytes(); - } - - int sizeHint() { - return codec.sizeHint(this); - } - - Map toJson(); -} - -class $MultiAddress { - const $MultiAddress(); - - Id id(_i3.AccountId32 value0) { - return Id(value0); - } - - Index index(BigInt value0) { - return Index(value0); - } - - Raw raw(List value0) { - return Raw(value0); - } - - Address32 address32(List value0) { - return Address32(value0); - } - - Address20 address20(List value0) { - return Address20(value0); - } -} - -class $MultiAddressCodec with _i1.Codec { - const $MultiAddressCodec(); - - @override - MultiAddress decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Id._decode(input); - case 1: - return Index._decode(input); - case 2: - return Raw._decode(input); - case 3: - return Address32._decode(input); - case 4: - return Address20._decode(input); - default: - throw Exception('MultiAddress: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(MultiAddress value, _i1.Output output) { - switch (value.runtimeType) { - case Id: - (value as Id).encodeTo(output); - break; - case Index: - (value as Index).encodeTo(output); - break; - case Raw: - (value as Raw).encodeTo(output); - break; - case Address32: - (value as Address32).encodeTo(output); - break; - case Address20: - (value as Address20).encodeTo(output); - break; - default: - throw Exception('MultiAddress: Unsupported "$value" of type "${value.runtimeType}"'); - } - } - - @override - int sizeHint(MultiAddress value) { - switch (value.runtimeType) { - case Id: - return (value as Id)._sizeHint(); - case Index: - return (value as Index)._sizeHint(); - case Raw: - return (value as Raw)._sizeHint(); - case Address32: - return (value as Address32)._sizeHint(); - case Address20: - return (value as Address20)._sizeHint(); - default: - throw Exception('MultiAddress: Unsupported "$value" of type "${value.runtimeType}"'); - } - } -} - -class Id extends MultiAddress { - const Id(this.value0); - - factory Id._decode(_i1.Input input) { - return Id(const _i1.U8ArrayCodec(32).decode(input)); - } - - /// AccountId - final _i3.AccountId32 value0; - - @override - Map> toJson() => {'Id': value0.toList()}; - - int _sizeHint() { - int size = 1; - size = size + const _i3.AccountId32Codec().sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => value0.hashCode; -} - -class Index extends MultiAddress { - const Index(this.value0); - - factory Index._decode(_i1.Input input) { - return Index(_i1.CompactBigIntCodec.codec.decode(input)); - } - - /// AccountIndex - final BigInt value0; - - @override - Map toJson() => {'Index': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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; - - @override - int get hashCode => value0.hashCode; -} - -class Raw extends MultiAddress { - const Raw(this.value0); - - factory Raw._decode(_i1.Input input) { - return Raw(_i1.U8SequenceCodec.codec.decode(input)); - } - - /// Vec - final List value0; - - @override - Map> toJson() => {'Raw': value0}; - - int _sizeHint() { - int size = 1; - size = size + _i1.U8SequenceCodec.codec.sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => value0.hashCode; -} - -class Address32 extends MultiAddress { - const Address32(this.value0); - - factory Address32._decode(_i1.Input input) { - return Address32(const _i1.U8ArrayCodec(32).decode(input)); - } - - /// [u8; 32] - final List value0; - - @override - Map> toJson() => {'Address32': value0.toList()}; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(32).sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => value0.hashCode; -} - -class Address20 extends MultiAddress { - const Address20(this.value0); - - factory Address20._decode(_i1.Input input) { - return Address20(const _i1.U8ArrayCodec(20).decode(input)); - } - - /// [u8; 20] - final List value0; - - @override - Map> toJson() => {'Address20': value0.toList()}; - - int _sizeHint() { - int size = 1; - size = size + const _i1.U8ArrayCodec(20).sizeHint(value0); - return size; - } - - void encodeTo(_i1.Output 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); - - @override - int get hashCode => value0.hashCode; -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_runtime/proving_trie/trie_error.dart b/quantus_sdk/lib/generated/resonance/types/sp_runtime/proving_trie/trie_error.dart deleted file mode 100644 index 5beb544b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_runtime/proving_trie/trie_error.dart +++ /dev/null @@ -1,84 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum TrieError { - invalidStateRoot('InvalidStateRoot', 0), - incompleteDatabase('IncompleteDatabase', 1), - valueAtIncompleteKey('ValueAtIncompleteKey', 2), - decoderError('DecoderError', 3), - invalidHash('InvalidHash', 4), - duplicateKey('DuplicateKey', 5), - extraneousNode('ExtraneousNode', 6), - extraneousValue('ExtraneousValue', 7), - extraneousHashReference('ExtraneousHashReference', 8), - invalidChildReference('InvalidChildReference', 9), - valueMismatch('ValueMismatch', 10), - incompleteProof('IncompleteProof', 11), - rootMismatch('RootMismatch', 12), - decodeError('DecodeError', 13); - - const TrieError(this.variantName, this.codecIndex); - - factory TrieError.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $TrieErrorCodec codec = $TrieErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $TrieErrorCodec with _i1.Codec { - const $TrieErrorCodec(); - - @override - TrieError decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return TrieError.invalidStateRoot; - case 1: - return TrieError.incompleteDatabase; - case 2: - return TrieError.valueAtIncompleteKey; - case 3: - return TrieError.decoderError; - case 4: - return TrieError.invalidHash; - case 5: - return TrieError.duplicateKey; - case 6: - return TrieError.extraneousNode; - case 7: - return TrieError.extraneousValue; - case 8: - return TrieError.extraneousHashReference; - case 9: - return TrieError.invalidChildReference; - case 10: - return TrieError.valueMismatch; - case 11: - return TrieError.incompleteProof; - case 12: - return TrieError.rootMismatch; - case 13: - return TrieError.decodeError; - default: - throw Exception('TrieError: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(TrieError value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_runtime/token_error.dart b/quantus_sdk/lib/generated/resonance/types/sp_runtime/token_error.dart deleted file mode 100644 index c16f0c25..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_runtime/token_error.dart +++ /dev/null @@ -1,72 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum TokenError { - fundsUnavailable('FundsUnavailable', 0), - onlyProvider('OnlyProvider', 1), - belowMinimum('BelowMinimum', 2), - cannotCreate('CannotCreate', 3), - unknownAsset('UnknownAsset', 4), - frozen('Frozen', 5), - unsupported('Unsupported', 6), - cannotCreateHold('CannotCreateHold', 7), - notExpendable('NotExpendable', 8), - blocked('Blocked', 9); - - const TokenError(this.variantName, this.codecIndex); - - factory TokenError.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $TokenErrorCodec codec = $TokenErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $TokenErrorCodec with _i1.Codec { - const $TokenErrorCodec(); - - @override - TokenError decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return TokenError.fundsUnavailable; - case 1: - return TokenError.onlyProvider; - case 2: - return TokenError.belowMinimum; - case 3: - return TokenError.cannotCreate; - case 4: - return TokenError.unknownAsset; - case 5: - return TokenError.frozen; - case 6: - return TokenError.unsupported; - case 7: - return TokenError.cannotCreateHold; - case 8: - return TokenError.notExpendable; - case 9: - return TokenError.blocked; - default: - throw Exception('TokenError: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(TokenError value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_runtime/transactional_error.dart b/quantus_sdk/lib/generated/resonance/types/sp_runtime/transactional_error.dart deleted file mode 100644 index 9a3a7f7f..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_runtime/transactional_error.dart +++ /dev/null @@ -1,48 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -enum TransactionalError { - limitReached('LimitReached', 0), - noLayer('NoLayer', 1); - - const TransactionalError(this.variantName, this.codecIndex); - - factory TransactionalError.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $TransactionalErrorCodec codec = $TransactionalErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $TransactionalErrorCodec with _i1.Codec { - const $TransactionalErrorCodec(); - - @override - TransactionalError decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return TransactionalError.limitReached; - case 1: - return TransactionalError.noLayer; - default: - throw Exception('TransactionalError: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(TransactionalError value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_version/runtime_version.dart b/quantus_sdk/lib/generated/resonance/types/sp_version/runtime_version.dart deleted file mode 100644 index 9d10f100..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_version/runtime_version.dart +++ /dev/null @@ -1,140 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i4; - -import 'package:polkadart/scale_codec.dart' as _i1; -import 'package:quiver/collection.dart' as _i5; - -import '../cow_1.dart' as _i2; -import '../cow_2.dart' as _i3; -import '../tuples.dart' as _i6; - -class RuntimeVersion { - const RuntimeVersion({ - required this.specName, - required this.implName, - required this.authoringVersion, - required this.specVersion, - required this.implVersion, - required this.apis, - required this.transactionVersion, - required this.systemVersion, - }); - - factory RuntimeVersion.decode(_i1.Input input) { - return codec.decode(input); - } - - /// Cow<'static, str> - final _i2.Cow specName; - - /// Cow<'static, str> - final _i2.Cow implName; - - /// u32 - final int authoringVersion; - - /// u32 - final int specVersion; - - /// u32 - final int implVersion; - - /// ApisVec - final _i3.Cow apis; - - /// u32 - final int transactionVersion; - - /// u8 - final int systemVersion; - - static const $RuntimeVersionCodec codec = $RuntimeVersionCodec(); - - _i4.Uint8List encode() { - return codec.encode(this); - } - - 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, - }; - - @override - bool operator ==(Object 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) && - other.transactionVersion == transactionVersion && - other.systemVersion == systemVersion; - - @override - int get hashCode => Object.hash( - 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); - 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); - } - - @override - RuntimeVersion decode(_i1.Input input) { - return RuntimeVersion( - specName: _i1.StrCodec.codec.decode(input), - implName: _i1.StrCodec.codec.decode(input), - authoringVersion: _i1.U32Codec.codec.decode(input), - 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), - transactionVersion: _i1.U32Codec.codec.decode(input), - systemVersion: _i1.U8Codec.codec.decode(input), - ); - } - - @override - int sizeHint(RuntimeVersion obj) { - int size = 0; - size = size + const _i2.CowCodec().sizeHint(obj.specName); - size = size + const _i2.CowCodec().sizeHint(obj.implName); - size = size + _i1.U32Codec.codec.sizeHint(obj.authoringVersion); - size = size + _i1.U32Codec.codec.sizeHint(obj.specVersion); - size = size + _i1.U32Codec.codec.sizeHint(obj.implVersion); - size = size + const _i3.CowCodec().sizeHint(obj.apis); - size = size + _i1.U32Codec.codec.sizeHint(obj.transactionVersion); - size = size + _i1.U8Codec.codec.sizeHint(obj.systemVersion); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_weights/runtime_db_weight.dart b/quantus_sdk/lib/generated/resonance/types/sp_weights/runtime_db_weight.dart deleted file mode 100644 index aac5361b..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_weights/runtime_db_weight.dart +++ /dev/null @@ -1,56 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -class RuntimeDbWeight { - const RuntimeDbWeight({required this.read, required this.write}); - - factory RuntimeDbWeight.decode(_i1.Input input) { - return codec.decode(input); - } - - /// u64 - final BigInt read; - - /// u64 - final BigInt write; - - static const $RuntimeDbWeightCodec codec = $RuntimeDbWeightCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'read': read, 'write': write}; - - @override - bool operator ==(Object other) => - identical(this, other) || other is RuntimeDbWeight && other.read == read && other.write == write; - - @override - 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); - } - - @override - RuntimeDbWeight decode(_i1.Input input) { - return RuntimeDbWeight(read: _i1.U64Codec.codec.decode(input), write: _i1.U64Codec.codec.decode(input)); - } - - @override - int sizeHint(RuntimeDbWeight obj) { - int size = 0; - size = size + _i1.U64Codec.codec.sizeHint(obj.read); - size = size + _i1.U64Codec.codec.sizeHint(obj.write); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/sp_weights/weight_v2/weight.dart b/quantus_sdk/lib/generated/resonance/types/sp_weights/weight_v2/weight.dart deleted file mode 100644 index 8d9a8883..00000000 --- a/quantus_sdk/lib/generated/resonance/types/sp_weights/weight_v2/weight.dart +++ /dev/null @@ -1,59 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -class Weight { - const Weight({required this.refTime, required this.proofSize}); - - factory Weight.decode(_i1.Input input) { - return codec.decode(input); - } - - /// u64 - final BigInt refTime; - - /// u64 - final BigInt proofSize; - - static const $WeightCodec codec = $WeightCodec(); - - _i2.Uint8List encode() { - return codec.encode(this); - } - - Map toJson() => {'refTime': refTime, 'proofSize': proofSize}; - - @override - bool operator ==(Object other) => - identical(this, other) || other is Weight && other.refTime == refTime && other.proofSize == proofSize; - - @override - 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); - } - - @override - Weight decode(_i1.Input input) { - return Weight( - refTime: _i1.CompactBigIntCodec.codec.decode(input), - proofSize: _i1.CompactBigIntCodec.codec.decode(input), - ); - } - - @override - int sizeHint(Weight obj) { - int size = 0; - size = size + _i1.CompactBigIntCodec.codec.sizeHint(obj.refTime); - size = size + _i1.CompactBigIntCodec.codec.sizeHint(obj.proofSize); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/tuples.dart b/quantus_sdk/lib/generated/resonance/types/tuples.dart deleted file mode 100644 index 2f309fdb..00000000 --- a/quantus_sdk/lib/generated/resonance/types/tuples.dart +++ /dev/null @@ -1,37 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -class Tuple2 { - const Tuple2(this.value0, this.value1); - - final T0 value0; - - final T1 value1; -} - -class Tuple2Codec with _i1.Codec> { - const Tuple2Codec(this.codec0, this.codec1); - - final _i1.Codec codec0; - - final _i1.Codec codec1; - - @override - 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)); - } - - @override - int sizeHint(Tuple2 tuple) { - int size = 0; - size += codec0.sizeHint(tuple.value0); - size += codec1.sizeHint(tuple.value1); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/tuples_1.dart b/quantus_sdk/lib/generated/resonance/types/tuples_1.dart deleted file mode 100644 index 2f309fdb..00000000 --- a/quantus_sdk/lib/generated/resonance/types/tuples_1.dart +++ /dev/null @@ -1,37 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -class Tuple2 { - const Tuple2(this.value0, this.value1); - - final T0 value0; - - final T1 value1; -} - -class Tuple2Codec with _i1.Codec> { - const Tuple2Codec(this.codec0, this.codec1); - - final _i1.Codec codec0; - - final _i1.Codec codec1; - - @override - 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)); - } - - @override - int sizeHint(Tuple2 tuple) { - int size = 0; - size += codec0.sizeHint(tuple.value0); - size += codec1.sizeHint(tuple.value1); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/tuples_2.dart b/quantus_sdk/lib/generated/resonance/types/tuples_2.dart deleted file mode 100644 index 9610a384..00000000 --- a/quantus_sdk/lib/generated/resonance/types/tuples_2.dart +++ /dev/null @@ -1,49 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -class Tuple4 { - const Tuple4(this.value0, this.value1, this.value2, this.value3); - - final T0 value0; - - final T1 value1; - - final T2 value2; - - final T3 value3; -} - -class Tuple4Codec with _i1.Codec> { - const Tuple4Codec(this.codec0, this.codec1, this.codec2, this.codec3); - - final _i1.Codec codec0; - - final _i1.Codec codec1; - - final _i1.Codec codec2; - - final _i1.Codec codec3; - - @override - void encodeTo(Tuple4 tuple, _i1.Output output) { - codec0.encodeTo(tuple.value0, output); - codec1.encodeTo(tuple.value1, output); - codec2.encodeTo(tuple.value2, output); - codec3.encodeTo(tuple.value3, output); - } - - @override - Tuple4 decode(_i1.Input input) { - return Tuple4(codec0.decode(input), codec1.decode(input), codec2.decode(input), codec3.decode(input)); - } - - @override - int sizeHint(Tuple4 tuple) { - int size = 0; - size += codec0.sizeHint(tuple.value0); - size += codec1.sizeHint(tuple.value1); - size += codec2.sizeHint(tuple.value2); - size += codec3.sizeHint(tuple.value3); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/tuples_3.dart b/quantus_sdk/lib/generated/resonance/types/tuples_3.dart deleted file mode 100644 index aa48d3ff..00000000 --- a/quantus_sdk/lib/generated/resonance/types/tuples_3.dart +++ /dev/null @@ -1,43 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -class Tuple3 { - const Tuple3(this.value0, this.value1, this.value2); - - final T0 value0; - - final T1 value1; - - final T2 value2; -} - -class Tuple3Codec with _i1.Codec> { - const Tuple3Codec(this.codec0, this.codec1, this.codec2); - - final _i1.Codec codec0; - - final _i1.Codec codec1; - - final _i1.Codec codec2; - - @override - void encodeTo(Tuple3 tuple, _i1.Output output) { - codec0.encodeTo(tuple.value0, output); - codec1.encodeTo(tuple.value1, output); - codec2.encodeTo(tuple.value2, output); - } - - @override - Tuple3 decode(_i1.Input input) { - return Tuple3(codec0.decode(input), codec1.decode(input), codec2.decode(input)); - } - - @override - int sizeHint(Tuple3 tuple) { - int size = 0; - size += codec0.sizeHint(tuple.value0); - size += codec1.sizeHint(tuple.value1); - size += codec2.sizeHint(tuple.value2); - return size; - } -} diff --git a/quantus_sdk/lib/generated/resonance/types/tuples_4.dart b/quantus_sdk/lib/generated/resonance/types/tuples_4.dart deleted file mode 100644 index 9f5250f5..00000000 --- a/quantus_sdk/lib/generated/resonance/types/tuples_4.dart +++ /dev/null @@ -1,119 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:polkadart/scale_codec.dart' as _i1; - -class Tuple10 { - const Tuple10( - this.value0, - this.value1, - this.value2, - this.value3, - this.value4, - this.value5, - this.value6, - this.value7, - this.value8, - this.value9, - ); - - final T0 value0; - - final T1 value1; - - final T2 value2; - - final T3 value3; - - final T4 value4; - - final T5 value5; - - final T6 value6; - - final T7 value7; - - final T8 value8; - - final T9 value9; -} - -class Tuple10Codec - with _i1.Codec> { - const Tuple10Codec( - this.codec0, - this.codec1, - this.codec2, - this.codec3, - this.codec4, - this.codec5, - this.codec6, - this.codec7, - this.codec8, - this.codec9, - ); - - final _i1.Codec codec0; - - final _i1.Codec codec1; - - final _i1.Codec codec2; - - final _i1.Codec codec3; - - final _i1.Codec codec4; - - final _i1.Codec codec5; - - final _i1.Codec codec6; - - final _i1.Codec codec7; - - final _i1.Codec codec8; - - final _i1.Codec codec9; - - @override - void encodeTo(Tuple10 tuple, _i1.Output output) { - codec0.encodeTo(tuple.value0, output); - codec1.encodeTo(tuple.value1, output); - codec2.encodeTo(tuple.value2, output); - codec3.encodeTo(tuple.value3, output); - codec4.encodeTo(tuple.value4, output); - codec5.encodeTo(tuple.value5, output); - codec6.encodeTo(tuple.value6, output); - codec7.encodeTo(tuple.value7, output); - codec8.encodeTo(tuple.value8, output); - codec9.encodeTo(tuple.value9, output); - } - - @override - Tuple10 decode(_i1.Input input) { - return Tuple10( - codec0.decode(input), - codec1.decode(input), - codec2.decode(input), - codec3.decode(input), - codec4.decode(input), - codec5.decode(input), - codec6.decode(input), - codec7.decode(input), - codec8.decode(input), - codec9.decode(input), - ); - } - - @override - int sizeHint(Tuple10 tuple) { - int size = 0; - size += codec0.sizeHint(tuple.value0); - size += codec1.sizeHint(tuple.value1); - size += codec2.sizeHint(tuple.value2); - size += codec3.sizeHint(tuple.value3); - size += codec4.sizeHint(tuple.value4); - size += codec5.sizeHint(tuple.value5); - size += codec6.sizeHint(tuple.value6); - size += codec7.sizeHint(tuple.value7); - size += codec8.sizeHint(tuple.value8); - size += codec9.sizeHint(tuple.value9); - return size; - } -} diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/assets.dart b/quantus_sdk/lib/generated/schrodinger/pallets/assets.dart index b6e99c2a..ba29cf24 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/assets.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,24 +29,27 @@ 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, @@ -59,9 +63,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); } @@ -69,9 +79,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); } @@ -81,9 +101,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); } @@ -91,16 +123,30 @@ 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 */ @@ -117,7 +163,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); } @@ -125,9 +174,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(); } @@ -135,24 +190,37 @@ 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 */ } /// Returns the storage key for `asset`. @@ -162,14 +230,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; } @@ -226,8 +308,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. @@ -255,7 +345,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. @@ -332,8 +427,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`. @@ -351,8 +454,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. @@ -373,8 +484,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. @@ -395,8 +514,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. @@ -424,7 +551,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` @@ -439,8 +571,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. @@ -453,8 +591,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. @@ -493,8 +637,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. @@ -515,7 +665,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. @@ -540,7 +695,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. @@ -579,9 +739,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. @@ -631,18 +795,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. @@ -665,8 +827,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. @@ -682,8 +852,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. @@ -704,7 +880,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 @@ -731,7 +911,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. @@ -760,8 +945,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. @@ -776,8 +967,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`. @@ -790,8 +987,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. @@ -807,8 +1010,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`. @@ -821,8 +1030,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. @@ -841,8 +1056,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, + )); } } diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/assets_holder.dart b/quantus_sdk/lib/generated/schrodinger/pallets/assets_holder.dart index 608ecb2d..918dddaa 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/assets_holder.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/balances.dart b/quantus_sdk/lib/generated/schrodinger/pallets/balances.dart index 4e5a442d..ac2bc4f4 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/balances.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/balances.dart @@ -22,13 +22,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, @@ -36,60 +38,63 @@ 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()), - ); - - final _i1.StorageMap<_i9.Tuple4, dynamic> _transferProof = - const _i1.StorageMap<_i9.Tuple4, dynamic>( - prefix: 'Balances', - storage: 'TransferProof', - valueCodec: _i2.NullCodec.codec, - hasher: _i1.StorageHasher.identity( - _i9.Tuple4Codec( - _i2.U64Codec.codec, - _i3.AccountId32Codec(), - _i3.AccountId32Codec(), - _i2.U128Codec.codec, - ), - ), - ); - - final _i1.StorageValue _transferCount = const _i1.StorageValue( + prefix: 'Balances', + storage: 'Freezes', + valueCodec: _i2.SequenceCodec<_i8.IdAmount>(_i8.IdAmount.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); + + final _i1.StorageMap< + _i9.Tuple4, dynamic> + _transferProof = const _i1.StorageMap< + _i9.Tuple4, + dynamic>( + prefix: 'Balances', + storage: 'TransferProof', + valueCodec: _i2.NullCodec.codec, + hasher: _i1.StorageHasher.identity( + _i9.Tuple4Codec( + _i2.U64Codec.codec, + _i3.AccountId32Codec(), + _i3.AccountId32Codec(), + _i2.U128Codec.codec, + )), + ); + + final _i1.StorageValue _transferCount = + const _i1.StorageValue( prefix: 'Balances', storage: 'TransferCount', valueCodec: _i2.U64Codec.codec, @@ -98,7 +103,10 @@ class Queries { /// The total units issued in the system. _i10.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); } @@ -108,7 +116,10 @@ class Queries { /// The total units of outstanding deactivated balance in the system. _i10.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); } @@ -139,9 +150,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. - _i10.Future<_i4.AccountData> account(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i10.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); } @@ -149,7 +166,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 */ } @@ -157,9 +177,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/` - _i10.Future> locks(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i10.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); } @@ -169,9 +195,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/` - _i10.Future> reserves(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i10.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); } @@ -179,9 +211,15 @@ class Queries { } /// Holds on account balances. - _i10.Future> holds(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i10.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); } @@ -189,9 +227,15 @@ class Queries { } /// Freeze locks on account balances. - _i10.Future> freezes(_i3.AccountId32 key1, {_i1.BlockHash? at}) async { + _i10.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); } @@ -204,7 +248,10 @@ class Queries { _i1.BlockHash? at, }) async { final hashedKey = _transferProof.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _transferProof.decodeValue(bytes); } @@ -213,7 +260,10 @@ class Queries { _i10.Future transferCount({_i1.BlockHash? at}) async { final hashedKey = _transferCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _transferCount.decodeValue(bytes); } @@ -244,68 +294,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. - _i10.Future> multiAccount(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + _i10.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/` - _i10.Future>> multiLocks(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + _i10.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/` - _i10.Future>> multiReserves(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + _i10.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. - _i10.Future>> multiHolds(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + _i10.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. - _i10.Future>> multiFreezes(List<_i3.AccountId32> keys, {_i1.BlockHash? at}) async { + _i10.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 */ } /// Transfer proofs for a wormhole transfers @@ -313,10 +403,16 @@ class Queries { List<_i9.Tuple4> keys, { _i1.BlockHash? at, }) async { - final hashedKeys = keys.map((key) => _transferProof.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final hashedKeys = + keys.map((key) => _transferProof.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _transferProof.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _transferProof.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -364,7 +460,8 @@ class Queries { } /// Returns the storage key for `transferProof`. - _i11.Uint8List transferProofKey(_i9.Tuple4 key1) { + _i11.Uint8List transferProofKey( + _i9.Tuple4 key1) { final hashedKey = _transferProof.hashedKeyFor(key1); return hashedKey; } @@ -422,8 +519,14 @@ class Txs { /// of the transfer, the account will be reaped. /// /// The dispatch origin for this call must be `Signed` by the transactor. - _i12.Balances transferAllowDeath({required _i13.MultiAddress dest, required BigInt value}) { - return _i12.Balances(_i14.TransferAllowDeath(dest: dest, value: value)); + _i12.Balances transferAllowDeath({ + required _i13.MultiAddress dest, + required BigInt value, + }) { + return _i12.Balances(_i14.TransferAllowDeath( + dest: dest, + value: value, + )); } /// Exactly as `transfer_allow_death`, except the origin must be root and the source account @@ -433,7 +536,11 @@ class Txs { required _i13.MultiAddress dest, required BigInt value, }) { - return _i12.Balances(_i14.ForceTransfer(source: source, dest: dest, value: value)); + return _i12.Balances(_i14.ForceTransfer( + source: source, + dest: dest, + value: value, + )); } /// Same as the [`transfer_allow_death`] call, but with a check that the transfer will not @@ -442,8 +549,14 @@ class Txs { /// 99% of the time you want [`transfer_allow_death`] instead. /// /// [`transfer_allow_death`]: struct.Pallet.html#method.transfer - _i12.Balances transferKeepAlive({required _i13.MultiAddress dest, required BigInt value}) { - return _i12.Balances(_i14.TransferKeepAlive(dest: dest, value: value)); + _i12.Balances transferKeepAlive({ + required _i13.MultiAddress dest, + required BigInt value, + }) { + return _i12.Balances(_i14.TransferKeepAlive( + dest: dest, + value: value, + )); } /// Transfer the entire transferable balance from the caller account. @@ -461,15 +574,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). - _i12.Balances transferAll({required _i13.MultiAddress dest, required bool keepAlive}) { - return _i12.Balances(_i14.TransferAll(dest: dest, keepAlive: keepAlive)); + _i12.Balances transferAll({ + required _i13.MultiAddress dest, + required bool keepAlive, + }) { + return _i12.Balances(_i14.TransferAll( + dest: dest, + keepAlive: keepAlive, + )); } /// Unreserve some balance from a user by force. /// /// Can only be called by ROOT. - _i12.Balances forceUnreserve({required _i13.MultiAddress who, required BigInt amount}) { - return _i12.Balances(_i14.ForceUnreserve(who: who, amount: amount)); + _i12.Balances forceUnreserve({ + required _i13.MultiAddress who, + required BigInt amount, + }) { + return _i12.Balances(_i14.ForceUnreserve( + who: who, + amount: amount, + )); } /// Upgrade a specified account. @@ -487,8 +612,14 @@ class Txs { /// Set the regular balance of a given account. /// /// The dispatch origin for this call is `root`. - _i12.Balances forceSetBalance({required _i13.MultiAddress who, required BigInt newFree}) { - return _i12.Balances(_i14.ForceSetBalance(who: who, newFree: newFree)); + _i12.Balances forceSetBalance({ + required _i13.MultiAddress who, + required BigInt newFree, + }) { + return _i12.Balances(_i14.ForceSetBalance( + who: who, + newFree: newFree, + )); } /// Adjust the total issuance in a saturating way. @@ -496,8 +627,14 @@ class Txs { /// Can only be called by root and always needs a positive `delta`. /// /// # Example - _i12.Balances forceAdjustTotalIssuance({required _i15.AdjustmentDirection direction, required BigInt delta}) { - return _i12.Balances(_i14.ForceAdjustTotalIssuance(direction: direction, delta: delta)); + _i12.Balances forceAdjustTotalIssuance({ + required _i15.AdjustmentDirection direction, + required BigInt delta, + }) { + return _i12.Balances(_i14.ForceAdjustTotalIssuance( + direction: direction, + delta: delta, + )); } /// Burn the specified liquid free balance from the origin account. @@ -507,8 +644,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_. - _i12.Balances burn({required BigInt value, required bool keepAlive}) { - return _i12.Balances(_i14.Burn(value: value, keepAlive: keepAlive)); + _i12.Balances burn({ + required BigInt value, + required bool keepAlive, + }) { + return _i12.Balances(_i14.Burn( + value: value, + keepAlive: keepAlive, + )); } } diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/conviction_voting.dart b/quantus_sdk/lib/generated/schrodinger/pallets/conviction_voting.dart index 5b01a8c0..866e87c4 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/conviction_voting.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/merkle_airdrop.dart b/quantus_sdk/lib/generated/schrodinger/pallets/merkle_airdrop.dart index 9ca0a23f..4d008e08 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/merkle_airdrop.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/merkle_airdrop.dart @@ -16,7 +16,8 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageMap _airdropInfo = const _i1.StorageMap( + final _i1.StorageMap _airdropInfo = + const _i1.StorageMap( prefix: 'MerkleAirdrop', storage: 'AirdropInfo', valueCodec: _i2.AirdropMetadata.codec, @@ -25,12 +26,12 @@ class Queries { final _i1.StorageDoubleMap _claimed = const _i1.StorageDoubleMap( - prefix: 'MerkleAirdrop', - storage: 'Claimed', - valueCodec: _i3.NullCodec.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), - hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), - ); + prefix: 'MerkleAirdrop', + storage: 'Claimed', + valueCodec: _i3.NullCodec.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), + hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), + ); final _i1.StorageValue _nextAirdropId = const _i1.StorageValue( prefix: 'MerkleAirdrop', @@ -39,9 +40,15 @@ class Queries { ); /// Stores general info about an airdrop - _i5.Future<_i2.AirdropMetadata?> airdropInfo(int key1, {_i1.BlockHash? at}) async { + _i5.Future<_i2.AirdropMetadata?> airdropInfo( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _airdropInfo.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _airdropInfo.decodeValue(bytes); } @@ -49,9 +56,19 @@ class Queries { } /// Storage for claimed status - _i5.Future claimed(int key1, _i4.AccountId32 key2, {_i1.BlockHash? at}) async { - final hashedKey = _claimed.hashedKeyFor(key1, key2); - final bytes = await __api.getStorage(hashedKey, at: at); + _i5.Future claimed( + int key1, + _i4.AccountId32 key2, { + _i1.BlockHash? at, + }) async { + final hashedKey = _claimed.hashedKeyFor( + key1, + key2, + ); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _claimed.decodeValue(bytes); } @@ -61,7 +78,10 @@ class Queries { /// Counter for airdrop IDs _i5.Future nextAirdropId({_i1.BlockHash? at}) async { final hashedKey = _nextAirdropId.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _nextAirdropId.decodeValue(bytes); } @@ -69,11 +89,20 @@ class Queries { } /// Stores general info about an airdrop - _i5.Future> multiAirdropInfo(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _airdropInfo.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i5.Future> multiAirdropInfo( + List keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _airdropInfo.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _airdropInfo.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _airdropInfo.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -85,8 +114,14 @@ class Queries { } /// Returns the storage key for `claimed`. - _i6.Uint8List claimedKey(int key1, _i4.AccountId32 key2) { - final hashedKey = _claimed.hashedKeyFor(key1, key2); + _i6.Uint8List claimedKey( + int key1, + _i4.AccountId32 key2, + ) { + final hashedKey = _claimed.hashedKeyFor( + key1, + key2, + ); return hashedKey; } @@ -124,10 +159,16 @@ class Txs { /// * `merkle_root` - The Merkle root hash representing all valid claims /// * `vesting_period` - Optional vesting period for the airdrop /// * `vesting_delay` - Optional delay before vesting starts - _i7.MerkleAirdrop createAirdrop({required List merkleRoot, int? vestingPeriod, int? vestingDelay}) { - return _i7.MerkleAirdrop( - _i8.CreateAirdrop(merkleRoot: merkleRoot, vestingPeriod: vestingPeriod, vestingDelay: vestingDelay), - ); + _i7.MerkleAirdrop createAirdrop({ + required List merkleRoot, + int? vestingPeriod, + int? vestingDelay, + }) { + return _i7.MerkleAirdrop(_i8.CreateAirdrop( + merkleRoot: merkleRoot, + vestingPeriod: vestingPeriod, + vestingDelay: vestingDelay, + )); } /// Fund an existing airdrop with tokens. @@ -144,8 +185,14 @@ class Txs { /// # Errors /// /// * `AirdropNotFound` - If the specified airdrop does not exist - _i7.MerkleAirdrop fundAirdrop({required int airdropId, required BigInt amount}) { - return _i7.MerkleAirdrop(_i8.FundAirdrop(airdropId: airdropId, amount: amount)); + _i7.MerkleAirdrop fundAirdrop({ + required int airdropId, + required BigInt amount, + }) { + return _i7.MerkleAirdrop(_i8.FundAirdrop( + airdropId: airdropId, + amount: amount, + )); } /// Claim tokens from an airdrop by providing a Merkle proof. @@ -173,9 +220,12 @@ class Txs { required BigInt amount, required List> merkleProof, }) { - return _i7.MerkleAirdrop( - _i8.Claim(airdropId: airdropId, recipient: recipient, amount: amount, merkleProof: merkleProof), - ); + return _i7.MerkleAirdrop(_i8.Claim( + airdropId: airdropId, + recipient: recipient, + amount: amount, + merkleProof: merkleProof, + )); } /// Delete an airdrop and reclaim any remaining funds. @@ -204,7 +254,16 @@ class Constants { final int maxProofs = 4096; /// The pallet id, used for deriving its sovereign account ID. - final _i9.PalletId palletId = const [97, 105, 114, 100, 114, 111, 112, 33]; + final _i9.PalletId palletId = const [ + 97, + 105, + 114, + 100, + 114, + 111, + 112, + 33, + ]; /// Priority for unsigned claim transactions. final BigInt unsignedClaimPriority = BigInt.from(100); diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/mining_rewards.dart b/quantus_sdk/lib/generated/schrodinger/pallets/mining_rewards.dart index 2c4d2909..d75e7a1d 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/mining_rewards.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/mining_rewards.dart @@ -13,7 +13,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, @@ -21,7 +22,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); } @@ -42,10 +46,19 @@ class Constants { final BigInt minerBlockReward = BigInt.from(10000000000000); /// The base block reward given to treasury - final BigInt treasuryBlockReward = BigInt.from(1000000000000); + final BigInt treasuryBlockReward = BigInt.zero; /// The treasury pallet ID - final _i5.PalletId treasuryPalletId = const [112, 121, 47, 116, 114, 115, 114, 121]; + final _i5.PalletId treasuryPalletId = const [ + 112, + 121, + 47, + 116, + 114, + 115, + 114, + 121, + ]; /// Account ID used as the "from" account when creating transfer proofs for minted tokens final _i6.AccountId32 mintingAccount = const [ diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/preimage.dart b/quantus_sdk/lib/generated/schrodinger/pallets/preimage.dart index d0a8f646..0cffd534 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/preimage.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/q_po_w.dart b/quantus_sdk/lib/generated/schrodinger/pallets/q_po_w.dart index 9a91d8ea..5db26bf8 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/q_po_w.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/q_po_w.dart @@ -6,55 +6,41 @@ 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> _currentDistanceThreshold = const _i1.StorageValue<_i3.U512>( + final _i1.StorageValue<_i3.U512> _currentDifficulty = + const _i1.StorageValue<_i3.U512>( prefix: 'QPoW', - storage: 'CurrentDistanceThreshold', + storage: 'CurrentDifficulty', valueCodec: _i3.U512Codec(), ); - final _i1.StorageValue<_i3.U512> _totalWork = const _i1.StorageValue<_i3.U512>( + final _i1.StorageValue<_i3.U512> _totalWork = + const _i1.StorageValue<_i3.U512>( prefix: 'QPoW', storage: 'TotalWork', valueCodec: _i3.U512Codec(), ); - final _i1.StorageValue _blocksInPeriod = const _i1.StorageValue( - prefix: 'QPoW', - storage: 'BlocksInPeriod', - valueCodec: _i2.U32Codec.codec, - ); - - final _i1.StorageMap _blockTimeHistory = const _i1.StorageMap( - prefix: 'QPoW', - storage: 'BlockTimeHistory', - valueCodec: _i2.U64Codec.codec, - hasher: _i1.StorageHasher.twoxx64Concat(_i2.U32Codec.codec), - ); - - final _i1.StorageValue _historyIndex = const _i1.StorageValue( - prefix: 'QPoW', - storage: 'HistoryIndex', - valueCodec: _i2.U32Codec.codec, - ); - final _i1.StorageValue _blockTimeEma = const _i1.StorageValue( prefix: 'QPoW', storage: 'BlockTimeEma', @@ -63,7 +49,10 @@ 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); } @@ -72,76 +61,60 @@ 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); } return BigInt.zero; /* Default */ } - _i4.Future<_i3.U512> currentDistanceThreshold({_i1.BlockHash? at}) async { - final hashedKey = _currentDistanceThreshold.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + _i4.Future<_i3.U512> currentDifficulty({_i1.BlockHash? at}) async { + final hashedKey = _currentDifficulty.hashedKey(); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { - return _currentDistanceThreshold.decodeValue(bytes); + return _currentDifficulty.decodeValue(bytes); } - return List.filled(8, BigInt.zero, growable: false); /* Default */ + return List.filled( + 8, + BigInt.zero, + growable: false, + ); /* Default */ } _i4.Future<_i3.U512> totalWork({_i1.BlockHash? at}) async { final hashedKey = _totalWork.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _totalWork.decodeValue(bytes); } - return List.filled(8, BigInt.zero, growable: false); /* Default */ - } - - _i4.Future blocksInPeriod({_i1.BlockHash? at}) async { - final hashedKey = _blocksInPeriod.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _blocksInPeriod.decodeValue(bytes); - } - return 0; /* Default */ - } - - _i4.Future blockTimeHistory(int key1, {_i1.BlockHash? at}) async { - final hashedKey = _blockTimeHistory.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _blockTimeHistory.decodeValue(bytes); - } - return BigInt.zero; /* Default */ - } - - _i4.Future historyIndex({_i1.BlockHash? at}) async { - final hashedKey = _historyIndex.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); - if (bytes != null) { - return _historyIndex.decodeValue(bytes); - } - return 0; /* Default */ + 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); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _blockTimeEma.decodeValue(bytes); } return BigInt.zero; /* Default */ } - _i4.Future> multiBlockTimeHistory(List keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _blockTimeHistory.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); - if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _blockTimeHistory.decodeValue(v.key)).toList(); - } - return (keys.map((key) => BigInt.zero).toList() as List); /* Default */ - } - /// Returns the storage key for `lastBlockTime`. _i5.Uint8List lastBlockTimeKey() { final hashedKey = _lastBlockTime.hashedKey(); @@ -154,9 +127,9 @@ class Queries { return hashedKey; } - /// Returns the storage key for `currentDistanceThreshold`. - _i5.Uint8List currentDistanceThresholdKey() { - final hashedKey = _currentDistanceThreshold.hashedKey(); + /// Returns the storage key for `currentDifficulty`. + _i5.Uint8List currentDifficultyKey() { + final hashedKey = _currentDifficulty.hashedKey(); return hashedKey; } @@ -166,55 +139,43 @@ class Queries { return hashedKey; } - /// Returns the storage key for `blocksInPeriod`. - _i5.Uint8List blocksInPeriodKey() { - final hashedKey = _blocksInPeriod.hashedKey(); - return hashedKey; - } - - /// Returns the storage key for `blockTimeHistory`. - _i5.Uint8List blockTimeHistoryKey(int key1) { - final hashedKey = _blockTimeHistory.hashedKeyFor(key1); - return hashedKey; - } - - /// Returns the storage key for `historyIndex`. - _i5.Uint8List historyIndexKey() { - final hashedKey = _historyIndex.hashedKey(); - return hashedKey; - } - /// Returns the storage key for `blockTimeEma`. _i5.Uint8List blockTimeEmaKey() { final hashedKey = _blockTimeEma.hashedKey(); return hashedKey; } - - /// Returns the storage map key prefix for `blockTimeHistory`. - _i5.Uint8List blockTimeHistoryMapPrefix() { - final hashedKey = _blockTimeHistory.mapPrefix(); - return hashedKey; - } } class Constants { Constants(); /// Pallet's weight info - final int initialDistanceThresholdExponent = 496; - - final int difficultyAdjustPercentClamp = 10; + final _i3.U512 initialDifficulty = [ + BigInt.from(1189189), + BigInt.from(0), + BigInt.from(0), + BigInt.from(0), + BigInt.from(0), + BigInt.from(0), + BigInt.from(0), + 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 = 500; + final int emaAlpha = 100; final int maxReorgDepth = 180; /// Fixed point scale for calculations (default: 10^18) - final BigInt fixedU128Scale = BigInt.parse('1000000000000000000', radix: 10); - - /// Maximum distance threshold multiplier (default: 4) - final int maxDistanceMultiplier = 2; + final BigInt fixedU128Scale = BigInt.parse( + '1000000000000000000', + radix: 10, + ); } diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/recovery.dart b/quantus_sdk/lib/generated/schrodinger/pallets/recovery.dart index 4e0e8134..6400f72c 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/recovery.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/referenda.dart b/quantus_sdk/lib/generated/schrodinger/pallets/referenda.dart index 45e55b09..5dd941d2 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/referenda.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,8 +437,16 @@ 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, + ), ), ), _i4.Tuple2( @@ -374,8 +459,16 @@ class Constants { decisionPeriod: 36000, confirmPeriod: 900, minEnactmentPeriod: 1, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 500000000, ceil: 600000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 10000000, ceil: 100000000), + minApproval: const _i14.LinearDecreasing( + length: 1000000000, + floor: 500000000, + ceil: 600000000, + ), + minSupport: const _i14.LinearDecreasing( + length: 1000000000, + floor: 10000000, + ceil: 100000000, + ), ), ), _i4.Tuple2( @@ -388,8 +481,16 @@ class Constants { decisionPeriod: 21600, confirmPeriod: 7200, minEnactmentPeriod: 3600, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 250000000, ceil: 500000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 10000000, ceil: 100000000), + minApproval: const _i14.LinearDecreasing( + length: 1000000000, + floor: 250000000, + ceil: 500000000, + ), + minSupport: const _i14.LinearDecreasing( + length: 1000000000, + floor: 10000000, + ceil: 100000000, + ), ), ), _i4.Tuple2( @@ -402,8 +503,16 @@ class Constants { decisionPeriod: 36000, confirmPeriod: 7200, minEnactmentPeriod: 3600, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 500000000, ceil: 750000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 20000000, ceil: 100000000), + minApproval: const _i14.LinearDecreasing( + length: 1000000000, + floor: 500000000, + ceil: 750000000, + ), + minSupport: const _i14.LinearDecreasing( + length: 1000000000, + floor: 20000000, + ceil: 100000000, + ), ), ), _i4.Tuple2( @@ -416,8 +525,16 @@ class Constants { decisionPeriod: 50400, confirmPeriod: 14400, minEnactmentPeriod: 3600, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 650000000, ceil: 850000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 50000000, ceil: 150000000), + minApproval: const _i14.LinearDecreasing( + length: 1000000000, + floor: 650000000, + ceil: 850000000, + ), + minSupport: const _i14.LinearDecreasing( + length: 1000000000, + floor: 50000000, + ceil: 150000000, + ), ), ), _i4.Tuple2( @@ -430,8 +547,16 @@ class Constants { decisionPeriod: 100800, confirmPeriod: 28800, minEnactmentPeriod: 7200, - minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 750000000, ceil: 1000000000), - minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 100000000, ceil: 250000000), + minApproval: const _i14.LinearDecreasing( + length: 1000000000, + floor: 750000000, + ceil: 1000000000, + ), + minSupport: const _i14.LinearDecreasing( + length: 1000000000, + floor: 100000000, + ceil: 250000000, + ), ), ), ]; diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/reversible_transfers.dart b/quantus_sdk/lib/generated/schrodinger/pallets/reversible_transfers.dart index e18d57aa..2a93c55b 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/reversible_transfers.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/reversible_transfers.dart @@ -5,12 +5,14 @@ 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; import '../types/qp_scheduler/block_number_or_timestamp.dart' as _i10; import '../types/quantus_runtime/runtime_call.dart' as _i9; +import '../types/sp_arithmetic/per_things/permill.dart' as _i13; import '../types/sp_core/crypto/account_id32.dart' as _i2; import '../types/sp_runtime/multiaddress/multi_address.dart' as _i12; @@ -19,52 +21,57 @@ 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, int> _accountPendingIndex = const _i1.StorageMap<_i2.AccountId32, int>( + final _i1.StorageMap<_i2.AccountId32, int> _accountPendingIndex = + const _i1.StorageMap<_i2.AccountId32, int>( prefix: 'ReversibleTransfers', storage: 'AccountPendingIndex', valueCodec: _i6.U32Codec.codec, hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), ); - 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<_i4.H256>> _pendingTransfersByRecipient = + final _i1.StorageMap<_i2.AccountId32, List<_i4.H256>> + _pendingTransfersByRecipient = const _i1.StorageMap<_i2.AccountId32, List<_i4.H256>>( - prefix: 'ReversibleTransfers', - storage: 'PendingTransfersByRecipient', - valueCodec: _i6.SequenceCodec<_i4.H256>(_i4.H256Codec()), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'ReversibleTransfers', + storage: 'PendingTransfersByRecipient', + 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>> + _interceptorIndex = 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: 'InterceptorIndex', + valueCodec: _i6.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()), + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); final _i1.StorageValue _globalNonce = const _i1.StorageValue( prefix: 'ReversibleTransfers', @@ -74,9 +81,15 @@ 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); } @@ -85,9 +98,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); } @@ -96,9 +115,15 @@ class Queries { /// Indexes pending transaction IDs per account for efficient lookup and cancellation. /// Also enforces the maximum pending transactions limit per account. - _i7.Future accountPendingIndex(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { + _i7.Future accountPendingIndex( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _accountPendingIndex.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _accountPendingIndex.decodeValue(bytes); } @@ -107,9 +132,15 @@ class Queries { /// Maps sender accounts to their list of pending transaction IDs. /// This allows users to query all their outgoing pending transfers. - _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); } @@ -118,9 +149,15 @@ class Queries { /// Maps recipient accounts to their list of pending incoming transaction IDs. /// This allows users to query all their incoming pending transfers. - _i7.Future> pendingTransfersByRecipient(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { + _i7.Future> pendingTransfersByRecipient( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _pendingTransfersByRecipient.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _pendingTransfersByRecipient.decodeValue(bytes); } @@ -130,9 +167,15 @@ class Queries { /// 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 { + _i7.Future> interceptorIndex( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _interceptorIndex.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _interceptorIndex.decodeValue(bytes); } @@ -142,7 +185,10 @@ class Queries { /// 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); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _globalNonce.decodeValue(bytes); } @@ -155,32 +201,56 @@ 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 */ } /// Indexes pending transaction IDs per account for efficient lookup and cancellation. /// Also enforces the maximum pending transactions limit per account. - _i7.Future> multiAccountPendingIndex(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { - final hashedKeys = keys.map((key) => _accountPendingIndex.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + _i7.Future> multiAccountPendingIndex( + List<_i2.AccountId32> keys, { + _i1.BlockHash? at, + }) async { + final hashedKeys = + keys.map((key) => _accountPendingIndex.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _accountPendingIndex.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _accountPendingIndex.decodeValue(v.key)) + .toList(); } return (keys.map((key) => 0).toList() as List); /* Default */ } @@ -191,12 +261,19 @@ 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 recipient accounts to their list of pending incoming transaction IDs. @@ -205,24 +282,42 @@ class Queries { List<_i2.AccountId32> keys, { _i1.BlockHash? at, }) async { - final hashedKeys = keys.map((key) => _pendingTransfersByRecipient.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt(hashedKeys, at: at); + final hashedKeys = keys + .map((key) => _pendingTransfersByRecipient.hashedKeyFor(key)) + .toList(); + final bytes = await __api.queryStorageAt( + hashedKeys, + at: at, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _pendingTransfersByRecipient.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _pendingTransfersByRecipient.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); + _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, + ); if (bytes.isNotEmpty) { - return bytes.first.changes.map((v) => _interceptorIndex.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _interceptorIndex.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`. @@ -324,7 +419,10 @@ class Txs { required _i10.BlockNumberOrTimestamp delay, required _i2.AccountId32 interceptor, }) { - return _i9.ReversibleTransfers(_i11.SetHighSecurity(delay: delay, interceptor: interceptor)); + return _i9.ReversibleTransfers(_i11.SetHighSecurity( + delay: delay, + interceptor: interceptor, + )); } /// Cancel a pending reversible transaction scheduled by the caller. @@ -342,8 +440,14 @@ 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. @@ -357,7 +461,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 @@ -367,7 +475,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. @@ -377,9 +489,12 @@ 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, + )); } } @@ -402,4 +517,9 @@ class Constants { /// The minimum delay period allowed for reversible transactions, in milliseconds. final BigInt minDelayPeriodMoment = BigInt.from(12000); + + /// Volume fee taken from reversed transactions for high-security accounts only, + /// expressed as a Permill (e.g., Permill::from_percent(1) = 1%). Regular accounts incur no + /// fees. + final _i13.Permill volumeFee = 10000; } diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/scheduler.dart b/quantus_sdk/lib/generated/schrodinger/pallets/scheduler.dart index b0b60e5a..34373c24 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/scheduler.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); } @@ -120,9 +151,15 @@ class Queries { /// /// For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4 /// identities. - _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); } @@ -130,13 +167,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. @@ -145,9 +191,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 */ } @@ -161,9 +212,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 */ } @@ -233,12 +289,23 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler(_i10.Schedule(when: when, maybePeriodic: maybePeriodic, priority: priority, call: call)); + return _i9.Scheduler(_i10.Schedule( + when: when, + maybePeriodic: maybePeriodic, + 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, + )); } /// Schedule a named task. @@ -249,9 +316,13 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler( - _i10.ScheduleNamed(id: id, when: when, maybePeriodic: maybePeriodic, priority: priority, call: call), - ); + return _i9.Scheduler(_i10.ScheduleNamed( + id: id, + when: when, + maybePeriodic: maybePeriodic, + priority: priority, + call: call, + )); } /// Cancel a named scheduled task. @@ -266,9 +337,12 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler( - _i10.ScheduleAfter(after: after, maybePeriodic: maybePeriodic, priority: priority, call: call), - ); + return _i9.Scheduler(_i10.ScheduleAfter( + after: after, + maybePeriodic: maybePeriodic, + priority: priority, + call: call, + )); } /// Schedule a named task after a delay. @@ -279,9 +353,13 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler( - _i10.ScheduleNamedAfter(id: id, after: after, maybePeriodic: maybePeriodic, priority: priority, call: call), - ); + return _i9.Scheduler(_i10.ScheduleNamedAfter( + id: id, + after: after, + maybePeriodic: maybePeriodic, + priority: priority, + call: call, + )); } /// Set a retry configuration for a task so that, in case its scheduled run fails, it will @@ -301,7 +379,11 @@ 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 @@ -321,11 +403,16 @@ 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)); } @@ -341,7 +428,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/schrodinger/pallets/sudo.dart b/quantus_sdk/lib/generated/schrodinger/pallets/sudo.dart index b9cadac9..74afc29e 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/sudo.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/sudo.dart @@ -15,7 +15,8 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue<_i2.AccountId32> _key = const _i1.StorageValue<_i2.AccountId32>( + final _i1.StorageValue<_i2.AccountId32> _key = + const _i1.StorageValue<_i2.AccountId32>( prefix: 'Sudo', storage: 'Key', valueCodec: _i2.AccountId32Codec(), @@ -24,7 +25,10 @@ class Queries { /// The `AccountId` of the sudo key. _i3.Future<_i2.AccountId32?> key({_i1.BlockHash? at}) async { final hashedKey = _key.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _key.decodeValue(bytes); } @@ -51,8 +55,14 @@ class Txs { /// Sudo user to specify the weight of the call. /// /// The dispatch origin for this call must be _Signed_. - _i5.Sudo sudoUncheckedWeight({required _i5.RuntimeCall call, required _i7.Weight weight}) { - return _i5.Sudo(_i6.SudoUncheckedWeight(call: call, weight: weight)); + _i5.Sudo sudoUncheckedWeight({ + required _i5.RuntimeCall call, + required _i7.Weight weight, + }) { + return _i5.Sudo(_i6.SudoUncheckedWeight( + call: call, + weight: weight, + )); } /// Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo @@ -65,8 +75,14 @@ class Txs { /// a given account. /// /// The dispatch origin for this call must be _Signed_. - _i5.Sudo sudoAs({required _i8.MultiAddress who, required _i5.RuntimeCall call}) { - return _i5.Sudo(_i6.SudoAs(who: who, call: call)); + _i5.Sudo sudoAs({ + required _i8.MultiAddress who, + required _i5.RuntimeCall call, + }) { + return _i5.Sudo(_i6.SudoAs( + who: who, + call: call, + )); } /// Permanently removes the sudo key. diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/system.dart b/quantus_sdk/lib/generated/schrodinger/pallets/system.dart index 06673bfe..bcbeb850 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/system.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,19 +87,22 @@ 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> _events = const _i1.StorageValue>( + final _i1.StorageValue> _events = + const _i1.StorageValue>( prefix: 'System', storage: 'Events', valueCodec: _i4.SequenceCodec<_i8.EventRecord>(_i8.EventRecord.codec), @@ -110,34 +116,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, @@ -145,21 +156,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); } @@ -172,7 +190,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 */ } @@ -180,7 +201,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); } @@ -190,7 +214,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); } @@ -200,21 +227,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); } @@ -222,29 +264,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); } @@ -254,17 +319,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); } @@ -280,7 +355,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); } @@ -290,7 +368,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); } @@ -307,9 +388,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); } @@ -317,9 +404,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); } @@ -329,7 +420,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); } @@ -340,7 +434,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); } @@ -350,7 +447,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); } @@ -358,9 +458,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); } @@ -376,57 +480,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 @@ -439,13 +586,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`. @@ -616,7 +773,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)); } @@ -629,8 +787,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. @@ -677,41 +841,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, @@ -721,8 +918,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; @@ -738,20 +938,152 @@ class Constants { specName: 'quantus-runtime', implName: 'quantus-runtime', authoringVersion: 1, - specVersion: 112, + specVersion: 116, 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>([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>( + [ + 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/schrodinger/pallets/tech_collective.dart b/quantus_sdk/lib/generated/schrodinger/pallets/tech_collective.dart index 61efa344..62d1fcf7 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/tech_collective.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/tech_referenda.dart b/quantus_sdk/lib/generated/schrodinger/pallets/tech_referenda.dart index 25a942a9..180a0bca 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/tech_referenda.dart +++ b/quantus_sdk/lib/generated/schrodinger/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: 100, minEnactmentPeriod: 100, - 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/schrodinger/pallets/timestamp.dart b/quantus_sdk/lib/generated/schrodinger/pallets/timestamp.dart index 5f716696..d68a6568 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/timestamp.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/transaction_payment.dart b/quantus_sdk/lib/generated/schrodinger/pallets/transaction_payment.dart index 81c2bb8e..43f6af1b 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/transaction_payment.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/transaction_payment.dart @@ -12,13 +12,15 @@ 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, @@ -26,16 +28,25 @@ class Queries { _i4.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 */ } _i4.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); } diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/treasury_pallet.dart b/quantus_sdk/lib/generated/schrodinger/pallets/treasury_pallet.dart index 4fab5070..515df873 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/treasury_pallet.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/treasury_pallet.dart @@ -25,7 +25,8 @@ class Queries { valueCodec: _i2.U32Codec.codec, ); - final _i1.StorageMap _proposals = const _i1.StorageMap( + final _i1.StorageMap _proposals = + const _i1.StorageMap( prefix: 'TreasuryPallet', storage: 'Proposals', valueCodec: _i3.Proposal.codec, @@ -38,7 +39,8 @@ class Queries { valueCodec: _i2.U128Codec.codec, ); - final _i1.StorageValue> _approvals = const _i1.StorageValue>( + final _i1.StorageValue> _approvals = + const _i1.StorageValue>( prefix: 'TreasuryPallet', storage: 'Approvals', valueCodec: _i2.U32SequenceCodec.codec, @@ -50,7 +52,8 @@ class Queries { valueCodec: _i2.U32Codec.codec, ); - final _i1.StorageMap _spends = const _i1.StorageMap( + final _i1.StorageMap _spends = + const _i1.StorageMap( prefix: 'TreasuryPallet', storage: 'Spends', valueCodec: _i4.SpendStatus.codec, @@ -69,7 +72,10 @@ class Queries { /// Number of proposals that have been made. _i5.Future proposalCount({_i1.BlockHash? at}) async { final hashedKey = _proposalCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _proposalCount.decodeValue(bytes); } @@ -80,9 +86,15 @@ class Queries { /// Refer to for migration to `spend`. /// /// Proposals that have been made. - _i5.Future<_i3.Proposal?> proposals(int key1, {_i1.BlockHash? at}) async { + _i5.Future<_i3.Proposal?> proposals( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _proposals.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _proposals.decodeValue(bytes); } @@ -92,7 +104,10 @@ class Queries { /// The amount which has been reported as inactive to Currency. _i5.Future deactivated({_i1.BlockHash? at}) async { final hashedKey = _deactivated.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _deactivated.decodeValue(bytes); } @@ -105,17 +120,27 @@ class Queries { /// Proposal indices that have been approved but not yet awarded. _i5.Future> approvals({_i1.BlockHash? at}) async { final hashedKey = _approvals.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _approvals.decodeValue(bytes); } - return List.filled(0, 0, growable: true); /* Default */ + return List.filled( + 0, + 0, + growable: true, + ); /* Default */ } /// The count of spends that have been made. _i5.Future spendCount({_i1.BlockHash? at}) async { final hashedKey = _spendCount.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _spendCount.decodeValue(bytes); } @@ -123,9 +148,15 @@ class Queries { } /// Spends that have been approved and being processed. - _i5.Future<_i4.SpendStatus?> spends(int key1, {_i1.BlockHash? at}) async { + _i5.Future<_i4.SpendStatus?> spends( + int key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _spends.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _spends.decodeValue(bytes); } @@ -135,7 +166,10 @@ class Queries { /// The blocknumber for the last triggered spend period. _i5.Future lastSpendPeriod({_i1.BlockHash? at}) async { final hashedKey = _lastSpendPeriod.hashedKey(); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _lastSpendPeriod.decodeValue(bytes); } @@ -146,21 +180,37 @@ class Queries { /// Refer to for migration to `spend`. /// /// Proposals that have been made. - _i5.Future> multiProposals(List keys, {_i1.BlockHash? at}) async { + _i5.Future> multiProposals( + List keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _proposals.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) => _proposals.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _proposals.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } /// Spends that have been approved and being processed. - _i5.Future> multiSpends(List keys, {_i1.BlockHash? at}) async { + _i5.Future> multiSpends( + List keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _spends.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) => _spends.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _spends.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -240,8 +290,14 @@ class Txs { /// ## Events /// /// Emits [`Event::SpendApproved`] if successful. - _i7.TreasuryPallet spendLocal({required BigInt amount, required _i8.MultiAddress beneficiary}) { - return _i7.TreasuryPallet(_i9.SpendLocal(amount: amount, beneficiary: beneficiary)); + _i7.TreasuryPallet spendLocal({ + required BigInt amount, + required _i8.MultiAddress beneficiary, + }) { + return _i7.TreasuryPallet(_i9.SpendLocal( + amount: amount, + beneficiary: beneficiary, + )); } /// Force a previously approved proposal to be removed from the approval queue. @@ -301,9 +357,12 @@ class Txs { required _i8.MultiAddress beneficiary, int? validFrom, }) { - return _i7.TreasuryPallet( - _i9.Spend(assetKind: assetKind, amount: amount, beneficiary: beneficiary, validFrom: validFrom), - ); + return _i7.TreasuryPallet(_i9.Spend( + assetKind: assetKind, + amount: amount, + beneficiary: beneficiary, + validFrom: validFrom, + )); } /// Claim a spend. @@ -383,7 +442,16 @@ class Constants { final _i10.Permill burn = 0; /// The treasury's pallet id, used for deriving its sovereign account ID. - final _i11.PalletId palletId = const [112, 121, 47, 116, 114, 115, 114, 121]; + final _i11.PalletId palletId = const [ + 112, + 121, + 47, + 116, + 114, + 115, + 114, + 121, + ]; /// DEPRECATED: associated with `spend_local` call and will be removed in May 2025. /// Refer to for migration to `spend`. diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/utility.dart b/quantus_sdk/lib/generated/schrodinger/pallets/utility.dart index 52251630..5f1507a7 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/utility.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/vesting.dart b/quantus_sdk/lib/generated/schrodinger/pallets/vesting.dart index f80ca5c0..8b18f84c 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/vesting.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/vesting.dart @@ -19,22 +19,29 @@ class Queries { final _i1.StorageMap<_i2.AccountId32, List<_i3.VestingInfo>> _vesting = const _i1.StorageMap<_i2.AccountId32, List<_i3.VestingInfo>>( - prefix: 'Vesting', - storage: 'Vesting', - valueCodec: _i4.SequenceCodec<_i3.VestingInfo>(_i3.VestingInfo.codec), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'Vesting', + storage: 'Vesting', + valueCodec: _i4.SequenceCodec<_i3.VestingInfo>(_i3.VestingInfo.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); - final _i1.StorageValue<_i5.Releases> _storageVersion = const _i1.StorageValue<_i5.Releases>( + final _i1.StorageValue<_i5.Releases> _storageVersion = + const _i1.StorageValue<_i5.Releases>( prefix: 'Vesting', storage: 'StorageVersion', valueCodec: _i5.Releases.codec, ); /// Information regarding the vesting of a given account. - _i6.Future?> vesting(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { + _i6.Future?> vesting( + _i2.AccountId32 key1, { + _i1.BlockHash? at, + }) async { final hashedKey = _vesting.hashedKeyFor(key1); - final bytes = await __api.getStorage(hashedKey, at: at); + final bytes = await __api.getStorage( + hashedKey, + at: at, + ); if (bytes != null) { return _vesting.decodeValue(bytes); } @@ -46,7 +53,10 @@ class Queries { /// New networks start with latest version, as determined by the genesis build. _i6.Future<_i5.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,11 +64,19 @@ class Queries { } /// Information regarding the vesting of a given account. - _i6.Future?>> multiVesting(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { + _i6.Future?>> multiVesting( + List<_i2.AccountId32> keys, { + _i1.BlockHash? at, + }) async { final hashedKeys = keys.map((key) => _vesting.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) => _vesting.decodeValue(v.key)).toList(); + return bytes.first.changes + .map((v) => _vesting.decodeValue(v.key)) + .toList(); } return []; /* Nullable */ } @@ -126,8 +144,14 @@ class Txs { /// /// ## Complexity /// - `O(1)`. - _i8.Vesting vestedTransfer({required _i10.MultiAddress target, required _i3.VestingInfo schedule}) { - return _i8.Vesting(_i9.VestedTransfer(target: target, schedule: schedule)); + _i8.Vesting vestedTransfer({ + required _i10.MultiAddress target, + required _i3.VestingInfo schedule, + }) { + return _i8.Vesting(_i9.VestedTransfer( + target: target, + schedule: schedule, + )); } /// Force a vested transfer. @@ -149,7 +173,11 @@ class Txs { required _i10.MultiAddress target, required _i3.VestingInfo schedule, }) { - return _i8.Vesting(_i9.ForceVestedTransfer(source: source, target: target, schedule: schedule)); + return _i8.Vesting(_i9.ForceVestedTransfer( + source: source, + target: target, + schedule: schedule, + )); } /// Merge two vesting schedules together, creating a new vesting schedule that unlocks over @@ -173,8 +201,14 @@ class Txs { /// /// - `schedule1_index`: index of the first schedule to merge. /// - `schedule2_index`: index of the second schedule to merge. - _i8.Vesting mergeSchedules({required int schedule1Index, required int schedule2Index}) { - return _i8.Vesting(_i9.MergeSchedules(schedule1Index: schedule1Index, schedule2Index: schedule2Index)); + _i8.Vesting mergeSchedules({ + required int schedule1Index, + required int schedule2Index, + }) { + return _i8.Vesting(_i9.MergeSchedules( + schedule1Index: schedule1Index, + schedule2Index: schedule2Index, + )); } /// Force remove a vesting schedule @@ -183,8 +217,14 @@ class Txs { /// /// - `target`: An account that has a vesting schedule /// - `schedule_index`: The vesting schedule index that should be removed - _i8.Vesting forceRemoveVestingSchedule({required _i10.MultiAddress target, required int scheduleIndex}) { - return _i8.Vesting(_i9.ForceRemoveVestingSchedule(target: target, scheduleIndex: scheduleIndex)); + _i8.Vesting forceRemoveVestingSchedule({ + required _i10.MultiAddress target, + required int scheduleIndex, + }) { + return _i8.Vesting(_i9.ForceRemoveVestingSchedule( + target: target, + scheduleIndex: scheduleIndex, + )); } } diff --git a/quantus_sdk/lib/generated/schrodinger/schrodinger.dart b/quantus_sdk/lib/generated/schrodinger/schrodinger.dart index 9d26d6af..dcc7d548 100644 --- a/quantus_sdk/lib/generated/schrodinger/schrodinger.dart +++ b/quantus_sdk/lib/generated/schrodinger/schrodinger.dart @@ -27,26 +27,26 @@ import 'pallets/vesting.dart' as _i9; class Queries { Queries(_i1.StateApi api) - : system = _i2.Queries(api), - timestamp = _i3.Queries(api), - balances = _i4.Queries(api), - transactionPayment = _i5.Queries(api), - sudo = _i6.Queries(api), - qPoW = _i7.Queries(api), - miningRewards = _i8.Queries(api), - vesting = _i9.Queries(api), - preimage = _i10.Queries(api), - scheduler = _i11.Queries(api), - referenda = _i12.Queries(api), - reversibleTransfers = _i13.Queries(api), - convictionVoting = _i14.Queries(api), - techCollective = _i15.Queries(api), - techReferenda = _i16.Queries(api), - merkleAirdrop = _i17.Queries(api), - treasuryPallet = _i18.Queries(api), - recovery = _i19.Queries(api), - assets = _i20.Queries(api), - assetsHolder = _i21.Queries(api); + : system = _i2.Queries(api), + timestamp = _i3.Queries(api), + balances = _i4.Queries(api), + transactionPayment = _i5.Queries(api), + sudo = _i6.Queries(api), + qPoW = _i7.Queries(api), + miningRewards = _i8.Queries(api), + vesting = _i9.Queries(api), + preimage = _i10.Queries(api), + scheduler = _i11.Queries(api), + referenda = _i12.Queries(api), + reversibleTransfers = _i13.Queries(api), + convictionVoting = _i14.Queries(api), + techCollective = _i15.Queries(api), + techReferenda = _i16.Queries(api), + merkleAirdrop = _i17.Queries(api), + treasuryPallet = _i18.Queries(api), + recovery = _i19.Queries(api), + assets = _i20.Queries(api), + assetsHolder = _i21.Queries(api); final _i2.Queries system; @@ -166,7 +166,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; @@ -179,24 +182,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 Schrodinger { - Schrodinger._(this._provider, this.rpc) - : query = Queries(rpc.state), - constant = Constants(), - tx = Extrinsics(), - registry = Registry(); + Schrodinger._( + this._provider, + this.rpc, + ) : query = Queries(rpc.state), + constant = Constants(), + tx = Extrinsics(), + registry = Registry(); factory Schrodinger(_i1.Provider provider) { - final rpc = Rpc(state: _i1.StateApi(provider), system: _i1.SystemApi(provider)); - return Schrodinger._(provider, rpc); + final rpc = Rpc( + state: _i1.StateApi(provider), + system: _i1.SystemApi(provider), + ); + return Schrodinger._( + provider, + rpc, + ); } factory Schrodinger.url(Uri url) { diff --git a/quantus_sdk/lib/generated/schrodinger/types/cow_1.dart b/quantus_sdk/lib/generated/schrodinger/types/cow_1.dart index deb05241..9f85ccde 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/cow_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/cow_2.dart b/quantus_sdk/lib/generated/schrodinger/types/cow_2.dart index 5077d888..c1e00c6b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/cow_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_metadata_hash_extension/check_metadata_hash.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_metadata_hash_extension/check_metadata_hash.dart index 58d56ebe..59209324 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_metadata_hash_extension/check_metadata_hash.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_metadata_hash_extension/mode.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_metadata_hash_extension/mode.dart index 2abf6f49..4a4dd4c7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_metadata_hash_extension/mode.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -42,7 +45,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/schrodinger/types/frame_support/dispatch/dispatch_class.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/dispatch_class.dart index a27bebbe..3c2ba5be 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/dispatch_class.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -45,7 +48,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/schrodinger/types/frame_support/dispatch/pays.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/pays.dart index 00b962e6..e05bac53 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/pays.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -42,7 +45,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/schrodinger/types/frame_support/dispatch/per_dispatch_class_1.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_1.dart index 7f410127..5a6fe514 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/dispatch/per_dispatch_class_2.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_2.dart index 4055b7ae..7b98dfe9 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/dispatch/per_dispatch_class_3.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_3.dart index a45897bd..f442b028 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_3.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/dispatch/post_dispatch_info.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/post_dispatch_info.dart index 05dbdaed..ca10c804 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/post_dispatch_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/dispatch/raw_origin.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/raw_origin.dart index c329c2b4..c2e51449 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/raw_origin.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/pallet_id.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/pallet_id.dart index ae6812ea..9c862f63 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/pallet_id.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/traits/preimages/bounded.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/preimages/bounded.dart index 289a499b..3588d651 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/preimages/bounded.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/traits/schedule/dispatch_time.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/schedule/dispatch_time.dart index 5a14fb3f..9b5953f2 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/schedule/dispatch_time.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/traits/tokens/misc/balance_status.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/balance_status.dart index 6d0c1a3d..0b510a6d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/balance_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -42,7 +45,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/schrodinger/types/frame_support/traits/tokens/misc/id_amount_1.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/id_amount_1.dart index 852db11b..a390eaa2 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/id_amount_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/traits/tokens/misc/id_amount_2.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/id_amount_2.dart index 6ec0b06d..4707596a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/id_amount_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/account_info.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/account_info.dart index d35ddcf1..3faadbb0 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/account_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/code_upgrade_authorization.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/code_upgrade_authorization.dart index d89fc207..cc29ab5d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/code_upgrade_authorization.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/dispatch_event_info.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/dispatch_event_info.dart index 764759fb..728e8f63 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/dispatch_event_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/event_record.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/event_record.dart index 5987bf9b..640ec813 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/event_record.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_genesis/check_genesis.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_genesis/check_genesis.dart index 8868c238..dfb8d9aa 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_genesis/check_genesis.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_mortality/check_mortality.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_mortality/check_mortality.dart index 06298fe3..74bb6a2b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_mortality/check_mortality.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart index f2cf2cad..e6bd60e1 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_nonce/check_nonce.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_nonce/check_nonce.dart index 5e91c23f..2b7e417d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_nonce/check_nonce.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_spec_version/check_spec_version.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_spec_version/check_spec_version.dart index 8366f520..54164051 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_spec_version/check_spec_version.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_tx_version/check_tx_version.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_tx_version/check_tx_version.dart index 68153e17..8c1617d2 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_tx_version/check_tx_version.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_weight/check_weight.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_weight/check_weight.dart index 8fec0eef..5fc6a462 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_weight/check_weight.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/last_runtime_upgrade_info.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/last_runtime_upgrade_info.dart index f36c690b..77fd6ae7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/last_runtime_upgrade_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/limits/block_length.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/block_length.dart index 8d610bb0..b5a0a476 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/block_length.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/limits/block_weights.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/block_weights.dart index 45160d0b..e0ff79bb 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/block_weights.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/limits/weights_per_class.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/weights_per_class.dart index d3728830..0a830e75 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/weights_per_class.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/call.dart index d63a4a81..13af67c8 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/error.dart index ffad510b..8c04694e 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -85,7 +88,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/schrodinger/types/frame_system/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/event.dart index fd6f224c..f54d2af9 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/phase.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/phase.dart index a888c990..e5dbc292 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/phase.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/call.dart index c5448eff..1740807f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,35 +290,78 @@ 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, + ); } } @@ -299,7 +444,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); @@ -401,7 +549,8 @@ class $CallCodec with _i1.Codec { (value as TransferAll).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -475,7 +624,8 @@ class $CallCodec with _i1.Codec { case TransferAll: return (value as TransferAll)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -500,7 +650,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( @@ -521,8 +675,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; @@ -533,19 +691,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. @@ -568,7 +748,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( @@ -593,8 +778,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; @@ -606,16 +796,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 && @@ -623,7 +831,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. @@ -650,8 +863,8 @@ class StartDestroy extends Call { @override Map> toJson() => { - 'start_destroy': {'id': id}, - }; + 'start_destroy': {'id': id} + }; int _sizeHint() { int size = 1; @@ -660,12 +873,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; @@ -695,8 +919,8 @@ class DestroyAccounts extends Call { @override Map> toJson() => { - 'destroy_accounts': {'id': id}, - }; + 'destroy_accounts': {'id': id} + }; int _sizeHint() { int size = 1; @@ -705,12 +929,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; @@ -740,8 +975,8 @@ class DestroyApprovals extends Call { @override Map> toJson() => { - 'destroy_approvals': {'id': id}, - }; + 'destroy_approvals': {'id': id} + }; int _sizeHint() { int size = 1; @@ -750,12 +985,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; @@ -783,8 +1029,8 @@ class FinishDestroy extends Call { @override Map> toJson() => { - 'finish_destroy': {'id': id}, - }; + 'finish_destroy': {'id': id} + }; int _sizeHint() { int size = 1; @@ -793,12 +1039,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; @@ -817,7 +1074,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( @@ -838,8 +1099,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; @@ -850,19 +1115,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`. @@ -881,7 +1168,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( @@ -902,8 +1193,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; @@ -914,18 +1209,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. @@ -947,7 +1265,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( @@ -968,8 +1290,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; @@ -980,18 +1306,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. @@ -1013,7 +1362,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( @@ -1034,8 +1387,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; @@ -1046,19 +1403,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. @@ -1081,7 +1460,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( @@ -1106,8 +1490,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; @@ -1119,16 +1508,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 && @@ -1136,7 +1543,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` @@ -1152,10 +1564,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 @@ -1166,8 +1584,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; @@ -1177,16 +1598,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. @@ -1200,10 +1638,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 @@ -1214,8 +1658,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; @@ -1225,16 +1672,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. @@ -1258,8 +1722,8 @@ class FreezeAsset extends Call { @override Map> toJson() => { - 'freeze_asset': {'id': id}, - }; + 'freeze_asset': {'id': id} + }; int _sizeHint() { int size = 1; @@ -1268,12 +1732,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; @@ -1300,8 +1775,8 @@ class ThawAsset extends Call { @override Map> toJson() => { - 'thaw_asset': {'id': id}, - }; + 'thaw_asset': {'id': id} + }; int _sizeHint() { int size = 1; @@ -1310,12 +1785,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; @@ -1332,7 +1818,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( @@ -1349,8 +1838,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; @@ -1360,17 +1852,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. @@ -1386,7 +1894,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( @@ -1411,8 +1924,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; @@ -1424,20 +1942,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. @@ -1457,7 +2002,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( @@ -1482,8 +2032,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; @@ -1495,24 +2050,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. @@ -1538,8 +2122,8 @@ class ClearMetadata extends Call { @override Map> toJson() => { - 'clear_metadata': {'id': id}, - }; + 'clear_metadata': {'id': id} + }; int _sizeHint() { int size = 1; @@ -1548,12 +2132,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; @@ -1609,8 +2204,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; @@ -1623,26 +2224,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. @@ -1668,8 +2302,8 @@ class ForceClearMetadata extends Call { @override Map> toJson() => { - 'force_clear_metadata': {'id': id}, - }; + 'force_clear_metadata': {'id': id} + }; int _sizeHint() { int size = 1; @@ -1678,12 +2312,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; @@ -1762,17 +2407,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; @@ -1788,20 +2433,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 && @@ -1813,7 +2488,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. @@ -1837,7 +2521,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( @@ -1858,8 +2546,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; @@ -1870,19 +2562,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. @@ -1899,7 +2613,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( @@ -1916,8 +2633,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; @@ -1927,17 +2647,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. @@ -1954,7 +2690,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( @@ -1975,8 +2715,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; @@ -1987,19 +2731,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 @@ -2021,7 +2787,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( @@ -2046,8 +2817,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; @@ -2059,16 +2835,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 && @@ -2076,7 +2870,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. @@ -2100,8 +2899,8 @@ class Touch extends Call { @override Map> toJson() => { - 'touch': {'id': id}, - }; + 'touch': {'id': id} + }; int _sizeHint() { int size = 1; @@ -2110,12 +2909,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; @@ -2135,10 +2945,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 @@ -2149,8 +2965,11 @@ class Refund extends Call { @override Map> toJson() => { - 'refund': {'id': id, 'allowBurn': allowBurn}, - }; + 'refund': { + 'id': id, + 'allowBurn': allowBurn, + } + }; int _sizeHint() { int size = 1; @@ -2160,17 +2979,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. @@ -2186,10 +3021,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 @@ -2200,8 +3041,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; @@ -2211,17 +3055,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`. @@ -2235,10 +3097,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 @@ -2249,8 +3117,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; @@ -2260,16 +3131,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. @@ -2286,10 +3174,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 @@ -2300,8 +3194,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; @@ -2311,17 +3208,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`. @@ -2335,10 +3248,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 @@ -2349,8 +3268,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; @@ -2360,16 +3282,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. @@ -2389,7 +3328,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( @@ -2410,8 +3353,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; @@ -2422,17 +3369,39 @@ 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, + ); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/error.dart index d0047e3f..c1e2238d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/error.dart @@ -77,7 +77,10 @@ enum Error { /// The asset cannot be destroyed because some accounts for this asset contain holds. containsHolds('ContainsHolds', 22); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -154,7 +157,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/schrodinger/types/pallet_assets/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/event.dart index ef0de033..a43d54b1 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,24 +244,60 @@ 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, + ); } } @@ -257,7 +366,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); @@ -338,7 +450,8 @@ class $EventCodec with _i1.Codec { (value as Withdrawn).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -398,14 +511,19 @@ class $EventCodec with _i1.Codec { case Withdrawn: return (value as Withdrawn)._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( @@ -426,8 +544,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; @@ -438,27 +560,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( @@ -479,8 +630,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; @@ -491,24 +646,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( @@ -533,8 +718,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; @@ -546,29 +736,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( @@ -589,8 +812,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; @@ -601,24 +828,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( @@ -643,13 +900,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; @@ -661,32 +918,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 @@ -697,8 +992,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; @@ -708,25 +1006,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 @@ -737,8 +1062,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; @@ -748,25 +1076,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 @@ -777,8 +1132,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; @@ -788,17 +1146,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. @@ -814,8 +1193,8 @@ class AssetFrozen extends Event { @override Map> toJson() => { - 'AssetFrozen': {'assetId': assetId}, - }; + 'AssetFrozen': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -824,12 +1203,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; @@ -848,8 +1238,8 @@ class AssetThawed extends Event { @override Map> toJson() => { - 'AssetThawed': {'assetId': assetId}, - }; + 'AssetThawed': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -858,12 +1248,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; @@ -871,7 +1272,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( @@ -892,12 +1297,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; @@ -908,27 +1313,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( @@ -949,12 +1377,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; @@ -965,22 +1393,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. @@ -996,8 +1443,8 @@ class DestructionStarted extends Event { @override Map> toJson() => { - 'DestructionStarted': {'assetId': assetId}, - }; + 'DestructionStarted': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -1006,12 +1453,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; @@ -1030,8 +1488,8 @@ class Destroyed extends Event { @override Map> toJson() => { - 'Destroyed': {'assetId': assetId}, - }; + 'Destroyed': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -1040,12 +1498,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; @@ -1053,10 +1522,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 @@ -1067,8 +1542,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; @@ -1078,17 +1556,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. @@ -1128,8 +1627,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; @@ -1142,26 +1647,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. @@ -1177,8 +1715,8 @@ class MetadataCleared extends Event { @override Map> toJson() => { - 'MetadataCleared': {'assetId': assetId}, - }; + 'MetadataCleared': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -1187,12 +1725,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; @@ -1200,7 +1749,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( @@ -1225,13 +1779,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; @@ -1243,29 +1797,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( @@ -1286,8 +1873,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; @@ -1298,22 +1889,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 @@ -1354,14 +1970,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; @@ -1374,26 +1990,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. @@ -1409,8 +2061,8 @@ class AssetStatusChanged extends Event { @override Map> toJson() => { - 'AssetStatusChanged': {'assetId': assetId}, - }; + 'AssetStatusChanged': {'assetId': assetId} + }; int _sizeHint() { int size = 1; @@ -1419,12 +2071,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; @@ -1432,7 +2095,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( @@ -1449,8 +2115,11 @@ class AssetMinBalanceChanged extends Event { @override Map> toJson() => { - 'AssetMinBalanceChanged': {'assetId': assetId, 'newMinBalance': newMinBalance}, - }; + 'AssetMinBalanceChanged': { + 'assetId': assetId, + 'newMinBalance': newMinBalance, + } + }; int _sizeHint() { int size = 1; @@ -1460,23 +2129,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( @@ -1497,8 +2187,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; @@ -1509,30 +2203,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 @@ -1543,8 +2268,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; @@ -1554,22 +2282,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( @@ -1590,8 +2343,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; @@ -1602,24 +2359,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( @@ -1640,8 +2426,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; @@ -1652,17 +2442,42 @@ 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, + ); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/account_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/account_status.dart index e1fdffda..74ba3435 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/account_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -45,7 +48,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/schrodinger/types/pallet_assets/types/approval.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/approval.dart index ef7cbb93..0a616302 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/approval.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets/types/asset_account.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_account.dart index 7002cc2c..05565bfb 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_account.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets/types/asset_details.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_details.dart index 9a721ed9..531aff9a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_details.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets/types/asset_metadata.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_metadata.dart index 45f1f10f..b24c6ad6 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_metadata.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets/types/asset_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_status.dart index eebad8fd..bf98848a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -45,7 +48,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/schrodinger/types/pallet_assets/types/existence_reason.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/existence_reason.dart index d0714f82..b2ad2be5 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/existence_reason.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets_holder/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets_holder/pallet/error.dart index 16f0270f..49de284a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets_holder/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -41,7 +44,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/schrodinger/types/pallet_assets_holder/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets_holder/pallet/event.dart index 1f214086..2ef6221d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets_holder/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_balances/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/call.dart index 0190e45b..ff111d7a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_balances/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/error.dart index 686dda4b..7d87a143 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -96,7 +99,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/schrodinger/types/pallet_balances/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/event.dart index 590c12c9..de5eee63 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/event.dart @@ -35,28 +35,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({ @@ -65,35 +103,82 @@ 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, + ); } - 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, + ); } - 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}) { @@ -108,24 +193,54 @@ 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_, + ); } } @@ -186,7 +301,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); @@ -255,7 +373,8 @@ class $EventCodec with _i1.Codec { (value as TotalIssuanceForced).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -307,17 +426,24 @@ class $EventCodec with _i1.Codec { case TotalIssuanceForced: return (value as TotalIssuanceForced)._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 @@ -328,8 +454,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; @@ -339,27 +468,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 && _i5.listsEqual(other.account, account) && other.freeBalance == freeBalance; - - @override - int get hashCode => Object.hash(account, freeBalance); + identical( + this, + other, + ) || + other is Endowed && + _i5.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 @@ -370,8 +525,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; @@ -381,22 +539,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 && _i5.listsEqual(other.account, account) && other.amount == amount; - - @override - int get hashCode => Object.hash(account, amount); + identical( + this, + other, + ) || + other is DustLost && + _i5.listsEqual( + other.account, + account, + ) && + other.amount == amount; + + @override + 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( @@ -417,8 +600,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; @@ -429,27 +616,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 && _i5.listsEqual(other.from, from) && _i5.listsEqual(other.to, to) && other.amount == amount; - - @override - int get hashCode => Object.hash(from, to, amount); + identical( + this, + other, + ) || + other is Transfer && + _i5.listsEqual( + other.from, + from, + ) && + _i5.listsEqual( + other.to, + to, + ) && + other.amount == amount; + + @override + 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 @@ -460,8 +681,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; @@ -471,25 +695,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 && _i5.listsEqual(other.who, who) && other.free == free; - - @override - int get hashCode => Object.hash(who, free); + identical( + this, + other, + ) || + other is BalanceSet && + _i5.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 @@ -500,8 +751,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; @@ -511,25 +765,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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Reserved && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + 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 @@ -540,8 +821,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; @@ -551,17 +835,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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Unreserved && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + int get hashCode => Object.hash( + who, + amount, + ); } /// Some balance was moved from the reserve of the first account to the second account. @@ -597,13 +902,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; @@ -615,32 +920,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 && - _i5.listsEqual(other.from, from) && - _i5.listsEqual(other.to, to) && + _i5.listsEqual( + other.from, + from, + ) && + _i5.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 @@ -651,8 +991,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; @@ -662,25 +1005,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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Deposit && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + 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 @@ -691,8 +1061,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; @@ -702,25 +1075,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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Withdraw && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + 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 @@ -731,8 +1131,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; @@ -742,25 +1145,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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Slashed && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + 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 @@ -771,8 +1201,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; @@ -782,25 +1215,52 @@ 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Minted && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + int get hashCode => Object.hash( + who, + amount, + ); } /// 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 @@ -811,8 +1271,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; @@ -822,25 +1285,52 @@ class Burned extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 11, + 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Burned && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + int get hashCode => Object.hash( + who, + amount, + ); } /// 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 @@ -851,8 +1341,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; @@ -862,25 +1355,52 @@ class Suspended 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 Suspended && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Suspended && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + 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 @@ -891,8 +1411,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; @@ -902,17 +1425,38 @@ class Restored extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(13, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 13, + 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Restored && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + int get hashCode => Object.hash( + who, + amount, + ); } /// An account was upgraded. @@ -928,8 +1472,8 @@ class Upgraded extends Event { @override Map>> toJson() => { - 'Upgraded': {'who': who.toList()}, - }; + 'Upgraded': {'who': who.toList()} + }; int _sizeHint() { int size = 1; @@ -938,12 +1482,27 @@ class Upgraded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(14, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i1.U8Codec.codec.encodeTo( + 14, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Upgraded && _i5.listsEqual(other.who, who); + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Upgraded && + _i5.listsEqual( + other.who, + who, + ); @override int get hashCode => who.hashCode; @@ -962,8 +1521,8 @@ class Issued extends Event { @override Map> toJson() => { - 'Issued': {'amount': amount}, - }; + 'Issued': {'amount': amount} + }; int _sizeHint() { int size = 1; @@ -972,12 +1531,23 @@ class Issued extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(15, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 15, + 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; @@ -996,8 +1566,8 @@ class Rescinded extends Event { @override Map> toJson() => { - 'Rescinded': {'amount': amount}, - }; + 'Rescinded': {'amount': amount} + }; int _sizeHint() { int size = 1; @@ -1006,12 +1576,23 @@ class Rescinded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(16, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 16, + 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; @@ -1019,10 +1600,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 @@ -1033,8 +1620,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; @@ -1044,25 +1634,52 @@ class Locked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(17, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 17, + 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Locked && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + 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 @@ -1073,8 +1690,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; @@ -1084,25 +1704,52 @@ class Unlocked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(18, output); - const _i1.U8ArrayCodec(32).encodeTo(who, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 18, + 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 && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Unlocked && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + 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 @@ -1113,8 +1760,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; @@ -1124,25 +1774,52 @@ class Frozen 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 Frozen && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Frozen && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + 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 @@ -1153,8 +1830,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; @@ -1164,25 +1844,52 @@ class Thawed 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 Thawed && _i5.listsEqual(other.who, who) && other.amount == amount; - - @override - int get hashCode => Object.hash(who, amount); + identical( + this, + other, + ) || + other is Thawed && + _i5.listsEqual( + other.who, + who, + ) && + other.amount == amount; + + @override + 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 @@ -1193,8 +1900,11 @@ class TotalIssuanceForced extends Event { @override Map> toJson() => { - 'TotalIssuanceForced': {'old': old, 'new': new_}, - }; + 'TotalIssuanceForced': { + 'old': old, + 'new': new_, + } + }; int _sizeHint() { int size = 1; @@ -1204,15 +1914,31 @@ class TotalIssuanceForced extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(21, output); - _i1.U128Codec.codec.encodeTo(old, output); - _i1.U128Codec.codec.encodeTo(new_, output); + _i1.U8Codec.codec.encodeTo( + 21, + 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_, + ); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/account_data.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/account_data.dart index 751ca8ed..e2da160c 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/account_data.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_balances/types/adjustment_direction.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/adjustment_direction.dart index fa2c622f..75cf1991 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/adjustment_direction.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -42,7 +45,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/schrodinger/types/pallet_balances/types/balance_lock.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/balance_lock.dart index 9f9f90bc..4e28efb6 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/balance_lock.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_balances/types/extra_flags.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/extra_flags.dart index 275f36a9..d4ef898a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/extra_flags.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_balances/types/reasons.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/reasons.dart index 8ed8b293..03ea6118 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/reasons.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -45,7 +48,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/schrodinger/types/pallet_balances/types/reserve_data.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/reserve_data.dart index c1436d9a..93664958 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/reserve_data.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/conviction/conviction.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/conviction/conviction.dart index c1d63b68..24dde870 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/conviction/conviction.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -57,7 +60,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/schrodinger/types/pallet_conviction_voting/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/call.dart index 45074a76..34bd45de 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/error.dart index 1241e4d6..97cacab4 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -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/schrodinger/types/pallet_conviction_voting/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/event.dart index 3de84afc..7c4fd3cb 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/event.dart @@ -35,24 +35,48 @@ abstract class Event { class $Event { const $Event(); - Delegated delegated(_i3.AccountId32 value0, _i3.AccountId32 value1) { - return Delegated(value0, value1); + Delegated delegated( + _i3.AccountId32 value0, + _i3.AccountId32 value1, + ) { + return Delegated( + value0, + value1, + ); } Undelegated undelegated(_i3.AccountId32 value0) { return Undelegated(value0); } - Voted voted({required _i3.AccountId32 who, required _i4.AccountVote vote}) { - return Voted(who: who, vote: vote); + Voted voted({ + required _i3.AccountId32 who, + required _i4.AccountVote vote, + }) { + return Voted( + who: who, + vote: vote, + ); } - VoteRemoved voteRemoved({required _i3.AccountId32 who, required _i4.AccountVote vote}) { - return VoteRemoved(who: who, vote: vote); + VoteRemoved voteRemoved({ + required _i3.AccountId32 who, + required _i4.AccountVote vote, + }) { + return VoteRemoved( + who: who, + vote: vote, + ); } - 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 +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 Delegated: (value as Delegated).encodeTo(output); @@ -97,7 +124,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,17 +143,24 @@ 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); + const Delegated( + this.value0, + this.value1, + ); factory Delegated._decode(_i1.Input input) { - return Delegated(const _i1.U8ArrayCodec(32).decode(input), const _i1.U8ArrayCodec(32).decode(input)); + return Delegated( + const _i1.U8ArrayCodec(32).decode(input), + const _i1.U8ArrayCodec(32).decode(input), + ); } /// T::AccountId @@ -136,8 +171,11 @@ class Delegated extends Event { @override Map>> toJson() => { - 'Delegated': [value0.toList(), value1.toList()], - }; + 'Delegated': [ + value0.toList(), + value1.toList(), + ] + }; int _sizeHint() { int size = 1; @@ -147,18 +185,41 @@ 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.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + value0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + value1, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is Delegated && _i5.listsEqual(other.value0, value0) && _i5.listsEqual(other.value1, value1); + identical( + this, + other, + ) || + other is Delegated && + _i5.listsEqual( + other.value0, + value0, + ) && + _i5.listsEqual( + other.value1, + value1, + ); @override - int get hashCode => Object.hash(value0, value1); + int get hashCode => Object.hash( + value0, + value1, + ); } /// An \[account\] has cancelled a previous delegation operation. @@ -182,13 +243,27 @@ class Undelegated extends Event { } 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 Undelegated && _i5.listsEqual(other.value0, value0); + identical( + this, + other, + ) || + other is Undelegated && + _i5.listsEqual( + other.value0, + value0, + ); @override int get hashCode => value0.hashCode; @@ -196,10 +271,16 @@ class Undelegated extends Event { /// An account has voted class Voted extends Event { - const Voted({required this.who, required this.vote}); + const Voted({ + required this.who, + required this.vote, + }); factory Voted._decode(_i1.Input input) { - return Voted(who: const _i1.U8ArrayCodec(32).decode(input), vote: _i4.AccountVote.codec.decode(input)); + return Voted( + who: const _i1.U8ArrayCodec(32).decode(input), + vote: _i4.AccountVote.codec.decode(input), + ); } /// T::AccountId @@ -210,8 +291,11 @@ class Voted extends Event { @override Map> toJson() => { - 'Voted': {'who': who.toList(), 'vote': vote.toJson()}, - }; + 'Voted': { + 'who': who.toList(), + 'vote': vote.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -221,25 +305,52 @@ 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.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i4.AccountVote.codec.encodeTo( + vote, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Voted && _i5.listsEqual(other.who, who) && other.vote == vote; + identical( + this, + other, + ) || + other is Voted && + _i5.listsEqual( + other.who, + who, + ) && + other.vote == vote; @override - int get hashCode => Object.hash(who, vote); + int get hashCode => Object.hash( + who, + vote, + ); } /// A vote has been removed class VoteRemoved extends Event { - const VoteRemoved({required this.who, required this.vote}); + const VoteRemoved({ + required this.who, + required this.vote, + }); factory VoteRemoved._decode(_i1.Input input) { - return VoteRemoved(who: const _i1.U8ArrayCodec(32).decode(input), vote: _i4.AccountVote.codec.decode(input)); + return VoteRemoved( + who: const _i1.U8ArrayCodec(32).decode(input), + vote: _i4.AccountVote.codec.decode(input), + ); } /// T::AccountId @@ -250,8 +361,11 @@ class VoteRemoved extends Event { @override Map> toJson() => { - 'VoteRemoved': {'who': who.toList(), 'vote': vote.toJson()}, - }; + 'VoteRemoved': { + 'who': who.toList(), + 'vote': vote.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -261,25 +375,52 @@ 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.U8Codec.codec.encodeTo( + 3, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + who, + output, + ); + _i4.AccountVote.codec.encodeTo( + vote, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is VoteRemoved && _i5.listsEqual(other.who, who) && other.vote == vote; + identical( + this, + other, + ) || + other is VoteRemoved && + _i5.listsEqual( + other.who, + who, + ) && + other.vote == vote; @override - int get hashCode => Object.hash(who, vote); + int get hashCode => Object.hash( + who, + vote, + ); } /// 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 @@ -290,8 +431,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; @@ -301,15 +445,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/schrodinger/types/pallet_conviction_voting/types/delegations.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/types/delegations.dart index fdac6304..8c818a91 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/types/delegations.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/types/tally.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/types/tally.dart index 6b84fb7d..a5a4d7bf 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/types/tally.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/account_vote.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/account_vote.dart index c0f7997b..3614ca52 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/account_vote.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/casting.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/casting.dart index 851190cf..6313a889 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/casting.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/delegating.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/delegating.dart index c18056c7..66cc48bd 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/delegating.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/prior_lock.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/prior_lock.dart index 34b7627f..ff2043cb 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/prior_lock.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/vote.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/vote.dart index c78cd6dc..992c5dbc 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/vote.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/voting.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/voting.dart index 4c150bb6..c520bab0 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/voting.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_merkle_airdrop/airdrop_metadata.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/airdrop_metadata.dart index 2872952a..c975a37b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/airdrop_metadata.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/airdrop_metadata.dart @@ -41,37 +41,70 @@ class AirdropMetadata { } Map toJson() => { - 'merkleRoot': merkleRoot.toList(), - 'creator': creator.toList(), - 'balance': balance, - 'vestingPeriod': vestingPeriod, - 'vestingDelay': vestingDelay, - }; + 'merkleRoot': merkleRoot.toList(), + 'creator': creator.toList(), + 'balance': balance, + 'vestingPeriod': vestingPeriod, + 'vestingDelay': vestingDelay, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is AirdropMetadata && - _i4.listsEqual(other.merkleRoot, merkleRoot) && - _i4.listsEqual(other.creator, creator) && + _i4.listsEqual( + other.merkleRoot, + merkleRoot, + ) && + _i4.listsEqual( + other.creator, + creator, + ) && other.balance == balance && other.vestingPeriod == vestingPeriod && other.vestingDelay == vestingDelay; @override - int get hashCode => Object.hash(merkleRoot, creator, balance, vestingPeriod, vestingDelay); + int get hashCode => Object.hash( + merkleRoot, + creator, + balance, + vestingPeriod, + vestingDelay, + ); } class $AirdropMetadataCodec with _i1.Codec { const $AirdropMetadataCodec(); @override - void encodeTo(AirdropMetadata obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.merkleRoot, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.creator, output); - _i1.U128Codec.codec.encodeTo(obj.balance, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(obj.vestingPeriod, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(obj.vestingDelay, output); + void encodeTo( + AirdropMetadata obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + obj.merkleRoot, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + obj.creator, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.balance, + output, + ); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( + obj.vestingPeriod, + output, + ); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( + obj.vestingDelay, + output, + ); } @override @@ -80,8 +113,10 @@ class $AirdropMetadataCodec with _i1.Codec { merkleRoot: const _i1.U8ArrayCodec(32).decode(input), creator: const _i1.U8ArrayCodec(32).decode(input), balance: _i1.U128Codec.codec.decode(input), - vestingPeriod: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - vestingDelay: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), + vestingPeriod: + const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), + vestingDelay: + const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), ); } @@ -91,8 +126,12 @@ class $AirdropMetadataCodec with _i1.Codec { size = size + const _i1.U8ArrayCodec(32).sizeHint(obj.merkleRoot); size = size + const _i2.AccountId32Codec().sizeHint(obj.creator); size = size + _i1.U128Codec.codec.sizeHint(obj.balance); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.vestingPeriod); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.vestingDelay); + size = size + + const _i1.OptionCodec(_i1.U32Codec.codec) + .sizeHint(obj.vestingPeriod); + size = size + + const _i1.OptionCodec(_i1.U32Codec.codec) + .sizeHint(obj.vestingDelay); return size; } } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/call.dart index be069d86..c15189dc 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/call.dart @@ -34,12 +34,26 @@ abstract class Call { class $Call { const $Call(); - CreateAirdrop createAirdrop({required List merkleRoot, int? vestingPeriod, int? vestingDelay}) { - return CreateAirdrop(merkleRoot: merkleRoot, vestingPeriod: vestingPeriod, vestingDelay: vestingDelay); + CreateAirdrop createAirdrop({ + required List merkleRoot, + int? vestingPeriod, + int? vestingDelay, + }) { + return CreateAirdrop( + merkleRoot: merkleRoot, + vestingPeriod: vestingPeriod, + vestingDelay: vestingDelay, + ); } - FundAirdrop fundAirdrop({required int airdropId, required BigInt amount}) { - return FundAirdrop(airdropId: airdropId, amount: amount); + FundAirdrop fundAirdrop({ + required int airdropId, + required BigInt amount, + }) { + return FundAirdrop( + airdropId: airdropId, + amount: amount, + ); } Claim claim({ @@ -48,7 +62,12 @@ class $Call { required BigInt amount, required List> merkleProof, }) { - return Claim(airdropId: airdropId, recipient: recipient, amount: amount, merkleProof: merkleProof); + return Claim( + airdropId: airdropId, + recipient: recipient, + amount: amount, + merkleProof: merkleProof, + ); } DeleteAirdrop deleteAirdrop({required int airdropId}) { @@ -77,7 +96,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 CreateAirdrop: (value as CreateAirdrop).encodeTo(output); @@ -92,7 +114,8 @@ class $CallCodec with _i1.Codec { (value as DeleteAirdrop).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -108,7 +131,8 @@ class $CallCodec with _i1.Codec { case DeleteAirdrop: return (value as DeleteAirdrop)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -126,13 +150,19 @@ class $CallCodec with _i1.Codec { /// * `vesting_period` - Optional vesting period for the airdrop /// * `vesting_delay` - Optional delay before vesting starts class CreateAirdrop extends Call { - const CreateAirdrop({required this.merkleRoot, this.vestingPeriod, this.vestingDelay}); + const CreateAirdrop({ + required this.merkleRoot, + this.vestingPeriod, + this.vestingDelay, + }); factory CreateAirdrop._decode(_i1.Input input) { return CreateAirdrop( merkleRoot: const _i1.U8ArrayCodec(32).decode(input), - vestingPeriod: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - vestingDelay: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), + vestingPeriod: + const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), + vestingDelay: + const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), ); } @@ -147,34 +177,62 @@ class CreateAirdrop extends Call { @override Map> toJson() => { - 'create_airdrop': {'merkleRoot': merkleRoot.toList(), 'vestingPeriod': vestingPeriod, 'vestingDelay': vestingDelay}, - }; + 'create_airdrop': { + 'merkleRoot': merkleRoot.toList(), + 'vestingPeriod': vestingPeriod, + 'vestingDelay': vestingDelay, + } + }; int _sizeHint() { int size = 1; size = size + const _i1.U8ArrayCodec(32).sizeHint(merkleRoot); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(vestingPeriod); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(vestingDelay); + size = size + + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(vestingPeriod); + size = size + + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(vestingDelay); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(merkleRoot, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(vestingPeriod, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(vestingDelay, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + merkleRoot, + output, + ); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( + vestingPeriod, + output, + ); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( + vestingDelay, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is CreateAirdrop && - _i4.listsEqual(other.merkleRoot, merkleRoot) && + _i4.listsEqual( + other.merkleRoot, + merkleRoot, + ) && other.vestingPeriod == vestingPeriod && other.vestingDelay == vestingDelay; @override - int get hashCode => Object.hash(merkleRoot, vestingPeriod, vestingDelay); + int get hashCode => Object.hash( + merkleRoot, + vestingPeriod, + vestingDelay, + ); } /// Fund an existing airdrop with tokens. @@ -192,10 +250,16 @@ class CreateAirdrop extends Call { /// /// * `AirdropNotFound` - If the specified airdrop does not exist class FundAirdrop extends Call { - const FundAirdrop({required this.airdropId, required this.amount}); + const FundAirdrop({ + required this.airdropId, + required this.amount, + }); factory FundAirdrop._decode(_i1.Input input) { - return FundAirdrop(airdropId: _i1.U32Codec.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); + return FundAirdrop( + airdropId: _i1.U32Codec.codec.decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// AirdropId @@ -206,8 +270,11 @@ class FundAirdrop extends Call { @override Map> toJson() => { - 'fund_airdrop': {'airdropId': airdropId, 'amount': amount}, - }; + 'fund_airdrop': { + 'airdropId': airdropId, + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -217,17 +284,35 @@ class FundAirdrop extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + airdropId, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is FundAirdrop && other.airdropId == airdropId && other.amount == amount; + identical( + this, + other, + ) || + other is FundAirdrop && + other.airdropId == airdropId && + other.amount == amount; @override - int get hashCode => Object.hash(airdropId, amount); + int get hashCode => Object.hash( + airdropId, + amount, + ); } /// Claim tokens from an airdrop by providing a Merkle proof. @@ -250,14 +335,20 @@ class FundAirdrop extends Call { /// * `InvalidProof` - If the provided Merkle proof is invalid /// * `InsufficientAirdropBalance` - If the airdrop doesn't have enough tokens class Claim extends Call { - const Claim({required this.airdropId, required this.recipient, required this.amount, required this.merkleProof}); + const Claim({ + required this.airdropId, + required this.recipient, + required this.amount, + required this.merkleProof, + }); factory Claim._decode(_i1.Input input) { return Claim( airdropId: _i1.U32Codec.codec.decode(input), recipient: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input), - merkleProof: const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).decode(input), + merkleProof: const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)) + .decode(input), ); } @@ -275,42 +366,73 @@ class Claim extends Call { @override Map> toJson() => { - 'claim': { - 'airdropId': airdropId, - 'recipient': recipient.toList(), - 'amount': amount, - 'merkleProof': merkleProof.map((value) => value.toList()).toList(), - }, - }; + 'claim': { + 'airdropId': airdropId, + 'recipient': recipient.toList(), + 'amount': amount, + 'merkleProof': merkleProof.map((value) => value.toList()).toList(), + } + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(airdropId); size = size + const _i3.AccountId32Codec().sizeHint(recipient); size = size + _i1.U128Codec.codec.sizeHint(amount); - size = size + const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).sizeHint(merkleProof); + size = size + + const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)) + .sizeHint(merkleProof); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - const _i1.U8ArrayCodec(32).encodeTo(recipient, output); - _i1.U128Codec.codec.encodeTo(amount, output); - const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).encodeTo(merkleProof, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U32Codec.codec.encodeTo( + airdropId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + recipient, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); + const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).encodeTo( + merkleProof, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Claim && other.airdropId == airdropId && - _i4.listsEqual(other.recipient, recipient) && + _i4.listsEqual( + other.recipient, + recipient, + ) && other.amount == amount && - _i4.listsEqual(other.merkleProof, merkleProof); + _i4.listsEqual( + other.merkleProof, + merkleProof, + ); @override - int get hashCode => Object.hash(airdropId, recipient, amount, merkleProof); + int get hashCode => Object.hash( + airdropId, + recipient, + amount, + merkleProof, + ); } /// Delete an airdrop and reclaim any remaining funds. @@ -339,8 +461,8 @@ class DeleteAirdrop extends Call { @override Map> toJson() => { - 'delete_airdrop': {'airdropId': airdropId}, - }; + 'delete_airdrop': {'airdropId': airdropId} + }; int _sizeHint() { int size = 1; @@ -349,12 +471,23 @@ class DeleteAirdrop extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.U32Codec.codec.encodeTo( + airdropId, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is DeleteAirdrop && other.airdropId == airdropId; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is DeleteAirdrop && other.airdropId == airdropId; @override int get hashCode => airdropId.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/error.dart index 32d472bc..a57932a6 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/error.dart @@ -20,7 +20,10 @@ enum Error { /// Only the creator of an airdrop can delete it. notAirdropCreator('NotAirdropCreator', 4); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -61,7 +64,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/schrodinger/types/pallet_merkle_airdrop/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/event.dart index 76df7d4c..beb9a7c4 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/event.dart @@ -35,16 +35,36 @@ abstract class Event { class $Event { const $Event(); - AirdropCreated airdropCreated({required int airdropId, required _i3.AirdropMetadata airdropMetadata}) { - return AirdropCreated(airdropId: airdropId, airdropMetadata: airdropMetadata); + AirdropCreated airdropCreated({ + required int airdropId, + required _i3.AirdropMetadata airdropMetadata, + }) { + return AirdropCreated( + airdropId: airdropId, + airdropMetadata: airdropMetadata, + ); } - AirdropFunded airdropFunded({required int airdropId, required BigInt amount}) { - return AirdropFunded(airdropId: airdropId, amount: amount); + AirdropFunded airdropFunded({ + required int airdropId, + required BigInt amount, + }) { + return AirdropFunded( + airdropId: airdropId, + amount: amount, + ); } - Claimed claimed({required int airdropId, required _i4.AccountId32 account, required BigInt amount}) { - return Claimed(airdropId: airdropId, account: account, amount: amount); + Claimed claimed({ + required int airdropId, + required _i4.AccountId32 account, + required BigInt amount, + }) { + return Claimed( + airdropId: airdropId, + account: account, + amount: amount, + ); } AirdropDeleted airdropDeleted({required int airdropId}) { @@ -73,7 +93,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 AirdropCreated: (value as AirdropCreated).encodeTo(output); @@ -88,7 +111,8 @@ class $EventCodec with _i1.Codec { (value as AirdropDeleted).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -104,7 +128,8 @@ class $EventCodec with _i1.Codec { case AirdropDeleted: return (value as AirdropDeleted)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -113,7 +138,10 @@ class $EventCodec with _i1.Codec { /// /// Parameters: [airdrop_id, merkle_root] class AirdropCreated extends Event { - const AirdropCreated({required this.airdropId, required this.airdropMetadata}); + const AirdropCreated({ + required this.airdropId, + required this.airdropMetadata, + }); factory AirdropCreated._decode(_i1.Input input) { return AirdropCreated( @@ -132,8 +160,11 @@ class AirdropCreated extends Event { @override Map> toJson() => { - 'AirdropCreated': {'airdropId': airdropId, 'airdropMetadata': airdropMetadata.toJson()}, - }; + 'AirdropCreated': { + 'airdropId': airdropId, + 'airdropMetadata': airdropMetadata.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -143,28 +174,51 @@ class AirdropCreated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - _i3.AirdropMetadata.codec.encodeTo(airdropMetadata, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + airdropId, + output, + ); + _i3.AirdropMetadata.codec.encodeTo( + airdropMetadata, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is AirdropCreated && other.airdropId == airdropId && other.airdropMetadata == airdropMetadata; + identical( + this, + other, + ) || + other is AirdropCreated && + other.airdropId == airdropId && + other.airdropMetadata == airdropMetadata; @override - int get hashCode => Object.hash(airdropId, airdropMetadata); + int get hashCode => Object.hash( + airdropId, + airdropMetadata, + ); } /// An airdrop has been funded with tokens. /// /// Parameters: [airdrop_id, amount] class AirdropFunded extends Event { - const AirdropFunded({required this.airdropId, required this.amount}); + const AirdropFunded({ + required this.airdropId, + required this.amount, + }); factory AirdropFunded._decode(_i1.Input input) { - return AirdropFunded(airdropId: _i1.U32Codec.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); + return AirdropFunded( + airdropId: _i1.U32Codec.codec.decode(input), + amount: _i1.U128Codec.codec.decode(input), + ); } /// AirdropId @@ -177,8 +231,11 @@ class AirdropFunded extends Event { @override Map> toJson() => { - 'AirdropFunded': {'airdropId': airdropId, 'amount': amount}, - }; + 'AirdropFunded': { + 'airdropId': airdropId, + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -188,24 +245,46 @@ class AirdropFunded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + airdropId, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is AirdropFunded && other.airdropId == airdropId && other.amount == amount; + identical( + this, + other, + ) || + other is AirdropFunded && + other.airdropId == airdropId && + other.amount == amount; @override - int get hashCode => Object.hash(airdropId, amount); + int get hashCode => Object.hash( + airdropId, + amount, + ); } /// A user has claimed tokens from an airdrop. /// /// Parameters: [airdrop_id, account, amount] class Claimed extends Event { - const Claimed({required this.airdropId, required this.account, required this.amount}); + const Claimed({ + required this.airdropId, + required this.account, + required this.amount, + }); factory Claimed._decode(_i1.Input input) { return Claimed( @@ -229,8 +308,12 @@ class Claimed extends Event { @override Map> toJson() => { - 'Claimed': {'airdropId': airdropId, 'account': account.toList(), 'amount': amount}, - }; + 'Claimed': { + 'airdropId': airdropId, + 'account': account.toList(), + 'amount': amount, + } + }; int _sizeHint() { int size = 1; @@ -241,22 +324,44 @@ class Claimed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); - _i1.U128Codec.codec.encodeTo(amount, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U32Codec.codec.encodeTo( + airdropId, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Claimed && other.airdropId == airdropId && - _i5.listsEqual(other.account, account) && + _i5.listsEqual( + other.account, + account, + ) && other.amount == amount; @override - int get hashCode => Object.hash(airdropId, account, amount); + int get hashCode => Object.hash( + airdropId, + account, + amount, + ); } /// An airdrop has been deleted. @@ -275,8 +380,8 @@ class AirdropDeleted extends Event { @override Map> toJson() => { - 'AirdropDeleted': {'airdropId': airdropId}, - }; + 'AirdropDeleted': {'airdropId': airdropId} + }; int _sizeHint() { int size = 1; @@ -285,12 +390,23 @@ class AirdropDeleted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U32Codec.codec.encodeTo(airdropId, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.U32Codec.codec.encodeTo( + airdropId, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is AirdropDeleted && other.airdropId == airdropId; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is AirdropDeleted && other.airdropId == airdropId; @override int get hashCode => airdropId.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_mining_rewards/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_mining_rewards/pallet/event.dart index 081e7da5..453d7f17 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_mining_rewards/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_mining_rewards/pallet/event.dart @@ -34,12 +34,24 @@ 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}) { @@ -66,7 +78,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); @@ -78,7 +93,8 @@ class $EventCodec with _i1.Codec { (value as TreasuryRewarded).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -92,17 +108,24 @@ class $EventCodec with _i1.Codec { case TreasuryRewarded: return (value as TreasuryRewarded)._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 @@ -115,8 +138,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; @@ -126,25 +152,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 @@ -157,8 +210,11 @@ class FeesCollected extends Event { @override Map> toJson() => { - 'FeesCollected': {'amount': amount, 'total': total}, - }; + 'FeesCollected': { + 'amount': amount, + 'total': total, + } + }; int _sizeHint() { int size = 1; @@ -168,17 +224,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 @@ -195,8 +267,8 @@ class TreasuryRewarded extends Event { @override Map> toJson() => { - 'TreasuryRewarded': {'reward': reward}, - }; + 'TreasuryRewarded': {'reward': reward} + }; int _sizeHint() { int size = 1; @@ -205,12 +277,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; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/old_request_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/old_request_status.dart index 69303e64..89471be7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/old_request_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_preimage/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/call.dart index 246d31d2..8a69a1dd 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_preimage/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/error.dart index 596aaa89..e363a051 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -76,7 +79,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/schrodinger/types/pallet_preimage/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/event.dart index 26f10fba..f54cb52b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_preimage/pallet/hold_reason.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/hold_reason.dart index ed80e5ab..09136b7c 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/hold_reason.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -39,7 +42,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/schrodinger/types/pallet_preimage/request_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/request_status.dart index c3a46ad8..573053c2 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/request_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_qpow/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_qpow/pallet/error.dart deleted file mode 100644 index c35439cc..00000000 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_qpow/pallet/error.dart +++ /dev/null @@ -1,49 +0,0 @@ -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:typed_data' as _i2; - -import 'package:polkadart/scale_codec.dart' as _i1; - -/// The `Error` enum of this pallet. -enum Error { - invalidSolution('InvalidSolution', 0), - arithmeticOverflow('ArithmeticOverflow', 1); - - const Error(this.variantName, this.codecIndex); - - factory Error.decode(_i1.Input input) { - return codec.decode(input); - } - - final String variantName; - - final int codecIndex; - - static const $ErrorCodec codec = $ErrorCodec(); - - String toJson() => variantName; - _i2.Uint8List encode() { - return codec.encode(this); - } -} - -class $ErrorCodec with _i1.Codec { - const $ErrorCodec(); - - @override - Error decode(_i1.Input input) { - final index = _i1.U8Codec.codec.decode(input); - switch (index) { - case 0: - return Error.invalidSolution; - case 1: - return Error.arithmeticOverflow; - default: - throw Exception('Error: Invalid variant index: "$index"'); - } - } - - @override - void encodeTo(Error value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); - } -} diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_qpow/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_qpow/pallet/event.dart index f8863192..45174ad5 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_qpow/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_qpow/pallet/event.dart @@ -37,19 +37,23 @@ class $Event { ProofSubmitted proofSubmitted({ required List nonce, required _i3.U512 difficulty, - required _i3.U512 distanceAchieved, + required _i3.U512 hashAchieved, }) { - return ProofSubmitted(nonce: nonce, difficulty: difficulty, distanceAchieved: distanceAchieved); + return ProofSubmitted( + nonce: nonce, + difficulty: difficulty, + hashAchieved: hashAchieved, + ); } - DistanceThresholdAdjusted distanceThresholdAdjusted({ - required _i3.U512 oldDistanceThreshold, - required _i3.U512 newDistanceThreshold, + DifficultyAdjusted difficultyAdjusted({ + required _i3.U512 oldDifficulty, + required _i3.U512 newDifficulty, required BigInt observedBlockTime, }) { - return DistanceThresholdAdjusted( - oldDistanceThreshold: oldDistanceThreshold, - newDistanceThreshold: newDistanceThreshold, + return DifficultyAdjusted( + oldDifficulty: oldDifficulty, + newDifficulty: newDifficulty, observedBlockTime: observedBlockTime, ); } @@ -65,23 +69,27 @@ class $EventCodec with _i1.Codec { case 0: return ProofSubmitted._decode(input); case 1: - return DistanceThresholdAdjusted._decode(input); + return DifficultyAdjusted._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 ProofSubmitted: (value as ProofSubmitted).encodeTo(output); break; - case DistanceThresholdAdjusted: - (value as DistanceThresholdAdjusted).encodeTo(output); + case DifficultyAdjusted: + (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}"'); } } @@ -90,22 +98,27 @@ class $EventCodec with _i1.Codec { switch (value.runtimeType) { case ProofSubmitted: return (value as ProofSubmitted)._sizeHint(); - case DistanceThresholdAdjusted: - return (value as DistanceThresholdAdjusted)._sizeHint(); + 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.distanceAchieved}); + const ProofSubmitted({ + required this.nonce, + required this.difficulty, + required this.hashAchieved, + }); factory ProofSubmitted._decode(_i1.Input input) { return ProofSubmitted( nonce: const _i1.U8ArrayCodec(64).decode(input), difficulty: const _i1.U64ArrayCodec(8).decode(input), - distanceAchieved: const _i1.U64ArrayCodec(8).decode(input), + hashAchieved: const _i1.U64ArrayCodec(8).decode(input), ); } @@ -116,100 +129,153 @@ class ProofSubmitted extends Event { final _i3.U512 difficulty; /// U512 - final _i3.U512 distanceAchieved; + final _i3.U512 hashAchieved; @override Map>> toJson() => { - 'ProofSubmitted': { - 'nonce': nonce.toList(), - 'difficulty': difficulty.toList(), - 'distanceAchieved': distanceAchieved.toList(), - }, - }; + 'ProofSubmitted': { + 'nonce': nonce.toList(), + 'difficulty': difficulty.toList(), + 'hashAchieved': hashAchieved.toList(), + } + }; int _sizeHint() { int size = 1; size = size + const _i1.U8ArrayCodec(64).sizeHint(nonce); size = size + const _i3.U512Codec().sizeHint(difficulty); - size = size + const _i3.U512Codec().sizeHint(distanceAchieved); + size = size + const _i3.U512Codec().sizeHint(hashAchieved); return size; } 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(distanceAchieved, 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.distanceAchieved, distanceAchieved); + _i4.listsEqual( + other.nonce, + nonce, + ) && + _i4.listsEqual( + other.difficulty, + difficulty, + ) && + _i4.listsEqual( + other.hashAchieved, + hashAchieved, + ); @override - int get hashCode => Object.hash(nonce, difficulty, distanceAchieved); + int get hashCode => Object.hash( + nonce, + difficulty, + hashAchieved, + ); } -class DistanceThresholdAdjusted extends Event { - const DistanceThresholdAdjusted({ - required this.oldDistanceThreshold, - required this.newDistanceThreshold, +class DifficultyAdjusted extends Event { + const DifficultyAdjusted({ + required this.oldDifficulty, + required this.newDifficulty, required this.observedBlockTime, }); - factory DistanceThresholdAdjusted._decode(_i1.Input input) { - return DistanceThresholdAdjusted( - oldDistanceThreshold: const _i1.U64ArrayCodec(8).decode(input), - newDistanceThreshold: const _i1.U64ArrayCodec(8).decode(input), + factory DifficultyAdjusted._decode(_i1.Input input) { + return DifficultyAdjusted( + oldDifficulty: const _i1.U64ArrayCodec(8).decode(input), + newDifficulty: const _i1.U64ArrayCodec(8).decode(input), observedBlockTime: _i1.U64Codec.codec.decode(input), ); } - /// DistanceThreshold - final _i3.U512 oldDistanceThreshold; + /// Difficulty + final _i3.U512 oldDifficulty; - /// DistanceThreshold - final _i3.U512 newDistanceThreshold; + /// Difficulty + final _i3.U512 newDifficulty; /// BlockDuration final BigInt observedBlockTime; @override Map> toJson() => { - 'DistanceThresholdAdjusted': { - 'oldDistanceThreshold': oldDistanceThreshold.toList(), - 'newDistanceThreshold': newDistanceThreshold.toList(), - 'observedBlockTime': observedBlockTime, - }, - }; + 'DifficultyAdjusted': { + 'oldDifficulty': oldDifficulty.toList(), + 'newDifficulty': newDifficulty.toList(), + 'observedBlockTime': observedBlockTime, + } + }; int _sizeHint() { int size = 1; - size = size + const _i3.U512Codec().sizeHint(oldDistanceThreshold); - size = size + const _i3.U512Codec().sizeHint(newDistanceThreshold); + size = size + const _i3.U512Codec().sizeHint(oldDifficulty); + size = size + const _i3.U512Codec().sizeHint(newDifficulty); size = size + _i1.U64Codec.codec.sizeHint(observedBlockTime); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U64ArrayCodec(8).encodeTo(oldDistanceThreshold, output); - const _i1.U64ArrayCodec(8).encodeTo(newDistanceThreshold, 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) || - other is DistanceThresholdAdjusted && - _i4.listsEqual(other.oldDistanceThreshold, oldDistanceThreshold) && - _i4.listsEqual(other.newDistanceThreshold, newDistanceThreshold) && + identical( + this, + other, + ) || + other is DifficultyAdjusted && + _i4.listsEqual( + other.oldDifficulty, + oldDifficulty, + ) && + _i4.listsEqual( + other.newDifficulty, + newDifficulty, + ) && other.observedBlockTime == observedBlockTime; @override - int get hashCode => Object.hash(oldDistanceThreshold, newDistanceThreshold, observedBlockTime); + int get hashCode => Object.hash( + oldDifficulty, + newDifficulty, + observedBlockTime, + ); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/member_record.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/member_record.dart index bbcabb46..66c7e5db 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/member_record.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_ranked_collective/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/call.dart index 430c043f..a7c7d089 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_ranked_collective/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/error.dart index 3906b1e7..2d4558d0 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -91,7 +94,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/schrodinger/types/pallet_ranked_collective/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/event.dart index 380795e3..44350e40 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_ranked_collective/tally.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/tally.dart index dcacb46c..77fac349 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/tally.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_ranked_collective/vote_record.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/vote_record.dart index 8a05fdc3..4a5a5ccf 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/vote_record.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_recovery/active_recovery.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/active_recovery.dart index 2df5af34..dda7b5da 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/active_recovery.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_recovery/deposit_kind.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/deposit_kind.dart index 8e0a6d10..f9b5c57b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/deposit_kind.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_recovery/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/call.dart index 6aa962cb..cfb0f532 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_recovery/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/error.dart index 5f8ebe8c..ab7178cd 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -116,7 +119,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/schrodinger/types/pallet_recovery/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/event.dart index 6544b0b1..a69b27fd 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_recovery/recovery_config.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/recovery_config.dart index 2a6992a2..75daa32a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/recovery_config.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/pallet/call_1.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/call_1.dart index bb798313..1e8b28e5 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/call_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/pallet/call_2.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/call_2.dart index bb798313..1e8b28e5 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/call_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/pallet/error_1.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/error_1.dart index 8c6cf831..9c9bfc82 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/error_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -106,7 +109,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/schrodinger/types/pallet_referenda/pallet/error_2.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/error_2.dart index 8c6cf831..9c9bfc82 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/error_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -106,7 +109,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/schrodinger/types/pallet_referenda/pallet/event_1.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/event_1.dart index 1be40aae..af8eb6e4 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/event_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/pallet/event_2.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/event_2.dart index 4010a513..a205a0a7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/event_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/curve.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/curve.dart index 79a32460..4650f0d1 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/curve.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/deciding_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/deciding_status.dart index 0330544f..96baa433 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/deciding_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/deposit.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/deposit.dart index 7477eb42..50fa863e 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/deposit.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/referendum_info_1.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_info_1.dart index a4fe6c9b..6e81d583 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_info_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/referendum_info_2.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_info_2.dart index 90cca436..566ef150 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_info_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/referendum_status_1.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_status_1.dart index 8bd8a9f7..0b48bec7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_status_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/referendum_status_2.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_status_2.dart index 80e244fd..c910cc13 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_status_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/track_details.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/track_details.dart index fe353521..c17b1809 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/track_details.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_reversible_transfers/high_security_account_data.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/high_security_account_data.dart index 34d86c1e..b43db38e 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/high_security_account_data.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/high_security_account_data.dart @@ -8,7 +8,10 @@ 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.interceptor, + required this.delay, + }); factory HighSecurityAccountData.decode(_i1.Input input) { return codec.decode(input); @@ -20,30 +23,54 @@ 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() => {'interceptor': interceptor.toList(), 'delay': delay.toJson()}; + Map toJson() => { + 'interceptor': interceptor.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.interceptor, + interceptor, + ) && + other.delay == delay; @override - int get hashCode => Object.hash(interceptor, delay); + int get hashCode => Object.hash( + interceptor, + 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.interceptor, + output, + ); + _i3.BlockNumberOrTimestamp.codec.encodeTo( + obj.delay, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/call.dart index 11220e9d..55cd2b09 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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 interceptor, + }) { + return SetHighSecurity( + delay: delay, + interceptor: interceptor, + ); } 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, + ); } } @@ -106,7 +131,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); @@ -130,7 +158,8 @@ class $CallCodec with _i1.Codec { (value as ScheduleAssetTransferWithDelay).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -152,7 +181,8 @@ class $CallCodec with _i1.Codec { case ScheduleAssetTransferWithDelay: return (value as ScheduleAssetTransferWithDelay)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -171,7 +201,10 @@ class $CallCodec with _i1.Codec { /// - interceptor: The account that can intercept transctions from the /// high security account. class SetHighSecurity extends Call { - const SetHighSecurity({required this.delay, required this.interceptor}); + const SetHighSecurity({ + required this.delay, + required this.interceptor, + }); factory SetHighSecurity._decode(_i1.Input input) { return SetHighSecurity( @@ -188,8 +221,11 @@ class SetHighSecurity extends Call { @override Map> toJson() => { - 'set_high_security': {'delay': delay.toJson(), 'interceptor': interceptor.toList()}, - }; + 'set_high_security': { + 'delay': delay.toJson(), + 'interceptor': interceptor.toList(), + } + }; int _sizeHint() { int size = 1; @@ -199,18 +235,38 @@ 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(interceptor, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.BlockNumberOrTimestamp.codec.encodeTo( + delay, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + interceptor, + 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.interceptor, + interceptor, + ); @override - int get hashCode => Object.hash(delay, interceptor); + int get hashCode => Object.hash( + delay, + interceptor, + ); } /// Cancel a pending reversible transaction scheduled by the caller. @@ -228,8 +284,8 @@ class Cancel extends Call { @override Map>> toJson() => { - 'cancel': {'txId': txId.toList()}, - }; + 'cancel': {'txId': txId.toList()} + }; int _sizeHint() { int size = 1; @@ -238,12 +294,27 @@ 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; @@ -264,8 +335,8 @@ class ExecuteTransfer extends Call { @override Map>> toJson() => { - 'execute_transfer': {'txId': txId.toList()}, - }; + 'execute_transfer': {'txId': txId.toList()} + }; int _sizeHint() { int size = 1; @@ -274,13 +345,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; @@ -288,10 +373,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 @@ -302,8 +393,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; @@ -313,17 +407,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. @@ -333,7 +443,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( @@ -354,8 +468,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; @@ -366,25 +484,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( @@ -405,8 +549,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; @@ -417,19 +565,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. @@ -464,13 +634,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; @@ -482,16 +652,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 && @@ -499,5 +687,10 @@ 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, + ); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/error.dart index 9eb6a022..c92e64f5 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/error.dart @@ -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); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -117,7 +121,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/schrodinger/types/pallet_reversible_transfers/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/event.dart index 7ca937dc..fb273e7e 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/event.dart @@ -44,7 +44,11 @@ class $Event { required _i3.AccountId32 interceptor, required _i4.BlockNumberOrTimestamp delay, }) { - return HighSecuritySet(who: who, interceptor: interceptor, delay: delay); + return HighSecuritySet( + who: who, + interceptor: interceptor, + delay: delay, + ); } TransactionScheduled transactionScheduled({ @@ -67,15 +71,25 @@ 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, + ); } } @@ -100,7 +114,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 HighSecuritySet: (value as HighSecuritySet).encodeTo(output); @@ -115,7 +132,8 @@ class $EventCodec with _i1.Codec { (value as TransactionExecuted).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -131,7 +149,8 @@ class $EventCodec with _i1.Codec { case TransactionExecuted: return (value as TransactionExecuted)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -139,7 +158,11 @@ class $EventCodec with _i1.Codec { /// 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.interceptor, + required this.delay, + }); factory HighSecuritySet._decode(_i1.Input input) { return HighSecuritySet( @@ -160,8 +183,12 @@ class HighSecuritySet extends Event { @override Map> toJson() => { - 'HighSecuritySet': {'who': who.toList(), 'interceptor': interceptor.toList(), 'delay': delay.toJson()}, - }; + 'HighSecuritySet': { + 'who': who.toList(), + 'interceptor': interceptor.toList(), + 'delay': delay.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -172,22 +199,47 @@ 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(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( + interceptor, + 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.interceptor, + interceptor, + ) && other.delay == delay; @override - int get hashCode => Object.hash(who, interceptor, delay); + int get hashCode => Object.hash( + who, + interceptor, + delay, + ); } /// A transaction has been intercepted and scheduled for delayed execution. @@ -238,23 +290,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(), + 'interceptor': interceptor.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 _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); @@ -262,36 +315,86 @@ 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( + 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, + ); } @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.interceptor, + interceptor, + ) && 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, + interceptor, + assetId, + amount, + txId, + executeAt, + ); } /// A scheduled transaction has been successfully cancelled by the owner. /// [who, tx_id] 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( @@ -308,8 +411,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; @@ -319,29 +425,56 @@ 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. /// [tx_id, dispatch_result] 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), @@ -356,15 +489,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); @@ -372,19 +508,39 @@ 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, + ); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/hold_reason.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/hold_reason.dart index bca8ed2f..e4dceb10 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/hold_reason.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -39,7 +42,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/schrodinger/types/pallet_reversible_transfers/pending_transfer.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pending_transfer.dart index 823f72db..e0c3fc83 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pending_transfer.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pending_transfer.dart @@ -42,37 +42,73 @@ class PendingTransfer { } Map toJson() => { - 'from': from.toList(), - 'to': to.toList(), - 'interceptor': interceptor.toList(), - 'call': call.toJson(), - 'amount': amount, - }; + 'from': from.toList(), + 'to': to.toList(), + 'interceptor': interceptor.toList(), + 'call': call.toJson(), + '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) && + _i5.listsEqual( + other.from, + from, + ) && + _i5.listsEqual( + other.to, + to, + ) && + _i5.listsEqual( + other.interceptor, + interceptor, + ) && other.call == call && other.amount == amount; @override - int get hashCode => Object.hash(from, to, interceptor, call, amount); + int get hashCode => Object.hash( + from, + to, + interceptor, + call, + 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.interceptor, + output, + ); + _i3.Bounded.codec.encodeTo( + obj.call, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/call.dart index 92a790d4..12cd7898 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/call.dart @@ -42,11 +42,22 @@ class $Call { required int priority, required _i5.RuntimeCall call, }) { - return Schedule(when: when, maybePeriodic: maybePeriodic, priority: priority, call: call); + return Schedule( + when: when, + maybePeriodic: maybePeriodic, + 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({ @@ -56,7 +67,13 @@ class $Call { required int priority, required _i5.RuntimeCall call, }) { - return ScheduleNamed(id: id, when: when, maybePeriodic: maybePeriodic, priority: priority, call: call); + return ScheduleNamed( + id: id, + when: when, + maybePeriodic: maybePeriodic, + priority: priority, + call: call, + ); } CancelNamed cancelNamed({required List id}) { @@ -69,7 +86,12 @@ class $Call { required int priority, required _i5.RuntimeCall call, }) { - return ScheduleAfter(after: after, maybePeriodic: maybePeriodic, priority: priority, call: call); + return ScheduleAfter( + after: after, + maybePeriodic: maybePeriodic, + priority: priority, + call: call, + ); } ScheduleNamedAfter scheduleNamedAfter({ @@ -79,7 +101,13 @@ class $Call { required int priority, required _i5.RuntimeCall call, }) { - return ScheduleNamedAfter(id: id, after: after, maybePeriodic: maybePeriodic, priority: priority, call: call); + return ScheduleNamedAfter( + id: id, + after: after, + maybePeriodic: maybePeriodic, + priority: priority, + call: call, + ); } SetRetry setRetry({ @@ -87,7 +115,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({ @@ -95,10 +127,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 _i3.Tuple2<_i4.BlockNumberOrTimestamp, int> task}) { + CancelRetry cancelRetry( + {required _i3.Tuple2<_i4.BlockNumberOrTimestamp, int> task}) { return CancelRetry(task: task); } @@ -140,7 +177,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); @@ -173,7 +213,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}"'); } } @@ -201,21 +242,30 @@ 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}"'); } } } /// Anonymously schedule a task. class Schedule extends Call { - const Schedule({required this.when, this.maybePeriodic, required this.priority, required this.call}); + const Schedule({ + required this.when, + this.maybePeriodic, + required this.priority, + required this.call, + }); factory Schedule._decode(_i1.Input input) { return Schedule( when: _i1.U32Codec.codec.decode(input), - maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).decode(input), + maybePeriodic: + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).decode(input), priority: _i1.U8Codec.codec.decode(input), call: _i5.RuntimeCall.codec.decode(input), ); @@ -235,40 +285,64 @@ class Schedule extends Call { @override Map> toJson() => { - 'schedule': { - 'when': when, - 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], - 'priority': priority, - 'call': call.toJson(), - }, - }; + 'schedule': { + 'when': when, + 'maybePeriodic': [ + maybePeriodic?.value0.toJson(), + maybePeriodic?.value1, + ], + 'priority': priority, + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(when); - size = - size + + size = size + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).sizeHint(maybePeriodic); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).sizeHint(maybePeriodic); size = size + _i1.U8Codec.codec.sizeHint(priority); size = size + _i5.RuntimeCall.codec.sizeHint(call); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U32Codec.codec.encodeTo(when, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U32Codec.codec.encodeTo( + when, + output, + ); const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).encodeTo(maybePeriodic, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i5.RuntimeCall.codec.encodeTo(call, output); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).encodeTo( + maybePeriodic, + output, + ); + _i1.U8Codec.codec.encodeTo( + priority, + output, + ); + _i5.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Schedule && other.when == when && other.maybePeriodic == maybePeriodic && @@ -276,15 +350,26 @@ class Schedule extends Call { other.call == call; @override - int get hashCode => Object.hash(when, maybePeriodic, priority, call); + int get hashCode => Object.hash( + when, + maybePeriodic, + 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 @@ -295,8 +380,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; @@ -306,17 +394,33 @@ 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, + ); } /// Schedule a named task. @@ -333,9 +437,12 @@ class ScheduleNamed extends Call { return ScheduleNamed( id: const _i1.U8ArrayCodec(32).decode(input), when: _i1.U32Codec.codec.decode(input), - maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).decode(input), + maybePeriodic: + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).decode(input), priority: _i1.U8Codec.codec.decode(input), call: _i5.RuntimeCall.codec.decode(input), ); @@ -358,52 +465,88 @@ class ScheduleNamed extends Call { @override Map> toJson() => { - 'schedule_named': { - 'id': id.toList(), - 'when': when, - 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], - 'priority': priority, - 'call': call.toJson(), - }, - }; + 'schedule_named': { + 'id': id.toList(), + 'when': when, + 'maybePeriodic': [ + maybePeriodic?.value0.toJson(), + maybePeriodic?.value1, + ], + 'priority': priority, + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; size = size + const _i1.U8ArrayCodec(32).sizeHint(id); size = size + _i1.U32Codec.codec.sizeHint(when); - size = - size + + size = size + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).sizeHint(maybePeriodic); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).sizeHint(maybePeriodic); size = size + _i1.U8Codec.codec.sizeHint(priority); size = size + _i5.RuntimeCall.codec.sizeHint(call); return size; } 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( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + id, + output, + ); + _i1.U32Codec.codec.encodeTo( + when, + output, + ); const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).encodeTo(maybePeriodic, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i5.RuntimeCall.codec.encodeTo(call, output); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).encodeTo( + maybePeriodic, + output, + ); + _i1.U8Codec.codec.encodeTo( + priority, + output, + ); + _i5.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.maybePeriodic == maybePeriodic && other.priority == priority && other.call == call; @override - int get hashCode => Object.hash(id, when, maybePeriodic, priority, call); + int get hashCode => Object.hash( + id, + when, + maybePeriodic, + priority, + call, + ); } /// Cancel a named scheduled task. @@ -419,8 +562,8 @@ class CancelNamed extends Call { @override Map>> toJson() => { - 'cancel_named': {'id': id.toList()}, - }; + 'cancel_named': {'id': id.toList()} + }; int _sizeHint() { int size = 1; @@ -429,12 +572,27 @@ 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; @@ -442,14 +600,22 @@ class CancelNamed extends Call { /// Anonymously schedule a task after a delay. class ScheduleAfter extends Call { - const ScheduleAfter({required this.after, this.maybePeriodic, required this.priority, required this.call}); + const ScheduleAfter({ + required this.after, + this.maybePeriodic, + required this.priority, + required this.call, + }); factory ScheduleAfter._decode(_i1.Input input) { return ScheduleAfter( after: _i4.BlockNumberOrTimestamp.codec.decode(input), - maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).decode(input), + maybePeriodic: + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).decode(input), priority: _i1.U8Codec.codec.decode(input), call: _i5.RuntimeCall.codec.decode(input), ); @@ -469,40 +635,64 @@ class ScheduleAfter extends Call { @override Map> toJson() => { - 'schedule_after': { - 'after': after.toJson(), - 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], - 'priority': priority, - 'call': call.toJson(), - }, - }; + 'schedule_after': { + 'after': after.toJson(), + 'maybePeriodic': [ + maybePeriodic?.value0.toJson(), + maybePeriodic?.value1, + ], + 'priority': priority, + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; size = size + _i4.BlockNumberOrTimestamp.codec.sizeHint(after); - size = - size + + size = size + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).sizeHint(maybePeriodic); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).sizeHint(maybePeriodic); size = size + _i1.U8Codec.codec.sizeHint(priority); size = size + _i5.RuntimeCall.codec.sizeHint(call); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i4.BlockNumberOrTimestamp.codec.encodeTo(after, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i4.BlockNumberOrTimestamp.codec.encodeTo( + after, + output, + ); const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).encodeTo(maybePeriodic, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i5.RuntimeCall.codec.encodeTo(call, output); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).encodeTo( + maybePeriodic, + output, + ); + _i1.U8Codec.codec.encodeTo( + priority, + output, + ); + _i5.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is ScheduleAfter && other.after == after && other.maybePeriodic == maybePeriodic && @@ -510,7 +700,12 @@ class ScheduleAfter extends Call { other.call == call; @override - int get hashCode => Object.hash(after, maybePeriodic, priority, call); + int get hashCode => Object.hash( + after, + maybePeriodic, + priority, + call, + ); } /// Schedule a named task after a delay. @@ -527,9 +722,12 @@ class ScheduleNamedAfter extends Call { return ScheduleNamedAfter( id: const _i1.U8ArrayCodec(32).decode(input), after: _i4.BlockNumberOrTimestamp.codec.decode(input), - maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).decode(input), + maybePeriodic: + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).decode(input), priority: _i1.U8Codec.codec.decode(input), call: _i5.RuntimeCall.codec.decode(input), ); @@ -552,52 +750,88 @@ class ScheduleNamedAfter extends Call { @override Map> toJson() => { - 'schedule_named_after': { - 'id': id.toList(), - 'after': after.toJson(), - 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], - 'priority': priority, - 'call': call.toJson(), - }, - }; + 'schedule_named_after': { + 'id': id.toList(), + 'after': after.toJson(), + 'maybePeriodic': [ + maybePeriodic?.value0.toJson(), + maybePeriodic?.value1, + ], + 'priority': priority, + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; size = size + const _i1.U8ArrayCodec(32).sizeHint(id); size = size + _i4.BlockNumberOrTimestamp.codec.sizeHint(after); - size = - size + + size = size + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).sizeHint(maybePeriodic); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).sizeHint(maybePeriodic); size = size + _i1.U8Codec.codec.sizeHint(priority); size = size + _i5.RuntimeCall.codec.sizeHint(call); return size; } 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( + 5, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + id, + output, + ); + _i4.BlockNumberOrTimestamp.codec.encodeTo( + after, + output, + ); const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).encodeTo(maybePeriodic, output); - _i1.U8Codec.codec.encodeTo(priority, output); - _i5.RuntimeCall.codec.encodeTo(call, output); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).encodeTo( + maybePeriodic, + output, + ); + _i1.U8Codec.codec.encodeTo( + priority, + output, + ); + _i5.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.maybePeriodic == maybePeriodic && other.priority == priority && other.call == call; @override - int get hashCode => Object.hash(id, after, maybePeriodic, priority, call); + int get hashCode => Object.hash( + id, + after, + maybePeriodic, + priority, + call, + ); } /// Set a retry configuration for a task so that, in case its scheduled run fails, it will @@ -613,7 +847,11 @@ class ScheduleNamedAfter extends Call { /// original task's configuration, but will have a lower value for `remaining` than the /// original `total_retries`. 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( @@ -637,17 +875,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 _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, @@ -658,22 +898,44 @@ class SetRetry extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); const _i3.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; + identical( + this, + other, + ) || + other is SetRetry && + other.task == task && + other.retries == retries && + other.period == period; @override - int get hashCode => Object.hash(task, retries, period); + 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 @@ -689,7 +951,11 @@ class SetRetry extends Call { /// original task's configuration, but will have a lower value for `remaining` than the /// original `total_retries`. 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( @@ -710,8 +976,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; @@ -722,19 +992,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; + 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); + int get hashCode => Object.hash( + id, + retries, + period, + ); } /// Removes the retry configuration of a task. @@ -743,11 +1038,10 @@ class CancelRetry extends Call { factory CancelRetry._decode(_i1.Input input) { return CancelRetry( - task: const _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input), - ); + task: const _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + ).decode(input)); } /// TaskAddressOf @@ -755,15 +1049,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 _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, @@ -772,15 +1068,26 @@ class CancelRetry extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(8, output); + _i1.U8Codec.codec.encodeTo( + 8, + output, + ); const _i3.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; @@ -799,8 +1106,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; @@ -809,12 +1116,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/schrodinger/types/pallet_scheduler/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/error.dart index 4cdb7fe1..8604736e 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/error.dart @@ -23,7 +23,10 @@ enum Error { /// Attempt to use a non-named function on a named task. named('Named', 5); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -66,7 +69,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/schrodinger/types/pallet_scheduler/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/event.dart index 09186880..c5769c8d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,30 +73,62 @@ 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, + ); } - PeriodicFailed periodicFailed({required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id}) { - return PeriodicFailed(task: task, id: id); + PeriodicFailed periodicFailed({ + required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, + List? id, + }) { + return PeriodicFailed( + 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, + ); } } @@ -115,7 +163,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); @@ -145,7 +196,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}"'); } } @@ -171,17 +223,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 @@ -192,8 +251,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; @@ -203,25 +265,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 @@ -232,8 +316,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; @@ -243,22 +330,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( @@ -285,24 +392,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, @@ -311,29 +420,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( @@ -361,51 +498,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( @@ -425,44 +595,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( @@ -482,44 +674,66 @@ 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 renewed since the agenda is full at that block. class PeriodicFailed extends Event { - const PeriodicFailed({required this.task, this.id}); + const PeriodicFailed({ + required this.task, + this.id, + }); factory PeriodicFailed._decode(_i1.Input input) { return PeriodicFailed( @@ -539,45 +753,67 @@ class PeriodicFailed extends Event { @override Map?>> toJson() => { - 'PeriodicFailed': { - 'task': [task.value0.toJson(), task.value1], - 'id': id?.toList(), - }, - }; + 'PeriodicFailed': { + '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 PeriodicFailed && other.task == task && other.id == id; + identical( + this, + other, + ) || + other is PeriodicFailed && 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( @@ -597,44 +833,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(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 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( @@ -654,37 +912,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(8, output); + _i1.U8Codec.codec.encodeTo( + 8, + 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/schrodinger/types/pallet_scheduler/retry_config.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/retry_config.dart index 57203819..efcc08b7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/retry_config.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_scheduler/scheduled.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/scheduled.dart index 0fec4c35..a4ec4ce9 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/scheduled.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/scheduled.dart @@ -9,7 +9,13 @@ import '../quantus_runtime/origin_caller.dart' as _i5; import '../tuples_1.dart' as _i3; class Scheduled { - const Scheduled({this.maybeId, required this.priority, required this.call, this.maybePeriodic, required this.origin}); + const Scheduled({ + this.maybeId, + required this.priority, + required this.call, + this.maybePeriodic, + required this.origin, + }); factory Scheduled.decode(_i1.Input input) { return codec.decode(input); @@ -37,16 +43,22 @@ class Scheduled { } Map toJson() => { - 'maybeId': maybeId?.toList(), - 'priority': priority, - 'call': call.toJson(), - 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], - 'origin': origin.toJson(), - }; + 'maybeId': maybeId?.toList(), + 'priority': priority, + 'call': call.toJson(), + 'maybePeriodic': [ + maybePeriodic?.value0.toJson(), + maybePeriodic?.value1, + ], + 'origin': origin.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Scheduled && other.maybeId == maybeId && other.priority == priority && @@ -55,32 +67,62 @@ class Scheduled { other.origin == origin; @override - int get hashCode => Object.hash(maybeId, priority, call, maybePeriodic, origin); + int get hashCode => Object.hash( + maybeId, + priority, + call, + maybePeriodic, + 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); + 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, + ); const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).encodeTo(obj.maybePeriodic, output); - _i5.OriginCaller.codec.encodeTo(obj.origin, output); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).encodeTo( + obj.maybePeriodic, + output, + ); + _i5.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), - maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).decode(input), + maybePeriodic: + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).decode(input), origin: _i5.OriginCaller.codec.decode(input), ); } @@ -88,14 +130,17 @@ 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 + + size = size + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), - ).sizeHint(obj.maybePeriodic); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + )).sizeHint(obj.maybePeriodic); size = size + _i5.OriginCaller.codec.sizeHint(obj.origin); return size; } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/call.dart index 9513e6c8..8e6af339 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/call.dart @@ -39,16 +39,28 @@ class $Call { return Sudo(call: call); } - SudoUncheckedWeight sudoUncheckedWeight({required _i3.RuntimeCall call, required _i4.Weight weight}) { - return SudoUncheckedWeight(call: call, weight: weight); + SudoUncheckedWeight sudoUncheckedWeight({ + required _i3.RuntimeCall call, + required _i4.Weight weight, + }) { + return SudoUncheckedWeight( + call: call, + weight: weight, + ); } SetKey setKey({required _i5.MultiAddress new_}) { return SetKey(new_: new_); } - SudoAs sudoAs({required _i5.MultiAddress who, required _i3.RuntimeCall call}) { - return SudoAs(who: who, call: call); + SudoAs sudoAs({ + required _i5.MultiAddress who, + required _i3.RuntimeCall call, + }) { + return SudoAs( + who: who, + call: call, + ); } RemoveKey removeKey() { @@ -79,7 +91,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 Sudo: (value as Sudo).encodeTo(output); @@ -97,7 +112,8 @@ class $CallCodec with _i1.Codec { (value as RemoveKey).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -115,7 +131,8 @@ class $CallCodec with _i1.Codec { case RemoveKey: return 1; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -133,8 +150,8 @@ class Sudo extends Call { @override Map>>> toJson() => { - 'sudo': {'call': call.toJson()}, - }; + 'sudo': {'call': call.toJson()} + }; int _sizeHint() { int size = 1; @@ -143,12 +160,23 @@ class Sudo extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i3.RuntimeCall.codec.encodeTo(call, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Sudo && other.call == call; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Sudo && other.call == call; @override int get hashCode => call.hashCode; @@ -160,10 +188,16 @@ class Sudo extends Call { /// /// The dispatch origin for this call must be _Signed_. class SudoUncheckedWeight extends Call { - const SudoUncheckedWeight({required this.call, required this.weight}); + const SudoUncheckedWeight({ + required this.call, + required this.weight, + }); factory SudoUncheckedWeight._decode(_i1.Input input) { - return SudoUncheckedWeight(call: _i3.RuntimeCall.codec.decode(input), weight: _i4.Weight.codec.decode(input)); + return SudoUncheckedWeight( + call: _i3.RuntimeCall.codec.decode(input), + weight: _i4.Weight.codec.decode(input), + ); } /// Box<::RuntimeCall> @@ -174,8 +208,11 @@ class SudoUncheckedWeight extends Call { @override Map>> toJson() => { - 'sudo_unchecked_weight': {'call': call.toJson(), 'weight': weight.toJson()}, - }; + 'sudo_unchecked_weight': { + 'call': call.toJson(), + 'weight': weight.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -185,17 +222,35 @@ class SudoUncheckedWeight extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i3.RuntimeCall.codec.encodeTo(call, output); - _i4.Weight.codec.encodeTo(weight, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + call, + output, + ); + _i4.Weight.codec.encodeTo( + weight, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is SudoUncheckedWeight && other.call == call && other.weight == weight; + identical( + this, + other, + ) || + other is SudoUncheckedWeight && + other.call == call && + other.weight == weight; @override - int get hashCode => Object.hash(call, weight); + int get hashCode => Object.hash( + call, + weight, + ); } /// Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo @@ -212,8 +267,8 @@ class SetKey extends Call { @override Map>> toJson() => { - 'set_key': {'new': new_.toJson()}, - }; + 'set_key': {'new': new_.toJson()} + }; int _sizeHint() { int size = 1; @@ -222,12 +277,23 @@ class SetKey extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i5.MultiAddress.codec.encodeTo(new_, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i5.MultiAddress.codec.encodeTo( + new_, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is SetKey && other.new_ == new_; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is SetKey && other.new_ == new_; @override int get hashCode => new_.hashCode; @@ -238,10 +304,16 @@ class SetKey extends Call { /// /// The dispatch origin for this call must be _Signed_. class SudoAs extends Call { - const SudoAs({required this.who, required this.call}); + const SudoAs({ + required this.who, + required this.call, + }); factory SudoAs._decode(_i1.Input input) { - return SudoAs(who: _i5.MultiAddress.codec.decode(input), call: _i3.RuntimeCall.codec.decode(input)); + return SudoAs( + who: _i5.MultiAddress.codec.decode(input), + call: _i3.RuntimeCall.codec.decode(input), + ); } /// AccountIdLookupOf @@ -252,8 +324,11 @@ class SudoAs extends Call { @override Map>> toJson() => { - 'sudo_as': {'who': who.toJson(), 'call': call.toJson()}, - }; + 'sudo_as': { + 'who': who.toJson(), + 'call': call.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -263,16 +338,33 @@ class SudoAs extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i5.MultiAddress.codec.encodeTo(who, output); - _i3.RuntimeCall.codec.encodeTo(call, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i5.MultiAddress.codec.encodeTo( + who, + output, + ); + _i3.RuntimeCall.codec.encodeTo( + call, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is SudoAs && other.who == who && other.call == call; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is SudoAs && other.who == who && other.call == call; @override - int get hashCode => Object.hash(who, call); + int get hashCode => Object.hash( + who, + call, + ); } /// Permanently removes the sudo key. @@ -285,7 +377,10 @@ class RemoveKey extends Call { Map toJson() => {'remove_key': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/error.dart index 5f9a8048..489a0679 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/error.dart @@ -8,7 +8,10 @@ enum Error { /// Sender must be the Sudo account. requireSudo('RequireSudo', 0); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -41,7 +44,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/schrodinger/types/pallet_sudo/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/event.dart index 7c57f805..5a086110 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/event.dart @@ -39,15 +39,22 @@ class $Event { return Sudid(sudoResult: sudoResult); } - KeyChanged keyChanged({_i4.AccountId32? old, required _i4.AccountId32 new_}) { - return KeyChanged(old: old, new_: new_); + KeyChanged keyChanged({ + _i4.AccountId32? old, + required _i4.AccountId32 new_, + }) { + return KeyChanged( + old: old, + new_: new_, + ); } KeyRemoved keyRemoved() { return KeyRemoved(); } - SudoAsDone sudoAsDone({required _i1.Result sudoResult}) { + SudoAsDone sudoAsDone( + {required _i1.Result sudoResult}) { return SudoAsDone(sudoResult: sudoResult); } } @@ -73,7 +80,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 Sudid: (value as Sudid).encodeTo(output); @@ -88,7 +98,8 @@ class $EventCodec with _i1.Codec { (value as SudoAsDone).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -104,7 +115,8 @@ class $EventCodec with _i1.Codec { case SudoAsDone: return (value as SudoAsDone)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -115,11 +127,10 @@ class Sudid extends Event { factory Sudid._decode(_i1.Input input) { return Sudid( - sudoResult: const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).decode(input), - ); + sudoResult: const _i1.ResultCodec( + _i1.NullCodec.codec, + _i3.DispatchError.codec, + ).decode(input)); } /// DispatchResult @@ -128,13 +139,12 @@ class Sudid extends Event { @override Map>> toJson() => { - 'Sudid': {'sudoResult': sudoResult.toJson()}, - }; + 'Sudid': {'sudoResult': sudoResult.toJson()} + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, @@ -143,15 +153,26 @@ class Sudid extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, - ).encodeTo(sudoResult, output); + ).encodeTo( + sudoResult, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Sudid && other.sudoResult == sudoResult; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Sudid && other.sudoResult == sudoResult; @override int get hashCode => sudoResult.hashCode; @@ -159,11 +180,15 @@ class Sudid extends Event { /// The sudo key has been updated. class KeyChanged extends Event { - const KeyChanged({this.old, required this.new_}); + const KeyChanged({ + this.old, + required this.new_, + }); factory KeyChanged._decode(_i1.Input input) { return KeyChanged( - old: const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()).decode(input), + old: const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()) + .decode(input), new_: const _i1.U8ArrayCodec(32).decode(input), ); } @@ -178,28 +203,54 @@ class KeyChanged extends Event { @override Map?>> toJson() => { - 'KeyChanged': {'old': old?.toList(), 'new': new_.toList()}, - }; + 'KeyChanged': { + 'old': old?.toList(), + 'new': new_.toList(), + } + }; int _sizeHint() { int size = 1; - size = size + const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()).sizeHint(old); + size = size + + const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()) + .sizeHint(old); size = size + const _i4.AccountId32Codec().sizeHint(new_); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()).encodeTo(old, output); - const _i1.U8ArrayCodec(32).encodeTo(new_, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()).encodeTo( + old, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + new_, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is KeyChanged && other.old == old && _i5.listsEqual(other.new_, new_); + identical( + this, + other, + ) || + other is KeyChanged && + other.old == old && + _i5.listsEqual( + other.new_, + new_, + ); @override - int get hashCode => Object.hash(old, new_); + int get hashCode => Object.hash( + old, + new_, + ); } /// The key was permanently removed. @@ -210,7 +261,10 @@ class KeyRemoved extends Event { Map toJson() => {'KeyRemoved': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); } @override @@ -226,11 +280,10 @@ class SudoAsDone extends Event { factory SudoAsDone._decode(_i1.Input input) { return SudoAsDone( - sudoResult: const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).decode(input), - ); + sudoResult: const _i1.ResultCodec( + _i1.NullCodec.codec, + _i3.DispatchError.codec, + ).decode(input)); } /// DispatchResult @@ -239,13 +292,12 @@ class SudoAsDone extends Event { @override Map>> toJson() => { - 'SudoAsDone': {'sudoResult': sudoResult.toJson()}, - }; + 'SudoAsDone': {'sudoResult': sudoResult.toJson()} + }; int _sizeHint() { int size = 1; - size = - size + + size = size + const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, @@ -254,15 +306,26 @@ class SudoAsDone extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, - ).encodeTo(sudoResult, output); + ).encodeTo( + sudoResult, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is SudoAsDone && other.sudoResult == sudoResult; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is SudoAsDone && other.sudoResult == sudoResult; @override int get hashCode => sudoResult.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_timestamp/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_timestamp/pallet/call.dart index 513d9777..784b0d7c 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_timestamp/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_transaction_payment/charge_transaction_payment.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/charge_transaction_payment.dart index 7146a0fb..3abf4a8d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/charge_transaction_payment.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_transaction_payment/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/pallet/event.dart index a0f28f9a..c596daed 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_transaction_payment/releases.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/releases.dart index a01f00ee..0d0e0eab 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/releases.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -42,7 +45,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/schrodinger/types/pallet_treasury/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/call.dart index f740ba9c..12c67a52 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/call.dart @@ -33,8 +33,14 @@ abstract class Call { class $Call { const $Call(); - SpendLocal spendLocal({required BigInt amount, required _i3.MultiAddress beneficiary}) { - return SpendLocal(amount: amount, beneficiary: beneficiary); + SpendLocal spendLocal({ + required BigInt amount, + required _i3.MultiAddress beneficiary, + }) { + return SpendLocal( + amount: amount, + beneficiary: beneficiary, + ); } RemoveApproval removeApproval({required BigInt proposalId}) { @@ -47,7 +53,12 @@ class $Call { required _i3.MultiAddress beneficiary, int? validFrom, }) { - return Spend(assetKind: assetKind, amount: amount, beneficiary: beneficiary, validFrom: validFrom); + return Spend( + assetKind: assetKind, + amount: amount, + beneficiary: beneficiary, + validFrom: validFrom, + ); } Payout payout({required int index}) { @@ -88,7 +99,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 SpendLocal: (value as SpendLocal).encodeTo(output); @@ -109,7 +123,8 @@ class $CallCodec with _i1.Codec { (value as VoidSpend).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -129,7 +144,8 @@ class $CallCodec with _i1.Codec { case VoidSpend: return (value as VoidSpend)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -152,7 +168,10 @@ class $CallCodec with _i1.Codec { /// /// Emits [`Event::SpendApproved`] if successful. class SpendLocal extends Call { - const SpendLocal({required this.amount, required this.beneficiary}); + const SpendLocal({ + required this.amount, + required this.beneficiary, + }); factory SpendLocal._decode(_i1.Input input) { return SpendLocal( @@ -169,8 +188,11 @@ class SpendLocal extends Call { @override Map> toJson() => { - 'spend_local': {'amount': amount, 'beneficiary': beneficiary.toJson()}, - }; + 'spend_local': { + 'amount': amount, + 'beneficiary': beneficiary.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -180,17 +202,35 @@ class SpendLocal extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.CompactBigIntCodec.codec.encodeTo(amount, output); - _i3.MultiAddress.codec.encodeTo(beneficiary, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + amount, + output, + ); + _i3.MultiAddress.codec.encodeTo( + beneficiary, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is SpendLocal && other.amount == amount && other.beneficiary == beneficiary; + identical( + this, + other, + ) || + other is SpendLocal && + other.amount == amount && + other.beneficiary == beneficiary; @override - int get hashCode => Object.hash(amount, beneficiary); + int get hashCode => Object.hash( + amount, + beneficiary, + ); } /// Force a previously approved proposal to be removed from the approval queue. @@ -218,7 +258,8 @@ class RemoveApproval extends Call { const RemoveApproval({required this.proposalId}); factory RemoveApproval._decode(_i1.Input input) { - return RemoveApproval(proposalId: _i1.CompactBigIntCodec.codec.decode(input)); + return RemoveApproval( + proposalId: _i1.CompactBigIntCodec.codec.decode(input)); } /// ProposalIndex @@ -226,8 +267,8 @@ class RemoveApproval extends Call { @override Map> toJson() => { - 'remove_approval': {'proposalId': proposalId}, - }; + 'remove_approval': {'proposalId': proposalId} + }; int _sizeHint() { int size = 1; @@ -236,12 +277,23 @@ class RemoveApproval extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.CompactBigIntCodec.codec.encodeTo(proposalId, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + proposalId, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is RemoveApproval && other.proposalId == proposalId; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is RemoveApproval && other.proposalId == proposalId; @override int get hashCode => proposalId.hashCode; @@ -274,7 +326,12 @@ class RemoveApproval extends Call { /// /// Emits [`Event::AssetSpendApproved`] if successful. class Spend extends Call { - const Spend({required this.assetKind, required this.amount, required this.beneficiary, this.validFrom}); + const Spend({ + required this.assetKind, + required this.amount, + required this.beneficiary, + this.validFrom, + }); factory Spend._decode(_i1.Input input) { return Spend( @@ -299,29 +356,53 @@ class Spend extends Call { @override Map> toJson() => { - 'spend': {'assetKind': null, 'amount': amount, 'beneficiary': beneficiary.toJson(), 'validFrom': validFrom}, - }; + 'spend': { + 'assetKind': null, + 'amount': amount, + 'beneficiary': beneficiary.toJson(), + 'validFrom': validFrom, + } + }; int _sizeHint() { int size = 1; size = size + _i1.NullCodec.codec.sizeHint(assetKind); size = size + _i1.CompactBigIntCodec.codec.sizeHint(amount); size = size + _i3.MultiAddress.codec.sizeHint(beneficiary); - size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(validFrom); + size = size + + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(validFrom); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.NullCodec.codec.encodeTo(assetKind, output); - _i1.CompactBigIntCodec.codec.encodeTo(amount, output); - _i3.MultiAddress.codec.encodeTo(beneficiary, output); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(validFrom, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.NullCodec.codec.encodeTo( + assetKind, + output, + ); + _i1.CompactBigIntCodec.codec.encodeTo( + amount, + output, + ); + _i3.MultiAddress.codec.encodeTo( + beneficiary, + output, + ); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( + validFrom, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Spend && other.assetKind == assetKind && other.amount == amount && @@ -329,7 +410,12 @@ class Spend extends Call { other.validFrom == validFrom; @override - int get hashCode => Object.hash(assetKind, amount, beneficiary, validFrom); + int get hashCode => Object.hash( + assetKind, + amount, + beneficiary, + validFrom, + ); } /// Claim a spend. @@ -363,8 +449,8 @@ class Payout extends Call { @override Map> toJson() => { - 'payout': {'index': index}, - }; + 'payout': {'index': index} + }; int _sizeHint() { int size = 1; @@ -373,12 +459,23 @@ class Payout extends Call { } 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 Payout && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Payout && other.index == index; @override int get hashCode => index.hashCode; @@ -415,8 +512,8 @@ class CheckStatus extends Call { @override Map> toJson() => { - 'check_status': {'index': index}, - }; + 'check_status': {'index': index} + }; int _sizeHint() { int size = 1; @@ -425,12 +522,23 @@ class CheckStatus 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 CheckStatus && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is CheckStatus && other.index == index; @override int get hashCode => index.hashCode; @@ -464,8 +572,8 @@ class VoidSpend extends Call { @override Map> toJson() => { - 'void_spend': {'index': index}, - }; + 'void_spend': {'index': index} + }; int _sizeHint() { int size = 1; @@ -474,12 +582,23 @@ class VoidSpend extends Call { } 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 VoidSpend && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is VoidSpend && other.index == index; @override int get hashCode => index.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/error.dart index a6718c9b..80efe92b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/error.dart @@ -39,7 +39,10 @@ enum Error { /// The payment has neither failed nor succeeded yet. inconclusive('Inconclusive', 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/schrodinger/types/pallet_treasury/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/event.dart index b7c89ff3..49b4bdf9 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/event.dart @@ -38,8 +38,16 @@ class $Event { return Spending(budgetRemaining: budgetRemaining); } - Awarded awarded({required int proposalIndex, required BigInt award, required _i3.AccountId32 account}) { - return Awarded(proposalIndex: proposalIndex, award: award, account: account); + Awarded awarded({ + required int proposalIndex, + required BigInt award, + required _i3.AccountId32 account, + }) { + return Awarded( + proposalIndex: proposalIndex, + award: award, + account: account, + ); } Burnt burnt({required BigInt burntFunds}) { @@ -59,11 +67,21 @@ class $Event { required BigInt amount, required _i3.AccountId32 beneficiary, }) { - return SpendApproved(proposalIndex: proposalIndex, amount: amount, beneficiary: beneficiary); + return SpendApproved( + proposalIndex: proposalIndex, + amount: amount, + beneficiary: beneficiary, + ); } - UpdatedInactive updatedInactive({required BigInt reactivated, required BigInt deactivated}) { - return UpdatedInactive(reactivated: reactivated, deactivated: deactivated); + UpdatedInactive updatedInactive({ + required BigInt reactivated, + required BigInt deactivated, + }) { + return UpdatedInactive( + reactivated: reactivated, + deactivated: deactivated, + ); } AssetSpendApproved assetSpendApproved({ @@ -88,12 +106,24 @@ class $Event { return AssetSpendVoided(index: index); } - Paid paid({required int index, required int paymentId}) { - return Paid(index: index, paymentId: paymentId); + Paid paid({ + required int index, + required int paymentId, + }) { + return Paid( + index: index, + paymentId: paymentId, + ); } - PaymentFailed paymentFailed({required int index, required int paymentId}) { - return PaymentFailed(index: index, paymentId: paymentId); + PaymentFailed paymentFailed({ + required int index, + required int paymentId, + }) { + return PaymentFailed( + index: index, + paymentId: paymentId, + ); } SpendProcessed spendProcessed({required int index}) { @@ -138,7 +168,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 Spending: (value as Spending).encodeTo(output); @@ -177,7 +210,8 @@ class $EventCodec with _i1.Codec { (value as SpendProcessed).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -209,7 +243,8 @@ class $EventCodec with _i1.Codec { case SpendProcessed: return (value as SpendProcessed)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -227,8 +262,8 @@ class Spending extends Event { @override Map> toJson() => { - 'Spending': {'budgetRemaining': budgetRemaining}, - }; + 'Spending': {'budgetRemaining': budgetRemaining} + }; int _sizeHint() { int size = 1; @@ -237,13 +272,23 @@ class Spending extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - _i1.U128Codec.codec.encodeTo(budgetRemaining, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + _i1.U128Codec.codec.encodeTo( + budgetRemaining, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Spending && other.budgetRemaining == budgetRemaining; + identical( + this, + other, + ) || + other is Spending && other.budgetRemaining == budgetRemaining; @override int get hashCode => budgetRemaining.hashCode; @@ -251,7 +296,11 @@ class Spending extends Event { /// Some funds have been allocated. class Awarded extends Event { - const Awarded({required this.proposalIndex, required this.award, required this.account}); + const Awarded({ + required this.proposalIndex, + required this.award, + required this.account, + }); factory Awarded._decode(_i1.Input input) { return Awarded( @@ -272,8 +321,12 @@ class Awarded extends Event { @override Map> toJson() => { - 'Awarded': {'proposalIndex': proposalIndex, 'award': award, 'account': account.toList()}, - }; + 'Awarded': { + 'proposalIndex': proposalIndex, + 'award': award, + 'account': account.toList(), + } + }; int _sizeHint() { int size = 1; @@ -284,22 +337,44 @@ class Awarded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(proposalIndex, output); - _i1.U128Codec.codec.encodeTo(award, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalIndex, + output, + ); + _i1.U128Codec.codec.encodeTo( + award, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Awarded && other.proposalIndex == proposalIndex && other.award == award && - _i4.listsEqual(other.account, account); + _i4.listsEqual( + other.account, + account, + ); @override - int get hashCode => Object.hash(proposalIndex, award, account); + int get hashCode => Object.hash( + proposalIndex, + award, + account, + ); } /// Some of our funds have been burnt. @@ -315,8 +390,8 @@ class Burnt extends Event { @override Map> toJson() => { - 'Burnt': {'burntFunds': burntFunds}, - }; + 'Burnt': {'burntFunds': burntFunds} + }; int _sizeHint() { int size = 1; @@ -325,12 +400,23 @@ class Burnt extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i1.U128Codec.codec.encodeTo(burntFunds, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i1.U128Codec.codec.encodeTo( + burntFunds, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Burnt && other.burntFunds == burntFunds; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Burnt && other.burntFunds == burntFunds; @override int get hashCode => burntFunds.hashCode; @@ -349,8 +435,8 @@ class Rollover extends Event { @override Map> toJson() => { - 'Rollover': {'rolloverBalance': rolloverBalance}, - }; + 'Rollover': {'rolloverBalance': rolloverBalance} + }; int _sizeHint() { int size = 1; @@ -359,13 +445,23 @@ class Rollover extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i1.U128Codec.codec.encodeTo(rolloverBalance, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i1.U128Codec.codec.encodeTo( + rolloverBalance, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Rollover && other.rolloverBalance == rolloverBalance; + identical( + this, + other, + ) || + other is Rollover && other.rolloverBalance == rolloverBalance; @override int get hashCode => rolloverBalance.hashCode; @@ -384,8 +480,8 @@ class Deposit extends Event { @override Map> toJson() => { - 'Deposit': {'value': value}, - }; + 'Deposit': {'value': value} + }; int _sizeHint() { int size = 1; @@ -394,12 +490,23 @@ class Deposit extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U128Codec.codec.encodeTo(value, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.U128Codec.codec.encodeTo( + value, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Deposit && other.value == value; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Deposit && other.value == value; @override int get hashCode => value.hashCode; @@ -407,7 +514,11 @@ class Deposit extends Event { /// A new spend proposal has been approved. class SpendApproved extends Event { - const SpendApproved({required this.proposalIndex, required this.amount, required this.beneficiary}); + const SpendApproved({ + required this.proposalIndex, + required this.amount, + required this.beneficiary, + }); factory SpendApproved._decode(_i1.Input input) { return SpendApproved( @@ -428,8 +539,12 @@ class SpendApproved extends Event { @override Map> toJson() => { - 'SpendApproved': {'proposalIndex': proposalIndex, 'amount': amount, 'beneficiary': beneficiary.toList()}, - }; + 'SpendApproved': { + 'proposalIndex': proposalIndex, + 'amount': amount, + 'beneficiary': beneficiary.toList(), + } + }; int _sizeHint() { int size = 1; @@ -440,27 +555,52 @@ class SpendApproved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i1.U32Codec.codec.encodeTo(proposalIndex, output); - _i1.U128Codec.codec.encodeTo(amount, output); - const _i1.U8ArrayCodec(32).encodeTo(beneficiary, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i1.U32Codec.codec.encodeTo( + proposalIndex, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + beneficiary, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is SpendApproved && other.proposalIndex == proposalIndex && other.amount == amount && - _i4.listsEqual(other.beneficiary, beneficiary); + _i4.listsEqual( + other.beneficiary, + beneficiary, + ); @override - int get hashCode => Object.hash(proposalIndex, amount, beneficiary); + int get hashCode => Object.hash( + proposalIndex, + amount, + beneficiary, + ); } /// The inactive funds of the pallet have been updated. class UpdatedInactive extends Event { - const UpdatedInactive({required this.reactivated, required this.deactivated}); + const UpdatedInactive({ + required this.reactivated, + required this.deactivated, + }); factory UpdatedInactive._decode(_i1.Input input) { return UpdatedInactive( @@ -477,8 +617,11 @@ class UpdatedInactive extends Event { @override Map> toJson() => { - 'UpdatedInactive': {'reactivated': reactivated, 'deactivated': deactivated}, - }; + 'UpdatedInactive': { + 'reactivated': reactivated, + 'deactivated': deactivated, + } + }; int _sizeHint() { int size = 1; @@ -488,18 +631,35 @@ class UpdatedInactive extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(6, output); - _i1.U128Codec.codec.encodeTo(reactivated, output); - _i1.U128Codec.codec.encodeTo(deactivated, output); + _i1.U8Codec.codec.encodeTo( + 6, + output, + ); + _i1.U128Codec.codec.encodeTo( + reactivated, + output, + ); + _i1.U128Codec.codec.encodeTo( + deactivated, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is UpdatedInactive && other.reactivated == reactivated && other.deactivated == deactivated; - - @override - int get hashCode => Object.hash(reactivated, deactivated); + identical( + this, + other, + ) || + other is UpdatedInactive && + other.reactivated == reactivated && + other.deactivated == deactivated; + + @override + int get hashCode => Object.hash( + reactivated, + deactivated, + ); } /// A new asset spend proposal has been approved. @@ -544,15 +704,15 @@ class AssetSpendApproved extends Event { @override Map> toJson() => { - 'AssetSpendApproved': { - 'index': index, - 'assetKind': null, - 'amount': amount, - 'beneficiary': beneficiary.toList(), - 'validFrom': validFrom, - 'expireAt': expireAt, - }, - }; + 'AssetSpendApproved': { + 'index': index, + 'assetKind': null, + 'amount': amount, + 'beneficiary': beneficiary.toList(), + 'validFrom': validFrom, + 'expireAt': expireAt, + } + }; int _sizeHint() { int size = 1; @@ -566,28 +726,62 @@ class AssetSpendApproved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(7, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i1.NullCodec.codec.encodeTo(assetKind, output); - _i1.U128Codec.codec.encodeTo(amount, output); - const _i1.U8ArrayCodec(32).encodeTo(beneficiary, output); - _i1.U32Codec.codec.encodeTo(validFrom, output); - _i1.U32Codec.codec.encodeTo(expireAt, output); + _i1.U8Codec.codec.encodeTo( + 7, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i1.NullCodec.codec.encodeTo( + assetKind, + output, + ); + _i1.U128Codec.codec.encodeTo( + amount, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + beneficiary, + output, + ); + _i1.U32Codec.codec.encodeTo( + validFrom, + output, + ); + _i1.U32Codec.codec.encodeTo( + expireAt, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is AssetSpendApproved && other.index == index && other.assetKind == assetKind && other.amount == amount && - _i4.listsEqual(other.beneficiary, beneficiary) && + _i4.listsEqual( + other.beneficiary, + beneficiary, + ) && other.validFrom == validFrom && other.expireAt == expireAt; @override - int get hashCode => Object.hash(index, assetKind, amount, beneficiary, validFrom, expireAt); + int get hashCode => Object.hash( + index, + assetKind, + amount, + beneficiary, + validFrom, + expireAt, + ); } /// An approved spend was voided. @@ -603,8 +797,8 @@ class AssetSpendVoided extends Event { @override Map> toJson() => { - 'AssetSpendVoided': {'index': index}, - }; + 'AssetSpendVoided': {'index': index} + }; int _sizeHint() { int size = 1; @@ -613,12 +807,23 @@ class AssetSpendVoided 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 AssetSpendVoided && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is AssetSpendVoided && other.index == index; @override int get hashCode => index.hashCode; @@ -626,10 +831,16 @@ class AssetSpendVoided extends Event { /// A payment happened. class Paid extends Event { - const Paid({required this.index, required this.paymentId}); + const Paid({ + required this.index, + required this.paymentId, + }); factory Paid._decode(_i1.Input input) { - return Paid(index: _i1.U32Codec.codec.decode(input), paymentId: _i1.U32Codec.codec.decode(input)); + return Paid( + index: _i1.U32Codec.codec.decode(input), + paymentId: _i1.U32Codec.codec.decode(input), + ); } /// SpendIndex @@ -640,8 +851,11 @@ class Paid extends Event { @override Map> toJson() => { - 'Paid': {'index': index, 'paymentId': paymentId}, - }; + 'Paid': { + 'index': index, + 'paymentId': paymentId, + } + }; int _sizeHint() { int size = 1; @@ -651,25 +865,47 @@ class Paid extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(9, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i1.U32Codec.codec.encodeTo(paymentId, output); + _i1.U8Codec.codec.encodeTo( + 9, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i1.U32Codec.codec.encodeTo( + paymentId, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is Paid && other.index == index && other.paymentId == paymentId; + identical( + this, + other, + ) || + other is Paid && other.index == index && other.paymentId == paymentId; @override - int get hashCode => Object.hash(index, paymentId); + int get hashCode => Object.hash( + index, + paymentId, + ); } /// A payment failed and can be retried. class PaymentFailed extends Event { - const PaymentFailed({required this.index, required this.paymentId}); + const PaymentFailed({ + required this.index, + required this.paymentId, + }); factory PaymentFailed._decode(_i1.Input input) { - return PaymentFailed(index: _i1.U32Codec.codec.decode(input), paymentId: _i1.U32Codec.codec.decode(input)); + return PaymentFailed( + index: _i1.U32Codec.codec.decode(input), + paymentId: _i1.U32Codec.codec.decode(input), + ); } /// SpendIndex @@ -680,8 +916,11 @@ class PaymentFailed extends Event { @override Map> toJson() => { - 'PaymentFailed': {'index': index, 'paymentId': paymentId}, - }; + 'PaymentFailed': { + 'index': index, + 'paymentId': paymentId, + } + }; int _sizeHint() { int size = 1; @@ -691,17 +930,35 @@ class PaymentFailed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(10, output); - _i1.U32Codec.codec.encodeTo(index, output); - _i1.U32Codec.codec.encodeTo(paymentId, output); + _i1.U8Codec.codec.encodeTo( + 10, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); + _i1.U32Codec.codec.encodeTo( + paymentId, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is PaymentFailed && other.index == index && other.paymentId == paymentId; + identical( + this, + other, + ) || + other is PaymentFailed && + other.index == index && + other.paymentId == paymentId; @override - int get hashCode => Object.hash(index, paymentId); + int get hashCode => Object.hash( + index, + paymentId, + ); } /// A spend was processed and removed from the storage. It might have been successfully @@ -718,8 +975,8 @@ class SpendProcessed extends Event { @override Map> toJson() => { - 'SpendProcessed': {'index': index}, - }; + 'SpendProcessed': {'index': index} + }; int _sizeHint() { int size = 1; @@ -728,12 +985,23 @@ class SpendProcessed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(11, output); - _i1.U32Codec.codec.encodeTo(index, output); + _i1.U8Codec.codec.encodeTo( + 11, + output, + ); + _i1.U32Codec.codec.encodeTo( + index, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is SpendProcessed && other.index == index; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is SpendProcessed && other.index == index; @override int get hashCode => index.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/payment_state.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/payment_state.dart index b15460bb..a8fa898b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/payment_state.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/payment_state.dart @@ -62,7 +62,10 @@ class $PaymentStateCodec with _i1.Codec { } @override - void encodeTo(PaymentState value, _i1.Output output) { + void encodeTo( + PaymentState value, + _i1.Output output, + ) { switch (value.runtimeType) { case Pending: (value as Pending).encodeTo(output); @@ -74,7 +77,8 @@ class $PaymentStateCodec with _i1.Codec { (value as Failed).encodeTo(output); break; default: - throw Exception('PaymentState: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'PaymentState: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -88,7 +92,8 @@ class $PaymentStateCodec with _i1.Codec { case Failed: return 1; default: - throw Exception('PaymentState: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'PaymentState: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -100,7 +105,10 @@ class Pending extends PaymentState { Map toJson() => {'Pending': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); } @override @@ -122,8 +130,8 @@ class Attempted extends PaymentState { @override Map> toJson() => { - 'Attempted': {'id': id}, - }; + 'Attempted': {'id': id} + }; int _sizeHint() { int size = 1; @@ -132,12 +140,23 @@ class Attempted extends PaymentState { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i1.U32Codec.codec.encodeTo(id, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i1.U32Codec.codec.encodeTo( + id, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Attempted && other.id == id; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Attempted && other.id == id; @override int get hashCode => id.hashCode; @@ -150,7 +169,10 @@ class Failed extends PaymentState { Map toJson() => {'Failed': 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/schrodinger/types/pallet_treasury/proposal.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/proposal.dart index 061a1ce7..776daee2 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/proposal.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/proposal.dart @@ -7,7 +7,12 @@ import 'package:quiver/collection.dart' as _i4; import '../sp_core/crypto/account_id32.dart' as _i2; class Proposal { - const Proposal({required this.proposer, required this.value, required this.beneficiary, required this.bond}); + const Proposal({ + required this.proposer, + required this.value, + required this.beneficiary, + required this.bond, + }); factory Proposal.decode(_i1.Input input) { return codec.decode(input); @@ -32,34 +37,63 @@ class Proposal { } Map toJson() => { - 'proposer': proposer.toList(), - 'value': value, - 'beneficiary': beneficiary.toList(), - 'bond': bond, - }; + 'proposer': proposer.toList(), + 'value': value, + 'beneficiary': beneficiary.toList(), + 'bond': bond, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is Proposal && - _i4.listsEqual(other.proposer, proposer) && + _i4.listsEqual( + other.proposer, + proposer, + ) && other.value == value && - _i4.listsEqual(other.beneficiary, beneficiary) && + _i4.listsEqual( + other.beneficiary, + beneficiary, + ) && other.bond == bond; @override - int get hashCode => Object.hash(proposer, value, beneficiary, bond); + int get hashCode => Object.hash( + proposer, + value, + beneficiary, + bond, + ); } class $ProposalCodec with _i1.Codec { const $ProposalCodec(); @override - void encodeTo(Proposal obj, _i1.Output output) { - const _i1.U8ArrayCodec(32).encodeTo(obj.proposer, output); - _i1.U128Codec.codec.encodeTo(obj.value, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.beneficiary, output); - _i1.U128Codec.codec.encodeTo(obj.bond, output); + void encodeTo( + Proposal obj, + _i1.Output output, + ) { + const _i1.U8ArrayCodec(32).encodeTo( + obj.proposer, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.value, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + obj.beneficiary, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.bond, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/spend_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/spend_status.dart index ade044e9..d3d720e0 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/spend_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/spend_status.dart @@ -46,40 +46,74 @@ class SpendStatus { } Map toJson() => { - 'assetKind': null, - 'amount': amount, - 'beneficiary': beneficiary.toList(), - 'validFrom': validFrom, - 'expireAt': expireAt, - 'status': status.toJson(), - }; + 'assetKind': null, + 'amount': amount, + 'beneficiary': beneficiary.toList(), + 'validFrom': validFrom, + 'expireAt': expireAt, + 'status': status.toJson(), + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is SpendStatus && other.assetKind == assetKind && other.amount == amount && - _i5.listsEqual(other.beneficiary, beneficiary) && + _i5.listsEqual( + other.beneficiary, + beneficiary, + ) && other.validFrom == validFrom && other.expireAt == expireAt && other.status == status; @override - int get hashCode => Object.hash(assetKind, amount, beneficiary, validFrom, expireAt, status); + int get hashCode => Object.hash( + assetKind, + amount, + beneficiary, + validFrom, + expireAt, + status, + ); } class $SpendStatusCodec with _i1.Codec { const $SpendStatusCodec(); @override - void encodeTo(SpendStatus obj, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(obj.assetKind, output); - _i1.U128Codec.codec.encodeTo(obj.amount, output); - const _i1.U8ArrayCodec(32).encodeTo(obj.beneficiary, output); - _i1.U32Codec.codec.encodeTo(obj.validFrom, output); - _i1.U32Codec.codec.encodeTo(obj.expireAt, output); - _i3.PaymentState.codec.encodeTo(obj.status, output); + void encodeTo( + SpendStatus obj, + _i1.Output output, + ) { + _i1.NullCodec.codec.encodeTo( + obj.assetKind, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.amount, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + obj.beneficiary, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.validFrom, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.expireAt, + output, + ); + _i3.PaymentState.codec.encodeTo( + obj.status, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/call.dart index 3788829a..46a79794 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_utility/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/error.dart index 885d1676..6649ae69 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -41,7 +44,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/schrodinger/types/pallet_utility/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/event.dart index 4f8e5095..9047d028 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_vesting/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/call.dart index 34f97f7b..5c7644df 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/call.dart @@ -42,8 +42,14 @@ class $Call { return VestOther(target: target); } - VestedTransfer vestedTransfer({required _i3.MultiAddress target, required _i4.VestingInfo schedule}) { - return VestedTransfer(target: target, schedule: schedule); + VestedTransfer vestedTransfer({ + required _i3.MultiAddress target, + required _i4.VestingInfo schedule, + }) { + return VestedTransfer( + target: target, + schedule: schedule, + ); } ForceVestedTransfer forceVestedTransfer({ @@ -51,18 +57,31 @@ class $Call { required _i3.MultiAddress target, required _i4.VestingInfo schedule, }) { - return ForceVestedTransfer(source: source, target: target, schedule: schedule); + return ForceVestedTransfer( + source: source, + target: target, + schedule: schedule, + ); } - MergeSchedules mergeSchedules({required int schedule1Index, required int schedule2Index}) { - return MergeSchedules(schedule1Index: schedule1Index, schedule2Index: schedule2Index); + MergeSchedules mergeSchedules({ + required int schedule1Index, + required int schedule2Index, + }) { + return MergeSchedules( + schedule1Index: schedule1Index, + schedule2Index: schedule2Index, + ); } ForceRemoveVestingSchedule forceRemoveVestingSchedule({ required _i3.MultiAddress target, required int scheduleIndex, }) { - return ForceRemoveVestingSchedule(target: target, scheduleIndex: scheduleIndex); + return ForceRemoveVestingSchedule( + target: target, + scheduleIndex: scheduleIndex, + ); } } @@ -91,7 +110,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 Vest: (value as Vest).encodeTo(output); @@ -112,7 +134,8 @@ class $CallCodec with _i1.Codec { (value as ForceRemoveVestingSchedule).encodeTo(output); break; default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -132,7 +155,8 @@ class $CallCodec with _i1.Codec { case ForceRemoveVestingSchedule: return (value as ForceRemoveVestingSchedule)._sizeHint(); default: - throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -153,7 +177,10 @@ class Vest extends Call { Map toJson() => {'vest': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); } @override @@ -186,8 +213,8 @@ class VestOther extends Call { @override Map>> toJson() => { - 'vest_other': {'target': target.toJson()}, - }; + 'vest_other': {'target': target.toJson()} + }; int _sizeHint() { int size = 1; @@ -196,12 +223,23 @@ class VestOther extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - _i3.MultiAddress.codec.encodeTo(target, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + _i3.MultiAddress.codec.encodeTo( + target, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is VestOther && other.target == target; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is VestOther && other.target == target; @override int get hashCode => target.hashCode; @@ -221,10 +259,16 @@ class VestOther extends Call { /// ## Complexity /// - `O(1)`. class VestedTransfer extends Call { - const VestedTransfer({required this.target, required this.schedule}); + const VestedTransfer({ + required this.target, + required this.schedule, + }); factory VestedTransfer._decode(_i1.Input input) { - return VestedTransfer(target: _i3.MultiAddress.codec.decode(input), schedule: _i4.VestingInfo.codec.decode(input)); + return VestedTransfer( + target: _i3.MultiAddress.codec.decode(input), + schedule: _i4.VestingInfo.codec.decode(input), + ); } /// AccountIdLookupOf @@ -235,8 +279,11 @@ class VestedTransfer extends Call { @override Map>> toJson() => { - 'vested_transfer': {'target': target.toJson(), 'schedule': schedule.toJson()}, - }; + 'vested_transfer': { + 'target': target.toJson(), + 'schedule': schedule.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -246,17 +293,35 @@ class VestedTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - _i3.MultiAddress.codec.encodeTo(target, output); - _i4.VestingInfo.codec.encodeTo(schedule, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + _i3.MultiAddress.codec.encodeTo( + target, + output, + ); + _i4.VestingInfo.codec.encodeTo( + schedule, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is VestedTransfer && other.target == target && other.schedule == schedule; + identical( + this, + other, + ) || + other is VestedTransfer && + other.target == target && + other.schedule == schedule; @override - int get hashCode => Object.hash(target, schedule); + int get hashCode => Object.hash( + target, + schedule, + ); } /// Force a vested transfer. @@ -274,7 +339,11 @@ class VestedTransfer extends Call { /// ## Complexity /// - `O(1)`. class ForceVestedTransfer extends Call { - const ForceVestedTransfer({required this.source, required this.target, required this.schedule}); + const ForceVestedTransfer({ + required this.source, + required this.target, + required this.schedule, + }); factory ForceVestedTransfer._decode(_i1.Input input) { return ForceVestedTransfer( @@ -295,8 +364,12 @@ class ForceVestedTransfer extends Call { @override Map>> toJson() => { - 'force_vested_transfer': {'source': source.toJson(), 'target': target.toJson(), 'schedule': schedule.toJson()}, - }; + 'force_vested_transfer': { + 'source': source.toJson(), + 'target': target.toJson(), + 'schedule': schedule.toJson(), + } + }; int _sizeHint() { int size = 1; @@ -307,19 +380,41 @@ class ForceVestedTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(3, output); - _i3.MultiAddress.codec.encodeTo(source, output); - _i3.MultiAddress.codec.encodeTo(target, output); - _i4.VestingInfo.codec.encodeTo(schedule, output); + _i1.U8Codec.codec.encodeTo( + 3, + output, + ); + _i3.MultiAddress.codec.encodeTo( + source, + output, + ); + _i3.MultiAddress.codec.encodeTo( + target, + output, + ); + _i4.VestingInfo.codec.encodeTo( + schedule, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ForceVestedTransfer && other.source == source && other.target == target && other.schedule == schedule; + identical( + this, + other, + ) || + other is ForceVestedTransfer && + other.source == source && + other.target == target && + other.schedule == schedule; @override - int get hashCode => Object.hash(source, target, schedule); + int get hashCode => Object.hash( + source, + target, + schedule, + ); } /// Merge two vesting schedules together, creating a new vesting schedule that unlocks over @@ -344,7 +439,10 @@ class ForceVestedTransfer extends Call { /// - `schedule1_index`: index of the first schedule to merge. /// - `schedule2_index`: index of the second schedule to merge. class MergeSchedules extends Call { - const MergeSchedules({required this.schedule1Index, required this.schedule2Index}); + const MergeSchedules({ + required this.schedule1Index, + required this.schedule2Index, + }); factory MergeSchedules._decode(_i1.Input input) { return MergeSchedules( @@ -361,8 +459,11 @@ class MergeSchedules extends Call { @override Map> toJson() => { - 'merge_schedules': {'schedule1Index': schedule1Index, 'schedule2Index': schedule2Index}, - }; + 'merge_schedules': { + 'schedule1Index': schedule1Index, + 'schedule2Index': schedule2Index, + } + }; int _sizeHint() { int size = 1; @@ -372,18 +473,35 @@ class MergeSchedules extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i1.U32Codec.codec.encodeTo(schedule1Index, output); - _i1.U32Codec.codec.encodeTo(schedule2Index, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i1.U32Codec.codec.encodeTo( + schedule1Index, + output, + ); + _i1.U32Codec.codec.encodeTo( + schedule2Index, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is MergeSchedules && other.schedule1Index == schedule1Index && other.schedule2Index == schedule2Index; + identical( + this, + other, + ) || + other is MergeSchedules && + other.schedule1Index == schedule1Index && + other.schedule2Index == schedule2Index; @override - int get hashCode => Object.hash(schedule1Index, schedule2Index); + int get hashCode => Object.hash( + schedule1Index, + schedule2Index, + ); } /// Force remove a vesting schedule @@ -393,7 +511,10 @@ class MergeSchedules extends Call { /// - `target`: An account that has a vesting schedule /// - `schedule_index`: The vesting schedule index that should be removed class ForceRemoveVestingSchedule extends Call { - const ForceRemoveVestingSchedule({required this.target, required this.scheduleIndex}); + const ForceRemoveVestingSchedule({ + required this.target, + required this.scheduleIndex, + }); factory ForceRemoveVestingSchedule._decode(_i1.Input input) { return ForceRemoveVestingSchedule( @@ -410,8 +531,11 @@ class ForceRemoveVestingSchedule extends Call { @override Map> toJson() => { - 'force_remove_vesting_schedule': {'target': target.toJson(), 'scheduleIndex': scheduleIndex}, - }; + 'force_remove_vesting_schedule': { + 'target': target.toJson(), + 'scheduleIndex': scheduleIndex, + } + }; int _sizeHint() { int size = 1; @@ -421,16 +545,33 @@ class ForceRemoveVestingSchedule extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i3.MultiAddress.codec.encodeTo(target, output); - _i1.U32Codec.codec.encodeTo(scheduleIndex, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i3.MultiAddress.codec.encodeTo( + target, + output, + ); + _i1.U32Codec.codec.encodeTo( + scheduleIndex, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is ForceRemoveVestingSchedule && other.target == target && other.scheduleIndex == scheduleIndex; + identical( + this, + other, + ) || + other is ForceRemoveVestingSchedule && + other.target == target && + other.scheduleIndex == scheduleIndex; @override - int get hashCode => Object.hash(target, scheduleIndex); + int get hashCode => Object.hash( + target, + scheduleIndex, + ); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/error.dart index 209ccc88..0689a7a6 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/error.dart @@ -21,7 +21,10 @@ enum Error { /// Failed to create a new schedule because some parameter was invalid. invalidScheduleParams('InvalidScheduleParams', 4); - const Error(this.variantName, this.codecIndex); + const Error( + this.variantName, + this.codecIndex, + ); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -62,7 +65,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/schrodinger/types/pallet_vesting/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/event.dart index bbcf53aa..c4b0e81e 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/event.dart @@ -34,12 +34,24 @@ abstract class Event { class $Event { const $Event(); - VestingCreated vestingCreated({required _i3.AccountId32 account, required int scheduleIndex}) { - return VestingCreated(account: account, scheduleIndex: scheduleIndex); + VestingCreated vestingCreated({ + required _i3.AccountId32 account, + required int scheduleIndex, + }) { + return VestingCreated( + account: account, + scheduleIndex: scheduleIndex, + ); } - VestingUpdated vestingUpdated({required _i3.AccountId32 account, required BigInt unvested}) { - return VestingUpdated(account: account, unvested: unvested); + VestingUpdated vestingUpdated({ + required _i3.AccountId32 account, + required BigInt unvested, + }) { + return VestingUpdated( + account: account, + unvested: unvested, + ); } VestingCompleted vestingCompleted({required _i3.AccountId32 account}) { @@ -66,7 +78,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 VestingCreated: (value as VestingCreated).encodeTo(output); @@ -78,7 +93,8 @@ class $EventCodec with _i1.Codec { (value as VestingCompleted).encodeTo(output); break; default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -92,14 +108,18 @@ class $EventCodec with _i1.Codec { case VestingCompleted: return (value as VestingCompleted)._sizeHint(); default: - throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A vesting schedule has been created. class VestingCreated extends Event { - const VestingCreated({required this.account, required this.scheduleIndex}); + const VestingCreated({ + required this.account, + required this.scheduleIndex, + }); factory VestingCreated._decode(_i1.Input input) { return VestingCreated( @@ -116,8 +136,11 @@ class VestingCreated extends Event { @override Map> toJson() => { - 'VestingCreated': {'account': account.toList(), 'scheduleIndex': scheduleIndex}, - }; + 'VestingCreated': { + 'account': account.toList(), + 'scheduleIndex': scheduleIndex, + } + }; int _sizeHint() { int size = 1; @@ -127,24 +150,47 @@ class VestingCreated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(0, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); - _i1.U32Codec.codec.encodeTo(scheduleIndex, output); + _i1.U8Codec.codec.encodeTo( + 0, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); + _i1.U32Codec.codec.encodeTo( + scheduleIndex, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is VestingCreated && _i4.listsEqual(other.account, account) && other.scheduleIndex == scheduleIndex; + identical( + this, + other, + ) || + other is VestingCreated && + _i4.listsEqual( + other.account, + account, + ) && + other.scheduleIndex == scheduleIndex; @override - int get hashCode => Object.hash(account, scheduleIndex); + int get hashCode => Object.hash( + account, + scheduleIndex, + ); } /// The amount vested has been updated. This could indicate a change in funds available. /// The balance given is the amount which is left unvested (and thus locked). class VestingUpdated extends Event { - const VestingUpdated({required this.account, required this.unvested}); + const VestingUpdated({ + required this.account, + required this.unvested, + }); factory VestingUpdated._decode(_i1.Input input) { return VestingUpdated( @@ -161,8 +207,11 @@ class VestingUpdated extends Event { @override Map> toJson() => { - 'VestingUpdated': {'account': account.toList(), 'unvested': unvested}, - }; + 'VestingUpdated': { + 'account': account.toList(), + 'unvested': unvested, + } + }; int _sizeHint() { int size = 1; @@ -172,18 +221,38 @@ class VestingUpdated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(1, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); - _i1.U128Codec.codec.encodeTo(unvested, output); + _i1.U8Codec.codec.encodeTo( + 1, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); + _i1.U128Codec.codec.encodeTo( + unvested, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || - other is VestingUpdated && _i4.listsEqual(other.account, account) && other.unvested == unvested; + identical( + this, + other, + ) || + other is VestingUpdated && + _i4.listsEqual( + other.account, + account, + ) && + other.unvested == unvested; @override - int get hashCode => Object.hash(account, unvested); + int get hashCode => Object.hash( + account, + unvested, + ); } /// An \[account\] has become fully vested. @@ -199,8 +268,8 @@ class VestingCompleted extends Event { @override Map>> toJson() => { - 'VestingCompleted': {'account': account.toList()}, - }; + 'VestingCompleted': {'account': account.toList()} + }; int _sizeHint() { int size = 1; @@ -209,13 +278,27 @@ class VestingCompleted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(2, output); - const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U8Codec.codec.encodeTo( + 2, + output, + ); + const _i1.U8ArrayCodec(32).encodeTo( + account, + output, + ); } @override bool operator ==(Object other) => - identical(this, other) || other is VestingCompleted && _i4.listsEqual(other.account, account); + identical( + this, + other, + ) || + other is VestingCompleted && + _i4.listsEqual( + other.account, + account, + ); @override int get hashCode => account.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/releases.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/releases.dart index ba162240..31151441 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/releases.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/releases.dart @@ -7,7 +7,10 @@ enum Releases { v0('V0', 0), v1('V1', 1); - const Releases(this.variantName, this.codecIndex); + const Releases( + this.variantName, + this.codecIndex, + ); factory Releases.decode(_i1.Input input) { return codec.decode(input); @@ -42,7 +45,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/schrodinger/types/pallet_vesting/vesting_info/vesting_info.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/vesting_info/vesting_info.dart index ee152efa..656601d2 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/vesting_info/vesting_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/vesting_info/vesting_info.dart @@ -4,7 +4,11 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class VestingInfo { - const VestingInfo({required this.locked, required this.perBlock, required this.startingBlock}); + const VestingInfo({ + required this.locked, + required this.perBlock, + required this.startingBlock, + }); factory VestingInfo.decode(_i1.Input input) { return codec.decode(input); @@ -25,28 +29,51 @@ class VestingInfo { return codec.encode(this); } - Map toJson() => {'locked': locked, 'perBlock': perBlock, 'startingBlock': startingBlock}; + Map toJson() => { + 'locked': locked, + 'perBlock': perBlock, + 'startingBlock': startingBlock, + }; @override bool operator ==(Object other) => - identical(this, other) || + identical( + this, + other, + ) || other is VestingInfo && other.locked == locked && other.perBlock == perBlock && other.startingBlock == startingBlock; @override - int get hashCode => Object.hash(locked, perBlock, startingBlock); + int get hashCode => Object.hash( + locked, + perBlock, + startingBlock, + ); } class $VestingInfoCodec with _i1.Codec { const $VestingInfoCodec(); @override - void encodeTo(VestingInfo obj, _i1.Output output) { - _i1.U128Codec.codec.encodeTo(obj.locked, output); - _i1.U128Codec.codec.encodeTo(obj.perBlock, output); - _i1.U32Codec.codec.encodeTo(obj.startingBlock, output); + void encodeTo( + VestingInfo obj, + _i1.Output output, + ) { + _i1.U128Codec.codec.encodeTo( + obj.locked, + output, + ); + _i1.U128Codec.codec.encodeTo( + obj.perBlock, + output, + ); + _i1.U32Codec.codec.encodeTo( + obj.startingBlock, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/primitive_types/h256.dart b/quantus_sdk/lib/generated/schrodinger/types/primitive_types/h256.dart index 3a26f8c3..4eded259 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/primitive_types/h256.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/primitive_types/u512.dart b/quantus_sdk/lib/generated/schrodinger/types/primitive_types/u512.dart index 92988381..954a9d71 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/primitive_types/u512.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart b/quantus_sdk/lib/generated/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart index 4b323353..fac8b05c 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart b/quantus_sdk/lib/generated/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart index b8b5fa11..7e22489b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/qp_poseidon/poseidon_hasher.dart b/quantus_sdk/lib/generated/schrodinger/types/qp_poseidon/poseidon_hasher.dart index 50302afc..6f39b4fe 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/qp_poseidon/poseidon_hasher.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/qp_poseidon/poseidon_hasher.dart @@ -12,8 +12,14 @@ class PoseidonHasherCodec with _i1.Codec { } @override - void encodeTo(PoseidonHasher value, _i1.Output output) { - _i1.NullCodec.codec.encodeTo(value, output); + void encodeTo( + PoseidonHasher value, + _i1.Output output, + ) { + _i1.NullCodec.codec.encodeTo( + value, + output, + ); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart b/quantus_sdk/lib/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart index 72570de7..539ae026 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/qp_scheduler/dispatch_time.dart b/quantus_sdk/lib/generated/schrodinger/types/qp_scheduler/dispatch_time.dart index ba19d5d2..0e5ee2d9 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/qp_scheduler/dispatch_time.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/quantus_runtime/governance/definitions/preimage_deposit.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/governance/definitions/preimage_deposit.dart index 6bbcc7ef..3b70b47f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/governance/definitions/preimage_deposit.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart index 4608d712..6646c7f1 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart @@ -9,7 +9,10 @@ enum Origin { mediumSpender('MediumSpender', 2), bigSpender('BigSpender', 3); - const Origin(this.variantName, this.codecIndex); + const Origin( + this.variantName, + this.codecIndex, + ); factory Origin.decode(_i1.Input input) { return codec.decode(input); @@ -48,7 +51,13 @@ class $OriginCodec with _i1.Codec { } @override - void encodeTo(Origin value, _i1.Output output) { - _i1.U8Codec.codec.encodeTo(value.codecIndex, output); + void encodeTo( + Origin value, + _i1.Output output, + ) { + _i1.U8Codec.codec.encodeTo( + value.codecIndex, + output, + ); } } diff --git a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/origin_caller.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/origin_caller.dart index a8d62c6e..24eaca19 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/origin_caller.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/origin_caller.dart @@ -59,7 +59,10 @@ 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); @@ -68,7 +71,8 @@ class $OriginCallerCodec with _i1.Codec { (value as Origins).encodeTo(output); break; default: - throw Exception('OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -80,7 +84,8 @@ class $OriginCallerCodec with _i1.Codec { case Origins: return (value as Origins)._sizeHint(); default: - throw Exception('OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -105,12 +110,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; @@ -136,12 +152,23 @@ class Origins extends OriginCaller { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(19, output); - _i4.Origin.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 19, + output, + ); + _i4.Origin.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Origins && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Origins && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime.dart index f16a6bb0..4c026b0a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/quantus_runtime/runtime_call.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_call.dart index aa8cca69..5e0d1bd6 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_call.dart @@ -164,7 +164,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); @@ -218,7 +221,8 @@ class $RuntimeCallCodec with _i1.Codec { (value as Assets).encodeTo(output); break; default: - throw Exception('RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -260,7 +264,8 @@ class $RuntimeCallCodec with _i1.Codec { case Assets: return (value as Assets)._sizeHint(); default: - throw Exception('RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception( + 'RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -277,7 +282,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; @@ -286,12 +292,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; @@ -309,7 +326,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; @@ -318,12 +336,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; @@ -341,7 +370,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; @@ -350,12 +380,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; @@ -382,12 +423,23 @@ class Sudo extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i6.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i6.Call.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Sudo && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Sudo && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -414,12 +466,23 @@ class Vesting 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 Vesting && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Vesting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -437,7 +500,8 @@ class Preimage extends RuntimeCall { final _i8.Call value0; @override - Map>>> toJson() => {'Preimage': value0.toJson()}; + Map>>> toJson() => + {'Preimage': value0.toJson()}; int _sizeHint() { int size = 1; @@ -446,12 +510,23 @@ class Preimage 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 Preimage && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Preimage && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -469,7 +544,8 @@ class Scheduler extends RuntimeCall { final _i9.Call value0; @override - Map>> toJson() => {'Scheduler': value0.toJson()}; + Map>> toJson() => + {'Scheduler': value0.toJson()}; int _sizeHint() { int size = 1; @@ -478,12 +554,23 @@ class Scheduler 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 Scheduler && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Scheduler && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -501,7 +588,8 @@ class Utility extends RuntimeCall { final _i10.Call value0; @override - Map>> toJson() => {'Utility': value0.toJson()}; + Map>> toJson() => + {'Utility': value0.toJson()}; int _sizeHint() { int size = 1; @@ -510,12 +598,23 @@ class Utility 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 Utility && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Utility && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -533,7 +632,8 @@ class Referenda extends RuntimeCall { final _i11.Call value0; @override - Map>> toJson() => {'Referenda': value0.toJson()}; + Map>> toJson() => + {'Referenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -542,12 +642,23 @@ class Referenda 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 Referenda && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Referenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -565,7 +676,8 @@ class ReversibleTransfers extends RuntimeCall { final _i12.Call value0; @override - Map>> toJson() => {'ReversibleTransfers': value0.toJson()}; + Map>> toJson() => + {'ReversibleTransfers': value0.toJson()}; int _sizeHint() { int size = 1; @@ -574,12 +686,23 @@ class ReversibleTransfers 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 ReversibleTransfers && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ReversibleTransfers && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -597,7 +720,8 @@ class ConvictionVoting extends RuntimeCall { final _i13.Call value0; @override - Map>> toJson() => {'ConvictionVoting': value0.toJson()}; + Map>> toJson() => + {'ConvictionVoting': value0.toJson()}; int _sizeHint() { int size = 1; @@ -606,12 +730,23 @@ class ConvictionVoting 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 ConvictionVoting && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ConvictionVoting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -629,7 +764,8 @@ class TechCollective extends RuntimeCall { final _i14.Call value0; @override - Map>> toJson() => {'TechCollective': value0.toJson()}; + Map>> toJson() => + {'TechCollective': value0.toJson()}; int _sizeHint() { int size = 1; @@ -638,12 +774,23 @@ class TechCollective 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 TechCollective && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TechCollective && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -661,7 +808,8 @@ class TechReferenda extends RuntimeCall { final _i15.Call value0; @override - Map>> toJson() => {'TechReferenda': value0.toJson()}; + Map>> toJson() => + {'TechReferenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -670,12 +818,23 @@ class TechReferenda 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 TechReferenda && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TechReferenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -693,7 +852,8 @@ class MerkleAirdrop extends RuntimeCall { final _i16.Call value0; @override - Map>> toJson() => {'MerkleAirdrop': value0.toJson()}; + Map>> toJson() => + {'MerkleAirdrop': value0.toJson()}; int _sizeHint() { int size = 1; @@ -702,12 +862,23 @@ class MerkleAirdrop 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 MerkleAirdrop && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is MerkleAirdrop && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -725,7 +896,8 @@ class TreasuryPallet extends RuntimeCall { final _i17.Call value0; @override - Map>> toJson() => {'TreasuryPallet': value0.toJson()}; + Map>> toJson() => + {'TreasuryPallet': value0.toJson()}; int _sizeHint() { int size = 1; @@ -734,12 +906,23 @@ class TreasuryPallet extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(18, output); - _i17.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 18, + output, + ); + _i17.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; @@ -766,12 +949,23 @@ class Recovery extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(20, output); - _i18.Call.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 20, + output, + ); + _i18.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; @@ -789,7 +983,8 @@ class Assets extends RuntimeCall { final _i19.Call value0; @override - Map>> toJson() => {'Assets': value0.toJson()}; + Map>> toJson() => + {'Assets': value0.toJson()}; int _sizeHint() { int size = 1; @@ -798,12 +993,23 @@ class Assets extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(21, output); - _i19.Call.codec.encodeTo(value0, output); - } - - @override - bool operator ==(Object other) => identical(this, other) || other is Assets && other.value0 == value0; + _i1.U8Codec.codec.encodeTo( + 21, + output, + ); + _i19.Call.codec.encodeTo( + value0, + output, + ); + } + + @override + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Assets && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_event.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_event.dart index 223d1708..516ec28d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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 AssetsHolder).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 AssetsHolder: return (value as AssetsHolder)._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; @@ -343,7 +359,8 @@ class Balances extends RuntimeEvent { final _i4.Event value0; @override - Map>> toJson() => {'Balances': value0.toJson()}; + Map>> toJson() => + {'Balances': value0.toJson()}; int _sizeHint() { int size = 1; @@ -352,12 +369,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 +402,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 +412,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; @@ -414,12 +454,23 @@ class Sudo extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(4, output); - _i6.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 4, + output, + ); + _i6.Event.codec.encodeTo( + value0, + output, + ); } @override - bool operator ==(Object other) => identical(this, other) || other is Sudo && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Sudo && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -436,7 +487,8 @@ class QPoW extends RuntimeEvent { final _i7.Event value0; @override - Map>> toJson() => {'QPoW': value0.toJson()}; + Map>> toJson() => + {'QPoW': value0.toJson()}; int _sizeHint() { int size = 1; @@ -445,12 +497,23 @@ class QPoW extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(5, output); - _i7.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 5, + output, + ); + _i7.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; @@ -467,7 +530,8 @@ class MiningRewards extends RuntimeEvent { final _i8.Event value0; @override - Map>> toJson() => {'MiningRewards': value0.toJson()}; + Map>> toJson() => + {'MiningRewards': value0.toJson()}; int _sizeHint() { int size = 1; @@ -476,12 +540,23 @@ class MiningRewards 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 MiningRewards && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is MiningRewards && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -498,7 +573,8 @@ class Vesting extends RuntimeEvent { final _i9.Event value0; @override - Map>> toJson() => {'Vesting': value0.toJson()}; + Map>> toJson() => + {'Vesting': value0.toJson()}; int _sizeHint() { int size = 1; @@ -507,12 +583,23 @@ class Vesting 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 Vesting && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Vesting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -529,7 +616,8 @@ class Preimage extends RuntimeEvent { final _i10.Event value0; @override - Map>>> toJson() => {'Preimage': value0.toJson()}; + Map>>> toJson() => + {'Preimage': value0.toJson()}; int _sizeHint() { int size = 1; @@ -538,12 +626,23 @@ class Preimage 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 Preimage && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Preimage && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -560,7 +659,8 @@ class Scheduler extends RuntimeEvent { final _i11.Event value0; @override - Map>> toJson() => {'Scheduler': value0.toJson()}; + Map>> toJson() => + {'Scheduler': value0.toJson()}; int _sizeHint() { int size = 1; @@ -569,12 +669,23 @@ class Scheduler 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 Scheduler && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Scheduler && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -600,12 +711,23 @@ class Utility 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 Utility && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Utility && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -622,7 +744,8 @@ class Referenda extends RuntimeEvent { final _i13.Event value0; @override - Map>> toJson() => {'Referenda': value0.toJson()}; + Map>> toJson() => + {'Referenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -631,12 +754,23 @@ class Referenda 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 Referenda && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is Referenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -653,7 +787,8 @@ class ReversibleTransfers extends RuntimeEvent { final _i14.Event value0; @override - Map>> toJson() => {'ReversibleTransfers': value0.toJson()}; + Map>> toJson() => + {'ReversibleTransfers': value0.toJson()}; int _sizeHint() { int size = 1; @@ -662,12 +797,23 @@ class ReversibleTransfers 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 ReversibleTransfers && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ReversibleTransfers && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -684,7 +830,8 @@ class ConvictionVoting extends RuntimeEvent { final _i15.Event value0; @override - Map> toJson() => {'ConvictionVoting': value0.toJson()}; + Map> toJson() => + {'ConvictionVoting': value0.toJson()}; int _sizeHint() { int size = 1; @@ -693,12 +840,23 @@ class ConvictionVoting 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 ConvictionVoting && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is ConvictionVoting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -715,7 +873,8 @@ class TechCollective extends RuntimeEvent { final _i16.Event value0; @override - Map>> toJson() => {'TechCollective': value0.toJson()}; + Map>> toJson() => + {'TechCollective': value0.toJson()}; int _sizeHint() { int size = 1; @@ -724,12 +883,23 @@ class TechCollective 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 TechCollective && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TechCollective && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -746,7 +916,8 @@ class TechReferenda extends RuntimeEvent { final _i17.Event value0; @override - Map>> toJson() => {'TechReferenda': value0.toJson()}; + Map>> toJson() => + {'TechReferenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -755,12 +926,23 @@ class TechReferenda 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 TechReferenda && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TechReferenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -777,7 +959,8 @@ class MerkleAirdrop extends RuntimeEvent { final _i18.Event value0; @override - Map>> toJson() => {'MerkleAirdrop': value0.toJson()}; + Map>> toJson() => + {'MerkleAirdrop': value0.toJson()}; int _sizeHint() { int size = 1; @@ -786,12 +969,23 @@ class MerkleAirdrop 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 MerkleAirdrop && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is MerkleAirdrop && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -808,7 +1002,8 @@ class TreasuryPallet extends RuntimeEvent { final _i19.Event value0; @override - Map>> toJson() => {'TreasuryPallet': value0.toJson()}; + Map>> toJson() => + {'TreasuryPallet': value0.toJson()}; int _sizeHint() { int size = 1; @@ -817,12 +1012,23 @@ class TreasuryPallet 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 TreasuryPallet && other.value0 == value0; + bool operator ==(Object other) => + identical( + this, + other, + ) || + other is TreasuryPallet && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -839,7 +1045,8 @@ class Recovery extends RuntimeEvent { final _i20.Event value0; @override - Map>> toJson() => {'Recovery': value0.toJson()}; + Map>> toJson() => + {'Recovery': value0.toJson()}; int _sizeHint() { int size = 1; @@ -848,12 +1055,23 @@ class Recovery extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(20, output); - _i20.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 20, + output, + ); + _i20.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; @@ -870,7 +1088,8 @@ class Assets extends RuntimeEvent { final _i21.Event value0; @override - Map>> toJson() => {'Assets': value0.toJson()}; + Map>> toJson() => + {'Assets': value0.toJson()}; int _sizeHint() { int size = 1; @@ -879,12 +1098,23 @@ class Assets extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(21, output); - _i21.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 21, + output, + ); + _i21.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; @@ -901,7 +1131,8 @@ class AssetsHolder extends RuntimeEvent { final _i22.Event value0; @override - Map>> toJson() => {'AssetsHolder': value0.toJson()}; + Map>> toJson() => + {'AssetsHolder': value0.toJson()}; int _sizeHint() { int size = 1; @@ -910,12 +1141,23 @@ class AssetsHolder extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo(22, output); - _i22.Event.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 22, + output, + ); + _i22.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; diff --git a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_freeze_reason.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_freeze_reason.dart index 5e4c8b0d..98109e19 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_freeze_reason.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/quantus_runtime/runtime_hold_reason.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_hold_reason.dart index 813bf00d..bc1460b4 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_hold_reason.dart +++ b/quantus_sdk/lib/generated/schrodinger/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(9, output); - _i3.HoldReason.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 9, + 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(13, output); - _i4.HoldReason.codec.encodeTo(value0, output); + _i1.U8Codec.codec.encodeTo( + 13, + 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/schrodinger/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart index 1f05a1bb..fa9b3554 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart +++ b/quantus_sdk/lib/generated/schrodinger/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 { } @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/schrodinger/types/sp_arithmetic/fixed_point/fixed_i64.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/fixed_point/fixed_i64.dart index e542ca16..cc36d889 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/fixed_point/fixed_i64.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_arithmetic/fixed_point/fixed_u128.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/fixed_point/fixed_u128.dart index 87a788a0..771c1755 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/fixed_point/fixed_u128.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_arithmetic/per_things/perbill.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/per_things/perbill.dart index 0f88314b..6feb69ff 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/per_things/perbill.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_arithmetic/per_things/permill.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/per_things/permill.dart index 7411f90d..9fd260c7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/per_things/permill.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_core/crypto/account_id32.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_core/crypto/account_id32.dart index 93fbda9f..81513d7f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_core/crypto/account_id32.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/dispatch_error.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/dispatch_error.dart index 715b1735..a5c2d18c 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/dispatch_error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/dispatch_error_with_post_info.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/dispatch_error_with_post_info.dart index cc35e8e0..6cbbf070 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/dispatch_error_with_post_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/generic/digest/digest.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/digest/digest.dart index 1aa48457..215d34e5 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/digest/digest.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/generic/digest/digest_item.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/digest/digest_item.dart index 4ac2501d..4c9b58a7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/digest/digest_item.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/generic/era/era.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/era/era.dart index 97172381..5133d6d7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/era/era.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart index 23205b0a..09f50caf 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/module_error.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/module_error.dart index d1980872..6ed8f3d0 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/module_error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/multiaddress/multi_address.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/multiaddress/multi_address.dart index 0466c0f0..03d9629e 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/multiaddress/multi_address.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/proving_trie/trie_error.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/proving_trie/trie_error.dart index 5beb544b..27b1afb3 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/proving_trie/trie_error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -78,7 +81,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/schrodinger/types/sp_runtime/token_error.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/token_error.dart index c16f0c25..1b882412 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/token_error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -66,7 +69,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/schrodinger/types/sp_runtime/transactional_error.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/transactional_error.dart index 9a3a7f7f..864c12af 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/transactional_error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -42,7 +45,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/schrodinger/types/sp_version/runtime_version.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_version/runtime_version.dart index 9d10f100..f5a580ba 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_version/runtime_version.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_weights/runtime_db_weight.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_weights/runtime_db_weight.dart index aac5361b..ad7cd305 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_weights/runtime_db_weight.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_weights/weight_v2/weight.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_weights/weight_v2/weight.dart index 8d9a8883..7d7e8599 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_weights/weight_v2/weight.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/tuples.dart b/quantus_sdk/lib/generated/schrodinger/types/tuples.dart index 2f309fdb..b42e59e2 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/tuples.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/tuples_1.dart b/quantus_sdk/lib/generated/schrodinger/types/tuples_1.dart index 2f309fdb..b42e59e2 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/tuples_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/tuples_2.dart b/quantus_sdk/lib/generated/schrodinger/types/tuples_2.dart index 9610a384..3d011bc1 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/tuples_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/tuples_2.dart @@ -2,7 +2,12 @@ import 'package:polkadart/scale_codec.dart' as _i1; class Tuple4 { - const Tuple4(this.value0, this.value1, this.value2, this.value3); + const Tuple4( + this.value0, + this.value1, + this.value2, + this.value3, + ); final T0 value0; @@ -14,7 +19,12 @@ class Tuple4 { } class Tuple4Codec with _i1.Codec> { - const Tuple4Codec(this.codec0, this.codec1, this.codec2, this.codec3); + const Tuple4Codec( + this.codec0, + this.codec1, + this.codec2, + this.codec3, + ); final _i1.Codec codec0; @@ -25,7 +35,10 @@ class Tuple4Codec with _i1.Codec> { final _i1.Codec codec3; @override - void encodeTo(Tuple4 tuple, _i1.Output output) { + void encodeTo( + Tuple4 tuple, + _i1.Output output, + ) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); codec2.encodeTo(tuple.value2, output); @@ -34,7 +47,12 @@ class Tuple4Codec with _i1.Codec> { @override Tuple4 decode(_i1.Input input) { - return Tuple4(codec0.decode(input), codec1.decode(input), codec2.decode(input), codec3.decode(input)); + return Tuple4( + codec0.decode(input), + codec1.decode(input), + codec2.decode(input), + codec3.decode(input), + ); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/tuples_3.dart b/quantus_sdk/lib/generated/schrodinger/types/tuples_3.dart index aa48d3ff..e56f1a7f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/tuples_3.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/tuples_3.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/schrodinger/types/tuples_4.dart b/quantus_sdk/lib/generated/schrodinger/types/tuples_4.dart index 9f5250f5..8797ee9f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/tuples_4.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/tuples_4.dart @@ -72,7 +72,10 @@ class Tuple10Codec final _i1.Codec codec9; @override - void encodeTo(Tuple10 tuple, _i1.Output output) { + void encodeTo( + Tuple10 tuple, + _i1.Output output, + ) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); codec2.encodeTo(tuple.value2, output); diff --git a/quantus_sdk/pubspec.yaml b/quantus_sdk/pubspec.yaml index e10906b9..dcb63250 100644 --- a/quantus_sdk/pubspec.yaml +++ b/quantus_sdk/pubspec.yaml @@ -52,10 +52,7 @@ dependencies: polkadart: output_dir: lib/generated # Optional. Sets the directory of generated files. Provided value should be a valid path on your system. Default: lib/generated chains: # Dictionary of chains and endpoints - # resonance: ws://127.0.0.1:9944 # Local dev node - # resonance: wss://a.t.res.fm:443 # Testnet node - resonance: wss://a.t.res.fm:443 - schrodinger: wss://quantu.se:443 + schrodinger: wss://a1-dirac.quantus.cat dev_dependencies: flutter_test: From d27e82cfa4844151a219ffa5c6970979ef426e09 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 17:15:49 +0800 Subject: [PATCH 15/36] rename resonance to quantusApi --- .../lib/src/services/balances_service.dart | 4 +- .../lib/src/services/recovery_service.dart | 52 +++++++++---------- .../reversible_transfers_service.dart | 42 +++++++-------- .../lib/src/services/substrate_service.dart | 4 +- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/quantus_sdk/lib/src/services/balances_service.dart b/quantus_sdk/lib/src/services/balances_service.dart index dbe38488..b5ea0ea1 100644 --- a/quantus_sdk/lib/src/services/balances_service.dart +++ b/quantus_sdk/lib/src/services/balances_service.dart @@ -38,9 +38,9 @@ class BalancesService { } Balances getBalanceTransferCall(String targetAddress, BigInt amount) { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final multiDest = const multi_address.$MultiAddress().id(crypto.ss58ToAccountId(s: targetAddress)); - final runtimeCall = resonanceApi.tx.balances.transferAllowDeath(dest: multiDest, value: amount); + final runtimeCall = quantusApi.tx.balances.transferAllowDeath(dest: multiDest, value: amount); return runtimeCall; } } diff --git a/quantus_sdk/lib/src/services/recovery_service.dart b/quantus_sdk/lib/src/services/recovery_service.dart index d2352cff..3ff6cf1e 100644 --- a/quantus_sdk/lib/src/services/recovery_service.dart +++ b/quantus_sdk/lib/src/services/recovery_service.dart @@ -28,11 +28,11 @@ class RecoveryService { required int delayPeriod, }) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final friends = friendAddresses.map((addr) => crypto.ss58ToAccountId(s: addr)).toList(); // Create the call - final call = resonanceApi.tx.recovery.createRecovery( + final call = quantusApi.tx.recovery.createRecovery( friends: friends, threshold: threshold, delayPeriod: delayPeriod, @@ -48,11 +48,11 @@ class RecoveryService { /// Initiate recovery process for a lost account Future initiateRecovery({required Account rescuerAccount, required String lostAccountAddress}) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final lostAccount = const multi_address.$MultiAddress().id(crypto.ss58ToAccountId(s: lostAccountAddress)); // Create the call - final call = resonanceApi.tx.recovery.initiateRecovery(account: lostAccount); + final call = quantusApi.tx.recovery.initiateRecovery(account: lostAccount); // Submit the transaction using substrate service return await _substrateService.submitExtrinsic(rescuerAccount, call); @@ -68,12 +68,12 @@ class RecoveryService { required String rescuerAddress, }) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final lostAccount = const multi_address.$MultiAddress().id(crypto.ss58ToAccountId(s: lostAccountAddress)); final rescuer = const multi_address.$MultiAddress().id(crypto.ss58ToAccountId(s: rescuerAddress)); // Create the call - final call = resonanceApi.tx.recovery.vouchRecovery(lost: lostAccount, rescuer: rescuer); + final call = quantusApi.tx.recovery.vouchRecovery(lost: lostAccount, rescuer: rescuer); // Submit the transaction using substrate service return await _substrateService.submitExtrinsic(friendAccount, call); @@ -85,11 +85,11 @@ class RecoveryService { /// Claim recovery of a lost account (called by rescuer after threshold is met) Future claimRecovery({required Account rescuerAccount, required String lostAccountAddress}) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final lostAccount = const multi_address.$MultiAddress().id(crypto.ss58ToAccountId(s: lostAccountAddress)); // Create the call - final call = resonanceApi.tx.recovery.claimRecovery(account: lostAccount); + final call = quantusApi.tx.recovery.claimRecovery(account: lostAccount); // Submit the transaction using substrate service return await _substrateService.submitExtrinsic(rescuerAccount, call); @@ -101,11 +101,11 @@ class RecoveryService { /// Close an active recovery process (called by the lost account owner) Future closeRecovery({required Account lostAccount, required String rescuerAddress}) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final rescuer = const multi_address.$MultiAddress().id(crypto.ss58ToAccountId(s: rescuerAddress)); // Create the call - final call = resonanceApi.tx.recovery.closeRecovery(rescuer: rescuer); + final call = quantusApi.tx.recovery.closeRecovery(rescuer: rescuer); // Submit the transaction using substrate service return await _substrateService.submitExtrinsic(lostAccount, call); @@ -117,10 +117,10 @@ class RecoveryService { /// Remove recovery configuration from account Future removeRecoveryConfig({required Account senderAccount}) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); // Create the call - final call = resonanceApi.tx.recovery.removeRecovery(); + final call = quantusApi.tx.recovery.removeRecovery(); // Submit the transaction using substrate service return await _substrateService.submitExtrinsic(senderAccount, call); @@ -136,13 +136,13 @@ class RecoveryService { required RuntimeCall call, }) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final recoveredAccount = const multi_address.$MultiAddress().id( crypto.ss58ToAccountId(s: recoveredAccountAddress), ); // Create the call - final proxyCall = resonanceApi.tx.recovery.asRecovered(account: recoveredAccount, call: call); + final proxyCall = quantusApi.tx.recovery.asRecovered(account: recoveredAccount, call: call); // Submit the transaction using substrate service return await _substrateService.submitExtrinsic(rescuerAccount, proxyCall); @@ -154,13 +154,13 @@ class RecoveryService { /// Cancel the ability to use a recovered account Future cancelRecovered({required Account rescuerAccount, required String recoveredAccountAddress}) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final recoveredAccount = const multi_address.$MultiAddress().id( crypto.ss58ToAccountId(s: recoveredAccountAddress), ); // Create the call - final call = resonanceApi.tx.recovery.cancelRecovered(account: recoveredAccount); + final call = quantusApi.tx.recovery.cancelRecovered(account: recoveredAccount); // Submit the transaction using substrate service return await _substrateService.submitExtrinsic(rescuerAccount, call); @@ -172,10 +172,10 @@ class RecoveryService { /// Query recovery configuration for an account Future getRecoveryConfig(String address) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final accountId = crypto.ss58ToAccountId(s: address); - return await resonanceApi.query.recovery.recoverable(accountId); + return await quantusApi.query.recovery.recoverable(accountId); } catch (e) { throw Exception('Failed to get recovery config: $e'); } @@ -184,11 +184,11 @@ class RecoveryService { /// Query active recovery process Future getActiveRecovery(String lostAccountAddress, String rescuerAddress) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final lostAccountId = crypto.ss58ToAccountId(s: lostAccountAddress); final rescuerId = crypto.ss58ToAccountId(s: rescuerAddress); - return await resonanceApi.query.recovery.activeRecoveries(lostAccountId, rescuerId); + return await quantusApi.query.recovery.activeRecoveries(lostAccountId, rescuerId); } catch (e) { throw Exception('Failed to get active recovery: $e'); } @@ -197,10 +197,10 @@ class RecoveryService { /// Check if an account can act as proxy for a recovered account Future getProxyRecoveredAccount(String proxyAddress) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final proxyId = crypto.ss58ToAccountId(s: proxyAddress); - final recoveredAccountId = await resonanceApi.query.recovery.proxy(proxyId); + final recoveredAccountId = await quantusApi.query.recovery.proxy(proxyId); return recoveredAccountId != null ? crypto.toAccountId( obj: crypto.Keypair(publicKey: Uint8List.fromList(recoveredAccountId), secretKey: Uint8List(0)), @@ -255,8 +255,8 @@ class RecoveryService { /// Get recovery constants Future> getConstants() async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); - final constants = resonanceApi.constant.recovery; + final quantusApi = Schrodinger(_substrateService.provider!); + final constants = quantusApi.constant.recovery; return { 'configDepositBase': constants.configDepositBase, @@ -271,10 +271,10 @@ class RecoveryService { /// Helper to create a balance transfer call for recovered account Balances createBalanceTransferCall(String recipientAddress, BigInt amount) { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final accountID = crypto.ss58ToAccountId(s: recipientAddress); final dest = const multi_address.$MultiAddress().id(accountID); - final call = resonanceApi.tx.balances.transferAllowDeath(dest: dest, value: amount); + final call = quantusApi.tx.balances.transferAllowDeath(dest: dest, value: amount); return call; } diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index 9258ea2d..2dd21e7d 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -32,11 +32,11 @@ class ReversibleTransfersService { required BigInt amount, }) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final multiDest = const multi_address.$MultiAddress().id(crypto.ss58ToAccountId(s: recipientAddress)); // Create the call - final call = resonanceApi.tx.reversibleTransfers.scheduleTransfer(dest: multiDest, amount: amount); + final call = quantusApi.tx.reversibleTransfers.scheduleTransfer(dest: multiDest, amount: amount); call.hashCode; // Submit the transaction using substrate service @@ -78,10 +78,10 @@ class ReversibleTransfersService { BigInt amount, qp.BlockNumberOrTimestamp delay, ) { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final multiDest = const multi_address.$MultiAddress().id(crypto.ss58ToAccountId(s: recipientAddress)); - final call = resonanceApi.tx.reversibleTransfers.scheduleTransferWithDelay( + final call = quantusApi.tx.reversibleTransfers.scheduleTransferWithDelay( dest: multiDest, amount: amount, delay: delay, @@ -110,10 +110,10 @@ class ReversibleTransfersService { /// Cancel a pending reversible transaction (theft deterrence - reverse a transaction) Future cancelReversibleTransfer({required Account account, required H256 transactionId}) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); // Create the call - final call = resonanceApi.tx.reversibleTransfers.cancel(txId: transactionId); + final call = quantusApi.tx.reversibleTransfers.cancel(txId: transactionId); // Submit the transaction using substrate service return _substrateService.submitExtrinsic(account, call); @@ -126,10 +126,10 @@ class ReversibleTransfersService { Future getHighSecurityConfig(String address) async { print('getHighSecurityConfig: $address'); try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final accountId = crypto.ss58ToAccountId(s: address); - return await resonanceApi.query.reversibleTransfers.highSecurityAccounts(accountId); + return await quantusApi.query.reversibleTransfers.highSecurityAccounts(accountId); } catch (e) { throw Exception('Failed to get account reversibility config: $e'); } @@ -138,9 +138,9 @@ class ReversibleTransfersService { /// Query pending transfer details Future getPendingTransfer(H256 transactionId) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); - return await resonanceApi.query.reversibleTransfers.pendingTransfers(transactionId); + return await quantusApi.query.reversibleTransfers.pendingTransfers(transactionId); } catch (e) { throw Exception('Failed to get pending transfer: $e'); } @@ -149,10 +149,10 @@ class ReversibleTransfersService { /// Get account's pending transaction index Future getAccountPendingIndex(String address) async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final accountId = crypto.ss58ToAccountId(s: address); - return await resonanceApi.query.reversibleTransfers.accountPendingIndex(accountId); + return await quantusApi.query.reversibleTransfers.accountPendingIndex(accountId); } catch (e) { throw Exception('Failed to get account pending index: $e'); } @@ -193,8 +193,8 @@ class ReversibleTransfersService { /// Get constants related to reversible transfers Future> getConstants() async { try { - final resonanceApi = Schrodinger(_substrateService.provider!); - final constants = resonanceApi.constant.reversibleTransfers; + final quantusApi = Schrodinger(_substrateService.provider!); + final constants = quantusApi.constant.reversibleTransfers; return { 'maxPendingPerAccount': constants.maxPendingPerAccount, @@ -221,11 +221,11 @@ class ReversibleTransfersService { 'setHighSecurity: ${account.accountId}, $guardianAccountId, ${delay.value0} ms -> ${DurationToTimestampExtension.fromQpTimestamp(delay)}', ); try { - final resonanceApi = Schrodinger(_substrateService.provider!); - final accountId = crypto.ss58ToAccountId(s: account.accountId); + final quantusApi = Schrodinger(_substrateService.provider!); + final guardianId = crypto.ss58ToAccountId(s: guardianAccountId); // Create the call - final call = resonanceApi.tx.reversibleTransfers.setHighSecurity(delay: delay, interceptor: accountId); + final call = quantusApi.tx.reversibleTransfers.setHighSecurity(delay: delay, interceptor: guardianId); // Submit the transaction using substrate service return await _substrateService.submitExtrinsic(account, call); @@ -256,9 +256,9 @@ class ReversibleTransfersService { print('getInterceptedAccounts: $guardianAddress'); try { - final resonanceApi = Schrodinger(_substrateService.provider!); + final quantusApi = Schrodinger(_substrateService.provider!); final accountId = crypto.ss58ToAccountId(s: guardianAddress); - final interceptedAccounts = await resonanceApi.query.reversibleTransfers.interceptorIndex(accountId); + final interceptedAccounts = await quantusApi.query.reversibleTransfers.interceptorIndex(accountId); return interceptedAccounts.map((id) { final address = AddressExtension.ss58AddressFromBytes(Uint8List.fromList(id)); print('intercepted account: $address'); @@ -275,8 +275,8 @@ class ReversibleTransfersService { Duration safeguardDuration, ) async { final delay = safeguardDuration.qpTimestamp; - final resonanceApi = Schrodinger(_substrateService.provider!); - final call = resonanceApi.tx.reversibleTransfers.setHighSecurity( + final quantusApi = Schrodinger(_substrateService.provider!); + final call = quantusApi.tx.reversibleTransfers.setHighSecurity( delay: delay, interceptor: crypto.ss58ToAccountId(s: guardianAccountId), ); diff --git a/quantus_sdk/lib/src/services/substrate_service.dart b/quantus_sdk/lib/src/services/substrate_service.dart index f4fc479e..2764bb55 100644 --- a/quantus_sdk/lib/src/services/substrate_service.dart +++ b/quantus_sdk/lib/src/services/substrate_service.dart @@ -72,8 +72,8 @@ class SubstrateService { final accountInfo = await _rpcEndpointService.rpcTask((uri) async { final provider = Provider.fromUri(uri); - final resonanceApi = Schrodinger(provider); - return await resonanceApi.query.system.account(accountID); + final quantusApi = Schrodinger(provider); + return await quantusApi.query.system.account(accountID); }); print('user balance $address: ${accountInfo.data.free}'); From 32af11726c81e96023b2f3677025c53f3d2effd4 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 17:17:17 +0800 Subject: [PATCH 16/36] rename variables --- .../lib/src/services/reversible_transfers_service.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index 2dd21e7d..7fc47ec6 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -218,14 +218,14 @@ class ReversibleTransfersService { required qp.Timestamp delay, }) async { print( - 'setHighSecurity: ${account.accountId}, $guardianAccountId, ${delay.value0} ms -> ${DurationToTimestampExtension.fromQpTimestamp(delay)}', + 'X setHighSecurity: ${account.accountId}, $guardianAccountId, ${delay.value0} ms -> ${DurationToTimestampExtension.fromQpTimestamp(delay)}', ); try { final quantusApi = Schrodinger(_substrateService.provider!); - final guardianId = crypto.ss58ToAccountId(s: guardianAccountId); + final guardianAccountId32 = crypto.ss58ToAccountId(s: guardianAccountId); // Create the call - final call = quantusApi.tx.reversibleTransfers.setHighSecurity(delay: delay, interceptor: guardianId); + final call = quantusApi.tx.reversibleTransfers.setHighSecurity(delay: delay, interceptor: guardianAccountId32); // Submit the transaction using substrate service return await _substrateService.submitExtrinsic(account, call); From 10417cdbb385777b88b5fae9c6c1194289e0bf49 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 18:20:00 +0800 Subject: [PATCH 17/36] add watch extrinsic method for debugging --- .../lib/src/services/substrate_service.dart | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/quantus_sdk/lib/src/services/substrate_service.dart b/quantus_sdk/lib/src/services/substrate_service.dart index 2764bb55..a4b2a78a 100644 --- a/quantus_sdk/lib/src/services/substrate_service.dart +++ b/quantus_sdk/lib/src/services/substrate_service.dart @@ -126,6 +126,51 @@ class SubstrateService { return Uint8List.fromList(hex.decode(data.substring(2))); } + // Utility method to submit and watch an extrinsic. + // Good for debugging - overall direct fire and forget calls are more reliable. + // ignore: unused_element + Future _submitExtrinsicAndWatch(Uint8List extrinsic) async { + final params = ['0x${hex.encode(extrinsic)}']; + + // For debugging: calculate the hash locally since submitAndWatch returns a sub ID + final txHash = Hasher.blake2b256.hash(extrinsic); + final txHashHex = '0x${hex.encode(txHash)}'; + print('Calculated Tx Hash: $txHashHex'); + + // We don't await this because we want to return the hash immediately + // but keep the listener running + _rpcEndpointService.rpcTask((uri) async { + final wsUri = uri.replace(scheme: uri.scheme == 'https' ? 'wss' : 'ws'); + print('submitExtrinsic (Watch) to $wsUri'); + + final provider = Provider.fromUri(wsUri); + + try { + final subscription = await provider.subscribe('author_submitAndWatchExtrinsic', params); + print('Subscribed to extrinsic updates: ${subscription.id}'); + + subscription.stream.listen((message) { + print('Extrinsic Status Update [${message.subscription}]: ${message.result}'); + + // Check for error/invalid + final result = message.result; + if (result is Map && + (result.containsKey('invalid') || result.containsKey('dropped') || result.containsKey('error'))) { + print('Extrinsic FAILED/DROPPED: $result'); + } + }); + } catch (e) { + print('Error watching extrinsic: $e'); + } + + // Keep alive for logs + await Future.delayed(const Duration(seconds: 20)); + // await provider.disconnect(); // Optional cleanup + }); + + return txHash; + } + Future submitExtrinsic(Account account, RuntimeCall call, {int maxRetries = 3}) async { int retryCount = 0; while (retryCount < maxRetries) { From 11f0d21ff7dad78c36f1c7145dd685b7494e36f3 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 18:20:24 +0800 Subject: [PATCH 18/36] code with less chance of overflow --- quantus_sdk/lib/src/extensions/duration_extension.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantus_sdk/lib/src/extensions/duration_extension.dart b/quantus_sdk/lib/src/extensions/duration_extension.dart index 9e88bfc4..c4be7ad4 100644 --- a/quantus_sdk/lib/src/extensions/duration_extension.dart +++ b/quantus_sdk/lib/src/extensions/duration_extension.dart @@ -1,7 +1,7 @@ import 'package:quantus_sdk/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart' as qp; extension DurationToTimestampExtension on Duration { - qp.Timestamp get qpTimestamp => qp.Timestamp(BigInt.from(inMilliseconds)); + qp.Timestamp get qpTimestamp => qp.Timestamp(BigInt.from(inSeconds) * BigInt.from(1000)); - static Duration fromQpTimestamp(qp.Timestamp timestamp) => Duration(milliseconds: timestamp.value0.toInt()); + static Duration fromQpTimestamp(qp.Timestamp timestamp) => Duration(seconds: timestamp.value0.toInt() ~/ 1000); } From 4cd7aeb6b1bce2e1ead5db58c7c3ef4aaa03b040 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Tue, 13 Jan 2026 23:22:20 +0800 Subject: [PATCH 19/36] better printouts and debug info --- .../reversible_transfers_service.dart | 24 ++++++++++++++----- .../lib/src/services/substrate_service.dart | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/quantus_sdk/lib/src/services/reversible_transfers_service.dart b/quantus_sdk/lib/src/services/reversible_transfers_service.dart index 7fc47ec6..1741dfcc 100644 --- a/quantus_sdk/lib/src/services/reversible_transfers_service.dart +++ b/quantus_sdk/lib/src/services/reversible_transfers_service.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:typed_data'; +import 'package:convert/convert.dart'; import 'package:polkadart/polkadart.dart'; import 'package:quantus_sdk/generated/schrodinger/schrodinger.dart'; import 'package:quantus_sdk/generated/schrodinger/types/pallet_reversible_transfers/high_security_account_data.dart'; @@ -215,20 +216,31 @@ class ReversibleTransfersService { Future setHighSecurity({ required Account account, required String guardianAccountId, - required qp.Timestamp delay, + required qp.BlockNumberOrTimestamp delay, }) async { - print( - 'X setHighSecurity: ${account.accountId}, $guardianAccountId, ${delay.value0} ms -> ${DurationToTimestampExtension.fromQpTimestamp(delay)}', - ); + final delayValue = delay is qp.BlockNumber + ? '${(delay).value0} blocks' + : delay is qp.Timestamp + ? '${(delay).value0} ms' + : delay.toJson().toString(); + print('setHighSecurity: ${account.accountId}, $guardianAccountId, $delayValue'); try { final quantusApi = Schrodinger(_substrateService.provider!); final guardianAccountId32 = crypto.ss58ToAccountId(s: guardianAccountId); // Create the call - final call = quantusApi.tx.reversibleTransfers.setHighSecurity(delay: delay, interceptor: guardianAccountId32); + ReversibleTransfers call = quantusApi.tx.reversibleTransfers.setHighSecurity( + delay: delay, + interceptor: guardianAccountId32, + ); + print('Encoded Call: ${call.encode()}'); + print('Encoded Call Hex: ${hex.encode(call.encode())}'); // Submit the transaction using substrate service - return await _substrateService.submitExtrinsic(account, call); + final res = await _substrateService.submitExtrinsic(account, call); + + print('setHighSecurity done with result: $res'); + return res; } catch (e) { print('Failed to enable high security: $e'); throw Exception('Failed to enable high security: $e'); diff --git a/quantus_sdk/lib/src/services/substrate_service.dart b/quantus_sdk/lib/src/services/substrate_service.dart index a4b2a78a..bb1e932a 100644 --- a/quantus_sdk/lib/src/services/substrate_service.dart +++ b/quantus_sdk/lib/src/services/substrate_service.dart @@ -190,7 +190,7 @@ class SubstrateService { print('Failed to submit extrinsic after $maxRetries retries: $e'); rethrow; } - print('Failed to submit extrinsic, retrying... $retryCount'); + print('Failed to submit extrinsic, retrying... $retryCount error: $e'); await Future.delayed(Duration(milliseconds: 500 * retryCount)); } } From 1cbcdb3f2312ed048fd59e136c4fca0a39d914f1 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 00:35:41 +0800 Subject: [PATCH 20/36] add recovery pallet fees to high security fee --- .../lib/src/services/high_security_service.dart | 13 ++++++++++++- quantus_sdk/lib/src/services/recovery_service.dart | 9 +++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/quantus_sdk/lib/src/services/high_security_service.dart b/quantus_sdk/lib/src/services/high_security_service.dart index cf28c76c..bcf90459 100644 --- a/quantus_sdk/lib/src/services/high_security_service.dart +++ b/quantus_sdk/lib/src/services/high_security_service.dart @@ -28,7 +28,18 @@ class HighSecurityService { String guardianAccountId, Duration safeguardDuration, ) async { - return _reversibleTransfersService.getHighSecuritySetupFee(account, guardianAccountId, safeguardDuration); + final transactionFee = await _reversibleTransfersService.getHighSecuritySetupFee( + account, + guardianAccountId, + safeguardDuration, + ); + final recoveryPalletFee = RecoveryService().configDepositBase + RecoveryService().friendDepositFactor; + + return ExtrinsicFeeData( + fee: transactionFee.fee + recoveryPalletFee, + blockHash: transactionFee.blockHash, + blockNumber: transactionFee.blockNumber, + ); } Future isHighSecurity(Account account) async { diff --git a/quantus_sdk/lib/src/services/recovery_service.dart b/quantus_sdk/lib/src/services/recovery_service.dart index 3ff6cf1e..ea44d31e 100644 --- a/quantus_sdk/lib/src/services/recovery_service.dart +++ b/quantus_sdk/lib/src/services/recovery_service.dart @@ -4,9 +4,8 @@ import 'dart:typed_data'; import 'package:quantus_sdk/generated/schrodinger/schrodinger.dart'; import 'package:quantus_sdk/generated/schrodinger/types/pallet_recovery/active_recovery.dart'; import 'package:quantus_sdk/generated/schrodinger/types/pallet_recovery/recovery_config.dart'; -import 'package:quantus_sdk/generated/schrodinger/types/quantus_runtime/runtime_call.dart'; import 'package:quantus_sdk/generated/schrodinger/types/sp_runtime/multiaddress/multi_address.dart' as multi_address; -import 'package:quantus_sdk/src/models/account.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:quantus_sdk/src/rust/api/crypto.dart' as crypto; import 'substrate_service.dart'; @@ -19,6 +18,12 @@ class RecoveryService { final SubstrateService _substrateService = SubstrateService(); + final dummyQuantusApi = Schrodinger.url(Uri.parse(AppConstants.rpcEndpoints[0])); + late final BigInt configDepositBase = dummyQuantusApi.constant.recovery.configDepositBase; + late final BigInt friendDepositFactor = dummyQuantusApi.constant.recovery.friendDepositFactor; + late final int maxFriends = dummyQuantusApi.constant.recovery.maxFriends; + late final BigInt recoveryDeposit = dummyQuantusApi.constant.recovery.recoveryDeposit; + /// Create a recovery configuration for an account /// This makes the account recoverable by trusted friends Future createRecoveryConfig({ From d3b0348747f782de668752ed3dd7fe1045d99af0 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 10:47:13 +0800 Subject: [PATCH 21/36] simple low balance warning for high security --- .../high_security_get_started_screen.dart | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_get_started_screen.dart b/mobile-app/lib/features/main/screens/high_security/high_security_get_started_screen.dart index 0265b876..1dcb6a4f 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_get_started_screen.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_get_started_screen.dart @@ -6,9 +6,22 @@ import 'package:resonance_network_wallet/features/components/button.dart'; import 'package:resonance_network_wallet/features/components/scaffold_base.dart'; import 'package:resonance_network_wallet/features/components/wallet_app_bar.dart'; import 'package:resonance_network_wallet/features/main/screens/high_security/high_security_guardian_wizard.dart'; +import 'package:resonance_network_wallet/features/styles/app_colors_theme.dart'; import 'package:resonance_network_wallet/features/styles/app_size_theme.dart'; import 'package:resonance_network_wallet/features/styles/app_text_theme.dart'; import 'package:resonance_network_wallet/providers/high_security_form_provider.dart'; +import 'package:resonance_network_wallet/providers/wallet_providers.dart'; + +final highSecurityEstimatedFeeProvider = FutureProvider.family((ref, account) async { + final highSecurityService = ref.read(highSecurityServiceProvider); + // Invent fake parameters for estimation + final feeData = await highSecurityService.getHighSecuritySetupFee( + account, + account.accountId, // Use self as dummy guardian + const Duration(days: 14), // Fake duration + ); + return feeData.fee; +}); class HighSecurityGetStartedScreen extends ConsumerWidget { final Account account; @@ -17,6 +30,23 @@ class HighSecurityGetStartedScreen extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final formNotifier = ref.read(highSecurityFormProvider.notifier); + final balanceAsync = ref.watch(balanceProviderFamily(account.accountId)); + final estimatedFeeAsync = ref.watch(highSecurityEstimatedFeeProvider(account)); + + bool hasInsufficientFunds = false; + String? formattedFee; + + if (balanceAsync.hasValue && estimatedFeeAsync.hasValue) { + final balance = balanceAsync.value!; + final fee = estimatedFeeAsync.value!; + if (balance < fee) { + hasInsufficientFunds = true; + formattedFee = ref.read(numberFormattingServiceProvider).formatBalance(fee, addSymbol: true); + } + } + + final bool isLoading = balanceAsync.isLoading || estimatedFeeAsync.isLoading; + final bool canStart = !isLoading && !hasInsufficientFunds && !balanceAsync.hasError && !estimatedFeeAsync.hasError; return ScaffoldBase( appBar: WalletAppBar.simpleWithBackButton(title: 'Security Settings'), @@ -39,9 +69,20 @@ class HighSecurityGetStartedScreen extends ConsumerWidget { style: context.themeText.paragraph?.copyWith(fontWeight: FontWeight.w600), ), const Expanded(child: SizedBox()), + if (hasInsufficientFunds && formattedFee != null) + Padding( + padding: const EdgeInsets.only(bottom: 16.0), + child: Text( + 'Insufficient funds. You need at least $formattedFee to proceed.', + style: context.themeText.paragraph?.copyWith(color: context.themeColors.error), + textAlign: TextAlign.center, + ), + ), Button( variant: ButtonVariant.neutral, label: 'Start', + isDisabled: !canStart, + isLoading: isLoading, onPressed: () { formNotifier.resetState(); Navigator.push( From 2813d0c694aa00b9013e60f5cb045df6384582af Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 11:40:20 +0800 Subject: [PATCH 22/36] be smarter about existing accounts when loading entrusted --- quantus_sdk/lib/src/services/high_security_service.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quantus_sdk/lib/src/services/high_security_service.dart b/quantus_sdk/lib/src/services/high_security_service.dart index bcf90459..8784d46a 100644 --- a/quantus_sdk/lib/src/services/high_security_service.dart +++ b/quantus_sdk/lib/src/services/high_security_service.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:typed_data'; +import 'package:collection/collection.dart'; import 'package:quantus_sdk/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart' as qp; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:quantus_sdk/src/extensions/address_extension.dart'; @@ -51,9 +52,11 @@ class HighSecurityService { } Future> getEntrustedAccounts(Account account) async { + final accounts = await AccountsService().getAccounts(); + Account? mapExistingAccount(String ss58Address) => accounts.firstWhereOrNull((a) => a.accountId == ss58Address); return (await _reversibleTransfersService.getInterceptedAccounts( account.accountId, - )).map((account) => Account.fromSs58Address(account)).toList(); + )).map((account) => mapExistingAccount(account) ?? Account.fromSs58Address(account)).toList(); } Future getHighSecurityConfig(String address) async { From 02b15b7d42bf4f4abd057350a69bdbac337d3d15 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 11:40:33 +0800 Subject: [PATCH 23/36] entrusted are always high security --- mobile-app/lib/features/main/screens/accounts_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile-app/lib/features/main/screens/accounts_screen.dart b/mobile-app/lib/features/main/screens/accounts_screen.dart index 5a1fd109..7268f3eb 100644 --- a/mobile-app/lib/features/main/screens/accounts_screen.dart +++ b/mobile-app/lib/features/main/screens/accounts_screen.dart @@ -541,7 +541,7 @@ class _AccountsScreenState extends ConsumerState { account: entrusted, balance: _formattingService.formatBalance(balance, addSymbol: true), checksumName: checksumName, - isHighSecurity: isHighSecurity, + isHighSecurity: true, ), ), ); From b98bb59da4bbe550bffb1b7f15e7e9e266851e81 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 11:55:43 +0800 Subject: [PATCH 24/36] high security details screen first draft --- .../components/network_status_banner.dart | 5 +- .../main/screens/account_settings_screen.dart | 9 +- .../high_security_details_screen.dart | 386 ++++++++++++++++++ 3 files changed, 396 insertions(+), 4 deletions(-) create mode 100644 mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart diff --git a/mobile-app/lib/features/components/network_status_banner.dart b/mobile-app/lib/features/components/network_status_banner.dart index 0c06ef14..37485f48 100644 --- a/mobile-app/lib/features/components/network_status_banner.dart +++ b/mobile-app/lib/features/components/network_status_banner.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:resonance_network_wallet/features/styles/app_colors_theme.dart'; import 'package:resonance_network_wallet/providers/connectivity_provider.dart'; class NetworkStatusBanner extends ConsumerWidget { @@ -17,7 +18,7 @@ class NetworkStatusBanner extends ConsumerWidget { width: double.infinity, padding: const EdgeInsets.symmetric(vertical: 2), decoration: const BoxDecoration(color: Color(0xFFFF1F45)), - child: const Row( + child: Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -25,7 +26,7 @@ class NetworkStatusBanner extends ConsumerWidget { Text( 'Not Connected', style: TextStyle( - color: Color(0xFFF4F6F9), + color: context.themeColors.textPrimary, fontSize: 16, fontFamily: 'Fira Code', fontWeight: FontWeight.w400, diff --git a/mobile-app/lib/features/main/screens/account_settings_screen.dart b/mobile-app/lib/features/main/screens/account_settings_screen.dart index d251bd85..033148cd 100644 --- a/mobile-app/lib/features/main/screens/account_settings_screen.dart +++ b/mobile-app/lib/features/main/screens/account_settings_screen.dart @@ -16,6 +16,7 @@ import 'package:resonance_network_wallet/features/styles/app_size_theme.dart'; import 'package:resonance_network_wallet/features/components/sphere.dart'; import 'package:resonance_network_wallet/features/components/wallet_app_bar.dart'; import 'package:resonance_network_wallet/features/main/screens/create_account_screen.dart'; +import 'package:resonance_network_wallet/features/main/screens/high_security/high_security_details_screen.dart'; import 'package:resonance_network_wallet/features/main/screens/high_security/high_security_get_started_screen.dart'; import 'package:resonance_network_wallet/features/main/screens/receive_screen.dart'; import 'package:resonance_network_wallet/features/styles/app_colors_theme.dart'; @@ -35,7 +36,7 @@ class AccountSettingsScreen extends ConsumerStatefulWidget { required this.account, required this.balance, required this.checksumName, - this.isHighSecurity = true, + required this.isHighSecurity, }); @override @@ -303,7 +304,11 @@ class _AccountSettingsScreenState extends ConsumerState { onTap: () { Navigator.push( context, - MaterialPageRoute(builder: (context) => HighSecurityGetStartedScreen(account: widget.account)), + MaterialPageRoute( + builder: (context) => isHighSecurity + ? HighSecurityDetailsScreen(account: widget.account) + : HighSecurityGetStartedScreen(account: widget.account), + ), ); }, child: Container( diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart new file mode 100644 index 00000000..6826e0da --- /dev/null +++ b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart @@ -0,0 +1,386 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:quantus_sdk/quantus_sdk.dart'; +import 'package:resonance_network_wallet/features/components/scaffold_base.dart'; +import 'package:resonance_network_wallet/features/components/wallet_app_bar.dart'; +import 'package:resonance_network_wallet/features/styles/app_colors_theme.dart'; +import 'package:resonance_network_wallet/features/styles/app_size_theme.dart'; +import 'package:resonance_network_wallet/features/styles/app_text_theme.dart'; +import 'package:resonance_network_wallet/providers/wallet_providers.dart'; +import 'package:resonance_network_wallet/shared/extensions/media_query_data_extension.dart'; + +final highSecurityConfigProvider = FutureProvider.family((ref, account) async { + final service = ref.watch(highSecurityServiceProvider); + return service.getHighSecurityConfig(account.accountId); +}); + +class HighSecurityDetailsScreen extends ConsumerWidget { + final Account account; + const HighSecurityDetailsScreen({super.key, required this.account}); + + static const _text16 = TextStyle( + color: context.themeColors.textPrimary, + fontSize: 16, + fontFamily: 'Fira Code', + fontWeight: FontWeight.w400, + ); + + static const _statusTitle = TextStyle( + color: Color(0xFF0B0F14), + fontSize: 16, + fontFamily: 'Fira Code', + fontWeight: FontWeight.w400, + ); + + static const _statusSubtitle = TextStyle( + color: Color(0xFF0B0F14), + fontSize: 12, + fontFamily: 'Fira Code', + fontWeight: FontWeight.w600, + ); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final configAsync = ref.watch(highSecurityConfigProvider(account)); + + return ScaffoldBase( + appBar: WalletAppBar.simpleWithBackButton(title: 'Account Settings'), + child: configAsync.when( + loading: () => Center( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + CircularProgressIndicator(color: context.themeColors.circularLoader), + const SizedBox(height: 12), + Text('Loading...', style: context.themeText.smallParagraph), + ], + ), + ), + error: (e, _) => Center( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 24), + child: Text('Failed to load High Security settings: $e', style: context.themeText.smallParagraph), + ), + ), + data: (data) { + if (data == null) { + return Center( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 24), + child: Text('High Security is not enabled for this account.', style: context.themeText.smallParagraph), + ), + ); + } + + const reminders = ['2 hrs before', '2 days, 8 hrs before']; + + return SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.only(left: 27, right: 27, top: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(height: 20), + const _StatusCard(), + const SizedBox(height: 20), + _GuardianAccountSection(guardianAccountId: data.guardianAccountId), + const SizedBox(height: 20), + _SafeguardWindowSection(safeguardWindow: data.safeguardWindow), + const SizedBox(height: 20), + const _RemindersSection(reminders: reminders), + SizedBox(height: context.themeSize.bottomButtonSpacing), + ], + ), + ), + ); + }, + ), + ); + } + + static String shortAddress(String address) { + if (address.length <= 12) return address; + return '${address.substring(0, 7)}...${address.substring(address.length - 5)}'; + } +} + +class _GuardianAccountSection extends StatelessWidget { + final String guardianAccountId; + const _GuardianAccountSection({required this.guardianAccountId}); + + static const _text16 = HighSecurityDetailsScreen._text16; + + @override + Widget build(BuildContext context) { + return Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Guardian Account', style: _text16), + const SizedBox(height: 8), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 321), + child: Container( + width: double.infinity, + padding: const EdgeInsets.only(top: 8, left: 8, right: 18, bottom: 8), + decoration: ShapeDecoration( + color: const Color(0xFF3D3C44), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)), + ), + child: Text(HighSecurityDetailsScreen.shortAddress(guardianAccountId), style: _text16), + ), + ), + ], + ); + } +} + +class _SafeguardWindowSection extends StatelessWidget { + final Duration safeguardWindow; + const _SafeguardWindowSection({required this.safeguardWindow}); + + static const _text16 = HighSecurityDetailsScreen._text16; + + @override + Widget build(BuildContext context) { + final formatted = _formatDuration(safeguardWindow); + return Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Safeguard Window', style: _text16), + const SizedBox(height: 8), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 321), + child: Container( + width: double.infinity, + padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 8), + decoration: ShapeDecoration( + color: const Color(0xFF3D3C44), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)), + ), + child: Text(formatted, style: _text16), + ), + ), + ], + ); + } + + String _formatDuration(Duration d) { + final totalHours = d.inHours; + final days = totalHours ~/ 24; + final hours = totalHours % 24; + if (days > 0) return '$days days, $hours hrs'; + return '$hours hrs'; + } +} + +class _RemindersSection extends StatelessWidget { + final List reminders; + const _RemindersSection({required this.reminders}); + + static const _text16 = HighSecurityDetailsScreen._text16; + + @override + Widget build(BuildContext context) { + return Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Reminders', style: _text16), + const SizedBox(height: 8), + Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + for (final reminder in reminders) ...[_ReminderRow(label: reminder), const SizedBox(height: 12)], + ], + ), + const SizedBox(height: 8), + const Row( + mainAxisSize: MainAxisSize.min, + children: [ + const XIcon(), + SizedBox(width: 17), + Text('Add Reminder', style: _text16), + ], + ), + ], + ); + } +} + +class _ReminderRow extends StatelessWidget { + final String label; + const _ReminderRow({required this.label}); + + static const _text16 = HighSecurityDetailsScreen._text16; + + @override + Widget build(BuildContext context) { + final width = context.isTablet ? 420.0 : double.infinity; + return ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 321), + child: Container( + width: width, + padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 8), + decoration: ShapeDecoration( + color: const Color(0xFF3D3C44), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(label, style: _text16), + const _ChevronIcon(), + ], + ), + ), + ); + } +} + +class _ChevronIcon extends StatelessWidget { + const _ChevronIcon(); + + @override + Widget build(BuildContext context) { + return SizedBox( + width: 12.84, + height: 12.84, + child: Stack( + children: [ + Positioned( + left: 10.14, + top: 0, + child: Transform.rotate( + angle: 0.79, + child: Container( + width: 3.81, + height: 2, + decoration: ShapeDecoration( + color: Colors.white.withValues(alpha: 0.70), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0.50)), + ), + ), + ), + ), + ], + ), + ); + } +} + +class XIcon extends StatelessWidget { + const XIcon(); + + @override + Widget build(BuildContext context) { + return SizedBox( + width: 12, + height: 12, + child: Stack( + children: [ + Center( + child: Container( + width: 12, + height: 2, + decoration: ShapeDecoration( + color: context.themeColors.textPrimary, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0.50)), + ), + ), + ), + Center( + child: Container( + width: 2, + height: 12, + decoration: ShapeDecoration( + color: context.themeColors.textPrimary, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0.50)), + ), + ), + ), + ], + ), + ); + } +} + +// class _AddReminderIcon extends StatelessWidget { +// const _AddReminderIcon(); + +// @override +// Widget build(BuildContext context) { +// return Transform.rotate(angle: 0.79, child: const SizedBox(width: 12, height: 8, child: Stack())); +// } +// } + +class _StatusCard extends StatelessWidget { + const _StatusCard(); + + static const _statusTitle = HighSecurityDetailsScreen._statusTitle; + static const _statusSubtitle = HighSecurityDetailsScreen._statusSubtitle; + + @override + Widget build(BuildContext context) { + return Container( + width: double.infinity, + padding: const EdgeInsets.only(top: 12, left: 12, right: 18, bottom: 12), + decoration: ShapeDecoration( + color: const Color(0xFF4CEDE7), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)), + ), + child: const Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: 20, + height: 25, + child: Stack( + children: [ + Positioned(left: 5, top: 16, child: _StatusDot()), + Positioned(left: 9, top: 16, child: _StatusDot()), + Positioned(left: 13, top: 16, child: _StatusDot()), + ], + ), + ), + SizedBox(width: 12), + Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('High Security', style: _statusTitle), + SizedBox(height: 4), + Text('ON', style: _statusSubtitle), + ], + ), + ], + ), + ], + ), + ); + } +} + +class _StatusDot extends StatelessWidget { + const _StatusDot(); + + @override + Widget build(BuildContext context) { + return const SizedBox( + width: 2, + height: 2, + child: DecoratedBox( + decoration: ShapeDecoration(color: Color(0xFF0B0F14), shape: OvalBorder()), + ), + ); + } +} From 5da7f2cd551e015adcf5f9470fd6b59038f6de67 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 12:06:42 +0800 Subject: [PATCH 25/36] use theme colors --- .../high_security_details_screen.dart | 58 +++++++++---------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart index 6826e0da..180659c6 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart @@ -18,22 +18,23 @@ class HighSecurityDetailsScreen extends ConsumerWidget { final Account account; const HighSecurityDetailsScreen({super.key, required this.account}); - static const _text16 = TextStyle( + // Shared style accessors + static TextStyle text16(BuildContext context) => TextStyle( color: context.themeColors.textPrimary, fontSize: 16, fontFamily: 'Fira Code', fontWeight: FontWeight.w400, ); - static const _statusTitle = TextStyle( - color: Color(0xFF0B0F14), + static TextStyle statusTitle(BuildContext context) => TextStyle( + color: context.themeColors.textSecondary, fontSize: 16, fontFamily: 'Fira Code', fontWeight: FontWeight.w400, ); - static const _statusSubtitle = TextStyle( - color: Color(0xFF0B0F14), + static TextStyle statusSubtitle(BuildContext context) => TextStyle( + color: context.themeColors.textSecondary, fontSize: 12, fontFamily: 'Fira Code', fontWeight: FontWeight.w600, @@ -108,15 +109,14 @@ class _GuardianAccountSection extends StatelessWidget { final String guardianAccountId; const _GuardianAccountSection({required this.guardianAccountId}); - static const _text16 = HighSecurityDetailsScreen._text16; - @override Widget build(BuildContext context) { + final style = HighSecurityDetailsScreen.text16(context); return Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text('Guardian Account', style: _text16), + Text('Guardian Account', style: style), const SizedBox(height: 8), ConstrainedBox( constraints: const BoxConstraints(maxWidth: 321), @@ -127,7 +127,7 @@ class _GuardianAccountSection extends StatelessWidget { color: const Color(0xFF3D3C44), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)), ), - child: Text(HighSecurityDetailsScreen.shortAddress(guardianAccountId), style: _text16), + child: Text(HighSecurityDetailsScreen.shortAddress(guardianAccountId), style: style), ), ), ], @@ -139,16 +139,15 @@ class _SafeguardWindowSection extends StatelessWidget { final Duration safeguardWindow; const _SafeguardWindowSection({required this.safeguardWindow}); - static const _text16 = HighSecurityDetailsScreen._text16; - @override Widget build(BuildContext context) { final formatted = _formatDuration(safeguardWindow); + final style = HighSecurityDetailsScreen.text16(context); return Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text('Safeguard Window', style: _text16), + Text('Safeguard Window', style: style), const SizedBox(height: 8), ConstrainedBox( constraints: const BoxConstraints(maxWidth: 321), @@ -159,7 +158,7 @@ class _SafeguardWindowSection extends StatelessWidget { color: const Color(0xFF3D3C44), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)), ), - child: Text(formatted, style: _text16), + child: Text(formatted, style: style), ), ), ], @@ -179,15 +178,14 @@ class _RemindersSection extends StatelessWidget { final List reminders; const _RemindersSection({required this.reminders}); - static const _text16 = HighSecurityDetailsScreen._text16; - @override Widget build(BuildContext context) { + final style = HighSecurityDetailsScreen.text16(context); return Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text('Reminders', style: _text16), + Text('Reminders', style: style), const SizedBox(height: 8), Column( mainAxisSize: MainAxisSize.min, @@ -197,12 +195,12 @@ class _RemindersSection extends StatelessWidget { ], ), const SizedBox(height: 8), - const Row( + Row( mainAxisSize: MainAxisSize.min, children: [ const XIcon(), - SizedBox(width: 17), - Text('Add Reminder', style: _text16), + const SizedBox(width: 17), + Text('Add Reminder', style: style), ], ), ], @@ -214,11 +212,10 @@ class _ReminderRow extends StatelessWidget { final String label; const _ReminderRow({required this.label}); - static const _text16 = HighSecurityDetailsScreen._text16; - @override Widget build(BuildContext context) { final width = context.isTablet ? 420.0 : double.infinity; + final style = HighSecurityDetailsScreen.text16(context); return ConstrainedBox( constraints: const BoxConstraints(maxWidth: 321), child: Container( @@ -231,7 +228,7 @@ class _ReminderRow extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text(label, style: _text16), + Text(label, style: style), const _ChevronIcon(), ], ), @@ -272,7 +269,7 @@ class _ChevronIcon extends StatelessWidget { } class XIcon extends StatelessWidget { - const XIcon(); + const XIcon({super.key}); @override Widget build(BuildContext context) { @@ -319,9 +316,6 @@ class XIcon extends StatelessWidget { class _StatusCard extends StatelessWidget { const _StatusCard(); - static const _statusTitle = HighSecurityDetailsScreen._statusTitle; - static const _statusSubtitle = HighSecurityDetailsScreen._statusSubtitle; - @override Widget build(BuildContext context) { return Container( @@ -331,7 +325,7 @@ class _StatusCard extends StatelessWidget { color: const Color(0xFF4CEDE7), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)), ), - child: const Row( + child: Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, @@ -341,7 +335,7 @@ class _StatusCard extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [ - SizedBox( + const SizedBox( width: 20, height: 25, child: Stack( @@ -352,14 +346,14 @@ class _StatusCard extends StatelessWidget { ], ), ), - SizedBox(width: 12), + const SizedBox(width: 12), Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('High Security', style: _statusTitle), - SizedBox(height: 4), - Text('ON', style: _statusSubtitle), + Text('High Security', style: HighSecurityDetailsScreen.statusTitle(context)), + const SizedBox(height: 4), + Text('ON', style: HighSecurityDetailsScreen.statusSubtitle(context)), ], ), ], From 54da19844893a89c70f14b0026d5d1f443e3223c Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 12:07:35 +0800 Subject: [PATCH 26/36] hide high sec --- mobile-app/lib/utils/feature_flags.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile-app/lib/utils/feature_flags.dart b/mobile-app/lib/utils/feature_flags.dart index a0241c15..07623f6d 100644 --- a/mobile-app/lib/utils/feature_flags.dart +++ b/mobile-app/lib/utils/feature_flags.dart @@ -2,5 +2,5 @@ class FeatureFlags { static const bool enableTestButtons = false; // Only show in debug mode static const bool enableKeystoneHardwareWallet = false; // turn keystone hw wallet on and off - static const bool enableHighSecurity = true; // turn keystone hw wallet on and off + static const bool enableHighSecurity = false; // turn keystone hw wallet on and off } From c5b332447c179599f95b81fcabb6f08ff08a8985 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 12:16:56 +0800 Subject: [PATCH 27/36] format --- .../generated/schrodinger/pallets/assets.dart | 431 +- .../schrodinger/pallets/assets_holder.dart | 76 +- .../schrodinger/pallets/balances.dart | 351 +- .../pallets/conviction_voting.dart | 147 +- .../schrodinger/pallets/merkle_airdrop.dart | 117 +- .../schrodinger/pallets/mining_rewards.dart | 19 +- .../schrodinger/pallets/preimage.dart | 111 +- .../generated/schrodinger/pallets/q_po_w.dart | 59 +- .../schrodinger/pallets/recovery.dart | 143 +- .../schrodinger/pallets/referenda.dart | 231 +- .../pallets/reversible_transfers.dart | 266 +- .../schrodinger/pallets/scheduler.dart | 216 +- .../generated/schrodinger/pallets/sudo.dart | 28 +- .../generated/schrodinger/pallets/system.dart | 574 +-- .../schrodinger/pallets/tech_collective.dart | 247 +- .../schrodinger/pallets/tech_referenda.dart | 173 +- .../schrodinger/pallets/timestamp.dart | 10 +- .../pallets/transaction_payment.dart | 21 +- .../schrodinger/pallets/treasury_pallet.dart | 118 +- .../schrodinger/pallets/utility.dart | 50 +- .../schrodinger/pallets/vesting.dart | 78 +- .../generated/schrodinger/schrodinger.dart | 82 +- .../generated/schrodinger/types/cow_1.dart | 10 +- .../generated/schrodinger/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 +- .../types/frame_support/pallet_id.dart | 10 +- .../traits/preimages/bounded.dart | 115 +- .../traits/schedule/dispatch_time.dart | 45 +- .../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 +- .../schrodinger/types/frame_system/phase.dart | 38 +- .../types/pallet_assets/pallet/call.dart | 1631 ++---- .../types/pallet_assets/pallet/error.dart | 15 +- .../types/pallet_assets/pallet/event.dart | 1421 ++---- .../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 | 1264 +---- .../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 | 267 +- .../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 +- .../airdrop_metadata.dart | 79 +- .../pallet_merkle_airdrop/pallet/call.dart | 243 +- .../pallet_merkle_airdrop/pallet/error.dart | 15 +- .../pallet_merkle_airdrop/pallet/event.dart | 200 +- .../pallet_mining_rewards/pallet/event.dart | 143 +- .../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 | 337 +- .../pallet/error.dart | 18 +- .../pallet/event.dart | 288 +- .../pallet/hold_reason.dart | 15 +- .../pending_transfer.dart | 70 +- .../types/pallet_scheduler/pallet/call.dart | 656 +-- .../types/pallet_scheduler/pallet/error.dart | 15 +- .../types/pallet_scheduler/pallet/event.dart | 563 +-- .../types/pallet_scheduler/retry_config.dart | 43 +- .../types/pallet_scheduler/scheduled.dart | 95 +- .../types/pallet_sudo/pallet/call.dart | 167 +- .../types/pallet_sudo/pallet/error.dart | 15 +- .../types/pallet_sudo/pallet/event.dart | 145 +- .../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 | 211 +- .../types/pallet_treasury/pallet/error.dart | 15 +- .../types/pallet_treasury/pallet/event.dart | 488 +- .../types/pallet_treasury/payment_state.dart | 42 +- .../types/pallet_treasury/proposal.dart | 64 +- .../types/pallet_treasury/spend_status.dart | 68 +- .../types/pallet_utility/pallet/call.dart | 375 +- .../types/pallet_utility/pallet/error.dart | 15 +- .../types/pallet_utility/pallet/event.dart | 167 +- .../types/pallet_vesting/pallet/call.dart | 245 +- .../types/pallet_vesting/pallet/error.dart | 15 +- .../types/pallet_vesting/pallet/event.dart | 143 +- .../types/pallet_vesting/releases.dart | 15 +- .../vesting_info/vesting_info.dart | 43 +- .../types/primitive_types/h256.dart | 10 +- .../types/primitive_types/u512.dart | 10 +- .../types/dilithium_signature_scheme.dart | 37 +- .../dilithium_signature_with_public.dart | 29 +- .../types/qp_poseidon/poseidon_hasher.dart | 10 +- .../block_number_or_timestamp.dart | 51 +- .../types/qp_scheduler/dispatch_time.dart | 45 +- .../definitions/preimage_deposit.dart | 17 +- .../origins/pallet_custom_origins/origin.dart | 15 +- .../types/quantus_runtime/origin_caller.dart | 45 +- .../types/quantus_runtime/runtime.dart | 10 +- .../types/quantus_runtime/runtime_call.dart | 348 +- .../types/quantus_runtime/runtime_event.dart | 402 +- .../runtime_freeze_reason.dart | 10 +- .../quantus_runtime/runtime_hold_reason.dart | 45 +- .../reversible_transaction_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 +- .../types/sp_runtime/module_error.dart | 46 +- .../multiaddress/multi_address.dart | 110 +- .../sp_runtime/proving_trie/trie_error.dart | 15 +- .../types/sp_runtime/token_error.dart | 15 +- .../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 +- .../generated/schrodinger/types/tuples.dart | 20 +- .../generated/schrodinger/types/tuples_1.dart | 20 +- .../generated/schrodinger/types/tuples_2.dart | 26 +- .../generated/schrodinger/types/tuples_3.dart | 23 +- .../generated/schrodinger/types/tuples_4.dart | 5 +- 202 files changed, 6394 insertions(+), 23122 deletions(-) diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/assets.dart b/quantus_sdk/lib/generated/schrodinger/pallets/assets.dart index ba29cf24..b6e99c2a 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/assets.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,27 +28,24 @@ 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, @@ -63,15 +59,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); } @@ -79,19 +69,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); } @@ -101,21 +81,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); } @@ -123,30 +91,16 @@ 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 */ @@ -163,10 +117,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); } @@ -174,15 +125,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(); } @@ -190,37 +135,24 @@ 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 */ } /// Returns the storage key for `asset`. @@ -230,28 +162,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; } @@ -308,16 +226,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. @@ -345,12 +255,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. @@ -427,16 +332,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`. @@ -454,16 +351,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. @@ -484,16 +373,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. @@ -514,16 +395,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. @@ -551,12 +424,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` @@ -571,14 +439,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. @@ -591,14 +453,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. @@ -637,14 +493,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. @@ -665,12 +515,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. @@ -695,12 +540,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. @@ -739,13 +579,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. @@ -795,16 +631,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. @@ -827,16 +665,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. @@ -852,14 +682,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. @@ -880,11 +704,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 @@ -911,12 +731,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. @@ -945,14 +760,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. @@ -967,14 +776,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`. @@ -987,14 +790,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. @@ -1010,14 +807,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`. @@ -1030,14 +821,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. @@ -1056,16 +841,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)); } } diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/assets_holder.dart b/quantus_sdk/lib/generated/schrodinger/pallets/assets_holder.dart index 918dddaa..608ecb2d 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/assets_holder.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/balances.dart b/quantus_sdk/lib/generated/schrodinger/pallets/balances.dart index ac2bc4f4..4e5a442d 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/balances.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/balances.dart @@ -22,15 +22,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, @@ -38,63 +36,60 @@ 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()), - ); - - final _i1.StorageMap< - _i9.Tuple4, dynamic> - _transferProof = const _i1.StorageMap< - _i9.Tuple4, - dynamic>( - prefix: 'Balances', - storage: 'TransferProof', - valueCodec: _i2.NullCodec.codec, - hasher: _i1.StorageHasher.identity( - _i9.Tuple4Codec( - _i2.U64Codec.codec, - _i3.AccountId32Codec(), - _i3.AccountId32Codec(), - _i2.U128Codec.codec, - )), - ); - - final _i1.StorageValue _transferCount = - const _i1.StorageValue( + prefix: 'Balances', + storage: 'Freezes', + valueCodec: _i2.SequenceCodec<_i8.IdAmount>(_i8.IdAmount.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i3.AccountId32Codec()), + ); + + final _i1.StorageMap<_i9.Tuple4, dynamic> _transferProof = + const _i1.StorageMap<_i9.Tuple4, dynamic>( + prefix: 'Balances', + storage: 'TransferProof', + valueCodec: _i2.NullCodec.codec, + hasher: _i1.StorageHasher.identity( + _i9.Tuple4Codec( + _i2.U64Codec.codec, + _i3.AccountId32Codec(), + _i3.AccountId32Codec(), + _i2.U128Codec.codec, + ), + ), + ); + + final _i1.StorageValue _transferCount = const _i1.StorageValue( prefix: 'Balances', storage: 'TransferCount', valueCodec: _i2.U64Codec.codec, @@ -103,10 +98,7 @@ class Queries { /// The total units issued in the system. _i10.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); } @@ -116,10 +108,7 @@ class Queries { /// The total units of outstanding deactivated balance in the system. _i10.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); } @@ -150,15 +139,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. - _i10.Future<_i4.AccountData> account( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i10.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); } @@ -166,10 +149,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 */ } @@ -177,15 +157,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/` - _i10.Future> locks( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i10.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); } @@ -195,15 +169,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/` - _i10.Future> reserves( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i10.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); } @@ -211,15 +179,9 @@ class Queries { } /// Holds on account balances. - _i10.Future> holds( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i10.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); } @@ -227,15 +189,9 @@ class Queries { } /// Freeze locks on account balances. - _i10.Future> freezes( - _i3.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i10.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); } @@ -248,10 +204,7 @@ class Queries { _i1.BlockHash? at, }) async { final hashedKey = _transferProof.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _transferProof.decodeValue(bytes); } @@ -260,10 +213,7 @@ class Queries { _i10.Future transferCount({_i1.BlockHash? at}) async { final hashedKey = _transferCount.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _transferCount.decodeValue(bytes); } @@ -294,108 +244,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. - _i10.Future> multiAccount( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i10.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/` - _i10.Future>> multiLocks( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i10.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/` - _i10.Future>> multiReserves( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i10.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. - _i10.Future>> multiHolds( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i10.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. - _i10.Future>> multiFreezes( - List<_i3.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i10.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 */ } /// Transfer proofs for a wormhole transfers @@ -403,16 +313,10 @@ class Queries { List<_i9.Tuple4> keys, { _i1.BlockHash? at, }) async { - final hashedKeys = - keys.map((key) => _transferProof.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final hashedKeys = keys.map((key) => _transferProof.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _transferProof.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _transferProof.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -460,8 +364,7 @@ class Queries { } /// Returns the storage key for `transferProof`. - _i11.Uint8List transferProofKey( - _i9.Tuple4 key1) { + _i11.Uint8List transferProofKey(_i9.Tuple4 key1) { final hashedKey = _transferProof.hashedKeyFor(key1); return hashedKey; } @@ -519,14 +422,8 @@ class Txs { /// of the transfer, the account will be reaped. /// /// The dispatch origin for this call must be `Signed` by the transactor. - _i12.Balances transferAllowDeath({ - required _i13.MultiAddress dest, - required BigInt value, - }) { - return _i12.Balances(_i14.TransferAllowDeath( - dest: dest, - value: value, - )); + _i12.Balances transferAllowDeath({required _i13.MultiAddress dest, required BigInt value}) { + return _i12.Balances(_i14.TransferAllowDeath(dest: dest, value: value)); } /// Exactly as `transfer_allow_death`, except the origin must be root and the source account @@ -536,11 +433,7 @@ class Txs { required _i13.MultiAddress dest, required BigInt value, }) { - return _i12.Balances(_i14.ForceTransfer( - source: source, - dest: dest, - value: value, - )); + return _i12.Balances(_i14.ForceTransfer(source: source, dest: dest, value: value)); } /// Same as the [`transfer_allow_death`] call, but with a check that the transfer will not @@ -549,14 +442,8 @@ class Txs { /// 99% of the time you want [`transfer_allow_death`] instead. /// /// [`transfer_allow_death`]: struct.Pallet.html#method.transfer - _i12.Balances transferKeepAlive({ - required _i13.MultiAddress dest, - required BigInt value, - }) { - return _i12.Balances(_i14.TransferKeepAlive( - dest: dest, - value: value, - )); + _i12.Balances transferKeepAlive({required _i13.MultiAddress dest, required BigInt value}) { + return _i12.Balances(_i14.TransferKeepAlive(dest: dest, value: value)); } /// Transfer the entire transferable balance from the caller account. @@ -574,27 +461,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). - _i12.Balances transferAll({ - required _i13.MultiAddress dest, - required bool keepAlive, - }) { - return _i12.Balances(_i14.TransferAll( - dest: dest, - keepAlive: keepAlive, - )); + _i12.Balances transferAll({required _i13.MultiAddress dest, required bool keepAlive}) { + return _i12.Balances(_i14.TransferAll(dest: dest, keepAlive: keepAlive)); } /// Unreserve some balance from a user by force. /// /// Can only be called by ROOT. - _i12.Balances forceUnreserve({ - required _i13.MultiAddress who, - required BigInt amount, - }) { - return _i12.Balances(_i14.ForceUnreserve( - who: who, - amount: amount, - )); + _i12.Balances forceUnreserve({required _i13.MultiAddress who, required BigInt amount}) { + return _i12.Balances(_i14.ForceUnreserve(who: who, amount: amount)); } /// Upgrade a specified account. @@ -612,14 +487,8 @@ class Txs { /// Set the regular balance of a given account. /// /// The dispatch origin for this call is `root`. - _i12.Balances forceSetBalance({ - required _i13.MultiAddress who, - required BigInt newFree, - }) { - return _i12.Balances(_i14.ForceSetBalance( - who: who, - newFree: newFree, - )); + _i12.Balances forceSetBalance({required _i13.MultiAddress who, required BigInt newFree}) { + return _i12.Balances(_i14.ForceSetBalance(who: who, newFree: newFree)); } /// Adjust the total issuance in a saturating way. @@ -627,14 +496,8 @@ class Txs { /// Can only be called by root and always needs a positive `delta`. /// /// # Example - _i12.Balances forceAdjustTotalIssuance({ - required _i15.AdjustmentDirection direction, - required BigInt delta, - }) { - return _i12.Balances(_i14.ForceAdjustTotalIssuance( - direction: direction, - delta: delta, - )); + _i12.Balances forceAdjustTotalIssuance({required _i15.AdjustmentDirection direction, required BigInt delta}) { + return _i12.Balances(_i14.ForceAdjustTotalIssuance(direction: direction, delta: delta)); } /// Burn the specified liquid free balance from the origin account. @@ -644,14 +507,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_. - _i12.Balances burn({ - required BigInt value, - required bool keepAlive, - }) { - return _i12.Balances(_i14.Burn( - value: value, - keepAlive: keepAlive, - )); + _i12.Balances burn({required BigInt value, required bool keepAlive}) { + return _i12.Balances(_i14.Burn(value: value, keepAlive: keepAlive)); } } diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/conviction_voting.dart b/quantus_sdk/lib/generated/schrodinger/pallets/conviction_voting.dart index 866e87c4..5b01a8c0 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/conviction_voting.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/merkle_airdrop.dart b/quantus_sdk/lib/generated/schrodinger/pallets/merkle_airdrop.dart index 4d008e08..9ca0a23f 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/merkle_airdrop.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/merkle_airdrop.dart @@ -16,8 +16,7 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageMap _airdropInfo = - const _i1.StorageMap( + final _i1.StorageMap _airdropInfo = const _i1.StorageMap( prefix: 'MerkleAirdrop', storage: 'AirdropInfo', valueCodec: _i2.AirdropMetadata.codec, @@ -26,12 +25,12 @@ class Queries { final _i1.StorageDoubleMap _claimed = const _i1.StorageDoubleMap( - prefix: 'MerkleAirdrop', - storage: 'Claimed', - valueCodec: _i3.NullCodec.codec, - hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), - hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), - ); + prefix: 'MerkleAirdrop', + storage: 'Claimed', + valueCodec: _i3.NullCodec.codec, + hasher1: _i1.StorageHasher.blake2b128Concat(_i3.U32Codec.codec), + hasher2: _i1.StorageHasher.blake2b128Concat(_i4.AccountId32Codec()), + ); final _i1.StorageValue _nextAirdropId = const _i1.StorageValue( prefix: 'MerkleAirdrop', @@ -40,15 +39,9 @@ class Queries { ); /// Stores general info about an airdrop - _i5.Future<_i2.AirdropMetadata?> airdropInfo( - int key1, { - _i1.BlockHash? at, - }) async { + _i5.Future<_i2.AirdropMetadata?> airdropInfo(int key1, {_i1.BlockHash? at}) async { final hashedKey = _airdropInfo.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _airdropInfo.decodeValue(bytes); } @@ -56,19 +49,9 @@ class Queries { } /// Storage for claimed status - _i5.Future claimed( - int key1, - _i4.AccountId32 key2, { - _i1.BlockHash? at, - }) async { - final hashedKey = _claimed.hashedKeyFor( - key1, - key2, - ); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + _i5.Future claimed(int key1, _i4.AccountId32 key2, {_i1.BlockHash? at}) async { + final hashedKey = _claimed.hashedKeyFor(key1, key2); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _claimed.decodeValue(bytes); } @@ -78,10 +61,7 @@ class Queries { /// Counter for airdrop IDs _i5.Future nextAirdropId({_i1.BlockHash? at}) async { final hashedKey = _nextAirdropId.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _nextAirdropId.decodeValue(bytes); } @@ -89,20 +69,11 @@ class Queries { } /// Stores general info about an airdrop - _i5.Future> multiAirdropInfo( - List keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _airdropInfo.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i5.Future> multiAirdropInfo(List keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _airdropInfo.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _airdropInfo.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _airdropInfo.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -114,14 +85,8 @@ class Queries { } /// Returns the storage key for `claimed`. - _i6.Uint8List claimedKey( - int key1, - _i4.AccountId32 key2, - ) { - final hashedKey = _claimed.hashedKeyFor( - key1, - key2, - ); + _i6.Uint8List claimedKey(int key1, _i4.AccountId32 key2) { + final hashedKey = _claimed.hashedKeyFor(key1, key2); return hashedKey; } @@ -159,16 +124,10 @@ class Txs { /// * `merkle_root` - The Merkle root hash representing all valid claims /// * `vesting_period` - Optional vesting period for the airdrop /// * `vesting_delay` - Optional delay before vesting starts - _i7.MerkleAirdrop createAirdrop({ - required List merkleRoot, - int? vestingPeriod, - int? vestingDelay, - }) { - return _i7.MerkleAirdrop(_i8.CreateAirdrop( - merkleRoot: merkleRoot, - vestingPeriod: vestingPeriod, - vestingDelay: vestingDelay, - )); + _i7.MerkleAirdrop createAirdrop({required List merkleRoot, int? vestingPeriod, int? vestingDelay}) { + return _i7.MerkleAirdrop( + _i8.CreateAirdrop(merkleRoot: merkleRoot, vestingPeriod: vestingPeriod, vestingDelay: vestingDelay), + ); } /// Fund an existing airdrop with tokens. @@ -185,14 +144,8 @@ class Txs { /// # Errors /// /// * `AirdropNotFound` - If the specified airdrop does not exist - _i7.MerkleAirdrop fundAirdrop({ - required int airdropId, - required BigInt amount, - }) { - return _i7.MerkleAirdrop(_i8.FundAirdrop( - airdropId: airdropId, - amount: amount, - )); + _i7.MerkleAirdrop fundAirdrop({required int airdropId, required BigInt amount}) { + return _i7.MerkleAirdrop(_i8.FundAirdrop(airdropId: airdropId, amount: amount)); } /// Claim tokens from an airdrop by providing a Merkle proof. @@ -220,12 +173,9 @@ class Txs { required BigInt amount, required List> merkleProof, }) { - return _i7.MerkleAirdrop(_i8.Claim( - airdropId: airdropId, - recipient: recipient, - amount: amount, - merkleProof: merkleProof, - )); + return _i7.MerkleAirdrop( + _i8.Claim(airdropId: airdropId, recipient: recipient, amount: amount, merkleProof: merkleProof), + ); } /// Delete an airdrop and reclaim any remaining funds. @@ -254,16 +204,7 @@ class Constants { final int maxProofs = 4096; /// The pallet id, used for deriving its sovereign account ID. - final _i9.PalletId palletId = const [ - 97, - 105, - 114, - 100, - 114, - 111, - 112, - 33, - ]; + final _i9.PalletId palletId = const [97, 105, 114, 100, 114, 111, 112, 33]; /// Priority for unsigned claim transactions. final BigInt unsignedClaimPriority = BigInt.from(100); diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/mining_rewards.dart b/quantus_sdk/lib/generated/schrodinger/pallets/mining_rewards.dart index d75e7a1d..47766564 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/mining_rewards.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/mining_rewards.dart @@ -13,8 +13,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, @@ -22,10 +21,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); } @@ -49,16 +45,7 @@ class Constants { final BigInt treasuryBlockReward = BigInt.zero; /// The treasury pallet ID - final _i5.PalletId treasuryPalletId = const [ - 112, - 121, - 47, - 116, - 114, - 115, - 114, - 121, - ]; + final _i5.PalletId treasuryPalletId = const [112, 121, 47, 116, 114, 115, 114, 121]; /// Account ID used as the "from" account when creating transfer proofs for minted tokens final _i6.AccountId32 mintingAccount = const [ diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/preimage.dart b/quantus_sdk/lib/generated/schrodinger/pallets/preimage.dart index 0cffd534..d0a8f646 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/preimage.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/q_po_w.dart b/quantus_sdk/lib/generated/schrodinger/pallets/q_po_w.dart index 5db26bf8..7b1dd91d 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/q_po_w.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/q_po_w.dart @@ -13,29 +13,25 @@ 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(), ); - final _i1.StorageValue<_i3.U512> _totalWork = - const _i1.StorageValue<_i3.U512>( + final _i1.StorageValue<_i3.U512> _totalWork = const _i1.StorageValue<_i3.U512>( prefix: 'QPoW', storage: 'TotalWork', valueCodec: _i3.U512Codec(), @@ -49,10 +45,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); } @@ -61,10 +54,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); } @@ -73,42 +63,25 @@ 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 */ } _i4.Future<_i3.U512> totalWork({_i1.BlockHash? at}) async { final hashedKey = _totalWork.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _totalWork.decodeValue(bytes); } - return List.filled( - 8, - BigInt.zero, - growable: false, - ); /* Default */ + 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, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _blockTimeEma.decodeValue(bytes); } @@ -161,10 +134,7 @@ class Constants { BigInt.from(0), ]; - final _i6.FixedU128 difficultyAdjustPercentClamp = BigInt.parse( - '100000000000000000', - radix: 10, - ); + final _i6.FixedU128 difficultyAdjustPercentClamp = BigInt.parse('100000000000000000', radix: 10); final BigInt targetBlockTime = BigInt.from(12000); @@ -174,8 +144,5 @@ class Constants { final int maxReorgDepth = 180; /// Fixed point scale for calculations (default: 10^18) - final BigInt fixedU128Scale = BigInt.parse( - '1000000000000000000', - radix: 10, - ); + final BigInt fixedU128Scale = BigInt.parse('1000000000000000000', radix: 10); } diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/recovery.dart b/quantus_sdk/lib/generated/schrodinger/pallets/recovery.dart index 6400f72c..4e0e8134 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/recovery.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/referenda.dart b/quantus_sdk/lib/generated/schrodinger/pallets/referenda.dart index 5dd941d2..45e55b09 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/referenda.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,16 +360,8 @@ 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), ), ), _i4.Tuple2( @@ -459,16 +374,8 @@ class Constants { decisionPeriod: 36000, confirmPeriod: 900, minEnactmentPeriod: 1, - minApproval: const _i14.LinearDecreasing( - length: 1000000000, - floor: 500000000, - ceil: 600000000, - ), - minSupport: const _i14.LinearDecreasing( - length: 1000000000, - floor: 10000000, - ceil: 100000000, - ), + minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 500000000, ceil: 600000000), + minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 10000000, ceil: 100000000), ), ), _i4.Tuple2( @@ -481,16 +388,8 @@ class Constants { decisionPeriod: 21600, confirmPeriod: 7200, minEnactmentPeriod: 3600, - minApproval: const _i14.LinearDecreasing( - length: 1000000000, - floor: 250000000, - ceil: 500000000, - ), - minSupport: const _i14.LinearDecreasing( - length: 1000000000, - floor: 10000000, - ceil: 100000000, - ), + minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 250000000, ceil: 500000000), + minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 10000000, ceil: 100000000), ), ), _i4.Tuple2( @@ -503,16 +402,8 @@ class Constants { decisionPeriod: 36000, confirmPeriod: 7200, minEnactmentPeriod: 3600, - minApproval: const _i14.LinearDecreasing( - length: 1000000000, - floor: 500000000, - ceil: 750000000, - ), - minSupport: const _i14.LinearDecreasing( - length: 1000000000, - floor: 20000000, - ceil: 100000000, - ), + minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 500000000, ceil: 750000000), + minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 20000000, ceil: 100000000), ), ), _i4.Tuple2( @@ -525,16 +416,8 @@ class Constants { decisionPeriod: 50400, confirmPeriod: 14400, minEnactmentPeriod: 3600, - minApproval: const _i14.LinearDecreasing( - length: 1000000000, - floor: 650000000, - ceil: 850000000, - ), - minSupport: const _i14.LinearDecreasing( - length: 1000000000, - floor: 50000000, - ceil: 150000000, - ), + minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 650000000, ceil: 850000000), + minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 50000000, ceil: 150000000), ), ), _i4.Tuple2( @@ -547,16 +430,8 @@ class Constants { decisionPeriod: 100800, confirmPeriod: 28800, minEnactmentPeriod: 7200, - minApproval: const _i14.LinearDecreasing( - length: 1000000000, - floor: 750000000, - ceil: 1000000000, - ), - minSupport: const _i14.LinearDecreasing( - length: 1000000000, - floor: 100000000, - ceil: 250000000, - ), + minApproval: const _i14.LinearDecreasing(length: 1000000000, floor: 750000000, ceil: 1000000000), + minSupport: const _i14.LinearDecreasing(length: 1000000000, floor: 100000000, ceil: 250000000), ), ), ]; diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/reversible_transfers.dart b/quantus_sdk/lib/generated/schrodinger/pallets/reversible_transfers.dart index 2a93c55b..33b33813 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/reversible_transfers.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,57 +20,52 @@ 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, int> _accountPendingIndex = - const _i1.StorageMap<_i2.AccountId32, int>( + final _i1.StorageMap<_i2.AccountId32, int> _accountPendingIndex = const _i1.StorageMap<_i2.AccountId32, int>( prefix: 'ReversibleTransfers', storage: 'AccountPendingIndex', valueCodec: _i6.U32Codec.codec, hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), ); - 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<_i4.H256>> - _pendingTransfersByRecipient = + final _i1.StorageMap<_i2.AccountId32, List<_i4.H256>> _pendingTransfersByRecipient = const _i1.StorageMap<_i2.AccountId32, List<_i4.H256>>( - prefix: 'ReversibleTransfers', - storage: 'PendingTransfersByRecipient', - valueCodec: _i6.SequenceCodec<_i4.H256>(_i4.H256Codec()), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'ReversibleTransfers', + storage: 'PendingTransfersByRecipient', + 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>> _interceptorIndex = 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: 'InterceptorIndex', + valueCodec: _i6.SequenceCodec<_i2.AccountId32>(_i2.AccountId32Codec()), + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); final _i1.StorageValue _globalNonce = const _i1.StorageValue( prefix: 'ReversibleTransfers', @@ -81,15 +75,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); } @@ -98,15 +86,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); } @@ -115,15 +97,9 @@ class Queries { /// Indexes pending transaction IDs per account for efficient lookup and cancellation. /// Also enforces the maximum pending transactions limit per account. - _i7.Future accountPendingIndex( - _i2.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i7.Future accountPendingIndex(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _accountPendingIndex.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _accountPendingIndex.decodeValue(bytes); } @@ -132,15 +108,9 @@ class Queries { /// Maps sender accounts to their list of pending transaction IDs. /// This allows users to query all their outgoing pending transfers. - _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); } @@ -149,15 +119,9 @@ class Queries { /// Maps recipient accounts to their list of pending incoming transaction IDs. /// This allows users to query all their incoming pending transfers. - _i7.Future> pendingTransfersByRecipient( - _i2.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i7.Future> pendingTransfersByRecipient(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _pendingTransfersByRecipient.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _pendingTransfersByRecipient.decodeValue(bytes); } @@ -167,15 +131,9 @@ class Queries { /// 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 { + _i7.Future> interceptorIndex(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _interceptorIndex.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _interceptorIndex.decodeValue(bytes); } @@ -185,10 +143,7 @@ class Queries { /// 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, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _globalNonce.decodeValue(bytes); } @@ -201,56 +156,32 @@ 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 */ } /// Indexes pending transaction IDs per account for efficient lookup and cancellation. /// Also enforces the maximum pending transactions limit per account. - _i7.Future> multiAccountPendingIndex( - List<_i2.AccountId32> keys, { - _i1.BlockHash? at, - }) async { - final hashedKeys = - keys.map((key) => _accountPendingIndex.hashedKeyFor(key)).toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + _i7.Future> multiAccountPendingIndex(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { + final hashedKeys = keys.map((key) => _accountPendingIndex.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _accountPendingIndex.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _accountPendingIndex.decodeValue(v.key)).toList(); } return (keys.map((key) => 0).toList() as List); /* Default */ } @@ -261,19 +192,12 @@ 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 recipient accounts to their list of pending incoming transaction IDs. @@ -282,42 +206,24 @@ class Queries { List<_i2.AccountId32> keys, { _i1.BlockHash? at, }) async { - final hashedKeys = keys - .map((key) => _pendingTransfersByRecipient.hashedKeyFor(key)) - .toList(); - final bytes = await __api.queryStorageAt( - hashedKeys, - at: at, - ); + final hashedKeys = keys.map((key) => _pendingTransfersByRecipient.hashedKeyFor(key)).toList(); + final bytes = await __api.queryStorageAt(hashedKeys, at: at); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _pendingTransfersByRecipient.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _pendingTransfersByRecipient.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, - ); + _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); if (bytes.isNotEmpty) { - return bytes.first.changes - .map((v) => _interceptorIndex.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _interceptorIndex.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`. @@ -419,10 +325,7 @@ class Txs { required _i10.BlockNumberOrTimestamp delay, required _i2.AccountId32 interceptor, }) { - return _i9.ReversibleTransfers(_i11.SetHighSecurity( - delay: delay, - interceptor: interceptor, - )); + return _i9.ReversibleTransfers(_i11.SetHighSecurity(delay: delay, interceptor: interceptor)); } /// Cancel a pending reversible transaction scheduled by the caller. @@ -440,14 +343,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. @@ -461,11 +358,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 @@ -475,11 +368,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. @@ -489,12 +378,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), + ); } } diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/scheduler.dart b/quantus_sdk/lib/generated/schrodinger/pallets/scheduler.dart index 34373c24..b0b60e5a 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/scheduler.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); } @@ -151,15 +120,9 @@ class Queries { /// /// For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4 /// identities. - _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); } @@ -167,22 +130,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. @@ -191,14 +145,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 */ } @@ -212,14 +161,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 */ } @@ -289,23 +233,12 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler(_i10.Schedule( - when: when, - maybePeriodic: maybePeriodic, - priority: priority, - call: call, - )); + return _i9.Scheduler(_i10.Schedule(when: when, maybePeriodic: maybePeriodic, 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)); } /// Schedule a named task. @@ -316,13 +249,9 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler(_i10.ScheduleNamed( - id: id, - when: when, - maybePeriodic: maybePeriodic, - priority: priority, - call: call, - )); + return _i9.Scheduler( + _i10.ScheduleNamed(id: id, when: when, maybePeriodic: maybePeriodic, priority: priority, call: call), + ); } /// Cancel a named scheduled task. @@ -337,12 +266,9 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler(_i10.ScheduleAfter( - after: after, - maybePeriodic: maybePeriodic, - priority: priority, - call: call, - )); + return _i9.Scheduler( + _i10.ScheduleAfter(after: after, maybePeriodic: maybePeriodic, priority: priority, call: call), + ); } /// Schedule a named task after a delay. @@ -353,13 +279,9 @@ class Txs { required int priority, required _i9.RuntimeCall call, }) { - return _i9.Scheduler(_i10.ScheduleNamedAfter( - id: id, - after: after, - maybePeriodic: maybePeriodic, - priority: priority, - call: call, - )); + return _i9.Scheduler( + _i10.ScheduleNamedAfter(id: id, after: after, maybePeriodic: maybePeriodic, priority: priority, call: call), + ); } /// Set a retry configuration for a task so that, in case its scheduled run fails, it will @@ -379,11 +301,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 @@ -403,16 +321,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)); } @@ -428,10 +341,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/schrodinger/pallets/sudo.dart b/quantus_sdk/lib/generated/schrodinger/pallets/sudo.dart index 74afc29e..b9cadac9 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/sudo.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/sudo.dart @@ -15,8 +15,7 @@ class Queries { final _i1.StateApi __api; - final _i1.StorageValue<_i2.AccountId32> _key = - const _i1.StorageValue<_i2.AccountId32>( + final _i1.StorageValue<_i2.AccountId32> _key = const _i1.StorageValue<_i2.AccountId32>( prefix: 'Sudo', storage: 'Key', valueCodec: _i2.AccountId32Codec(), @@ -25,10 +24,7 @@ class Queries { /// The `AccountId` of the sudo key. _i3.Future<_i2.AccountId32?> key({_i1.BlockHash? at}) async { final hashedKey = _key.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _key.decodeValue(bytes); } @@ -55,14 +51,8 @@ class Txs { /// Sudo user to specify the weight of the call. /// /// The dispatch origin for this call must be _Signed_. - _i5.Sudo sudoUncheckedWeight({ - required _i5.RuntimeCall call, - required _i7.Weight weight, - }) { - return _i5.Sudo(_i6.SudoUncheckedWeight( - call: call, - weight: weight, - )); + _i5.Sudo sudoUncheckedWeight({required _i5.RuntimeCall call, required _i7.Weight weight}) { + return _i5.Sudo(_i6.SudoUncheckedWeight(call: call, weight: weight)); } /// Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo @@ -75,14 +65,8 @@ class Txs { /// a given account. /// /// The dispatch origin for this call must be _Signed_. - _i5.Sudo sudoAs({ - required _i8.MultiAddress who, - required _i5.RuntimeCall call, - }) { - return _i5.Sudo(_i6.SudoAs( - who: who, - call: call, - )); + _i5.Sudo sudoAs({required _i8.MultiAddress who, required _i5.RuntimeCall call}) { + return _i5.Sudo(_i6.SudoAs(who: who, call: call)); } /// Permanently removes the sudo key. diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/system.dart b/quantus_sdk/lib/generated/schrodinger/pallets/system.dart index bcbeb850..c8cd39c2 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/system.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,22 +84,19 @@ 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> _events = - const _i1.StorageValue>( + final _i1.StorageValue> _events = const _i1.StorageValue>( prefix: 'System', storage: 'Events', valueCodec: _i4.SequenceCodec<_i8.EventRecord>(_i8.EventRecord.codec), @@ -116,39 +110,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, @@ -156,28 +145,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); } @@ -190,10 +172,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 */ } @@ -201,10 +180,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); } @@ -214,10 +190,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); } @@ -227,36 +200,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); } @@ -264,52 +222,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); } @@ -319,27 +254,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); } @@ -355,10 +280,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); } @@ -368,10 +290,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); } @@ -388,15 +307,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); } @@ -404,13 +317,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); } @@ -420,10 +329,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); } @@ -434,10 +340,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); } @@ -447,10 +350,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); } @@ -458,13 +358,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); } @@ -480,100 +376,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 @@ -586,23 +439,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`. @@ -773,8 +616,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)); } @@ -787,14 +629,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. @@ -841,74 +677,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, @@ -918,11 +721,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; @@ -941,149 +741,17 @@ class Constants { specVersion: 116, 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>( - [ - 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>([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/schrodinger/pallets/tech_collective.dart b/quantus_sdk/lib/generated/schrodinger/pallets/tech_collective.dart index 62d1fcf7..61efa344 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/tech_collective.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/tech_referenda.dart b/quantus_sdk/lib/generated/schrodinger/pallets/tech_referenda.dart index 180a0bca..25a942a9 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/tech_referenda.dart +++ b/quantus_sdk/lib/generated/schrodinger/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: 100, minEnactmentPeriod: 100, - 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/schrodinger/pallets/timestamp.dart b/quantus_sdk/lib/generated/schrodinger/pallets/timestamp.dart index d68a6568..5f716696 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/timestamp.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/transaction_payment.dart b/quantus_sdk/lib/generated/schrodinger/pallets/transaction_payment.dart index 43f6af1b..81c2bb8e 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/transaction_payment.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/transaction_payment.dart @@ -12,15 +12,13 @@ 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, @@ -28,25 +26,16 @@ class Queries { _i4.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 */ } _i4.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); } diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/treasury_pallet.dart b/quantus_sdk/lib/generated/schrodinger/pallets/treasury_pallet.dart index 515df873..4fab5070 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/treasury_pallet.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/treasury_pallet.dart @@ -25,8 +25,7 @@ class Queries { valueCodec: _i2.U32Codec.codec, ); - final _i1.StorageMap _proposals = - const _i1.StorageMap( + final _i1.StorageMap _proposals = const _i1.StorageMap( prefix: 'TreasuryPallet', storage: 'Proposals', valueCodec: _i3.Proposal.codec, @@ -39,8 +38,7 @@ class Queries { valueCodec: _i2.U128Codec.codec, ); - final _i1.StorageValue> _approvals = - const _i1.StorageValue>( + final _i1.StorageValue> _approvals = const _i1.StorageValue>( prefix: 'TreasuryPallet', storage: 'Approvals', valueCodec: _i2.U32SequenceCodec.codec, @@ -52,8 +50,7 @@ class Queries { valueCodec: _i2.U32Codec.codec, ); - final _i1.StorageMap _spends = - const _i1.StorageMap( + final _i1.StorageMap _spends = const _i1.StorageMap( prefix: 'TreasuryPallet', storage: 'Spends', valueCodec: _i4.SpendStatus.codec, @@ -72,10 +69,7 @@ class Queries { /// Number of proposals that have been made. _i5.Future proposalCount({_i1.BlockHash? at}) async { final hashedKey = _proposalCount.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _proposalCount.decodeValue(bytes); } @@ -86,15 +80,9 @@ class Queries { /// Refer to for migration to `spend`. /// /// Proposals that have been made. - _i5.Future<_i3.Proposal?> proposals( - int key1, { - _i1.BlockHash? at, - }) async { + _i5.Future<_i3.Proposal?> proposals(int key1, {_i1.BlockHash? at}) async { final hashedKey = _proposals.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _proposals.decodeValue(bytes); } @@ -104,10 +92,7 @@ class Queries { /// The amount which has been reported as inactive to Currency. _i5.Future deactivated({_i1.BlockHash? at}) async { final hashedKey = _deactivated.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _deactivated.decodeValue(bytes); } @@ -120,27 +105,17 @@ class Queries { /// Proposal indices that have been approved but not yet awarded. _i5.Future> approvals({_i1.BlockHash? at}) async { final hashedKey = _approvals.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _approvals.decodeValue(bytes); } - return List.filled( - 0, - 0, - growable: true, - ); /* Default */ + return List.filled(0, 0, growable: true); /* Default */ } /// The count of spends that have been made. _i5.Future spendCount({_i1.BlockHash? at}) async { final hashedKey = _spendCount.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _spendCount.decodeValue(bytes); } @@ -148,15 +123,9 @@ class Queries { } /// Spends that have been approved and being processed. - _i5.Future<_i4.SpendStatus?> spends( - int key1, { - _i1.BlockHash? at, - }) async { + _i5.Future<_i4.SpendStatus?> spends(int key1, {_i1.BlockHash? at}) async { final hashedKey = _spends.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _spends.decodeValue(bytes); } @@ -166,10 +135,7 @@ class Queries { /// The blocknumber for the last triggered spend period. _i5.Future lastSpendPeriod({_i1.BlockHash? at}) async { final hashedKey = _lastSpendPeriod.hashedKey(); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _lastSpendPeriod.decodeValue(bytes); } @@ -180,37 +146,21 @@ class Queries { /// Refer to for migration to `spend`. /// /// Proposals that have been made. - _i5.Future> multiProposals( - List keys, { - _i1.BlockHash? at, - }) async { + _i5.Future> multiProposals(List keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _proposals.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) => _proposals.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _proposals.decodeValue(v.key)).toList(); } return []; /* Nullable */ } /// Spends that have been approved and being processed. - _i5.Future> multiSpends( - List keys, { - _i1.BlockHash? at, - }) async { + _i5.Future> multiSpends(List keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _spends.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) => _spends.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _spends.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -290,14 +240,8 @@ class Txs { /// ## Events /// /// Emits [`Event::SpendApproved`] if successful. - _i7.TreasuryPallet spendLocal({ - required BigInt amount, - required _i8.MultiAddress beneficiary, - }) { - return _i7.TreasuryPallet(_i9.SpendLocal( - amount: amount, - beneficiary: beneficiary, - )); + _i7.TreasuryPallet spendLocal({required BigInt amount, required _i8.MultiAddress beneficiary}) { + return _i7.TreasuryPallet(_i9.SpendLocal(amount: amount, beneficiary: beneficiary)); } /// Force a previously approved proposal to be removed from the approval queue. @@ -357,12 +301,9 @@ class Txs { required _i8.MultiAddress beneficiary, int? validFrom, }) { - return _i7.TreasuryPallet(_i9.Spend( - assetKind: assetKind, - amount: amount, - beneficiary: beneficiary, - validFrom: validFrom, - )); + return _i7.TreasuryPallet( + _i9.Spend(assetKind: assetKind, amount: amount, beneficiary: beneficiary, validFrom: validFrom), + ); } /// Claim a spend. @@ -442,16 +383,7 @@ class Constants { final _i10.Permill burn = 0; /// The treasury's pallet id, used for deriving its sovereign account ID. - final _i11.PalletId palletId = const [ - 112, - 121, - 47, - 116, - 114, - 115, - 114, - 121, - ]; + final _i11.PalletId palletId = const [112, 121, 47, 116, 114, 115, 114, 121]; /// DEPRECATED: associated with `spend_local` call and will be removed in May 2025. /// Refer to for migration to `spend`. diff --git a/quantus_sdk/lib/generated/schrodinger/pallets/utility.dart b/quantus_sdk/lib/generated/schrodinger/pallets/utility.dart index 5f1507a7..52251630 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/utility.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/pallets/vesting.dart b/quantus_sdk/lib/generated/schrodinger/pallets/vesting.dart index 8b18f84c..f80ca5c0 100644 --- a/quantus_sdk/lib/generated/schrodinger/pallets/vesting.dart +++ b/quantus_sdk/lib/generated/schrodinger/pallets/vesting.dart @@ -19,29 +19,22 @@ class Queries { final _i1.StorageMap<_i2.AccountId32, List<_i3.VestingInfo>> _vesting = const _i1.StorageMap<_i2.AccountId32, List<_i3.VestingInfo>>( - prefix: 'Vesting', - storage: 'Vesting', - valueCodec: _i4.SequenceCodec<_i3.VestingInfo>(_i3.VestingInfo.codec), - hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), - ); + prefix: 'Vesting', + storage: 'Vesting', + valueCodec: _i4.SequenceCodec<_i3.VestingInfo>(_i3.VestingInfo.codec), + hasher: _i1.StorageHasher.blake2b128Concat(_i2.AccountId32Codec()), + ); - final _i1.StorageValue<_i5.Releases> _storageVersion = - const _i1.StorageValue<_i5.Releases>( + final _i1.StorageValue<_i5.Releases> _storageVersion = const _i1.StorageValue<_i5.Releases>( prefix: 'Vesting', storage: 'StorageVersion', valueCodec: _i5.Releases.codec, ); /// Information regarding the vesting of a given account. - _i6.Future?> vesting( - _i2.AccountId32 key1, { - _i1.BlockHash? at, - }) async { + _i6.Future?> vesting(_i2.AccountId32 key1, {_i1.BlockHash? at}) async { final hashedKey = _vesting.hashedKeyFor(key1); - final bytes = await __api.getStorage( - hashedKey, - at: at, - ); + final bytes = await __api.getStorage(hashedKey, at: at); if (bytes != null) { return _vesting.decodeValue(bytes); } @@ -53,10 +46,7 @@ class Queries { /// New networks start with latest version, as determined by the genesis build. _i6.Future<_i5.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); } @@ -64,19 +54,11 @@ class Queries { } /// Information regarding the vesting of a given account. - _i6.Future?>> multiVesting( - List<_i2.AccountId32> keys, { - _i1.BlockHash? at, - }) async { + _i6.Future?>> multiVesting(List<_i2.AccountId32> keys, {_i1.BlockHash? at}) async { final hashedKeys = keys.map((key) => _vesting.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) => _vesting.decodeValue(v.key)) - .toList(); + return bytes.first.changes.map((v) => _vesting.decodeValue(v.key)).toList(); } return []; /* Nullable */ } @@ -144,14 +126,8 @@ class Txs { /// /// ## Complexity /// - `O(1)`. - _i8.Vesting vestedTransfer({ - required _i10.MultiAddress target, - required _i3.VestingInfo schedule, - }) { - return _i8.Vesting(_i9.VestedTransfer( - target: target, - schedule: schedule, - )); + _i8.Vesting vestedTransfer({required _i10.MultiAddress target, required _i3.VestingInfo schedule}) { + return _i8.Vesting(_i9.VestedTransfer(target: target, schedule: schedule)); } /// Force a vested transfer. @@ -173,11 +149,7 @@ class Txs { required _i10.MultiAddress target, required _i3.VestingInfo schedule, }) { - return _i8.Vesting(_i9.ForceVestedTransfer( - source: source, - target: target, - schedule: schedule, - )); + return _i8.Vesting(_i9.ForceVestedTransfer(source: source, target: target, schedule: schedule)); } /// Merge two vesting schedules together, creating a new vesting schedule that unlocks over @@ -201,14 +173,8 @@ class Txs { /// /// - `schedule1_index`: index of the first schedule to merge. /// - `schedule2_index`: index of the second schedule to merge. - _i8.Vesting mergeSchedules({ - required int schedule1Index, - required int schedule2Index, - }) { - return _i8.Vesting(_i9.MergeSchedules( - schedule1Index: schedule1Index, - schedule2Index: schedule2Index, - )); + _i8.Vesting mergeSchedules({required int schedule1Index, required int schedule2Index}) { + return _i8.Vesting(_i9.MergeSchedules(schedule1Index: schedule1Index, schedule2Index: schedule2Index)); } /// Force remove a vesting schedule @@ -217,14 +183,8 @@ class Txs { /// /// - `target`: An account that has a vesting schedule /// - `schedule_index`: The vesting schedule index that should be removed - _i8.Vesting forceRemoveVestingSchedule({ - required _i10.MultiAddress target, - required int scheduleIndex, - }) { - return _i8.Vesting(_i9.ForceRemoveVestingSchedule( - target: target, - scheduleIndex: scheduleIndex, - )); + _i8.Vesting forceRemoveVestingSchedule({required _i10.MultiAddress target, required int scheduleIndex}) { + return _i8.Vesting(_i9.ForceRemoveVestingSchedule(target: target, scheduleIndex: scheduleIndex)); } } diff --git a/quantus_sdk/lib/generated/schrodinger/schrodinger.dart b/quantus_sdk/lib/generated/schrodinger/schrodinger.dart index dcc7d548..9d26d6af 100644 --- a/quantus_sdk/lib/generated/schrodinger/schrodinger.dart +++ b/quantus_sdk/lib/generated/schrodinger/schrodinger.dart @@ -27,26 +27,26 @@ import 'pallets/vesting.dart' as _i9; class Queries { Queries(_i1.StateApi api) - : system = _i2.Queries(api), - timestamp = _i3.Queries(api), - balances = _i4.Queries(api), - transactionPayment = _i5.Queries(api), - sudo = _i6.Queries(api), - qPoW = _i7.Queries(api), - miningRewards = _i8.Queries(api), - vesting = _i9.Queries(api), - preimage = _i10.Queries(api), - scheduler = _i11.Queries(api), - referenda = _i12.Queries(api), - reversibleTransfers = _i13.Queries(api), - convictionVoting = _i14.Queries(api), - techCollective = _i15.Queries(api), - techReferenda = _i16.Queries(api), - merkleAirdrop = _i17.Queries(api), - treasuryPallet = _i18.Queries(api), - recovery = _i19.Queries(api), - assets = _i20.Queries(api), - assetsHolder = _i21.Queries(api); + : system = _i2.Queries(api), + timestamp = _i3.Queries(api), + balances = _i4.Queries(api), + transactionPayment = _i5.Queries(api), + sudo = _i6.Queries(api), + qPoW = _i7.Queries(api), + miningRewards = _i8.Queries(api), + vesting = _i9.Queries(api), + preimage = _i10.Queries(api), + scheduler = _i11.Queries(api), + referenda = _i12.Queries(api), + reversibleTransfers = _i13.Queries(api), + convictionVoting = _i14.Queries(api), + techCollective = _i15.Queries(api), + techReferenda = _i16.Queries(api), + merkleAirdrop = _i17.Queries(api), + treasuryPallet = _i18.Queries(api), + recovery = _i19.Queries(api), + assets = _i20.Queries(api), + assetsHolder = _i21.Queries(api); final _i2.Queries system; @@ -166,10 +166,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; @@ -182,43 +179,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 Schrodinger { - Schrodinger._( - this._provider, - this.rpc, - ) : query = Queries(rpc.state), - constant = Constants(), - tx = Extrinsics(), - registry = Registry(); + Schrodinger._(this._provider, this.rpc) + : query = Queries(rpc.state), + constant = Constants(), + tx = Extrinsics(), + registry = Registry(); factory Schrodinger(_i1.Provider provider) { - final rpc = Rpc( - state: _i1.StateApi(provider), - system: _i1.SystemApi(provider), - ); - return Schrodinger._( - provider, - rpc, - ); + final rpc = Rpc(state: _i1.StateApi(provider), system: _i1.SystemApi(provider)); + return Schrodinger._(provider, rpc); } factory Schrodinger.url(Uri url) { diff --git a/quantus_sdk/lib/generated/schrodinger/types/cow_1.dart b/quantus_sdk/lib/generated/schrodinger/types/cow_1.dart index 9f85ccde..deb05241 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/cow_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/cow_2.dart b/quantus_sdk/lib/generated/schrodinger/types/cow_2.dart index c1e00c6b..5077d888 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/cow_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_metadata_hash_extension/check_metadata_hash.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_metadata_hash_extension/check_metadata_hash.dart index 59209324..58d56ebe 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_metadata_hash_extension/check_metadata_hash.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_metadata_hash_extension/mode.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_metadata_hash_extension/mode.dart index 4a4dd4c7..2abf6f49 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_metadata_hash_extension/mode.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -45,13 +42,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/schrodinger/types/frame_support/dispatch/dispatch_class.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/dispatch_class.dart index 3c2ba5be..a27bebbe 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/dispatch_class.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -48,13 +45,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/schrodinger/types/frame_support/dispatch/pays.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/pays.dart index e05bac53..00b962e6 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/pays.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -45,13 +42,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/schrodinger/types/frame_support/dispatch/per_dispatch_class_1.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_1.dart index 5a6fe514..7f410127 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/dispatch/per_dispatch_class_2.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_2.dart index 7b98dfe9..4055b7ae 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/dispatch/per_dispatch_class_3.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_3.dart index f442b028..a45897bd 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/per_dispatch_class_3.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/dispatch/post_dispatch_info.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/post_dispatch_info.dart index ca10c804..05dbdaed 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/post_dispatch_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/dispatch/raw_origin.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/raw_origin.dart index c2e51449..c329c2b4 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/dispatch/raw_origin.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/pallet_id.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/pallet_id.dart index 9c862f63..ae6812ea 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/pallet_id.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/traits/preimages/bounded.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/preimages/bounded.dart index 3588d651..289a499b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/preimages/bounded.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/traits/schedule/dispatch_time.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/schedule/dispatch_time.dart index 9b5953f2..5a14fb3f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/schedule/dispatch_time.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/traits/tokens/misc/balance_status.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/balance_status.dart index 0b510a6d..6d0c1a3d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/balance_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -45,13 +42,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/schrodinger/types/frame_support/traits/tokens/misc/id_amount_1.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/id_amount_1.dart index a390eaa2..852db11b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/id_amount_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_support/traits/tokens/misc/id_amount_2.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/id_amount_2.dart index 4707596a..6ec0b06d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_support/traits/tokens/misc/id_amount_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/account_info.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/account_info.dart index 3faadbb0..d35ddcf1 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/account_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/code_upgrade_authorization.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/code_upgrade_authorization.dart index cc29ab5d..d89fc207 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/code_upgrade_authorization.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/dispatch_event_info.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/dispatch_event_info.dart index 728e8f63..764759fb 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/dispatch_event_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/event_record.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/event_record.dart index 640ec813..5987bf9b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/event_record.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_genesis/check_genesis.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_genesis/check_genesis.dart index dfb8d9aa..8868c238 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_genesis/check_genesis.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_mortality/check_mortality.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_mortality/check_mortality.dart index 74bb6a2b..06298fe3 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_mortality/check_mortality.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart index e6bd60e1..f2cf2cad 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_nonce/check_nonce.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_nonce/check_nonce.dart index 2b7e417d..5e91c23f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_nonce/check_nonce.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_spec_version/check_spec_version.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_spec_version/check_spec_version.dart index 54164051..8366f520 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_spec_version/check_spec_version.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_tx_version/check_tx_version.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_tx_version/check_tx_version.dart index 8c1617d2..68153e17 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_tx_version/check_tx_version.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/extensions/check_weight/check_weight.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_weight/check_weight.dart index 5fc6a462..8fec0eef 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/extensions/check_weight/check_weight.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/last_runtime_upgrade_info.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/last_runtime_upgrade_info.dart index 77fd6ae7..f36c690b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/last_runtime_upgrade_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/limits/block_length.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/block_length.dart index b5a0a476..8d610bb0 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/block_length.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/limits/block_weights.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/block_weights.dart index e0ff79bb..45160d0b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/block_weights.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/limits/weights_per_class.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/weights_per_class.dart index 0a830e75..d3728830 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/limits/weights_per_class.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/call.dart index 13af67c8..d63a4a81 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/error.dart index 8c04694e..ffad510b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -88,13 +85,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/schrodinger/types/frame_system/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/event.dart index f54d2af9..fd6f224c 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/frame_system/phase.dart b/quantus_sdk/lib/generated/schrodinger/types/frame_system/phase.dart index e5dbc292..a888c990 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/frame_system/phase.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/call.dart index 1740807f..c5448eff 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,78 +188,35 @@ 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); } } @@ -444,10 +299,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); @@ -549,8 +401,7 @@ class $CallCodec with _i1.Codec { (value as TransferAll).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -624,8 +475,7 @@ class $CallCodec with _i1.Codec { case TransferAll: return (value as TransferAll)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -650,11 +500,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( @@ -675,12 +521,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; @@ -691,41 +533,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. @@ -748,12 +568,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( @@ -778,13 +593,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; @@ -796,34 +606,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 && @@ -831,12 +623,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. @@ -863,8 +650,8 @@ class StartDestroy extends Call { @override Map> toJson() => { - 'start_destroy': {'id': id} - }; + 'start_destroy': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -873,23 +660,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; @@ -919,8 +695,8 @@ class DestroyAccounts extends Call { @override Map> toJson() => { - 'destroy_accounts': {'id': id} - }; + 'destroy_accounts': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -929,23 +705,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; @@ -975,8 +740,8 @@ class DestroyApprovals extends Call { @override Map> toJson() => { - 'destroy_approvals': {'id': id} - }; + 'destroy_approvals': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -985,23 +750,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; @@ -1029,8 +783,8 @@ class FinishDestroy extends Call { @override Map> toJson() => { - 'finish_destroy': {'id': id} - }; + 'finish_destroy': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -1039,23 +793,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; @@ -1074,11 +817,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( @@ -1099,12 +838,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; @@ -1115,41 +850,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`. @@ -1168,11 +881,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( @@ -1193,12 +902,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; @@ -1209,41 +914,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. @@ -1265,11 +947,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( @@ -1290,12 +968,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; @@ -1306,41 +980,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. @@ -1362,11 +1013,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( @@ -1387,12 +1034,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; @@ -1403,41 +1046,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. @@ -1460,12 +1081,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( @@ -1490,13 +1106,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; @@ -1508,34 +1119,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 && @@ -1543,12 +1136,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` @@ -1564,16 +1152,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 @@ -1584,11 +1166,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; @@ -1598,33 +1177,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. @@ -1638,16 +1200,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 @@ -1658,11 +1214,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; @@ -1672,33 +1225,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. @@ -1722,8 +1258,8 @@ class FreezeAsset extends Call { @override Map> toJson() => { - 'freeze_asset': {'id': id} - }; + 'freeze_asset': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -1732,23 +1268,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; @@ -1775,8 +1300,8 @@ class ThawAsset extends Call { @override Map> toJson() => { - 'thaw_asset': {'id': id} - }; + 'thaw_asset': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -1785,23 +1310,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; @@ -1818,10 +1332,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( @@ -1838,11 +1349,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; @@ -1852,33 +1360,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. @@ -1894,12 +1386,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( @@ -1924,13 +1411,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; @@ -1942,47 +1424,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. @@ -2002,12 +1457,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( @@ -2032,13 +1482,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; @@ -2050,53 +1495,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. @@ -2122,8 +1538,8 @@ class ClearMetadata extends Call { @override Map> toJson() => { - 'clear_metadata': {'id': id} - }; + 'clear_metadata': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -2132,23 +1548,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; @@ -2204,14 +1609,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; @@ -2224,59 +1623,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. @@ -2302,8 +1668,8 @@ class ForceClearMetadata extends Call { @override Map> toJson() => { - 'force_clear_metadata': {'id': id} - }; + 'force_clear_metadata': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -2312,23 +1678,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; @@ -2407,17 +1762,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; @@ -2433,50 +1788,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 && @@ -2488,16 +1813,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. @@ -2521,11 +1837,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( @@ -2546,12 +1858,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; @@ -2562,41 +1870,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. @@ -2613,10 +1899,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( @@ -2633,11 +1916,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; @@ -2647,33 +1927,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. @@ -2690,11 +1954,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( @@ -2715,12 +1975,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; @@ -2731,41 +1987,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 @@ -2787,12 +2021,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( @@ -2817,13 +2046,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; @@ -2835,34 +2059,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 && @@ -2870,12 +2076,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. @@ -2899,8 +2100,8 @@ class Touch extends Call { @override Map> toJson() => { - 'touch': {'id': id} - }; + 'touch': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -2909,23 +2110,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; @@ -2945,16 +2135,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 @@ -2965,11 +2149,8 @@ class Refund extends Call { @override Map> toJson() => { - 'refund': { - 'id': id, - 'allowBurn': allowBurn, - } - }; + 'refund': {'id': id, 'allowBurn': allowBurn}, + }; int _sizeHint() { int size = 1; @@ -2979,33 +2160,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. @@ -3021,16 +2186,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 @@ -3041,11 +2200,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; @@ -3055,35 +2211,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`. @@ -3097,16 +2235,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 @@ -3117,11 +2249,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; @@ -3131,33 +2260,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. @@ -3174,16 +2286,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 @@ -3194,11 +2300,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; @@ -3208,33 +2311,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`. @@ -3248,16 +2335,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 @@ -3268,11 +2349,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; @@ -3282,33 +2360,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. @@ -3328,11 +2389,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( @@ -3353,12 +2410,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; @@ -3369,39 +2422,17 @@ 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); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/error.dart index c1e2238d..d0047e3f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/error.dart @@ -77,10 +77,7 @@ enum Error { /// The asset cannot be destroyed because some accounts for this asset contain holds. containsHolds('ContainsHolds', 22); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -157,13 +154,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/schrodinger/types/pallet_assets/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/event.dart index a43d54b1..ef0de033 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,60 +171,24 @@ 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); } } @@ -366,10 +257,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); @@ -450,8 +338,7 @@ class $EventCodec with _i1.Codec { (value as Withdrawn).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -511,19 +398,14 @@ class $EventCodec with _i1.Codec { case Withdrawn: return (value as Withdrawn)._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( @@ -544,12 +426,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; @@ -560,56 +438,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( @@ -630,12 +479,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; @@ -646,54 +491,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( @@ -718,13 +533,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; @@ -736,62 +546,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( @@ -812,12 +589,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; @@ -828,54 +601,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( @@ -900,13 +643,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; @@ -918,70 +661,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 @@ -992,11 +697,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; @@ -1006,52 +708,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 @@ -1062,11 +737,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; @@ -1076,52 +748,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 @@ -1132,11 +777,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; @@ -1146,38 +788,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. @@ -1193,8 +814,8 @@ class AssetFrozen extends Event { @override Map> toJson() => { - 'AssetFrozen': {'assetId': assetId} - }; + 'AssetFrozen': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -1203,23 +824,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; @@ -1238,8 +848,8 @@ class AssetThawed extends Event { @override Map> toJson() => { - 'AssetThawed': {'assetId': assetId} - }; + 'AssetThawed': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -1248,23 +858,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; @@ -1272,11 +871,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( @@ -1297,12 +892,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; @@ -1313,50 +908,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( @@ -1377,12 +949,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; @@ -1393,41 +965,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. @@ -1443,8 +996,8 @@ class DestructionStarted extends Event { @override Map> toJson() => { - 'DestructionStarted': {'assetId': assetId} - }; + 'DestructionStarted': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -1453,23 +1006,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; @@ -1488,8 +1030,8 @@ class Destroyed extends Event { @override Map> toJson() => { - 'Destroyed': {'assetId': assetId} - }; + 'Destroyed': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -1498,23 +1040,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; @@ -1522,16 +1053,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 @@ -1542,11 +1067,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; @@ -1556,38 +1078,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. @@ -1627,14 +1128,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; @@ -1647,59 +1142,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. @@ -1715,8 +1177,8 @@ class MetadataCleared extends Event { @override Map> toJson() => { - 'MetadataCleared': {'assetId': assetId} - }; + 'MetadataCleared': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -1725,23 +1187,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; @@ -1749,12 +1200,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( @@ -1779,13 +1225,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; @@ -1797,62 +1243,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( @@ -1873,12 +1286,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; @@ -1889,47 +1298,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 @@ -1970,14 +1354,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; @@ -1990,62 +1374,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. @@ -2061,8 +1409,8 @@ class AssetStatusChanged extends Event { @override Map> toJson() => { - 'AssetStatusChanged': {'assetId': assetId} - }; + 'AssetStatusChanged': {'assetId': assetId}, + }; int _sizeHint() { int size = 1; @@ -2071,23 +1419,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; @@ -2095,10 +1432,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( @@ -2115,11 +1449,8 @@ class AssetMinBalanceChanged extends Event { @override Map> toJson() => { - 'AssetMinBalanceChanged': { - 'assetId': assetId, - 'newMinBalance': newMinBalance, - } - }; + 'AssetMinBalanceChanged': {'assetId': assetId, 'newMinBalance': newMinBalance}, + }; int _sizeHint() { int size = 1; @@ -2129,44 +1460,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( @@ -2187,12 +1497,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; @@ -2203,61 +1509,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 @@ -2268,11 +1543,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; @@ -2282,47 +1554,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( @@ -2343,12 +1590,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; @@ -2359,53 +1602,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( @@ -2426,12 +1640,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; @@ -2442,42 +1652,17 @@ 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); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/account_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/account_status.dart index 74ba3435..e1fdffda 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/account_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -48,13 +45,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/schrodinger/types/pallet_assets/types/approval.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/approval.dart index 0a616302..ef7cbb93 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/approval.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets/types/asset_account.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_account.dart index 05565bfb..7002cc2c 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_account.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets/types/asset_details.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_details.dart index 531aff9a..9a721ed9 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_details.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets/types/asset_metadata.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_metadata.dart index b24c6ad6..45f1f10f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_metadata.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets/types/asset_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_status.dart index bf98848a..eebad8fd 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/asset_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -48,13 +45,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/schrodinger/types/pallet_assets/types/existence_reason.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/existence_reason.dart index b2ad2be5..d0714f82 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets/types/existence_reason.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_assets_holder/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets_holder/pallet/error.dart index 49de284a..16f0270f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets_holder/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -44,13 +41,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/schrodinger/types/pallet_assets_holder/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_assets_holder/pallet/event.dart index 2ef6221d..1f214086 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_assets_holder/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_balances/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/call.dart index ff111d7a..0190e45b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_balances/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/error.dart index 7d87a143..686dda4b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -99,13 +96,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/schrodinger/types/pallet_balances/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/event.dart index de5eee63..590c12c9 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/pallet/event.dart @@ -35,66 +35,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({ @@ -103,82 +65,35 @@ 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); } - 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); } - 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}) { @@ -193,54 +108,24 @@ 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_); } } @@ -301,10 +186,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); @@ -373,8 +255,7 @@ class $EventCodec with _i1.Codec { (value as TotalIssuanceForced).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -426,24 +307,17 @@ class $EventCodec with _i1.Codec { case TotalIssuanceForced: return (value as TotalIssuanceForced)._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 @@ -454,11 +328,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; @@ -468,53 +339,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 && - _i5.listsEqual( - other.account, - account, - ) && - other.freeBalance == freeBalance; - - @override - int get hashCode => Object.hash( - account, - freeBalance, - ); + identical(this, other) || + other is Endowed && _i5.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 @@ -525,11 +370,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; @@ -539,47 +381,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 && - _i5.listsEqual( - other.account, - account, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - account, - amount, - ); + identical(this, other) || other is DustLost && _i5.listsEqual(other.account, account) && other.amount == amount; + + @override + 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( @@ -600,12 +417,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; @@ -616,61 +429,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 && - _i5.listsEqual( - other.from, - from, - ) && - _i5.listsEqual( - other.to, - to, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - from, - to, - amount, - ); + identical(this, other) || + other is Transfer && _i5.listsEqual(other.from, from) && _i5.listsEqual(other.to, to) && other.amount == amount; + + @override + 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 @@ -681,11 +460,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; @@ -695,52 +471,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 && - _i5.listsEqual( - other.who, - who, - ) && - other.free == free; - - @override - int get hashCode => Object.hash( - who, - free, - ); + identical(this, other) || other is BalanceSet && _i5.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 @@ -751,11 +500,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; @@ -765,52 +511,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 && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Reserved && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + 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 @@ -821,11 +540,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; @@ -835,38 +551,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 && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Unreserved && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + int get hashCode => Object.hash(who, amount); } /// Some balance was moved from the reserve of the first account to the second account. @@ -902,13 +597,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; @@ -920,67 +615,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 && - _i5.listsEqual( - other.from, - from, - ) && - _i5.listsEqual( - other.to, - to, - ) && + _i5.listsEqual(other.from, from) && + _i5.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 @@ -991,11 +651,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; @@ -1005,52 +662,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 && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Deposit && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + 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 @@ -1061,11 +691,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; @@ -1075,52 +702,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 && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Withdraw && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + 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 @@ -1131,11 +731,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; @@ -1145,52 +742,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 && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Slashed && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + 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 @@ -1201,11 +771,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; @@ -1215,52 +782,25 @@ 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 && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Minted && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + int get hashCode => Object.hash(who, amount); } /// 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 @@ -1271,11 +811,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; @@ -1285,52 +822,25 @@ class Burned extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(11, 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 && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Burned && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + int get hashCode => Object.hash(who, amount); } /// 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 @@ -1341,11 +851,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; @@ -1355,52 +862,25 @@ class Suspended 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 Suspended && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Suspended && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + 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 @@ -1411,11 +891,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; @@ -1425,38 +902,17 @@ class Restored extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 13, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(13, 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 && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Restored && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + int get hashCode => Object.hash(who, amount); } /// An account was upgraded. @@ -1472,8 +928,8 @@ class Upgraded extends Event { @override Map>> toJson() => { - 'Upgraded': {'who': who.toList()} - }; + 'Upgraded': {'who': who.toList()}, + }; int _sizeHint() { int size = 1; @@ -1482,27 +938,12 @@ class Upgraded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 14, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); + _i1.U8Codec.codec.encodeTo(14, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Upgraded && - _i5.listsEqual( - other.who, - who, - ); + bool operator ==(Object other) => identical(this, other) || other is Upgraded && _i5.listsEqual(other.who, who); @override int get hashCode => who.hashCode; @@ -1521,8 +962,8 @@ class Issued extends Event { @override Map> toJson() => { - 'Issued': {'amount': amount} - }; + 'Issued': {'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1531,23 +972,12 @@ class Issued extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 15, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(15, 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; @@ -1566,8 +996,8 @@ class Rescinded extends Event { @override Map> toJson() => { - 'Rescinded': {'amount': amount} - }; + 'Rescinded': {'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -1576,23 +1006,12 @@ class Rescinded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 16, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(16, 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; @@ -1600,16 +1019,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 @@ -1620,11 +1033,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; @@ -1634,52 +1044,25 @@ class Locked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 17, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(17, 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 && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Locked && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + 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 @@ -1690,11 +1073,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; @@ -1704,52 +1084,25 @@ class Unlocked extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 18, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - who, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(18, 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 && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Unlocked && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + 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 @@ -1760,11 +1113,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; @@ -1774,52 +1124,25 @@ class Frozen 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 Frozen && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Frozen && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + 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 @@ -1830,11 +1153,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; @@ -1844,52 +1164,25 @@ class Thawed 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 Thawed && - _i5.listsEqual( - other.who, - who, - ) && - other.amount == amount; - - @override - int get hashCode => Object.hash( - who, - amount, - ); + identical(this, other) || other is Thawed && _i5.listsEqual(other.who, who) && other.amount == amount; + + @override + 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 @@ -1900,11 +1193,8 @@ class TotalIssuanceForced extends Event { @override Map> toJson() => { - 'TotalIssuanceForced': { - 'old': old, - 'new': new_, - } - }; + 'TotalIssuanceForced': {'old': old, 'new': new_}, + }; int _sizeHint() { int size = 1; @@ -1914,31 +1204,15 @@ class TotalIssuanceForced extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 21, - output, - ); - _i1.U128Codec.codec.encodeTo( - old, - output, - ); - _i1.U128Codec.codec.encodeTo( - new_, - output, - ); + _i1.U8Codec.codec.encodeTo(21, 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_); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/account_data.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/account_data.dart index e2da160c..751ca8ed 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/account_data.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_balances/types/adjustment_direction.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/adjustment_direction.dart index 75cf1991..fa2c622f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/adjustment_direction.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -45,13 +42,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/schrodinger/types/pallet_balances/types/balance_lock.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/balance_lock.dart index 4e28efb6..9f9f90bc 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/balance_lock.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_balances/types/extra_flags.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/extra_flags.dart index d4ef898a..275f36a9 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/extra_flags.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_balances/types/reasons.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/reasons.dart index 03ea6118..8ed8b293 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/reasons.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -48,13 +45,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/schrodinger/types/pallet_balances/types/reserve_data.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/reserve_data.dart index 93664958..c1436d9a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_balances/types/reserve_data.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/conviction/conviction.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/conviction/conviction.dart index 24dde870..c1d63b68 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/conviction/conviction.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -60,13 +57,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/schrodinger/types/pallet_conviction_voting/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/call.dart index 34bd45de..45074a76 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/error.dart index 97cacab4..1241e4d6 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -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/schrodinger/types/pallet_conviction_voting/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/event.dart index 7c4fd3cb..3de84afc 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/pallet/event.dart @@ -35,48 +35,24 @@ abstract class Event { class $Event { const $Event(); - Delegated delegated( - _i3.AccountId32 value0, - _i3.AccountId32 value1, - ) { - return Delegated( - value0, - value1, - ); + Delegated delegated(_i3.AccountId32 value0, _i3.AccountId32 value1) { + return Delegated(value0, value1); } Undelegated undelegated(_i3.AccountId32 value0) { return Undelegated(value0); } - Voted voted({ - required _i3.AccountId32 who, - required _i4.AccountVote vote, - }) { - return Voted( - who: who, - vote: vote, - ); + Voted voted({required _i3.AccountId32 who, required _i4.AccountVote vote}) { + return Voted(who: who, vote: vote); } - VoteRemoved voteRemoved({ - required _i3.AccountId32 who, - required _i4.AccountVote vote, - }) { - return VoteRemoved( - who: who, - vote: vote, - ); + VoteRemoved voteRemoved({required _i3.AccountId32 who, required _i4.AccountVote vote}) { + return VoteRemoved(who: who, vote: vote); } - 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_); } } @@ -103,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); @@ -124,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}"'); } } @@ -143,24 +115,17 @@ 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, - ); + const Delegated(this.value0, this.value1); factory Delegated._decode(_i1.Input input) { - return Delegated( - const _i1.U8ArrayCodec(32).decode(input), - const _i1.U8ArrayCodec(32).decode(input), - ); + return Delegated(const _i1.U8ArrayCodec(32).decode(input), const _i1.U8ArrayCodec(32).decode(input)); } /// T::AccountId @@ -171,11 +136,8 @@ class Delegated extends Event { @override Map>> toJson() => { - 'Delegated': [ - value0.toList(), - value1.toList(), - ] - }; + 'Delegated': [value0.toList(), value1.toList()], + }; int _sizeHint() { int size = 1; @@ -185,41 +147,18 @@ 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.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(value0, output); + const _i1.U8ArrayCodec(32).encodeTo(value1, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Delegated && - _i5.listsEqual( - other.value0, - value0, - ) && - _i5.listsEqual( - other.value1, - value1, - ); + identical(this, other) || + other is Delegated && _i5.listsEqual(other.value0, value0) && _i5.listsEqual(other.value1, value1); @override - int get hashCode => Object.hash( - value0, - value1, - ); + int get hashCode => Object.hash(value0, value1); } /// An \[account\] has cancelled a previous delegation operation. @@ -243,27 +182,13 @@ class Undelegated extends Event { } 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 Undelegated && - _i5.listsEqual( - other.value0, - value0, - ); + identical(this, other) || other is Undelegated && _i5.listsEqual(other.value0, value0); @override int get hashCode => value0.hashCode; @@ -271,16 +196,10 @@ class Undelegated extends Event { /// An account has voted class Voted extends Event { - const Voted({ - required this.who, - required this.vote, - }); + const Voted({required this.who, required this.vote}); factory Voted._decode(_i1.Input input) { - return Voted( - who: const _i1.U8ArrayCodec(32).decode(input), - vote: _i4.AccountVote.codec.decode(input), - ); + return Voted(who: const _i1.U8ArrayCodec(32).decode(input), vote: _i4.AccountVote.codec.decode(input)); } /// T::AccountId @@ -291,11 +210,8 @@ class Voted extends Event { @override Map> toJson() => { - 'Voted': { - 'who': who.toList(), - 'vote': vote.toJson(), - } - }; + 'Voted': {'who': who.toList(), 'vote': vote.toJson()}, + }; int _sizeHint() { int size = 1; @@ -305,52 +221,25 @@ 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.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i4.AccountVote.codec.encodeTo(vote, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Voted && - _i5.listsEqual( - other.who, - who, - ) && - other.vote == vote; + identical(this, other) || other is Voted && _i5.listsEqual(other.who, who) && other.vote == vote; @override - int get hashCode => Object.hash( - who, - vote, - ); + int get hashCode => Object.hash(who, vote); } /// A vote has been removed class VoteRemoved extends Event { - const VoteRemoved({ - required this.who, - required this.vote, - }); + const VoteRemoved({required this.who, required this.vote}); factory VoteRemoved._decode(_i1.Input input) { - return VoteRemoved( - who: const _i1.U8ArrayCodec(32).decode(input), - vote: _i4.AccountVote.codec.decode(input), - ); + return VoteRemoved(who: const _i1.U8ArrayCodec(32).decode(input), vote: _i4.AccountVote.codec.decode(input)); } /// T::AccountId @@ -361,11 +250,8 @@ class VoteRemoved extends Event { @override Map> toJson() => { - 'VoteRemoved': { - 'who': who.toList(), - 'vote': vote.toJson(), - } - }; + 'VoteRemoved': {'who': who.toList(), 'vote': vote.toJson()}, + }; int _sizeHint() { int size = 1; @@ -375,52 +261,25 @@ 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.U8Codec.codec.encodeTo(3, output); + const _i1.U8ArrayCodec(32).encodeTo(who, output); + _i4.AccountVote.codec.encodeTo(vote, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is VoteRemoved && - _i5.listsEqual( - other.who, - who, - ) && - other.vote == vote; + identical(this, other) || other is VoteRemoved && _i5.listsEqual(other.who, who) && other.vote == vote; @override - int get hashCode => Object.hash( - who, - vote, - ); + int get hashCode => Object.hash(who, vote); } /// 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 @@ -431,11 +290,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; @@ -445,36 +301,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/schrodinger/types/pallet_conviction_voting/types/delegations.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/types/delegations.dart index 8c818a91..fdac6304 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/types/delegations.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/types/tally.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/types/tally.dart index a5a4d7bf..6b84fb7d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/types/tally.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/account_vote.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/account_vote.dart index 3614ca52..c0f7997b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/account_vote.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/casting.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/casting.dart index 6313a889..851190cf 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/casting.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/delegating.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/delegating.dart index 66cc48bd..c18056c7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/delegating.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/prior_lock.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/prior_lock.dart index ff2043cb..34b7627f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/prior_lock.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/vote.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/vote.dart index 992c5dbc..c78cd6dc 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/vote.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_conviction_voting/vote/voting.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/voting.dart index c520bab0..4c150bb6 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_conviction_voting/vote/voting.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_merkle_airdrop/airdrop_metadata.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/airdrop_metadata.dart index c975a37b..2872952a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/airdrop_metadata.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/airdrop_metadata.dart @@ -41,70 +41,37 @@ class AirdropMetadata { } Map toJson() => { - 'merkleRoot': merkleRoot.toList(), - 'creator': creator.toList(), - 'balance': balance, - 'vestingPeriod': vestingPeriod, - 'vestingDelay': vestingDelay, - }; + 'merkleRoot': merkleRoot.toList(), + 'creator': creator.toList(), + 'balance': balance, + 'vestingPeriod': vestingPeriod, + 'vestingDelay': vestingDelay, + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is AirdropMetadata && - _i4.listsEqual( - other.merkleRoot, - merkleRoot, - ) && - _i4.listsEqual( - other.creator, - creator, - ) && + _i4.listsEqual(other.merkleRoot, merkleRoot) && + _i4.listsEqual(other.creator, creator) && other.balance == balance && other.vestingPeriod == vestingPeriod && other.vestingDelay == vestingDelay; @override - int get hashCode => Object.hash( - merkleRoot, - creator, - balance, - vestingPeriod, - vestingDelay, - ); + int get hashCode => Object.hash(merkleRoot, creator, balance, vestingPeriod, vestingDelay); } class $AirdropMetadataCodec with _i1.Codec { const $AirdropMetadataCodec(); @override - void encodeTo( - AirdropMetadata obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - obj.merkleRoot, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - obj.creator, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.balance, - output, - ); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( - obj.vestingPeriod, - output, - ); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( - obj.vestingDelay, - output, - ); + void encodeTo(AirdropMetadata obj, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(obj.merkleRoot, output); + const _i1.U8ArrayCodec(32).encodeTo(obj.creator, output); + _i1.U128Codec.codec.encodeTo(obj.balance, output); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(obj.vestingPeriod, output); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(obj.vestingDelay, output); } @override @@ -113,10 +80,8 @@ class $AirdropMetadataCodec with _i1.Codec { merkleRoot: const _i1.U8ArrayCodec(32).decode(input), creator: const _i1.U8ArrayCodec(32).decode(input), balance: _i1.U128Codec.codec.decode(input), - vestingPeriod: - const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - vestingDelay: - const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), + vestingPeriod: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), + vestingDelay: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), ); } @@ -126,12 +91,8 @@ class $AirdropMetadataCodec with _i1.Codec { size = size + const _i1.U8ArrayCodec(32).sizeHint(obj.merkleRoot); size = size + const _i2.AccountId32Codec().sizeHint(obj.creator); size = size + _i1.U128Codec.codec.sizeHint(obj.balance); - size = size + - const _i1.OptionCodec(_i1.U32Codec.codec) - .sizeHint(obj.vestingPeriod); - size = size + - const _i1.OptionCodec(_i1.U32Codec.codec) - .sizeHint(obj.vestingDelay); + size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.vestingPeriod); + size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(obj.vestingDelay); return size; } } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/call.dart index c15189dc..be069d86 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/call.dart @@ -34,26 +34,12 @@ abstract class Call { class $Call { const $Call(); - CreateAirdrop createAirdrop({ - required List merkleRoot, - int? vestingPeriod, - int? vestingDelay, - }) { - return CreateAirdrop( - merkleRoot: merkleRoot, - vestingPeriod: vestingPeriod, - vestingDelay: vestingDelay, - ); + CreateAirdrop createAirdrop({required List merkleRoot, int? vestingPeriod, int? vestingDelay}) { + return CreateAirdrop(merkleRoot: merkleRoot, vestingPeriod: vestingPeriod, vestingDelay: vestingDelay); } - FundAirdrop fundAirdrop({ - required int airdropId, - required BigInt amount, - }) { - return FundAirdrop( - airdropId: airdropId, - amount: amount, - ); + FundAirdrop fundAirdrop({required int airdropId, required BigInt amount}) { + return FundAirdrop(airdropId: airdropId, amount: amount); } Claim claim({ @@ -62,12 +48,7 @@ class $Call { required BigInt amount, required List> merkleProof, }) { - return Claim( - airdropId: airdropId, - recipient: recipient, - amount: amount, - merkleProof: merkleProof, - ); + return Claim(airdropId: airdropId, recipient: recipient, amount: amount, merkleProof: merkleProof); } DeleteAirdrop deleteAirdrop({required int airdropId}) { @@ -96,10 +77,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 CreateAirdrop: (value as CreateAirdrop).encodeTo(output); @@ -114,8 +92,7 @@ class $CallCodec with _i1.Codec { (value as DeleteAirdrop).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -131,8 +108,7 @@ class $CallCodec with _i1.Codec { case DeleteAirdrop: return (value as DeleteAirdrop)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -150,19 +126,13 @@ class $CallCodec with _i1.Codec { /// * `vesting_period` - Optional vesting period for the airdrop /// * `vesting_delay` - Optional delay before vesting starts class CreateAirdrop extends Call { - const CreateAirdrop({ - required this.merkleRoot, - this.vestingPeriod, - this.vestingDelay, - }); + const CreateAirdrop({required this.merkleRoot, this.vestingPeriod, this.vestingDelay}); factory CreateAirdrop._decode(_i1.Input input) { return CreateAirdrop( merkleRoot: const _i1.U8ArrayCodec(32).decode(input), - vestingPeriod: - const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), - vestingDelay: - const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), + vestingPeriod: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), + vestingDelay: const _i1.OptionCodec(_i1.U32Codec.codec).decode(input), ); } @@ -177,62 +147,34 @@ class CreateAirdrop extends Call { @override Map> toJson() => { - 'create_airdrop': { - 'merkleRoot': merkleRoot.toList(), - 'vestingPeriod': vestingPeriod, - 'vestingDelay': vestingDelay, - } - }; + 'create_airdrop': {'merkleRoot': merkleRoot.toList(), 'vestingPeriod': vestingPeriod, 'vestingDelay': vestingDelay}, + }; int _sizeHint() { int size = 1; size = size + const _i1.U8ArrayCodec(32).sizeHint(merkleRoot); - size = size + - const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(vestingPeriod); - size = size + - const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(vestingDelay); + size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(vestingPeriod); + size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(vestingDelay); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - merkleRoot, - output, - ); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( - vestingPeriod, - output, - ); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( - vestingDelay, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(merkleRoot, output); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(vestingPeriod, output); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(vestingDelay, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is CreateAirdrop && - _i4.listsEqual( - other.merkleRoot, - merkleRoot, - ) && + _i4.listsEqual(other.merkleRoot, merkleRoot) && other.vestingPeriod == vestingPeriod && other.vestingDelay == vestingDelay; @override - int get hashCode => Object.hash( - merkleRoot, - vestingPeriod, - vestingDelay, - ); + int get hashCode => Object.hash(merkleRoot, vestingPeriod, vestingDelay); } /// Fund an existing airdrop with tokens. @@ -250,16 +192,10 @@ class CreateAirdrop extends Call { /// /// * `AirdropNotFound` - If the specified airdrop does not exist class FundAirdrop extends Call { - const FundAirdrop({ - required this.airdropId, - required this.amount, - }); + const FundAirdrop({required this.airdropId, required this.amount}); factory FundAirdrop._decode(_i1.Input input) { - return FundAirdrop( - airdropId: _i1.U32Codec.codec.decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return FundAirdrop(airdropId: _i1.U32Codec.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// AirdropId @@ -270,11 +206,8 @@ class FundAirdrop extends Call { @override Map> toJson() => { - 'fund_airdrop': { - 'airdropId': airdropId, - 'amount': amount, - } - }; + 'fund_airdrop': {'airdropId': airdropId, 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -284,35 +217,17 @@ class FundAirdrop extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - airdropId, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(airdropId, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is FundAirdrop && - other.airdropId == airdropId && - other.amount == amount; + identical(this, other) || other is FundAirdrop && other.airdropId == airdropId && other.amount == amount; @override - int get hashCode => Object.hash( - airdropId, - amount, - ); + int get hashCode => Object.hash(airdropId, amount); } /// Claim tokens from an airdrop by providing a Merkle proof. @@ -335,20 +250,14 @@ class FundAirdrop extends Call { /// * `InvalidProof` - If the provided Merkle proof is invalid /// * `InsufficientAirdropBalance` - If the airdrop doesn't have enough tokens class Claim extends Call { - const Claim({ - required this.airdropId, - required this.recipient, - required this.amount, - required this.merkleProof, - }); + const Claim({required this.airdropId, required this.recipient, required this.amount, required this.merkleProof}); factory Claim._decode(_i1.Input input) { return Claim( airdropId: _i1.U32Codec.codec.decode(input), recipient: const _i1.U8ArrayCodec(32).decode(input), amount: _i1.U128Codec.codec.decode(input), - merkleProof: const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)) - .decode(input), + merkleProof: const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).decode(input), ); } @@ -366,73 +275,42 @@ class Claim extends Call { @override Map> toJson() => { - 'claim': { - 'airdropId': airdropId, - 'recipient': recipient.toList(), - 'amount': amount, - 'merkleProof': merkleProof.map((value) => value.toList()).toList(), - } - }; + 'claim': { + 'airdropId': airdropId, + 'recipient': recipient.toList(), + 'amount': amount, + 'merkleProof': merkleProof.map((value) => value.toList()).toList(), + }, + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(airdropId); size = size + const _i3.AccountId32Codec().sizeHint(recipient); size = size + _i1.U128Codec.codec.sizeHint(amount); - size = size + - const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)) - .sizeHint(merkleProof); + size = size + const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).sizeHint(merkleProof); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U32Codec.codec.encodeTo( - airdropId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - recipient, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); - const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).encodeTo( - merkleProof, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U32Codec.codec.encodeTo(airdropId, output); + const _i1.U8ArrayCodec(32).encodeTo(recipient, output); + _i1.U128Codec.codec.encodeTo(amount, output); + const _i1.SequenceCodec>(_i1.U8ArrayCodec(32)).encodeTo(merkleProof, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Claim && other.airdropId == airdropId && - _i4.listsEqual( - other.recipient, - recipient, - ) && + _i4.listsEqual(other.recipient, recipient) && other.amount == amount && - _i4.listsEqual( - other.merkleProof, - merkleProof, - ); + _i4.listsEqual(other.merkleProof, merkleProof); @override - int get hashCode => Object.hash( - airdropId, - recipient, - amount, - merkleProof, - ); + int get hashCode => Object.hash(airdropId, recipient, amount, merkleProof); } /// Delete an airdrop and reclaim any remaining funds. @@ -461,8 +339,8 @@ class DeleteAirdrop extends Call { @override Map> toJson() => { - 'delete_airdrop': {'airdropId': airdropId} - }; + 'delete_airdrop': {'airdropId': airdropId}, + }; int _sizeHint() { int size = 1; @@ -471,23 +349,12 @@ class DeleteAirdrop extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.U32Codec.codec.encodeTo( - airdropId, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.U32Codec.codec.encodeTo(airdropId, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is DeleteAirdrop && other.airdropId == airdropId; + bool operator ==(Object other) => identical(this, other) || other is DeleteAirdrop && other.airdropId == airdropId; @override int get hashCode => airdropId.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/error.dart index a57932a6..32d472bc 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/error.dart @@ -20,10 +20,7 @@ enum Error { /// Only the creator of an airdrop can delete it. notAirdropCreator('NotAirdropCreator', 4); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -64,13 +61,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/schrodinger/types/pallet_merkle_airdrop/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/event.dart index beb9a7c4..76df7d4c 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_merkle_airdrop/pallet/event.dart @@ -35,36 +35,16 @@ abstract class Event { class $Event { const $Event(); - AirdropCreated airdropCreated({ - required int airdropId, - required _i3.AirdropMetadata airdropMetadata, - }) { - return AirdropCreated( - airdropId: airdropId, - airdropMetadata: airdropMetadata, - ); + AirdropCreated airdropCreated({required int airdropId, required _i3.AirdropMetadata airdropMetadata}) { + return AirdropCreated(airdropId: airdropId, airdropMetadata: airdropMetadata); } - AirdropFunded airdropFunded({ - required int airdropId, - required BigInt amount, - }) { - return AirdropFunded( - airdropId: airdropId, - amount: amount, - ); + AirdropFunded airdropFunded({required int airdropId, required BigInt amount}) { + return AirdropFunded(airdropId: airdropId, amount: amount); } - Claimed claimed({ - required int airdropId, - required _i4.AccountId32 account, - required BigInt amount, - }) { - return Claimed( - airdropId: airdropId, - account: account, - amount: amount, - ); + Claimed claimed({required int airdropId, required _i4.AccountId32 account, required BigInt amount}) { + return Claimed(airdropId: airdropId, account: account, amount: amount); } AirdropDeleted airdropDeleted({required int airdropId}) { @@ -93,10 +73,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 AirdropCreated: (value as AirdropCreated).encodeTo(output); @@ -111,8 +88,7 @@ class $EventCodec with _i1.Codec { (value as AirdropDeleted).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -128,8 +104,7 @@ class $EventCodec with _i1.Codec { case AirdropDeleted: return (value as AirdropDeleted)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -138,10 +113,7 @@ class $EventCodec with _i1.Codec { /// /// Parameters: [airdrop_id, merkle_root] class AirdropCreated extends Event { - const AirdropCreated({ - required this.airdropId, - required this.airdropMetadata, - }); + const AirdropCreated({required this.airdropId, required this.airdropMetadata}); factory AirdropCreated._decode(_i1.Input input) { return AirdropCreated( @@ -160,11 +132,8 @@ class AirdropCreated extends Event { @override Map> toJson() => { - 'AirdropCreated': { - 'airdropId': airdropId, - 'airdropMetadata': airdropMetadata.toJson(), - } - }; + 'AirdropCreated': {'airdropId': airdropId, 'airdropMetadata': airdropMetadata.toJson()}, + }; int _sizeHint() { int size = 1; @@ -174,51 +143,28 @@ class AirdropCreated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - airdropId, - output, - ); - _i3.AirdropMetadata.codec.encodeTo( - airdropMetadata, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(airdropId, output); + _i3.AirdropMetadata.codec.encodeTo(airdropMetadata, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AirdropCreated && - other.airdropId == airdropId && - other.airdropMetadata == airdropMetadata; + identical(this, other) || + other is AirdropCreated && other.airdropId == airdropId && other.airdropMetadata == airdropMetadata; @override - int get hashCode => Object.hash( - airdropId, - airdropMetadata, - ); + int get hashCode => Object.hash(airdropId, airdropMetadata); } /// An airdrop has been funded with tokens. /// /// Parameters: [airdrop_id, amount] class AirdropFunded extends Event { - const AirdropFunded({ - required this.airdropId, - required this.amount, - }); + const AirdropFunded({required this.airdropId, required this.amount}); factory AirdropFunded._decode(_i1.Input input) { - return AirdropFunded( - airdropId: _i1.U32Codec.codec.decode(input), - amount: _i1.U128Codec.codec.decode(input), - ); + return AirdropFunded(airdropId: _i1.U32Codec.codec.decode(input), amount: _i1.U128Codec.codec.decode(input)); } /// AirdropId @@ -231,11 +177,8 @@ class AirdropFunded extends Event { @override Map> toJson() => { - 'AirdropFunded': { - 'airdropId': airdropId, - 'amount': amount, - } - }; + 'AirdropFunded': {'airdropId': airdropId, 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -245,46 +188,24 @@ class AirdropFunded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - airdropId, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(airdropId, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AirdropFunded && - other.airdropId == airdropId && - other.amount == amount; + identical(this, other) || other is AirdropFunded && other.airdropId == airdropId && other.amount == amount; @override - int get hashCode => Object.hash( - airdropId, - amount, - ); + int get hashCode => Object.hash(airdropId, amount); } /// A user has claimed tokens from an airdrop. /// /// Parameters: [airdrop_id, account, amount] class Claimed extends Event { - const Claimed({ - required this.airdropId, - required this.account, - required this.amount, - }); + const Claimed({required this.airdropId, required this.account, required this.amount}); factory Claimed._decode(_i1.Input input) { return Claimed( @@ -308,12 +229,8 @@ class Claimed extends Event { @override Map> toJson() => { - 'Claimed': { - 'airdropId': airdropId, - 'account': account.toList(), - 'amount': amount, - } - }; + 'Claimed': {'airdropId': airdropId, 'account': account.toList(), 'amount': amount}, + }; int _sizeHint() { int size = 1; @@ -324,44 +241,22 @@ class Claimed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U32Codec.codec.encodeTo( - airdropId, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U32Codec.codec.encodeTo(airdropId, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U128Codec.codec.encodeTo(amount, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Claimed && other.airdropId == airdropId && - _i5.listsEqual( - other.account, - account, - ) && + _i5.listsEqual(other.account, account) && other.amount == amount; @override - int get hashCode => Object.hash( - airdropId, - account, - amount, - ); + int get hashCode => Object.hash(airdropId, account, amount); } /// An airdrop has been deleted. @@ -380,8 +275,8 @@ class AirdropDeleted extends Event { @override Map> toJson() => { - 'AirdropDeleted': {'airdropId': airdropId} - }; + 'AirdropDeleted': {'airdropId': airdropId}, + }; int _sizeHint() { int size = 1; @@ -390,23 +285,12 @@ class AirdropDeleted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.U32Codec.codec.encodeTo( - airdropId, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.U32Codec.codec.encodeTo(airdropId, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is AirdropDeleted && other.airdropId == airdropId; + bool operator ==(Object other) => identical(this, other) || other is AirdropDeleted && other.airdropId == airdropId; @override int get hashCode => airdropId.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_mining_rewards/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_mining_rewards/pallet/event.dart index 453d7f17..081e7da5 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_mining_rewards/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_mining_rewards/pallet/event.dart @@ -34,24 +34,12 @@ 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}) { @@ -78,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 MinerRewarded: (value as MinerRewarded).encodeTo(output); @@ -93,8 +78,7 @@ class $EventCodec with _i1.Codec { (value as TreasuryRewarded).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -108,24 +92,17 @@ class $EventCodec with _i1.Codec { case TreasuryRewarded: return (value as TreasuryRewarded)._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 @@ -138,11 +115,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; @@ -152,52 +126,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 @@ -210,11 +157,8 @@ class FeesCollected extends Event { @override Map> toJson() => { - 'FeesCollected': { - 'amount': amount, - 'total': total, - } - }; + 'FeesCollected': {'amount': amount, 'total': total}, + }; int _sizeHint() { int size = 1; @@ -224,33 +168,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 @@ -267,8 +195,8 @@ class TreasuryRewarded extends Event { @override Map> toJson() => { - 'TreasuryRewarded': {'reward': reward} - }; + 'TreasuryRewarded': {'reward': reward}, + }; int _sizeHint() { int size = 1; @@ -277,23 +205,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; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/old_request_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/old_request_status.dart index 89471be7..69303e64 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/old_request_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_preimage/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/call.dart index 8a69a1dd..246d31d2 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_preimage/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/error.dart index e363a051..596aaa89 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -79,13 +76,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/schrodinger/types/pallet_preimage/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/event.dart index f54cb52b..26f10fba 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_preimage/pallet/hold_reason.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/hold_reason.dart index 09136b7c..ed80e5ab 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/pallet/hold_reason.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -42,13 +39,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/schrodinger/types/pallet_preimage/request_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/request_status.dart index 573053c2..c3a46ad8 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_preimage/request_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_qpow/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_qpow/pallet/event.dart index 45174ad5..e35e03cc 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_qpow/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_ranked_collective/member_record.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/member_record.dart index 66c7e5db..bbcabb46 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/member_record.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_ranked_collective/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/call.dart index a7c7d089..430c043f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_ranked_collective/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/error.dart index 2d4558d0..3906b1e7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -94,13 +91,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/schrodinger/types/pallet_ranked_collective/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/event.dart index 44350e40..380795e3 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_ranked_collective/tally.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/tally.dart index 77fac349..dcacb46c 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/tally.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_ranked_collective/vote_record.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/vote_record.dart index 4a5a5ccf..8a05fdc3 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_ranked_collective/vote_record.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_recovery/active_recovery.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/active_recovery.dart index dda7b5da..2df5af34 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/active_recovery.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_recovery/deposit_kind.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/deposit_kind.dart index f9b5c57b..8e0a6d10 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/deposit_kind.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_recovery/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/call.dart index cfb0f532..6aa962cb 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_recovery/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/error.dart index ab7178cd..5f8ebe8c 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -119,13 +116,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/schrodinger/types/pallet_recovery/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/event.dart index a69b27fd..6544b0b1 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_recovery/recovery_config.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/recovery_config.dart index 75daa32a..2a6992a2 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_recovery/recovery_config.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/pallet/call_1.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/call_1.dart index 1e8b28e5..bb798313 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/call_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/pallet/call_2.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/call_2.dart index 1e8b28e5..bb798313 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/call_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/pallet/error_1.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/error_1.dart index 9c9bfc82..8c6cf831 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/error_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -109,13 +106,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/schrodinger/types/pallet_referenda/pallet/error_2.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/error_2.dart index 9c9bfc82..8c6cf831 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/error_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -109,13 +106,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/schrodinger/types/pallet_referenda/pallet/event_1.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/event_1.dart index af8eb6e4..1be40aae 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/event_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/pallet/event_2.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/event_2.dart index a205a0a7..4010a513 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/pallet/event_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/curve.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/curve.dart index 4650f0d1..79a32460 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/curve.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/deciding_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/deciding_status.dart index 96baa433..0330544f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/deciding_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/deposit.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/deposit.dart index 50fa863e..7477eb42 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/deposit.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/referendum_info_1.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_info_1.dart index 6e81d583..a4fe6c9b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_info_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/referendum_info_2.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_info_2.dart index 566ef150..90cca436 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_info_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/referendum_status_1.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_status_1.dart index 0b48bec7..8bd8a9f7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_status_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/referendum_status_2.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_status_2.dart index c910cc13..80e244fd 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/referendum_status_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_referenda/types/track_details.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/track_details.dart index c17b1809..fe353521 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_referenda/types/track_details.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_reversible_transfers/high_security_account_data.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/high_security_account_data.dart index b43db38e..34d86c1e 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/high_security_account_data.dart +++ b/quantus_sdk/lib/generated/schrodinger/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.interceptor, - required this.delay, - }); + const HighSecurityAccountData({required this.interceptor, 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() => { - 'interceptor': interceptor.toList(), - 'delay': delay.toJson(), - }; + Map toJson() => {'interceptor': interceptor.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.interceptor, interceptor) && other.delay == delay; @override - int get hashCode => Object.hash( - interceptor, - delay, - ); + int get hashCode => Object.hash(interceptor, 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.interceptor, output); + _i3.BlockNumberOrTimestamp.codec.encodeTo(obj.delay, output); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/call.dart index 55cd2b09..11220e9d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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 interceptor, - }) { - return SetHighSecurity( - delay: delay, - interceptor: interceptor, - ); + SetHighSecurity setHighSecurity({required _i3.BlockNumberOrTimestamp delay, required _i4.AccountId32 interceptor}) { + return SetHighSecurity(delay: delay, interceptor: interceptor); } 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); } } @@ -131,10 +106,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); @@ -158,8 +130,7 @@ class $CallCodec with _i1.Codec { (value as ScheduleAssetTransferWithDelay).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -181,8 +152,7 @@ class $CallCodec with _i1.Codec { case ScheduleAssetTransferWithDelay: return (value as ScheduleAssetTransferWithDelay)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -201,10 +171,7 @@ class $CallCodec with _i1.Codec { /// - interceptor: The account that can intercept transctions from the /// high security account. class SetHighSecurity extends Call { - const SetHighSecurity({ - required this.delay, - required this.interceptor, - }); + const SetHighSecurity({required this.delay, required this.interceptor}); factory SetHighSecurity._decode(_i1.Input input) { return SetHighSecurity( @@ -221,11 +188,8 @@ class SetHighSecurity extends Call { @override Map> toJson() => { - 'set_high_security': { - 'delay': delay.toJson(), - 'interceptor': interceptor.toList(), - } - }; + 'set_high_security': {'delay': delay.toJson(), 'interceptor': interceptor.toList()}, + }; int _sizeHint() { int size = 1; @@ -235,38 +199,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( - interceptor, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.BlockNumberOrTimestamp.codec.encodeTo(delay, output); + const _i1.U8ArrayCodec(32).encodeTo(interceptor, 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.interceptor, interceptor); @override - int get hashCode => Object.hash( - delay, - interceptor, - ); + int get hashCode => Object.hash(delay, interceptor); } /// Cancel a pending reversible transaction scheduled by the caller. @@ -284,8 +228,8 @@ class Cancel extends Call { @override Map>> toJson() => { - 'cancel': {'txId': txId.toList()} - }; + 'cancel': {'txId': txId.toList()}, + }; int _sizeHint() { int size = 1; @@ -294,27 +238,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; @@ -335,8 +264,8 @@ class ExecuteTransfer extends Call { @override Map>> toJson() => { - 'execute_transfer': {'txId': txId.toList()} - }; + 'execute_transfer': {'txId': txId.toList()}, + }; int _sizeHint() { int size = 1; @@ -345,27 +274,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; @@ -373,16 +288,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 @@ -393,11 +302,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; @@ -407,33 +313,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. @@ -443,11 +333,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( @@ -468,12 +354,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; @@ -484,51 +366,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( @@ -549,12 +405,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; @@ -565,41 +417,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. @@ -634,13 +464,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; @@ -652,34 +482,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 && @@ -687,10 +499,5 @@ 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); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/error.dart index c92e64f5..9eb6a022 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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 interceptor has reached the maximum number of accounts they can intercept for. tooManyInterceptorAccounts('TooManyInterceptorAccounts', 15); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -121,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/schrodinger/types/pallet_reversible_transfers/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/event.dart index fb273e7e..7ca937dc 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/event.dart @@ -44,11 +44,7 @@ class $Event { required _i3.AccountId32 interceptor, required _i4.BlockNumberOrTimestamp delay, }) { - return HighSecuritySet( - who: who, - interceptor: interceptor, - delay: delay, - ); + return HighSecuritySet(who: who, interceptor: interceptor, delay: delay); } TransactionScheduled transactionScheduled({ @@ -71,25 +67,15 @@ 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); } } @@ -114,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 HighSecuritySet: (value as HighSecuritySet).encodeTo(output); @@ -132,8 +115,7 @@ class $EventCodec with _i1.Codec { (value as TransactionExecuted).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -149,8 +131,7 @@ class $EventCodec with _i1.Codec { case TransactionExecuted: return (value as TransactionExecuted)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -158,11 +139,7 @@ class $EventCodec with _i1.Codec { /// 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.interceptor, required this.delay}); factory HighSecuritySet._decode(_i1.Input input) { return HighSecuritySet( @@ -183,12 +160,8 @@ class HighSecuritySet extends Event { @override Map> toJson() => { - 'HighSecuritySet': { - 'who': who.toList(), - 'interceptor': interceptor.toList(), - 'delay': delay.toJson(), - } - }; + 'HighSecuritySet': {'who': who.toList(), 'interceptor': interceptor.toList(), 'delay': delay.toJson()}, + }; int _sizeHint() { int size = 1; @@ -199,47 +172,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( - 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(interceptor, 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.interceptor, interceptor) && other.delay == delay; @override - int get hashCode => Object.hash( - who, - interceptor, - delay, - ); + int get hashCode => Object.hash(who, interceptor, delay); } /// A transaction has been intercepted and scheduled for delayed execution. @@ -290,24 +238,23 @@ 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(), + 'interceptor': interceptor.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 _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); @@ -315,86 +262,36 @@ 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(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); } @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.interceptor, interceptor) && 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, interceptor, assetId, amount, txId, executeAt); } /// A scheduled transaction has been successfully cancelled by the owner. /// [who, tx_id] 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( @@ -411,11 +308,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; @@ -425,56 +319,29 @@ 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. /// [tx_id, dispatch_result] 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), @@ -489,18 +356,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); @@ -508,39 +372,19 @@ 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); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/hold_reason.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/hold_reason.dart index e4dceb10..bca8ed2f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pallet/hold_reason.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -42,13 +39,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/schrodinger/types/pallet_reversible_transfers/pending_transfer.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pending_transfer.dart index e0c3fc83..823f72db 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pending_transfer.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_reversible_transfers/pending_transfer.dart @@ -42,73 +42,37 @@ class PendingTransfer { } Map toJson() => { - 'from': from.toList(), - 'to': to.toList(), - 'interceptor': interceptor.toList(), - 'call': call.toJson(), - 'amount': amount, - }; + 'from': from.toList(), + 'to': to.toList(), + 'interceptor': interceptor.toList(), + 'call': call.toJson(), + '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, - ) && + _i5.listsEqual(other.from, from) && + _i5.listsEqual(other.to, to) && + _i5.listsEqual(other.interceptor, interceptor) && other.call == call && other.amount == amount; @override - int get hashCode => Object.hash( - from, - to, - interceptor, - call, - amount, - ); + int get hashCode => Object.hash(from, to, interceptor, call, 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.interceptor, output); + _i3.Bounded.codec.encodeTo(obj.call, output); + _i1.U128Codec.codec.encodeTo(obj.amount, output); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/call.dart index 12cd7898..92a790d4 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/call.dart @@ -42,22 +42,11 @@ class $Call { required int priority, required _i5.RuntimeCall call, }) { - return Schedule( - when: when, - maybePeriodic: maybePeriodic, - priority: priority, - call: call, - ); + return Schedule(when: when, maybePeriodic: maybePeriodic, 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({ @@ -67,13 +56,7 @@ class $Call { required int priority, required _i5.RuntimeCall call, }) { - return ScheduleNamed( - id: id, - when: when, - maybePeriodic: maybePeriodic, - priority: priority, - call: call, - ); + return ScheduleNamed(id: id, when: when, maybePeriodic: maybePeriodic, priority: priority, call: call); } CancelNamed cancelNamed({required List id}) { @@ -86,12 +69,7 @@ class $Call { required int priority, required _i5.RuntimeCall call, }) { - return ScheduleAfter( - after: after, - maybePeriodic: maybePeriodic, - priority: priority, - call: call, - ); + return ScheduleAfter(after: after, maybePeriodic: maybePeriodic, priority: priority, call: call); } ScheduleNamedAfter scheduleNamedAfter({ @@ -101,13 +79,7 @@ class $Call { required int priority, required _i5.RuntimeCall call, }) { - return ScheduleNamedAfter( - id: id, - after: after, - maybePeriodic: maybePeriodic, - priority: priority, - call: call, - ); + return ScheduleNamedAfter(id: id, after: after, maybePeriodic: maybePeriodic, priority: priority, call: call); } SetRetry setRetry({ @@ -115,11 +87,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({ @@ -127,15 +95,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 _i3.Tuple2<_i4.BlockNumberOrTimestamp, int> task}) { + CancelRetry cancelRetry({required _i3.Tuple2<_i4.BlockNumberOrTimestamp, int> task}) { return CancelRetry(task: task); } @@ -177,10 +140,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); @@ -213,8 +173,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}"'); } } @@ -242,30 +201,21 @@ 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}"'); } } } /// Anonymously schedule a task. class Schedule extends Call { - const Schedule({ - required this.when, - this.maybePeriodic, - required this.priority, - required this.call, - }); + const Schedule({required this.when, this.maybePeriodic, required this.priority, required this.call}); factory Schedule._decode(_i1.Input input) { return Schedule( when: _i1.U32Codec.codec.decode(input), - maybePeriodic: - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).decode(input), + maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).decode(input), priority: _i1.U8Codec.codec.decode(input), call: _i5.RuntimeCall.codec.decode(input), ); @@ -285,64 +235,40 @@ class Schedule extends Call { @override Map> toJson() => { - 'schedule': { - 'when': when, - 'maybePeriodic': [ - maybePeriodic?.value0.toJson(), - maybePeriodic?.value1, - ], - 'priority': priority, - 'call': call.toJson(), - } - }; + 'schedule': { + 'when': when, + 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], + 'priority': priority, + 'call': call.toJson(), + }, + }; int _sizeHint() { int size = 1; size = size + _i1.U32Codec.codec.sizeHint(when); - size = size + + size = + size + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).sizeHint(maybePeriodic); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).sizeHint(maybePeriodic); size = size + _i1.U8Codec.codec.sizeHint(priority); size = size + _i5.RuntimeCall.codec.sizeHint(call); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U32Codec.codec.encodeTo( - when, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U32Codec.codec.encodeTo(when, output); const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).encodeTo( - maybePeriodic, - output, - ); - _i1.U8Codec.codec.encodeTo( - priority, - output, - ); - _i5.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).encodeTo(maybePeriodic, output); + _i1.U8Codec.codec.encodeTo(priority, output); + _i5.RuntimeCall.codec.encodeTo(call, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Schedule && other.when == when && other.maybePeriodic == maybePeriodic && @@ -350,26 +276,15 @@ class Schedule extends Call { other.call == call; @override - int get hashCode => Object.hash( - when, - maybePeriodic, - priority, - call, - ); + int get hashCode => Object.hash(when, maybePeriodic, 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 @@ -380,11 +295,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; @@ -394,33 +306,17 @@ 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); } /// Schedule a named task. @@ -437,12 +333,9 @@ class ScheduleNamed extends Call { return ScheduleNamed( id: const _i1.U8ArrayCodec(32).decode(input), when: _i1.U32Codec.codec.decode(input), - maybePeriodic: - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).decode(input), + maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).decode(input), priority: _i1.U8Codec.codec.decode(input), call: _i5.RuntimeCall.codec.decode(input), ); @@ -465,88 +358,52 @@ class ScheduleNamed extends Call { @override Map> toJson() => { - 'schedule_named': { - 'id': id.toList(), - 'when': when, - 'maybePeriodic': [ - maybePeriodic?.value0.toJson(), - maybePeriodic?.value1, - ], - 'priority': priority, - 'call': call.toJson(), - } - }; + 'schedule_named': { + 'id': id.toList(), + 'when': when, + 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], + 'priority': priority, + 'call': call.toJson(), + }, + }; int _sizeHint() { int size = 1; size = size + const _i1.U8ArrayCodec(32).sizeHint(id); size = size + _i1.U32Codec.codec.sizeHint(when); - size = size + + size = + size + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).sizeHint(maybePeriodic); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).sizeHint(maybePeriodic); size = size + _i1.U8Codec.codec.sizeHint(priority); size = size + _i5.RuntimeCall.codec.sizeHint(call); return size; } 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(2, output); + const _i1.U8ArrayCodec(32).encodeTo(id, output); + _i1.U32Codec.codec.encodeTo(when, output); const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).encodeTo( - maybePeriodic, - output, - ); - _i1.U8Codec.codec.encodeTo( - priority, - output, - ); - _i5.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).encodeTo(maybePeriodic, output); + _i1.U8Codec.codec.encodeTo(priority, output); + _i5.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.maybePeriodic == maybePeriodic && other.priority == priority && other.call == call; @override - int get hashCode => Object.hash( - id, - when, - maybePeriodic, - priority, - call, - ); + int get hashCode => Object.hash(id, when, maybePeriodic, priority, call); } /// Cancel a named scheduled task. @@ -562,8 +419,8 @@ class CancelNamed extends Call { @override Map>> toJson() => { - 'cancel_named': {'id': id.toList()} - }; + 'cancel_named': {'id': id.toList()}, + }; int _sizeHint() { int size = 1; @@ -572,27 +429,12 @@ 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; @@ -600,22 +442,14 @@ class CancelNamed extends Call { /// Anonymously schedule a task after a delay. class ScheduleAfter extends Call { - const ScheduleAfter({ - required this.after, - this.maybePeriodic, - required this.priority, - required this.call, - }); + const ScheduleAfter({required this.after, this.maybePeriodic, required this.priority, required this.call}); factory ScheduleAfter._decode(_i1.Input input) { return ScheduleAfter( after: _i4.BlockNumberOrTimestamp.codec.decode(input), - maybePeriodic: - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).decode(input), + maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).decode(input), priority: _i1.U8Codec.codec.decode(input), call: _i5.RuntimeCall.codec.decode(input), ); @@ -635,64 +469,40 @@ class ScheduleAfter extends Call { @override Map> toJson() => { - 'schedule_after': { - 'after': after.toJson(), - 'maybePeriodic': [ - maybePeriodic?.value0.toJson(), - maybePeriodic?.value1, - ], - 'priority': priority, - 'call': call.toJson(), - } - }; + 'schedule_after': { + 'after': after.toJson(), + 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], + 'priority': priority, + 'call': call.toJson(), + }, + }; int _sizeHint() { int size = 1; size = size + _i4.BlockNumberOrTimestamp.codec.sizeHint(after); - size = size + + size = + size + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).sizeHint(maybePeriodic); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).sizeHint(maybePeriodic); size = size + _i1.U8Codec.codec.sizeHint(priority); size = size + _i5.RuntimeCall.codec.sizeHint(call); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i4.BlockNumberOrTimestamp.codec.encodeTo( - after, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i4.BlockNumberOrTimestamp.codec.encodeTo(after, output); const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).encodeTo( - maybePeriodic, - output, - ); - _i1.U8Codec.codec.encodeTo( - priority, - output, - ); - _i5.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).encodeTo(maybePeriodic, output); + _i1.U8Codec.codec.encodeTo(priority, output); + _i5.RuntimeCall.codec.encodeTo(call, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is ScheduleAfter && other.after == after && other.maybePeriodic == maybePeriodic && @@ -700,12 +510,7 @@ class ScheduleAfter extends Call { other.call == call; @override - int get hashCode => Object.hash( - after, - maybePeriodic, - priority, - call, - ); + int get hashCode => Object.hash(after, maybePeriodic, priority, call); } /// Schedule a named task after a delay. @@ -722,12 +527,9 @@ class ScheduleNamedAfter extends Call { return ScheduleNamedAfter( id: const _i1.U8ArrayCodec(32).decode(input), after: _i4.BlockNumberOrTimestamp.codec.decode(input), - maybePeriodic: - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).decode(input), + maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).decode(input), priority: _i1.U8Codec.codec.decode(input), call: _i5.RuntimeCall.codec.decode(input), ); @@ -750,88 +552,52 @@ class ScheduleNamedAfter extends Call { @override Map> toJson() => { - 'schedule_named_after': { - 'id': id.toList(), - 'after': after.toJson(), - 'maybePeriodic': [ - maybePeriodic?.value0.toJson(), - maybePeriodic?.value1, - ], - 'priority': priority, - 'call': call.toJson(), - } - }; + 'schedule_named_after': { + 'id': id.toList(), + 'after': after.toJson(), + 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], + 'priority': priority, + 'call': call.toJson(), + }, + }; int _sizeHint() { int size = 1; size = size + const _i1.U8ArrayCodec(32).sizeHint(id); size = size + _i4.BlockNumberOrTimestamp.codec.sizeHint(after); - size = size + + size = + size + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).sizeHint(maybePeriodic); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).sizeHint(maybePeriodic); size = size + _i1.U8Codec.codec.sizeHint(priority); size = size + _i5.RuntimeCall.codec.sizeHint(call); return size; } 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(5, output); + const _i1.U8ArrayCodec(32).encodeTo(id, output); + _i4.BlockNumberOrTimestamp.codec.encodeTo(after, output); const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).encodeTo( - maybePeriodic, - output, - ); - _i1.U8Codec.codec.encodeTo( - priority, - output, - ); - _i5.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).encodeTo(maybePeriodic, output); + _i1.U8Codec.codec.encodeTo(priority, output); + _i5.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.maybePeriodic == maybePeriodic && other.priority == priority && other.call == call; @override - int get hashCode => Object.hash( - id, - after, - maybePeriodic, - priority, - call, - ); + int get hashCode => Object.hash(id, after, maybePeriodic, priority, call); } /// Set a retry configuration for a task so that, in case its scheduled run fails, it will @@ -847,11 +613,7 @@ class ScheduleNamedAfter extends Call { /// original task's configuration, but will have a lower value for `remaining` than the /// original `total_retries`. 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( @@ -875,19 +637,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 _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, @@ -898,44 +658,22 @@ class SetRetry extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); const _i3.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; + identical(this, other) || + other is SetRetry && other.task == task && other.retries == retries && other.period == period; @override - int get hashCode => Object.hash( - task, - retries, - period, - ); + 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 @@ -951,11 +689,7 @@ class SetRetry extends Call { /// original task's configuration, but will have a lower value for `remaining` than the /// original `total_retries`. 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( @@ -976,12 +710,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; @@ -992,44 +722,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; + 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, - ); + int get hashCode => Object.hash(id, retries, period); } /// Removes the retry configuration of a task. @@ -1038,10 +743,11 @@ class CancelRetry extends Call { factory CancelRetry._decode(_i1.Input input) { return CancelRetry( - task: const _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - ).decode(input)); + task: const _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( + _i4.BlockNumberOrTimestamp.codec, + _i1.U32Codec.codec, + ).decode(input), + ); } /// TaskAddressOf @@ -1049,17 +755,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 _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( _i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec, @@ -1068,26 +772,15 @@ class CancelRetry extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 8, - output, - ); + _i1.U8Codec.codec.encodeTo(8, output); const _i3.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; @@ -1106,8 +799,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; @@ -1116,27 +809,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/schrodinger/types/pallet_scheduler/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/error.dart index 8604736e..4cdb7fe1 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/error.dart @@ -23,10 +23,7 @@ enum Error { /// Attempt to use a non-named function on a named task. named('Named', 5); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -69,13 +66,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/schrodinger/types/pallet_scheduler/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/event.dart index c5769c8d..09186880 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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,62 +57,30 @@ 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); } - PeriodicFailed periodicFailed({ - required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, - List? id, - }) { - return PeriodicFailed( - task: task, - id: id, - ); + PeriodicFailed periodicFailed({required _i4.Tuple2<_i3.BlockNumberOrTimestamp, int> task, List? id}) { + return PeriodicFailed(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); } } @@ -163,10 +115,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); @@ -196,8 +145,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}"'); } } @@ -223,24 +171,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 @@ -251,11 +192,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; @@ -265,47 +203,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 @@ -316,11 +232,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; @@ -330,42 +243,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( @@ -392,26 +285,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, @@ -420,57 +311,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( @@ -498,84 +361,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( @@ -595,66 +425,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( @@ -674,66 +482,44 @@ 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 renewed since the agenda is full at that block. class PeriodicFailed extends Event { - const PeriodicFailed({ - required this.task, - this.id, - }); + const PeriodicFailed({required this.task, this.id}); factory PeriodicFailed._decode(_i1.Input input) { return PeriodicFailed( @@ -753,67 +539,45 @@ class PeriodicFailed extends Event { @override Map?>> toJson() => { - 'PeriodicFailed': { - 'task': [ - task.value0.toJson(), - task.value1, - ], - 'id': id?.toList(), - } - }; + 'PeriodicFailed': { + '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 PeriodicFailed && other.task == task && other.id == id; + identical(this, other) || other is PeriodicFailed && 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( @@ -833,66 +597,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( - 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 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( @@ -912,56 +654,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( - 8, - output, - ); + _i1.U8Codec.codec.encodeTo(8, 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/schrodinger/types/pallet_scheduler/retry_config.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/retry_config.dart index efcc08b7..57203819 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/retry_config.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_scheduler/scheduled.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/scheduled.dart index a4ec4ce9..0fec4c35 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/scheduled.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_scheduler/scheduled.dart @@ -9,13 +9,7 @@ import '../quantus_runtime/origin_caller.dart' as _i5; import '../tuples_1.dart' as _i3; class Scheduled { - const Scheduled({ - this.maybeId, - required this.priority, - required this.call, - this.maybePeriodic, - required this.origin, - }); + const Scheduled({this.maybeId, required this.priority, required this.call, this.maybePeriodic, required this.origin}); factory Scheduled.decode(_i1.Input input) { return codec.decode(input); @@ -43,22 +37,16 @@ class Scheduled { } Map toJson() => { - 'maybeId': maybeId?.toList(), - 'priority': priority, - 'call': call.toJson(), - 'maybePeriodic': [ - maybePeriodic?.value0.toJson(), - maybePeriodic?.value1, - ], - 'origin': origin.toJson(), - }; + 'maybeId': maybeId?.toList(), + 'priority': priority, + 'call': call.toJson(), + 'maybePeriodic': [maybePeriodic?.value0.toJson(), maybePeriodic?.value1], + 'origin': origin.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Scheduled && other.maybeId == maybeId && other.priority == priority && @@ -67,62 +55,32 @@ class Scheduled { other.origin == origin; @override - int get hashCode => Object.hash( - maybeId, - priority, - call, - maybePeriodic, - origin, - ); + int get hashCode => Object.hash(maybeId, priority, call, maybePeriodic, 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, - ); + 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); const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).encodeTo( - obj.maybePeriodic, - output, - ); - _i5.OriginCaller.codec.encodeTo( - obj.origin, - output, - ); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).encodeTo(obj.maybePeriodic, output); + _i5.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), - maybePeriodic: - const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).decode(input), + maybePeriodic: const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).decode(input), origin: _i5.OriginCaller.codec.decode(input), ); } @@ -130,17 +88,14 @@ 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 + + size = + size + const _i1.OptionCodec<_i3.Tuple2<_i4.BlockNumberOrTimestamp, int>>( - _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>( - _i4.BlockNumberOrTimestamp.codec, - _i1.U32Codec.codec, - )).sizeHint(obj.maybePeriodic); + _i3.Tuple2Codec<_i4.BlockNumberOrTimestamp, int>(_i4.BlockNumberOrTimestamp.codec, _i1.U32Codec.codec), + ).sizeHint(obj.maybePeriodic); size = size + _i5.OriginCaller.codec.sizeHint(obj.origin); return size; } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/call.dart index 8e6af339..9513e6c8 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/call.dart @@ -39,28 +39,16 @@ class $Call { return Sudo(call: call); } - SudoUncheckedWeight sudoUncheckedWeight({ - required _i3.RuntimeCall call, - required _i4.Weight weight, - }) { - return SudoUncheckedWeight( - call: call, - weight: weight, - ); + SudoUncheckedWeight sudoUncheckedWeight({required _i3.RuntimeCall call, required _i4.Weight weight}) { + return SudoUncheckedWeight(call: call, weight: weight); } SetKey setKey({required _i5.MultiAddress new_}) { return SetKey(new_: new_); } - SudoAs sudoAs({ - required _i5.MultiAddress who, - required _i3.RuntimeCall call, - }) { - return SudoAs( - who: who, - call: call, - ); + SudoAs sudoAs({required _i5.MultiAddress who, required _i3.RuntimeCall call}) { + return SudoAs(who: who, call: call); } RemoveKey removeKey() { @@ -91,10 +79,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 Sudo: (value as Sudo).encodeTo(output); @@ -112,8 +97,7 @@ class $CallCodec with _i1.Codec { (value as RemoveKey).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -131,8 +115,7 @@ class $CallCodec with _i1.Codec { case RemoveKey: return 1; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -150,8 +133,8 @@ class Sudo extends Call { @override Map>>> toJson() => { - 'sudo': {'call': call.toJson()} - }; + 'sudo': {'call': call.toJson()}, + }; int _sizeHint() { int size = 1; @@ -160,23 +143,12 @@ class Sudo extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i3.RuntimeCall.codec.encodeTo(call, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Sudo && other.call == call; + bool operator ==(Object other) => identical(this, other) || other is Sudo && other.call == call; @override int get hashCode => call.hashCode; @@ -188,16 +160,10 @@ class Sudo extends Call { /// /// The dispatch origin for this call must be _Signed_. class SudoUncheckedWeight extends Call { - const SudoUncheckedWeight({ - required this.call, - required this.weight, - }); + const SudoUncheckedWeight({required this.call, required this.weight}); factory SudoUncheckedWeight._decode(_i1.Input input) { - return SudoUncheckedWeight( - call: _i3.RuntimeCall.codec.decode(input), - weight: _i4.Weight.codec.decode(input), - ); + return SudoUncheckedWeight(call: _i3.RuntimeCall.codec.decode(input), weight: _i4.Weight.codec.decode(input)); } /// Box<::RuntimeCall> @@ -208,11 +174,8 @@ class SudoUncheckedWeight extends Call { @override Map>> toJson() => { - 'sudo_unchecked_weight': { - 'call': call.toJson(), - 'weight': weight.toJson(), - } - }; + 'sudo_unchecked_weight': {'call': call.toJson(), 'weight': weight.toJson()}, + }; int _sizeHint() { int size = 1; @@ -222,35 +185,17 @@ class SudoUncheckedWeight extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - call, - output, - ); - _i4.Weight.codec.encodeTo( - weight, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i3.RuntimeCall.codec.encodeTo(call, output); + _i4.Weight.codec.encodeTo(weight, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SudoUncheckedWeight && - other.call == call && - other.weight == weight; + identical(this, other) || other is SudoUncheckedWeight && other.call == call && other.weight == weight; @override - int get hashCode => Object.hash( - call, - weight, - ); + int get hashCode => Object.hash(call, weight); } /// Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo @@ -267,8 +212,8 @@ class SetKey extends Call { @override Map>> toJson() => { - 'set_key': {'new': new_.toJson()} - }; + 'set_key': {'new': new_.toJson()}, + }; int _sizeHint() { int size = 1; @@ -277,23 +222,12 @@ class SetKey extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i5.MultiAddress.codec.encodeTo( - new_, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i5.MultiAddress.codec.encodeTo(new_, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SetKey && other.new_ == new_; + bool operator ==(Object other) => identical(this, other) || other is SetKey && other.new_ == new_; @override int get hashCode => new_.hashCode; @@ -304,16 +238,10 @@ class SetKey extends Call { /// /// The dispatch origin for this call must be _Signed_. class SudoAs extends Call { - const SudoAs({ - required this.who, - required this.call, - }); + const SudoAs({required this.who, required this.call}); factory SudoAs._decode(_i1.Input input) { - return SudoAs( - who: _i5.MultiAddress.codec.decode(input), - call: _i3.RuntimeCall.codec.decode(input), - ); + return SudoAs(who: _i5.MultiAddress.codec.decode(input), call: _i3.RuntimeCall.codec.decode(input)); } /// AccountIdLookupOf @@ -324,11 +252,8 @@ class SudoAs extends Call { @override Map>> toJson() => { - 'sudo_as': { - 'who': who.toJson(), - 'call': call.toJson(), - } - }; + 'sudo_as': {'who': who.toJson(), 'call': call.toJson()}, + }; int _sizeHint() { int size = 1; @@ -338,33 +263,16 @@ class SudoAs extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i5.MultiAddress.codec.encodeTo( - who, - output, - ); - _i3.RuntimeCall.codec.encodeTo( - call, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i5.MultiAddress.codec.encodeTo(who, output); + _i3.RuntimeCall.codec.encodeTo(call, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SudoAs && other.who == who && other.call == call; + bool operator ==(Object other) => identical(this, other) || other is SudoAs && other.who == who && other.call == call; @override - int get hashCode => Object.hash( - who, - call, - ); + int get hashCode => Object.hash(who, call); } /// Permanently removes the sudo key. @@ -377,10 +285,7 @@ class RemoveKey extends Call { Map toJson() => {'remove_key': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/error.dart index 489a0679..5f9a8048 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/error.dart @@ -8,10 +8,7 @@ enum Error { /// Sender must be the Sudo account. requireSudo('RequireSudo', 0); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -44,13 +41,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/schrodinger/types/pallet_sudo/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/event.dart index 5a086110..7c57f805 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_sudo/pallet/event.dart @@ -39,22 +39,15 @@ class $Event { return Sudid(sudoResult: sudoResult); } - KeyChanged keyChanged({ - _i4.AccountId32? old, - required _i4.AccountId32 new_, - }) { - return KeyChanged( - old: old, - new_: new_, - ); + KeyChanged keyChanged({_i4.AccountId32? old, required _i4.AccountId32 new_}) { + return KeyChanged(old: old, new_: new_); } KeyRemoved keyRemoved() { return KeyRemoved(); } - SudoAsDone sudoAsDone( - {required _i1.Result sudoResult}) { + SudoAsDone sudoAsDone({required _i1.Result sudoResult}) { return SudoAsDone(sudoResult: sudoResult); } } @@ -80,10 +73,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 Sudid: (value as Sudid).encodeTo(output); @@ -98,8 +88,7 @@ class $EventCodec with _i1.Codec { (value as SudoAsDone).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -115,8 +104,7 @@ class $EventCodec with _i1.Codec { case SudoAsDone: return (value as SudoAsDone)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -127,10 +115,11 @@ class Sudid extends Event { factory Sudid._decode(_i1.Input input) { return Sudid( - sudoResult: const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).decode(input)); + sudoResult: const _i1.ResultCodec( + _i1.NullCodec.codec, + _i3.DispatchError.codec, + ).decode(input), + ); } /// DispatchResult @@ -139,12 +128,13 @@ class Sudid extends Event { @override Map>> toJson() => { - 'Sudid': {'sudoResult': sudoResult.toJson()} - }; + 'Sudid': {'sudoResult': sudoResult.toJson()}, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, @@ -153,26 +143,15 @@ class Sudid extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, - ).encodeTo( - sudoResult, - output, - ); + ).encodeTo(sudoResult, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Sudid && other.sudoResult == sudoResult; + bool operator ==(Object other) => identical(this, other) || other is Sudid && other.sudoResult == sudoResult; @override int get hashCode => sudoResult.hashCode; @@ -180,15 +159,11 @@ class Sudid extends Event { /// The sudo key has been updated. class KeyChanged extends Event { - const KeyChanged({ - this.old, - required this.new_, - }); + const KeyChanged({this.old, required this.new_}); factory KeyChanged._decode(_i1.Input input) { return KeyChanged( - old: const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()) - .decode(input), + old: const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()).decode(input), new_: const _i1.U8ArrayCodec(32).decode(input), ); } @@ -203,54 +178,28 @@ class KeyChanged extends Event { @override Map?>> toJson() => { - 'KeyChanged': { - 'old': old?.toList(), - 'new': new_.toList(), - } - }; + 'KeyChanged': {'old': old?.toList(), 'new': new_.toList()}, + }; int _sizeHint() { int size = 1; - size = size + - const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()) - .sizeHint(old); + size = size + const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()).sizeHint(old); size = size + const _i4.AccountId32Codec().sizeHint(new_); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()).encodeTo( - old, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - new_, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.OptionCodec<_i4.AccountId32>(_i4.AccountId32Codec()).encodeTo(old, output); + const _i1.U8ArrayCodec(32).encodeTo(new_, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is KeyChanged && - other.old == old && - _i5.listsEqual( - other.new_, - new_, - ); + identical(this, other) || other is KeyChanged && other.old == old && _i5.listsEqual(other.new_, new_); @override - int get hashCode => Object.hash( - old, - new_, - ); + int get hashCode => Object.hash(old, new_); } /// The key was permanently removed. @@ -261,10 +210,7 @@ class KeyRemoved extends Event { Map toJson() => {'KeyRemoved': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); } @override @@ -280,10 +226,11 @@ class SudoAsDone extends Event { factory SudoAsDone._decode(_i1.Input input) { return SudoAsDone( - sudoResult: const _i1.ResultCodec( - _i1.NullCodec.codec, - _i3.DispatchError.codec, - ).decode(input)); + sudoResult: const _i1.ResultCodec( + _i1.NullCodec.codec, + _i3.DispatchError.codec, + ).decode(input), + ); } /// DispatchResult @@ -292,12 +239,13 @@ class SudoAsDone extends Event { @override Map>> toJson() => { - 'SudoAsDone': {'sudoResult': sudoResult.toJson()} - }; + 'SudoAsDone': {'sudoResult': sudoResult.toJson()}, + }; int _sizeHint() { int size = 1; - size = size + + size = + size + const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, @@ -306,26 +254,15 @@ class SudoAsDone extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); const _i1.ResultCodec( _i1.NullCodec.codec, _i3.DispatchError.codec, - ).encodeTo( - sudoResult, - output, - ); + ).encodeTo(sudoResult, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SudoAsDone && other.sudoResult == sudoResult; + bool operator ==(Object other) => identical(this, other) || other is SudoAsDone && other.sudoResult == sudoResult; @override int get hashCode => sudoResult.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_timestamp/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_timestamp/pallet/call.dart index 784b0d7c..513d9777 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_timestamp/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_transaction_payment/charge_transaction_payment.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/charge_transaction_payment.dart index 3abf4a8d..7146a0fb 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/charge_transaction_payment.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_transaction_payment/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/pallet/event.dart index c596daed..a0f28f9a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_transaction_payment/releases.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/releases.dart index 0d0e0eab..a01f00ee 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_transaction_payment/releases.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -45,13 +42,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/schrodinger/types/pallet_treasury/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/call.dart index 12c67a52..f740ba9c 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/call.dart @@ -33,14 +33,8 @@ abstract class Call { class $Call { const $Call(); - SpendLocal spendLocal({ - required BigInt amount, - required _i3.MultiAddress beneficiary, - }) { - return SpendLocal( - amount: amount, - beneficiary: beneficiary, - ); + SpendLocal spendLocal({required BigInt amount, required _i3.MultiAddress beneficiary}) { + return SpendLocal(amount: amount, beneficiary: beneficiary); } RemoveApproval removeApproval({required BigInt proposalId}) { @@ -53,12 +47,7 @@ class $Call { required _i3.MultiAddress beneficiary, int? validFrom, }) { - return Spend( - assetKind: assetKind, - amount: amount, - beneficiary: beneficiary, - validFrom: validFrom, - ); + return Spend(assetKind: assetKind, amount: amount, beneficiary: beneficiary, validFrom: validFrom); } Payout payout({required int index}) { @@ -99,10 +88,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 SpendLocal: (value as SpendLocal).encodeTo(output); @@ -123,8 +109,7 @@ class $CallCodec with _i1.Codec { (value as VoidSpend).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -144,8 +129,7 @@ class $CallCodec with _i1.Codec { case VoidSpend: return (value as VoidSpend)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -168,10 +152,7 @@ class $CallCodec with _i1.Codec { /// /// Emits [`Event::SpendApproved`] if successful. class SpendLocal extends Call { - const SpendLocal({ - required this.amount, - required this.beneficiary, - }); + const SpendLocal({required this.amount, required this.beneficiary}); factory SpendLocal._decode(_i1.Input input) { return SpendLocal( @@ -188,11 +169,8 @@ class SpendLocal extends Call { @override Map> toJson() => { - 'spend_local': { - 'amount': amount, - 'beneficiary': beneficiary.toJson(), - } - }; + 'spend_local': {'amount': amount, 'beneficiary': beneficiary.toJson()}, + }; int _sizeHint() { int size = 1; @@ -202,35 +180,17 @@ class SpendLocal extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - amount, - output, - ); - _i3.MultiAddress.codec.encodeTo( - beneficiary, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.CompactBigIntCodec.codec.encodeTo(amount, output); + _i3.MultiAddress.codec.encodeTo(beneficiary, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SpendLocal && - other.amount == amount && - other.beneficiary == beneficiary; + identical(this, other) || other is SpendLocal && other.amount == amount && other.beneficiary == beneficiary; @override - int get hashCode => Object.hash( - amount, - beneficiary, - ); + int get hashCode => Object.hash(amount, beneficiary); } /// Force a previously approved proposal to be removed from the approval queue. @@ -258,8 +218,7 @@ class RemoveApproval extends Call { const RemoveApproval({required this.proposalId}); factory RemoveApproval._decode(_i1.Input input) { - return RemoveApproval( - proposalId: _i1.CompactBigIntCodec.codec.decode(input)); + return RemoveApproval(proposalId: _i1.CompactBigIntCodec.codec.decode(input)); } /// ProposalIndex @@ -267,8 +226,8 @@ class RemoveApproval extends Call { @override Map> toJson() => { - 'remove_approval': {'proposalId': proposalId} - }; + 'remove_approval': {'proposalId': proposalId}, + }; int _sizeHint() { int size = 1; @@ -277,23 +236,12 @@ class RemoveApproval extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - proposalId, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.CompactBigIntCodec.codec.encodeTo(proposalId, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is RemoveApproval && other.proposalId == proposalId; + bool operator ==(Object other) => identical(this, other) || other is RemoveApproval && other.proposalId == proposalId; @override int get hashCode => proposalId.hashCode; @@ -326,12 +274,7 @@ class RemoveApproval extends Call { /// /// Emits [`Event::AssetSpendApproved`] if successful. class Spend extends Call { - const Spend({ - required this.assetKind, - required this.amount, - required this.beneficiary, - this.validFrom, - }); + const Spend({required this.assetKind, required this.amount, required this.beneficiary, this.validFrom}); factory Spend._decode(_i1.Input input) { return Spend( @@ -356,53 +299,29 @@ class Spend extends Call { @override Map> toJson() => { - 'spend': { - 'assetKind': null, - 'amount': amount, - 'beneficiary': beneficiary.toJson(), - 'validFrom': validFrom, - } - }; + 'spend': {'assetKind': null, 'amount': amount, 'beneficiary': beneficiary.toJson(), 'validFrom': validFrom}, + }; int _sizeHint() { int size = 1; size = size + _i1.NullCodec.codec.sizeHint(assetKind); size = size + _i1.CompactBigIntCodec.codec.sizeHint(amount); size = size + _i3.MultiAddress.codec.sizeHint(beneficiary); - size = size + - const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(validFrom); + size = size + const _i1.OptionCodec(_i1.U32Codec.codec).sizeHint(validFrom); return size; } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.NullCodec.codec.encodeTo( - assetKind, - output, - ); - _i1.CompactBigIntCodec.codec.encodeTo( - amount, - output, - ); - _i3.MultiAddress.codec.encodeTo( - beneficiary, - output, - ); - const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo( - validFrom, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.NullCodec.codec.encodeTo(assetKind, output); + _i1.CompactBigIntCodec.codec.encodeTo(amount, output); + _i3.MultiAddress.codec.encodeTo(beneficiary, output); + const _i1.OptionCodec(_i1.U32Codec.codec).encodeTo(validFrom, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Spend && other.assetKind == assetKind && other.amount == amount && @@ -410,12 +329,7 @@ class Spend extends Call { other.validFrom == validFrom; @override - int get hashCode => Object.hash( - assetKind, - amount, - beneficiary, - validFrom, - ); + int get hashCode => Object.hash(assetKind, amount, beneficiary, validFrom); } /// Claim a spend. @@ -449,8 +363,8 @@ class Payout extends Call { @override Map> toJson() => { - 'payout': {'index': index} - }; + 'payout': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -459,23 +373,12 @@ class Payout extends Call { } 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 Payout && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is Payout && other.index == index; @override int get hashCode => index.hashCode; @@ -512,8 +415,8 @@ class CheckStatus extends Call { @override Map> toJson() => { - 'check_status': {'index': index} - }; + 'check_status': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -522,23 +425,12 @@ class CheckStatus 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 CheckStatus && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is CheckStatus && other.index == index; @override int get hashCode => index.hashCode; @@ -572,8 +464,8 @@ class VoidSpend extends Call { @override Map> toJson() => { - 'void_spend': {'index': index} - }; + 'void_spend': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -582,23 +474,12 @@ class VoidSpend extends Call { } 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 VoidSpend && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is VoidSpend && other.index == index; @override int get hashCode => index.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/error.dart index 80efe92b..a6718c9b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/error.dart @@ -39,10 +39,7 @@ enum Error { /// The payment has neither failed nor succeeded yet. inconclusive('Inconclusive', 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/schrodinger/types/pallet_treasury/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/event.dart index 49b4bdf9..b7c89ff3 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/pallet/event.dart @@ -38,16 +38,8 @@ class $Event { return Spending(budgetRemaining: budgetRemaining); } - Awarded awarded({ - required int proposalIndex, - required BigInt award, - required _i3.AccountId32 account, - }) { - return Awarded( - proposalIndex: proposalIndex, - award: award, - account: account, - ); + Awarded awarded({required int proposalIndex, required BigInt award, required _i3.AccountId32 account}) { + return Awarded(proposalIndex: proposalIndex, award: award, account: account); } Burnt burnt({required BigInt burntFunds}) { @@ -67,21 +59,11 @@ class $Event { required BigInt amount, required _i3.AccountId32 beneficiary, }) { - return SpendApproved( - proposalIndex: proposalIndex, - amount: amount, - beneficiary: beneficiary, - ); + return SpendApproved(proposalIndex: proposalIndex, amount: amount, beneficiary: beneficiary); } - UpdatedInactive updatedInactive({ - required BigInt reactivated, - required BigInt deactivated, - }) { - return UpdatedInactive( - reactivated: reactivated, - deactivated: deactivated, - ); + UpdatedInactive updatedInactive({required BigInt reactivated, required BigInt deactivated}) { + return UpdatedInactive(reactivated: reactivated, deactivated: deactivated); } AssetSpendApproved assetSpendApproved({ @@ -106,24 +88,12 @@ class $Event { return AssetSpendVoided(index: index); } - Paid paid({ - required int index, - required int paymentId, - }) { - return Paid( - index: index, - paymentId: paymentId, - ); + Paid paid({required int index, required int paymentId}) { + return Paid(index: index, paymentId: paymentId); } - PaymentFailed paymentFailed({ - required int index, - required int paymentId, - }) { - return PaymentFailed( - index: index, - paymentId: paymentId, - ); + PaymentFailed paymentFailed({required int index, required int paymentId}) { + return PaymentFailed(index: index, paymentId: paymentId); } SpendProcessed spendProcessed({required int index}) { @@ -168,10 +138,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 Spending: (value as Spending).encodeTo(output); @@ -210,8 +177,7 @@ class $EventCodec with _i1.Codec { (value as SpendProcessed).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -243,8 +209,7 @@ class $EventCodec with _i1.Codec { case SpendProcessed: return (value as SpendProcessed)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -262,8 +227,8 @@ class Spending extends Event { @override Map> toJson() => { - 'Spending': {'budgetRemaining': budgetRemaining} - }; + 'Spending': {'budgetRemaining': budgetRemaining}, + }; int _sizeHint() { int size = 1; @@ -272,23 +237,13 @@ class Spending extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - _i1.U128Codec.codec.encodeTo( - budgetRemaining, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + _i1.U128Codec.codec.encodeTo(budgetRemaining, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Spending && other.budgetRemaining == budgetRemaining; + identical(this, other) || other is Spending && other.budgetRemaining == budgetRemaining; @override int get hashCode => budgetRemaining.hashCode; @@ -296,11 +251,7 @@ class Spending extends Event { /// Some funds have been allocated. class Awarded extends Event { - const Awarded({ - required this.proposalIndex, - required this.award, - required this.account, - }); + const Awarded({required this.proposalIndex, required this.award, required this.account}); factory Awarded._decode(_i1.Input input) { return Awarded( @@ -321,12 +272,8 @@ class Awarded extends Event { @override Map> toJson() => { - 'Awarded': { - 'proposalIndex': proposalIndex, - 'award': award, - 'account': account.toList(), - } - }; + 'Awarded': {'proposalIndex': proposalIndex, 'award': award, 'account': account.toList()}, + }; int _sizeHint() { int size = 1; @@ -337,44 +284,22 @@ class Awarded extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalIndex, - output, - ); - _i1.U128Codec.codec.encodeTo( - award, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(proposalIndex, output); + _i1.U128Codec.codec.encodeTo(award, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Awarded && other.proposalIndex == proposalIndex && other.award == award && - _i4.listsEqual( - other.account, - account, - ); + _i4.listsEqual(other.account, account); @override - int get hashCode => Object.hash( - proposalIndex, - award, - account, - ); + int get hashCode => Object.hash(proposalIndex, award, account); } /// Some of our funds have been burnt. @@ -390,8 +315,8 @@ class Burnt extends Event { @override Map> toJson() => { - 'Burnt': {'burntFunds': burntFunds} - }; + 'Burnt': {'burntFunds': burntFunds}, + }; int _sizeHint() { int size = 1; @@ -400,23 +325,12 @@ class Burnt extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i1.U128Codec.codec.encodeTo( - burntFunds, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i1.U128Codec.codec.encodeTo(burntFunds, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Burnt && other.burntFunds == burntFunds; + bool operator ==(Object other) => identical(this, other) || other is Burnt && other.burntFunds == burntFunds; @override int get hashCode => burntFunds.hashCode; @@ -435,8 +349,8 @@ class Rollover extends Event { @override Map> toJson() => { - 'Rollover': {'rolloverBalance': rolloverBalance} - }; + 'Rollover': {'rolloverBalance': rolloverBalance}, + }; int _sizeHint() { int size = 1; @@ -445,23 +359,13 @@ class Rollover extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i1.U128Codec.codec.encodeTo( - rolloverBalance, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i1.U128Codec.codec.encodeTo(rolloverBalance, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Rollover && other.rolloverBalance == rolloverBalance; + identical(this, other) || other is Rollover && other.rolloverBalance == rolloverBalance; @override int get hashCode => rolloverBalance.hashCode; @@ -480,8 +384,8 @@ class Deposit extends Event { @override Map> toJson() => { - 'Deposit': {'value': value} - }; + 'Deposit': {'value': value}, + }; int _sizeHint() { int size = 1; @@ -490,23 +394,12 @@ class Deposit extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.U128Codec.codec.encodeTo( - value, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.U128Codec.codec.encodeTo(value, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Deposit && other.value == value; + bool operator ==(Object other) => identical(this, other) || other is Deposit && other.value == value; @override int get hashCode => value.hashCode; @@ -514,11 +407,7 @@ class Deposit extends Event { /// A new spend proposal has been approved. class SpendApproved extends Event { - const SpendApproved({ - required this.proposalIndex, - required this.amount, - required this.beneficiary, - }); + const SpendApproved({required this.proposalIndex, required this.amount, required this.beneficiary}); factory SpendApproved._decode(_i1.Input input) { return SpendApproved( @@ -539,12 +428,8 @@ class SpendApproved extends Event { @override Map> toJson() => { - 'SpendApproved': { - 'proposalIndex': proposalIndex, - 'amount': amount, - 'beneficiary': beneficiary.toList(), - } - }; + 'SpendApproved': {'proposalIndex': proposalIndex, 'amount': amount, 'beneficiary': beneficiary.toList()}, + }; int _sizeHint() { int size = 1; @@ -555,52 +440,27 @@ class SpendApproved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i1.U32Codec.codec.encodeTo( - proposalIndex, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - beneficiary, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i1.U32Codec.codec.encodeTo(proposalIndex, output); + _i1.U128Codec.codec.encodeTo(amount, output); + const _i1.U8ArrayCodec(32).encodeTo(beneficiary, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is SpendApproved && other.proposalIndex == proposalIndex && other.amount == amount && - _i4.listsEqual( - other.beneficiary, - beneficiary, - ); + _i4.listsEqual(other.beneficiary, beneficiary); @override - int get hashCode => Object.hash( - proposalIndex, - amount, - beneficiary, - ); + int get hashCode => Object.hash(proposalIndex, amount, beneficiary); } /// The inactive funds of the pallet have been updated. class UpdatedInactive extends Event { - const UpdatedInactive({ - required this.reactivated, - required this.deactivated, - }); + const UpdatedInactive({required this.reactivated, required this.deactivated}); factory UpdatedInactive._decode(_i1.Input input) { return UpdatedInactive( @@ -617,11 +477,8 @@ class UpdatedInactive extends Event { @override Map> toJson() => { - 'UpdatedInactive': { - 'reactivated': reactivated, - 'deactivated': deactivated, - } - }; + 'UpdatedInactive': {'reactivated': reactivated, 'deactivated': deactivated}, + }; int _sizeHint() { int size = 1; @@ -631,35 +488,18 @@ class UpdatedInactive extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 6, - output, - ); - _i1.U128Codec.codec.encodeTo( - reactivated, - output, - ); - _i1.U128Codec.codec.encodeTo( - deactivated, - output, - ); + _i1.U8Codec.codec.encodeTo(6, output); + _i1.U128Codec.codec.encodeTo(reactivated, output); + _i1.U128Codec.codec.encodeTo(deactivated, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is UpdatedInactive && - other.reactivated == reactivated && - other.deactivated == deactivated; - - @override - int get hashCode => Object.hash( - reactivated, - deactivated, - ); + identical(this, other) || + other is UpdatedInactive && other.reactivated == reactivated && other.deactivated == deactivated; + + @override + int get hashCode => Object.hash(reactivated, deactivated); } /// A new asset spend proposal has been approved. @@ -704,15 +544,15 @@ class AssetSpendApproved extends Event { @override Map> toJson() => { - 'AssetSpendApproved': { - 'index': index, - 'assetKind': null, - 'amount': amount, - 'beneficiary': beneficiary.toList(), - 'validFrom': validFrom, - 'expireAt': expireAt, - } - }; + 'AssetSpendApproved': { + 'index': index, + 'assetKind': null, + 'amount': amount, + 'beneficiary': beneficiary.toList(), + 'validFrom': validFrom, + 'expireAt': expireAt, + }, + }; int _sizeHint() { int size = 1; @@ -726,62 +566,28 @@ class AssetSpendApproved extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 7, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i1.NullCodec.codec.encodeTo( - assetKind, - output, - ); - _i1.U128Codec.codec.encodeTo( - amount, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - beneficiary, - output, - ); - _i1.U32Codec.codec.encodeTo( - validFrom, - output, - ); - _i1.U32Codec.codec.encodeTo( - expireAt, - output, - ); + _i1.U8Codec.codec.encodeTo(7, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i1.NullCodec.codec.encodeTo(assetKind, output); + _i1.U128Codec.codec.encodeTo(amount, output); + const _i1.U8ArrayCodec(32).encodeTo(beneficiary, output); + _i1.U32Codec.codec.encodeTo(validFrom, output); + _i1.U32Codec.codec.encodeTo(expireAt, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is AssetSpendApproved && other.index == index && other.assetKind == assetKind && other.amount == amount && - _i4.listsEqual( - other.beneficiary, - beneficiary, - ) && + _i4.listsEqual(other.beneficiary, beneficiary) && other.validFrom == validFrom && other.expireAt == expireAt; @override - int get hashCode => Object.hash( - index, - assetKind, - amount, - beneficiary, - validFrom, - expireAt, - ); + int get hashCode => Object.hash(index, assetKind, amount, beneficiary, validFrom, expireAt); } /// An approved spend was voided. @@ -797,8 +603,8 @@ class AssetSpendVoided extends Event { @override Map> toJson() => { - 'AssetSpendVoided': {'index': index} - }; + 'AssetSpendVoided': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -807,23 +613,12 @@ class AssetSpendVoided 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 AssetSpendVoided && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is AssetSpendVoided && other.index == index; @override int get hashCode => index.hashCode; @@ -831,16 +626,10 @@ class AssetSpendVoided extends Event { /// A payment happened. class Paid extends Event { - const Paid({ - required this.index, - required this.paymentId, - }); + const Paid({required this.index, required this.paymentId}); factory Paid._decode(_i1.Input input) { - return Paid( - index: _i1.U32Codec.codec.decode(input), - paymentId: _i1.U32Codec.codec.decode(input), - ); + return Paid(index: _i1.U32Codec.codec.decode(input), paymentId: _i1.U32Codec.codec.decode(input)); } /// SpendIndex @@ -851,11 +640,8 @@ class Paid extends Event { @override Map> toJson() => { - 'Paid': { - 'index': index, - 'paymentId': paymentId, - } - }; + 'Paid': {'index': index, 'paymentId': paymentId}, + }; int _sizeHint() { int size = 1; @@ -865,47 +651,25 @@ class Paid extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 9, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i1.U32Codec.codec.encodeTo( - paymentId, - output, - ); + _i1.U8Codec.codec.encodeTo(9, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i1.U32Codec.codec.encodeTo(paymentId, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Paid && other.index == index && other.paymentId == paymentId; + identical(this, other) || other is Paid && other.index == index && other.paymentId == paymentId; @override - int get hashCode => Object.hash( - index, - paymentId, - ); + int get hashCode => Object.hash(index, paymentId); } /// A payment failed and can be retried. class PaymentFailed extends Event { - const PaymentFailed({ - required this.index, - required this.paymentId, - }); + const PaymentFailed({required this.index, required this.paymentId}); factory PaymentFailed._decode(_i1.Input input) { - return PaymentFailed( - index: _i1.U32Codec.codec.decode(input), - paymentId: _i1.U32Codec.codec.decode(input), - ); + return PaymentFailed(index: _i1.U32Codec.codec.decode(input), paymentId: _i1.U32Codec.codec.decode(input)); } /// SpendIndex @@ -916,11 +680,8 @@ class PaymentFailed extends Event { @override Map> toJson() => { - 'PaymentFailed': { - 'index': index, - 'paymentId': paymentId, - } - }; + 'PaymentFailed': {'index': index, 'paymentId': paymentId}, + }; int _sizeHint() { int size = 1; @@ -930,35 +691,17 @@ class PaymentFailed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 10, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); - _i1.U32Codec.codec.encodeTo( - paymentId, - output, - ); + _i1.U8Codec.codec.encodeTo(10, output); + _i1.U32Codec.codec.encodeTo(index, output); + _i1.U32Codec.codec.encodeTo(paymentId, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is PaymentFailed && - other.index == index && - other.paymentId == paymentId; + identical(this, other) || other is PaymentFailed && other.index == index && other.paymentId == paymentId; @override - int get hashCode => Object.hash( - index, - paymentId, - ); + int get hashCode => Object.hash(index, paymentId); } /// A spend was processed and removed from the storage. It might have been successfully @@ -975,8 +718,8 @@ class SpendProcessed extends Event { @override Map> toJson() => { - 'SpendProcessed': {'index': index} - }; + 'SpendProcessed': {'index': index}, + }; int _sizeHint() { int size = 1; @@ -985,23 +728,12 @@ class SpendProcessed extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 11, - output, - ); - _i1.U32Codec.codec.encodeTo( - index, - output, - ); + _i1.U8Codec.codec.encodeTo(11, output); + _i1.U32Codec.codec.encodeTo(index, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is SpendProcessed && other.index == index; + bool operator ==(Object other) => identical(this, other) || other is SpendProcessed && other.index == index; @override int get hashCode => index.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/payment_state.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/payment_state.dart index a8fa898b..b15460bb 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/payment_state.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/payment_state.dart @@ -62,10 +62,7 @@ class $PaymentStateCodec with _i1.Codec { } @override - void encodeTo( - PaymentState value, - _i1.Output output, - ) { + void encodeTo(PaymentState value, _i1.Output output) { switch (value.runtimeType) { case Pending: (value as Pending).encodeTo(output); @@ -77,8 +74,7 @@ class $PaymentStateCodec with _i1.Codec { (value as Failed).encodeTo(output); break; default: - throw Exception( - 'PaymentState: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('PaymentState: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -92,8 +88,7 @@ class $PaymentStateCodec with _i1.Codec { case Failed: return 1; default: - throw Exception( - 'PaymentState: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('PaymentState: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -105,10 +100,7 @@ class Pending extends PaymentState { Map toJson() => {'Pending': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); } @override @@ -130,8 +122,8 @@ class Attempted extends PaymentState { @override Map> toJson() => { - 'Attempted': {'id': id} - }; + 'Attempted': {'id': id}, + }; int _sizeHint() { int size = 1; @@ -140,23 +132,12 @@ class Attempted extends PaymentState { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i1.U32Codec.codec.encodeTo( - id, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i1.U32Codec.codec.encodeTo(id, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Attempted && other.id == id; + bool operator ==(Object other) => identical(this, other) || other is Attempted && other.id == id; @override int get hashCode => id.hashCode; @@ -169,10 +150,7 @@ class Failed extends PaymentState { Map toJson() => {'Failed': 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/schrodinger/types/pallet_treasury/proposal.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/proposal.dart index 776daee2..061a1ce7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/proposal.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/proposal.dart @@ -7,12 +7,7 @@ import 'package:quiver/collection.dart' as _i4; import '../sp_core/crypto/account_id32.dart' as _i2; class Proposal { - const Proposal({ - required this.proposer, - required this.value, - required this.beneficiary, - required this.bond, - }); + const Proposal({required this.proposer, required this.value, required this.beneficiary, required this.bond}); factory Proposal.decode(_i1.Input input) { return codec.decode(input); @@ -37,63 +32,34 @@ class Proposal { } Map toJson() => { - 'proposer': proposer.toList(), - 'value': value, - 'beneficiary': beneficiary.toList(), - 'bond': bond, - }; + 'proposer': proposer.toList(), + 'value': value, + 'beneficiary': beneficiary.toList(), + 'bond': bond, + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is Proposal && - _i4.listsEqual( - other.proposer, - proposer, - ) && + _i4.listsEqual(other.proposer, proposer) && other.value == value && - _i4.listsEqual( - other.beneficiary, - beneficiary, - ) && + _i4.listsEqual(other.beneficiary, beneficiary) && other.bond == bond; @override - int get hashCode => Object.hash( - proposer, - value, - beneficiary, - bond, - ); + int get hashCode => Object.hash(proposer, value, beneficiary, bond); } class $ProposalCodec with _i1.Codec { const $ProposalCodec(); @override - void encodeTo( - Proposal obj, - _i1.Output output, - ) { - const _i1.U8ArrayCodec(32).encodeTo( - obj.proposer, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.value, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - obj.beneficiary, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.bond, - output, - ); + void encodeTo(Proposal obj, _i1.Output output) { + const _i1.U8ArrayCodec(32).encodeTo(obj.proposer, output); + _i1.U128Codec.codec.encodeTo(obj.value, output); + const _i1.U8ArrayCodec(32).encodeTo(obj.beneficiary, output); + _i1.U128Codec.codec.encodeTo(obj.bond, output); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/spend_status.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/spend_status.dart index d3d720e0..ade044e9 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/spend_status.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_treasury/spend_status.dart @@ -46,74 +46,40 @@ class SpendStatus { } Map toJson() => { - 'assetKind': null, - 'amount': amount, - 'beneficiary': beneficiary.toList(), - 'validFrom': validFrom, - 'expireAt': expireAt, - 'status': status.toJson(), - }; + 'assetKind': null, + 'amount': amount, + 'beneficiary': beneficiary.toList(), + 'validFrom': validFrom, + 'expireAt': expireAt, + 'status': status.toJson(), + }; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is SpendStatus && other.assetKind == assetKind && other.amount == amount && - _i5.listsEqual( - other.beneficiary, - beneficiary, - ) && + _i5.listsEqual(other.beneficiary, beneficiary) && other.validFrom == validFrom && other.expireAt == expireAt && other.status == status; @override - int get hashCode => Object.hash( - assetKind, - amount, - beneficiary, - validFrom, - expireAt, - status, - ); + int get hashCode => Object.hash(assetKind, amount, beneficiary, validFrom, expireAt, status); } class $SpendStatusCodec with _i1.Codec { const $SpendStatusCodec(); @override - void encodeTo( - SpendStatus obj, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - obj.assetKind, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.amount, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - obj.beneficiary, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.validFrom, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.expireAt, - output, - ); - _i3.PaymentState.codec.encodeTo( - obj.status, - output, - ); + void encodeTo(SpendStatus obj, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(obj.assetKind, output); + _i1.U128Codec.codec.encodeTo(obj.amount, output); + const _i1.U8ArrayCodec(32).encodeTo(obj.beneficiary, output); + _i1.U32Codec.codec.encodeTo(obj.validFrom, output); + _i1.U32Codec.codec.encodeTo(obj.expireAt, output); + _i3.PaymentState.codec.encodeTo(obj.status, output); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/call.dart index 46a79794..3788829a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_utility/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/error.dart index 6649ae69..885d1676 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -44,13 +41,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/schrodinger/types/pallet_utility/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/event.dart index 9047d028..4f8e5095 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_utility/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/pallet_vesting/pallet/call.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/call.dart index 5c7644df..34f97f7b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/call.dart @@ -42,14 +42,8 @@ class $Call { return VestOther(target: target); } - VestedTransfer vestedTransfer({ - required _i3.MultiAddress target, - required _i4.VestingInfo schedule, - }) { - return VestedTransfer( - target: target, - schedule: schedule, - ); + VestedTransfer vestedTransfer({required _i3.MultiAddress target, required _i4.VestingInfo schedule}) { + return VestedTransfer(target: target, schedule: schedule); } ForceVestedTransfer forceVestedTransfer({ @@ -57,31 +51,18 @@ class $Call { required _i3.MultiAddress target, required _i4.VestingInfo schedule, }) { - return ForceVestedTransfer( - source: source, - target: target, - schedule: schedule, - ); + return ForceVestedTransfer(source: source, target: target, schedule: schedule); } - MergeSchedules mergeSchedules({ - required int schedule1Index, - required int schedule2Index, - }) { - return MergeSchedules( - schedule1Index: schedule1Index, - schedule2Index: schedule2Index, - ); + MergeSchedules mergeSchedules({required int schedule1Index, required int schedule2Index}) { + return MergeSchedules(schedule1Index: schedule1Index, schedule2Index: schedule2Index); } ForceRemoveVestingSchedule forceRemoveVestingSchedule({ required _i3.MultiAddress target, required int scheduleIndex, }) { - return ForceRemoveVestingSchedule( - target: target, - scheduleIndex: scheduleIndex, - ); + return ForceRemoveVestingSchedule(target: target, scheduleIndex: scheduleIndex); } } @@ -110,10 +91,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 Vest: (value as Vest).encodeTo(output); @@ -134,8 +112,7 @@ class $CallCodec with _i1.Codec { (value as ForceRemoveVestingSchedule).encodeTo(output); break; default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -155,8 +132,7 @@ class $CallCodec with _i1.Codec { case ForceRemoveVestingSchedule: return (value as ForceRemoveVestingSchedule)._sizeHint(); default: - throw Exception( - 'Call: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Call: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -177,10 +153,7 @@ class Vest extends Call { Map toJson() => {'vest': null}; void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); } @override @@ -213,8 +186,8 @@ class VestOther extends Call { @override Map>> toJson() => { - 'vest_other': {'target': target.toJson()} - }; + 'vest_other': {'target': target.toJson()}, + }; int _sizeHint() { int size = 1; @@ -223,23 +196,12 @@ class VestOther extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - _i3.MultiAddress.codec.encodeTo( - target, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + _i3.MultiAddress.codec.encodeTo(target, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is VestOther && other.target == target; + bool operator ==(Object other) => identical(this, other) || other is VestOther && other.target == target; @override int get hashCode => target.hashCode; @@ -259,16 +221,10 @@ class VestOther extends Call { /// ## Complexity /// - `O(1)`. class VestedTransfer extends Call { - const VestedTransfer({ - required this.target, - required this.schedule, - }); + const VestedTransfer({required this.target, required this.schedule}); factory VestedTransfer._decode(_i1.Input input) { - return VestedTransfer( - target: _i3.MultiAddress.codec.decode(input), - schedule: _i4.VestingInfo.codec.decode(input), - ); + return VestedTransfer(target: _i3.MultiAddress.codec.decode(input), schedule: _i4.VestingInfo.codec.decode(input)); } /// AccountIdLookupOf @@ -279,11 +235,8 @@ class VestedTransfer extends Call { @override Map>> toJson() => { - 'vested_transfer': { - 'target': target.toJson(), - 'schedule': schedule.toJson(), - } - }; + 'vested_transfer': {'target': target.toJson(), 'schedule': schedule.toJson()}, + }; int _sizeHint() { int size = 1; @@ -293,35 +246,17 @@ class VestedTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - _i3.MultiAddress.codec.encodeTo( - target, - output, - ); - _i4.VestingInfo.codec.encodeTo( - schedule, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + _i3.MultiAddress.codec.encodeTo(target, output); + _i4.VestingInfo.codec.encodeTo(schedule, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is VestedTransfer && - other.target == target && - other.schedule == schedule; + identical(this, other) || other is VestedTransfer && other.target == target && other.schedule == schedule; @override - int get hashCode => Object.hash( - target, - schedule, - ); + int get hashCode => Object.hash(target, schedule); } /// Force a vested transfer. @@ -339,11 +274,7 @@ class VestedTransfer extends Call { /// ## Complexity /// - `O(1)`. class ForceVestedTransfer extends Call { - const ForceVestedTransfer({ - required this.source, - required this.target, - required this.schedule, - }); + const ForceVestedTransfer({required this.source, required this.target, required this.schedule}); factory ForceVestedTransfer._decode(_i1.Input input) { return ForceVestedTransfer( @@ -364,12 +295,8 @@ class ForceVestedTransfer extends Call { @override Map>> toJson() => { - 'force_vested_transfer': { - 'source': source.toJson(), - 'target': target.toJson(), - 'schedule': schedule.toJson(), - } - }; + 'force_vested_transfer': {'source': source.toJson(), 'target': target.toJson(), 'schedule': schedule.toJson()}, + }; int _sizeHint() { int size = 1; @@ -380,41 +307,19 @@ class ForceVestedTransfer extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 3, - output, - ); - _i3.MultiAddress.codec.encodeTo( - source, - output, - ); - _i3.MultiAddress.codec.encodeTo( - target, - output, - ); - _i4.VestingInfo.codec.encodeTo( - schedule, - output, - ); + _i1.U8Codec.codec.encodeTo(3, output); + _i3.MultiAddress.codec.encodeTo(source, output); + _i3.MultiAddress.codec.encodeTo(target, output); + _i4.VestingInfo.codec.encodeTo(schedule, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ForceVestedTransfer && - other.source == source && - other.target == target && - other.schedule == schedule; + identical(this, other) || + other is ForceVestedTransfer && other.source == source && other.target == target && other.schedule == schedule; @override - int get hashCode => Object.hash( - source, - target, - schedule, - ); + int get hashCode => Object.hash(source, target, schedule); } /// Merge two vesting schedules together, creating a new vesting schedule that unlocks over @@ -439,10 +344,7 @@ class ForceVestedTransfer extends Call { /// - `schedule1_index`: index of the first schedule to merge. /// - `schedule2_index`: index of the second schedule to merge. class MergeSchedules extends Call { - const MergeSchedules({ - required this.schedule1Index, - required this.schedule2Index, - }); + const MergeSchedules({required this.schedule1Index, required this.schedule2Index}); factory MergeSchedules._decode(_i1.Input input) { return MergeSchedules( @@ -459,11 +361,8 @@ class MergeSchedules extends Call { @override Map> toJson() => { - 'merge_schedules': { - 'schedule1Index': schedule1Index, - 'schedule2Index': schedule2Index, - } - }; + 'merge_schedules': {'schedule1Index': schedule1Index, 'schedule2Index': schedule2Index}, + }; int _sizeHint() { int size = 1; @@ -473,35 +372,18 @@ class MergeSchedules extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i1.U32Codec.codec.encodeTo( - schedule1Index, - output, - ); - _i1.U32Codec.codec.encodeTo( - schedule2Index, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i1.U32Codec.codec.encodeTo(schedule1Index, output); + _i1.U32Codec.codec.encodeTo(schedule2Index, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is MergeSchedules && - other.schedule1Index == schedule1Index && - other.schedule2Index == schedule2Index; + identical(this, other) || + other is MergeSchedules && other.schedule1Index == schedule1Index && other.schedule2Index == schedule2Index; @override - int get hashCode => Object.hash( - schedule1Index, - schedule2Index, - ); + int get hashCode => Object.hash(schedule1Index, schedule2Index); } /// Force remove a vesting schedule @@ -511,10 +393,7 @@ class MergeSchedules extends Call { /// - `target`: An account that has a vesting schedule /// - `schedule_index`: The vesting schedule index that should be removed class ForceRemoveVestingSchedule extends Call { - const ForceRemoveVestingSchedule({ - required this.target, - required this.scheduleIndex, - }); + const ForceRemoveVestingSchedule({required this.target, required this.scheduleIndex}); factory ForceRemoveVestingSchedule._decode(_i1.Input input) { return ForceRemoveVestingSchedule( @@ -531,11 +410,8 @@ class ForceRemoveVestingSchedule extends Call { @override Map> toJson() => { - 'force_remove_vesting_schedule': { - 'target': target.toJson(), - 'scheduleIndex': scheduleIndex, - } - }; + 'force_remove_vesting_schedule': {'target': target.toJson(), 'scheduleIndex': scheduleIndex}, + }; int _sizeHint() { int size = 1; @@ -545,33 +421,16 @@ class ForceRemoveVestingSchedule extends Call { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i3.MultiAddress.codec.encodeTo( - target, - output, - ); - _i1.U32Codec.codec.encodeTo( - scheduleIndex, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i3.MultiAddress.codec.encodeTo(target, output); + _i1.U32Codec.codec.encodeTo(scheduleIndex, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is ForceRemoveVestingSchedule && - other.target == target && - other.scheduleIndex == scheduleIndex; + identical(this, other) || + other is ForceRemoveVestingSchedule && other.target == target && other.scheduleIndex == scheduleIndex; @override - int get hashCode => Object.hash( - target, - scheduleIndex, - ); + int get hashCode => Object.hash(target, scheduleIndex); } diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/error.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/error.dart index 0689a7a6..209ccc88 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/error.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/error.dart @@ -21,10 +21,7 @@ enum Error { /// Failed to create a new schedule because some parameter was invalid. invalidScheduleParams('InvalidScheduleParams', 4); - const Error( - this.variantName, - this.codecIndex, - ); + const Error(this.variantName, this.codecIndex); factory Error.decode(_i1.Input input) { return codec.decode(input); @@ -65,13 +62,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/schrodinger/types/pallet_vesting/pallet/event.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/event.dart index c4b0e81e..bbcf53aa 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/event.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/pallet/event.dart @@ -34,24 +34,12 @@ abstract class Event { class $Event { const $Event(); - VestingCreated vestingCreated({ - required _i3.AccountId32 account, - required int scheduleIndex, - }) { - return VestingCreated( - account: account, - scheduleIndex: scheduleIndex, - ); + VestingCreated vestingCreated({required _i3.AccountId32 account, required int scheduleIndex}) { + return VestingCreated(account: account, scheduleIndex: scheduleIndex); } - VestingUpdated vestingUpdated({ - required _i3.AccountId32 account, - required BigInt unvested, - }) { - return VestingUpdated( - account: account, - unvested: unvested, - ); + VestingUpdated vestingUpdated({required _i3.AccountId32 account, required BigInt unvested}) { + return VestingUpdated(account: account, unvested: unvested); } VestingCompleted vestingCompleted({required _i3.AccountId32 account}) { @@ -78,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 VestingCreated: (value as VestingCreated).encodeTo(output); @@ -93,8 +78,7 @@ class $EventCodec with _i1.Codec { (value as VestingCompleted).encodeTo(output); break; default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -108,18 +92,14 @@ class $EventCodec with _i1.Codec { case VestingCompleted: return (value as VestingCompleted)._sizeHint(); default: - throw Exception( - 'Event: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('Event: Unsupported "$value" of type "${value.runtimeType}"'); } } } /// A vesting schedule has been created. class VestingCreated extends Event { - const VestingCreated({ - required this.account, - required this.scheduleIndex, - }); + const VestingCreated({required this.account, required this.scheduleIndex}); factory VestingCreated._decode(_i1.Input input) { return VestingCreated( @@ -136,11 +116,8 @@ class VestingCreated extends Event { @override Map> toJson() => { - 'VestingCreated': { - 'account': account.toList(), - 'scheduleIndex': scheduleIndex, - } - }; + 'VestingCreated': {'account': account.toList(), 'scheduleIndex': scheduleIndex}, + }; int _sizeHint() { int size = 1; @@ -150,47 +127,24 @@ class VestingCreated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 0, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); - _i1.U32Codec.codec.encodeTo( - scheduleIndex, - output, - ); + _i1.U8Codec.codec.encodeTo(0, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U32Codec.codec.encodeTo(scheduleIndex, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is VestingCreated && - _i4.listsEqual( - other.account, - account, - ) && - other.scheduleIndex == scheduleIndex; + identical(this, other) || + other is VestingCreated && _i4.listsEqual(other.account, account) && other.scheduleIndex == scheduleIndex; @override - int get hashCode => Object.hash( - account, - scheduleIndex, - ); + int get hashCode => Object.hash(account, scheduleIndex); } /// The amount vested has been updated. This could indicate a change in funds available. /// The balance given is the amount which is left unvested (and thus locked). class VestingUpdated extends Event { - const VestingUpdated({ - required this.account, - required this.unvested, - }); + const VestingUpdated({required this.account, required this.unvested}); factory VestingUpdated._decode(_i1.Input input) { return VestingUpdated( @@ -207,11 +161,8 @@ class VestingUpdated extends Event { @override Map> toJson() => { - 'VestingUpdated': { - 'account': account.toList(), - 'unvested': unvested, - } - }; + 'VestingUpdated': {'account': account.toList(), 'unvested': unvested}, + }; int _sizeHint() { int size = 1; @@ -221,38 +172,18 @@ class VestingUpdated extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 1, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); - _i1.U128Codec.codec.encodeTo( - unvested, - output, - ); + _i1.U8Codec.codec.encodeTo(1, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); + _i1.U128Codec.codec.encodeTo(unvested, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is VestingUpdated && - _i4.listsEqual( - other.account, - account, - ) && - other.unvested == unvested; + identical(this, other) || + other is VestingUpdated && _i4.listsEqual(other.account, account) && other.unvested == unvested; @override - int get hashCode => Object.hash( - account, - unvested, - ); + int get hashCode => Object.hash(account, unvested); } /// An \[account\] has become fully vested. @@ -268,8 +199,8 @@ class VestingCompleted extends Event { @override Map>> toJson() => { - 'VestingCompleted': {'account': account.toList()} - }; + 'VestingCompleted': {'account': account.toList()}, + }; int _sizeHint() { int size = 1; @@ -278,27 +209,13 @@ class VestingCompleted extends Event { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 2, - output, - ); - const _i1.U8ArrayCodec(32).encodeTo( - account, - output, - ); + _i1.U8Codec.codec.encodeTo(2, output); + const _i1.U8ArrayCodec(32).encodeTo(account, output); } @override bool operator ==(Object other) => - identical( - this, - other, - ) || - other is VestingCompleted && - _i4.listsEqual( - other.account, - account, - ); + identical(this, other) || other is VestingCompleted && _i4.listsEqual(other.account, account); @override int get hashCode => account.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/releases.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/releases.dart index 31151441..ba162240 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/releases.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/releases.dart @@ -7,10 +7,7 @@ enum Releases { v0('V0', 0), v1('V1', 1); - const Releases( - this.variantName, - this.codecIndex, - ); + const Releases(this.variantName, this.codecIndex); factory Releases.decode(_i1.Input input) { return codec.decode(input); @@ -45,13 +42,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/schrodinger/types/pallet_vesting/vesting_info/vesting_info.dart b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/vesting_info/vesting_info.dart index 656601d2..ee152efa 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/vesting_info/vesting_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/pallet_vesting/vesting_info/vesting_info.dart @@ -4,11 +4,7 @@ import 'dart:typed_data' as _i2; import 'package:polkadart/scale_codec.dart' as _i1; class VestingInfo { - const VestingInfo({ - required this.locked, - required this.perBlock, - required this.startingBlock, - }); + const VestingInfo({required this.locked, required this.perBlock, required this.startingBlock}); factory VestingInfo.decode(_i1.Input input) { return codec.decode(input); @@ -29,51 +25,28 @@ class VestingInfo { return codec.encode(this); } - Map toJson() => { - 'locked': locked, - 'perBlock': perBlock, - 'startingBlock': startingBlock, - }; + Map toJson() => {'locked': locked, 'perBlock': perBlock, 'startingBlock': startingBlock}; @override bool operator ==(Object other) => - identical( - this, - other, - ) || + identical(this, other) || other is VestingInfo && other.locked == locked && other.perBlock == perBlock && other.startingBlock == startingBlock; @override - int get hashCode => Object.hash( - locked, - perBlock, - startingBlock, - ); + int get hashCode => Object.hash(locked, perBlock, startingBlock); } class $VestingInfoCodec with _i1.Codec { const $VestingInfoCodec(); @override - void encodeTo( - VestingInfo obj, - _i1.Output output, - ) { - _i1.U128Codec.codec.encodeTo( - obj.locked, - output, - ); - _i1.U128Codec.codec.encodeTo( - obj.perBlock, - output, - ); - _i1.U32Codec.codec.encodeTo( - obj.startingBlock, - output, - ); + void encodeTo(VestingInfo obj, _i1.Output output) { + _i1.U128Codec.codec.encodeTo(obj.locked, output); + _i1.U128Codec.codec.encodeTo(obj.perBlock, output); + _i1.U32Codec.codec.encodeTo(obj.startingBlock, output); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/primitive_types/h256.dart b/quantus_sdk/lib/generated/schrodinger/types/primitive_types/h256.dart index 4eded259..3a26f8c3 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/primitive_types/h256.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/primitive_types/u512.dart b/quantus_sdk/lib/generated/schrodinger/types/primitive_types/u512.dart index 954a9d71..92988381 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/primitive_types/u512.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart b/quantus_sdk/lib/generated/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart index fac8b05c..4b323353 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_scheme.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart b/quantus_sdk/lib/generated/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart index 7e22489b..b8b5fa11 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/qp_dilithium_crypto/types/dilithium_signature_with_public.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/qp_poseidon/poseidon_hasher.dart b/quantus_sdk/lib/generated/schrodinger/types/qp_poseidon/poseidon_hasher.dart index 6f39b4fe..50302afc 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/qp_poseidon/poseidon_hasher.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/qp_poseidon/poseidon_hasher.dart @@ -12,14 +12,8 @@ class PoseidonHasherCodec with _i1.Codec { } @override - void encodeTo( - PoseidonHasher value, - _i1.Output output, - ) { - _i1.NullCodec.codec.encodeTo( - value, - output, - ); + void encodeTo(PoseidonHasher value, _i1.Output output) { + _i1.NullCodec.codec.encodeTo(value, output); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart b/quantus_sdk/lib/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart index 539ae026..72570de7 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/qp_scheduler/block_number_or_timestamp.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/qp_scheduler/dispatch_time.dart b/quantus_sdk/lib/generated/schrodinger/types/qp_scheduler/dispatch_time.dart index 0e5ee2d9..ba19d5d2 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/qp_scheduler/dispatch_time.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/quantus_runtime/governance/definitions/preimage_deposit.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/governance/definitions/preimage_deposit.dart index 3b70b47f..6bbcc7ef 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/governance/definitions/preimage_deposit.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart index 6646c7f1..4608d712 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/governance/origins/pallet_custom_origins/origin.dart @@ -9,10 +9,7 @@ enum Origin { mediumSpender('MediumSpender', 2), bigSpender('BigSpender', 3); - const Origin( - this.variantName, - this.codecIndex, - ); + const Origin(this.variantName, this.codecIndex); factory Origin.decode(_i1.Input input) { return codec.decode(input); @@ -51,13 +48,7 @@ class $OriginCodec with _i1.Codec { } @override - void encodeTo( - Origin value, - _i1.Output output, - ) { - _i1.U8Codec.codec.encodeTo( - value.codecIndex, - output, - ); + void encodeTo(Origin value, _i1.Output output) { + _i1.U8Codec.codec.encodeTo(value.codecIndex, output); } } diff --git a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/origin_caller.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/origin_caller.dart index 24eaca19..a8d62c6e 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/origin_caller.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/origin_caller.dart @@ -59,10 +59,7 @@ 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); @@ -71,8 +68,7 @@ class $OriginCallerCodec with _i1.Codec { (value as Origins).encodeTo(output); break; default: - throw Exception( - 'OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -84,8 +80,7 @@ class $OriginCallerCodec with _i1.Codec { case Origins: return (value as Origins)._sizeHint(); default: - throw Exception( - 'OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('OriginCaller: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -110,23 +105,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; @@ -152,23 +136,12 @@ class Origins extends OriginCaller { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 19, - output, - ); - _i4.Origin.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(19, output); + _i4.Origin.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Origins && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Origins && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime.dart index 4c026b0a..f16a6bb0 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/quantus_runtime/runtime_call.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_call.dart index 5e0d1bd6..aa8cca69 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_call.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_call.dart @@ -164,10 +164,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); @@ -221,8 +218,7 @@ class $RuntimeCallCodec with _i1.Codec { (value as Assets).encodeTo(output); break; default: - throw Exception( - 'RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); } } @@ -264,8 +260,7 @@ class $RuntimeCallCodec with _i1.Codec { case Assets: return (value as Assets)._sizeHint(); default: - throw Exception( - 'RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); + throw Exception('RuntimeCall: Unsupported "$value" of type "${value.runtimeType}"'); } } } @@ -282,8 +277,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; @@ -292,23 +286,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; @@ -326,8 +309,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; @@ -336,23 +318,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; @@ -370,8 +341,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; @@ -380,23 +350,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; @@ -423,23 +382,12 @@ class Sudo extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i6.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i6.Call.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Sudo && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Sudo && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -466,23 +414,12 @@ class Vesting 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 Vesting && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Vesting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -500,8 +437,7 @@ class Preimage extends RuntimeCall { final _i8.Call value0; @override - Map>>> toJson() => - {'Preimage': value0.toJson()}; + Map>>> toJson() => {'Preimage': value0.toJson()}; int _sizeHint() { int size = 1; @@ -510,23 +446,12 @@ class Preimage 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 Preimage && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Preimage && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -544,8 +469,7 @@ class Scheduler extends RuntimeCall { final _i9.Call value0; @override - Map>> toJson() => - {'Scheduler': value0.toJson()}; + Map>> toJson() => {'Scheduler': value0.toJson()}; int _sizeHint() { int size = 1; @@ -554,23 +478,12 @@ class Scheduler 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 Scheduler && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Scheduler && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -588,8 +501,7 @@ class Utility extends RuntimeCall { final _i10.Call value0; @override - Map>> toJson() => - {'Utility': value0.toJson()}; + Map>> toJson() => {'Utility': value0.toJson()}; int _sizeHint() { int size = 1; @@ -598,23 +510,12 @@ class Utility 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 Utility && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Utility && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -632,8 +533,7 @@ class Referenda extends RuntimeCall { final _i11.Call value0; @override - Map>> toJson() => - {'Referenda': value0.toJson()}; + Map>> toJson() => {'Referenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -642,23 +542,12 @@ class Referenda 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 Referenda && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Referenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -676,8 +565,7 @@ class ReversibleTransfers extends RuntimeCall { final _i12.Call value0; @override - Map>> toJson() => - {'ReversibleTransfers': value0.toJson()}; + Map>> toJson() => {'ReversibleTransfers': value0.toJson()}; int _sizeHint() { int size = 1; @@ -686,23 +574,12 @@ class ReversibleTransfers 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 ReversibleTransfers && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is ReversibleTransfers && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -720,8 +597,7 @@ class ConvictionVoting extends RuntimeCall { final _i13.Call value0; @override - Map>> toJson() => - {'ConvictionVoting': value0.toJson()}; + Map>> toJson() => {'ConvictionVoting': value0.toJson()}; int _sizeHint() { int size = 1; @@ -730,23 +606,12 @@ class ConvictionVoting 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 ConvictionVoting && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is ConvictionVoting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -764,8 +629,7 @@ class TechCollective extends RuntimeCall { final _i14.Call value0; @override - Map>> toJson() => - {'TechCollective': value0.toJson()}; + Map>> toJson() => {'TechCollective': value0.toJson()}; int _sizeHint() { int size = 1; @@ -774,23 +638,12 @@ class TechCollective 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 TechCollective && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TechCollective && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -808,8 +661,7 @@ class TechReferenda extends RuntimeCall { final _i15.Call value0; @override - Map>> toJson() => - {'TechReferenda': value0.toJson()}; + Map>> toJson() => {'TechReferenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -818,23 +670,12 @@ class TechReferenda 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 TechReferenda && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TechReferenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -852,8 +693,7 @@ class MerkleAirdrop extends RuntimeCall { final _i16.Call value0; @override - Map>> toJson() => - {'MerkleAirdrop': value0.toJson()}; + Map>> toJson() => {'MerkleAirdrop': value0.toJson()}; int _sizeHint() { int size = 1; @@ -862,23 +702,12 @@ class MerkleAirdrop 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 MerkleAirdrop && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is MerkleAirdrop && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -896,8 +725,7 @@ class TreasuryPallet extends RuntimeCall { final _i17.Call value0; @override - Map>> toJson() => - {'TreasuryPallet': value0.toJson()}; + Map>> toJson() => {'TreasuryPallet': value0.toJson()}; int _sizeHint() { int size = 1; @@ -906,23 +734,12 @@ class TreasuryPallet extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 18, - output, - ); - _i17.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(18, output); + _i17.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; @@ -949,23 +766,12 @@ class Recovery extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 20, - output, - ); - _i18.Call.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(20, output); + _i18.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; @@ -983,8 +789,7 @@ class Assets extends RuntimeCall { final _i19.Call value0; @override - Map>> toJson() => - {'Assets': value0.toJson()}; + Map>> toJson() => {'Assets': value0.toJson()}; int _sizeHint() { int size = 1; @@ -993,23 +798,12 @@ class Assets extends RuntimeCall { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 21, - output, - ); - _i19.Call.codec.encodeTo( - value0, - output, - ); - } - - @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Assets && other.value0 == value0; + _i1.U8Codec.codec.encodeTo(21, output); + _i19.Call.codec.encodeTo(value0, output); + } + + @override + bool operator ==(Object other) => identical(this, other) || other is Assets && other.value0 == value0; @override int get hashCode => value0.hashCode; diff --git a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_event.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_event.dart index 516ec28d..223d1708 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_event.dart +++ b/quantus_sdk/lib/generated/schrodinger/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 AssetsHolder).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 AssetsHolder: return (value as AssetsHolder)._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; @@ -359,8 +343,7 @@ class Balances extends RuntimeEvent { final _i4.Event value0; @override - Map>> toJson() => - {'Balances': value0.toJson()}; + Map>> toJson() => {'Balances': value0.toJson()}; int _sizeHint() { int size = 1; @@ -369,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; @@ -402,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; @@ -412,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; @@ -454,23 +414,12 @@ class Sudo extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 4, - output, - ); - _i6.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(4, output); + _i6.Event.codec.encodeTo(value0, output); } @override - bool operator ==(Object other) => - identical( - this, - other, - ) || - other is Sudo && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Sudo && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -487,8 +436,7 @@ class QPoW extends RuntimeEvent { final _i7.Event value0; @override - Map>> toJson() => - {'QPoW': value0.toJson()}; + Map>> toJson() => {'QPoW': value0.toJson()}; int _sizeHint() { int size = 1; @@ -497,23 +445,12 @@ class QPoW extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 5, - output, - ); - _i7.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(5, output); + _i7.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; @@ -530,8 +467,7 @@ class MiningRewards extends RuntimeEvent { final _i8.Event value0; @override - Map>> toJson() => - {'MiningRewards': value0.toJson()}; + Map>> toJson() => {'MiningRewards': value0.toJson()}; int _sizeHint() { int size = 1; @@ -540,23 +476,12 @@ class MiningRewards 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 MiningRewards && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is MiningRewards && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -573,8 +498,7 @@ class Vesting extends RuntimeEvent { final _i9.Event value0; @override - Map>> toJson() => - {'Vesting': value0.toJson()}; + Map>> toJson() => {'Vesting': value0.toJson()}; int _sizeHint() { int size = 1; @@ -583,23 +507,12 @@ class Vesting 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 Vesting && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Vesting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -616,8 +529,7 @@ class Preimage extends RuntimeEvent { final _i10.Event value0; @override - Map>>> toJson() => - {'Preimage': value0.toJson()}; + Map>>> toJson() => {'Preimage': value0.toJson()}; int _sizeHint() { int size = 1; @@ -626,23 +538,12 @@ class Preimage 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 Preimage && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Preimage && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -659,8 +560,7 @@ class Scheduler extends RuntimeEvent { final _i11.Event value0; @override - Map>> toJson() => - {'Scheduler': value0.toJson()}; + Map>> toJson() => {'Scheduler': value0.toJson()}; int _sizeHint() { int size = 1; @@ -669,23 +569,12 @@ class Scheduler 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 Scheduler && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Scheduler && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -711,23 +600,12 @@ class Utility 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 Utility && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Utility && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -744,8 +622,7 @@ class Referenda extends RuntimeEvent { final _i13.Event value0; @override - Map>> toJson() => - {'Referenda': value0.toJson()}; + Map>> toJson() => {'Referenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -754,23 +631,12 @@ class Referenda 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 Referenda && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is Referenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -787,8 +653,7 @@ class ReversibleTransfers extends RuntimeEvent { final _i14.Event value0; @override - Map>> toJson() => - {'ReversibleTransfers': value0.toJson()}; + Map>> toJson() => {'ReversibleTransfers': value0.toJson()}; int _sizeHint() { int size = 1; @@ -797,23 +662,12 @@ class ReversibleTransfers 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 ReversibleTransfers && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is ReversibleTransfers && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -830,8 +684,7 @@ class ConvictionVoting extends RuntimeEvent { final _i15.Event value0; @override - Map> toJson() => - {'ConvictionVoting': value0.toJson()}; + Map> toJson() => {'ConvictionVoting': value0.toJson()}; int _sizeHint() { int size = 1; @@ -840,23 +693,12 @@ class ConvictionVoting 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 ConvictionVoting && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is ConvictionVoting && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -873,8 +715,7 @@ class TechCollective extends RuntimeEvent { final _i16.Event value0; @override - Map>> toJson() => - {'TechCollective': value0.toJson()}; + Map>> toJson() => {'TechCollective': value0.toJson()}; int _sizeHint() { int size = 1; @@ -883,23 +724,12 @@ class TechCollective 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 TechCollective && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TechCollective && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -916,8 +746,7 @@ class TechReferenda extends RuntimeEvent { final _i17.Event value0; @override - Map>> toJson() => - {'TechReferenda': value0.toJson()}; + Map>> toJson() => {'TechReferenda': value0.toJson()}; int _sizeHint() { int size = 1; @@ -926,23 +755,12 @@ class TechReferenda 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 TechReferenda && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TechReferenda && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -959,8 +777,7 @@ class MerkleAirdrop extends RuntimeEvent { final _i18.Event value0; @override - Map>> toJson() => - {'MerkleAirdrop': value0.toJson()}; + Map>> toJson() => {'MerkleAirdrop': value0.toJson()}; int _sizeHint() { int size = 1; @@ -969,23 +786,12 @@ class MerkleAirdrop 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 MerkleAirdrop && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is MerkleAirdrop && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -1002,8 +808,7 @@ class TreasuryPallet extends RuntimeEvent { final _i19.Event value0; @override - Map>> toJson() => - {'TreasuryPallet': value0.toJson()}; + Map>> toJson() => {'TreasuryPallet': value0.toJson()}; int _sizeHint() { int size = 1; @@ -1012,23 +817,12 @@ class TreasuryPallet 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 TreasuryPallet && other.value0 == value0; + bool operator ==(Object other) => identical(this, other) || other is TreasuryPallet && other.value0 == value0; @override int get hashCode => value0.hashCode; @@ -1045,8 +839,7 @@ class Recovery extends RuntimeEvent { final _i20.Event value0; @override - Map>> toJson() => - {'Recovery': value0.toJson()}; + Map>> toJson() => {'Recovery': value0.toJson()}; int _sizeHint() { int size = 1; @@ -1055,23 +848,12 @@ class Recovery extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 20, - output, - ); - _i20.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(20, output); + _i20.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; @@ -1088,8 +870,7 @@ class Assets extends RuntimeEvent { final _i21.Event value0; @override - Map>> toJson() => - {'Assets': value0.toJson()}; + Map>> toJson() => {'Assets': value0.toJson()}; int _sizeHint() { int size = 1; @@ -1098,23 +879,12 @@ class Assets extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 21, - output, - ); - _i21.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(21, output); + _i21.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; @@ -1131,8 +901,7 @@ class AssetsHolder extends RuntimeEvent { final _i22.Event value0; @override - Map>> toJson() => - {'AssetsHolder': value0.toJson()}; + Map>> toJson() => {'AssetsHolder': value0.toJson()}; int _sizeHint() { int size = 1; @@ -1141,23 +910,12 @@ class AssetsHolder extends RuntimeEvent { } void encodeTo(_i1.Output output) { - _i1.U8Codec.codec.encodeTo( - 22, - output, - ); - _i22.Event.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(22, output); + _i22.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; diff --git a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_freeze_reason.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_freeze_reason.dart index 98109e19..5e4c8b0d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_freeze_reason.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/quantus_runtime/runtime_hold_reason.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_hold_reason.dart index bc1460b4..813bf00d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/runtime_hold_reason.dart +++ b/quantus_sdk/lib/generated/schrodinger/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( - 9, - output, - ); - _i3.HoldReason.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(9, 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( - 13, - output, - ); - _i4.HoldReason.codec.encodeTo( - value0, - output, - ); + _i1.U8Codec.codec.encodeTo(13, 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/schrodinger/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart b/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart index fa9b3554..1f05a1bb 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/quantus_runtime/transaction_extensions/reversible_transaction_extension.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_arithmetic/arithmetic_error.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/arithmetic_error.dart index d7be8a27..74316759 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/arithmetic_error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -48,13 +45,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/schrodinger/types/sp_arithmetic/fixed_point/fixed_i64.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/fixed_point/fixed_i64.dart index cc36d889..e542ca16 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/fixed_point/fixed_i64.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_arithmetic/fixed_point/fixed_u128.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/fixed_point/fixed_u128.dart index 771c1755..87a788a0 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/fixed_point/fixed_u128.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_arithmetic/per_things/perbill.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/per_things/perbill.dart index 6feb69ff..0f88314b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/per_things/perbill.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_arithmetic/per_things/permill.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/per_things/permill.dart index 9fd260c7..7411f90d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_arithmetic/per_things/permill.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_core/crypto/account_id32.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_core/crypto/account_id32.dart index 81513d7f..93fbda9f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_core/crypto/account_id32.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/dispatch_error.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/dispatch_error.dart index a5c2d18c..715b1735 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/dispatch_error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/dispatch_error_with_post_info.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/dispatch_error_with_post_info.dart index 6cbbf070..cc35e8e0 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/dispatch_error_with_post_info.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/generic/digest/digest.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/digest/digest.dart index 215d34e5..1aa48457 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/digest/digest.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/generic/digest/digest_item.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/digest/digest_item.dart index 4c9b58a7..4ac2501d 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/digest/digest_item.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/generic/era/era.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/era/era.dart index 5133d6d7..97172381 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/era/era.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart index 09f50caf..23205b0a 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/module_error.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/module_error.dart index 6ed8f3d0..d1980872 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/module_error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/multiaddress/multi_address.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/multiaddress/multi_address.dart index 03d9629e..0466c0f0 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/multiaddress/multi_address.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_runtime/proving_trie/trie_error.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/proving_trie/trie_error.dart index 27b1afb3..5beb544b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/proving_trie/trie_error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -81,13 +78,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/schrodinger/types/sp_runtime/token_error.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/token_error.dart index 1b882412..c16f0c25 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/token_error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -69,13 +66,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/schrodinger/types/sp_runtime/transactional_error.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/transactional_error.dart index 864c12af..9a3a7f7f 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_runtime/transactional_error.dart +++ b/quantus_sdk/lib/generated/schrodinger/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); @@ -45,13 +42,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/schrodinger/types/sp_version/runtime_version.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_version/runtime_version.dart index f5a580ba..9d10f100 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_version/runtime_version.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_weights/runtime_db_weight.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_weights/runtime_db_weight.dart index ad7cd305..aac5361b 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_weights/runtime_db_weight.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/sp_weights/weight_v2/weight.dart b/quantus_sdk/lib/generated/schrodinger/types/sp_weights/weight_v2/weight.dart index 7d7e8599..8d9a8883 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/sp_weights/weight_v2/weight.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/tuples.dart b/quantus_sdk/lib/generated/schrodinger/types/tuples.dart index b42e59e2..2f309fdb 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/tuples.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/tuples_1.dart b/quantus_sdk/lib/generated/schrodinger/types/tuples_1.dart index b42e59e2..2f309fdb 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/tuples_1.dart +++ b/quantus_sdk/lib/generated/schrodinger/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/schrodinger/types/tuples_2.dart b/quantus_sdk/lib/generated/schrodinger/types/tuples_2.dart index 3d011bc1..9610a384 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/tuples_2.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/tuples_2.dart @@ -2,12 +2,7 @@ import 'package:polkadart/scale_codec.dart' as _i1; class Tuple4 { - const Tuple4( - this.value0, - this.value1, - this.value2, - this.value3, - ); + const Tuple4(this.value0, this.value1, this.value2, this.value3); final T0 value0; @@ -19,12 +14,7 @@ class Tuple4 { } class Tuple4Codec with _i1.Codec> { - const Tuple4Codec( - this.codec0, - this.codec1, - this.codec2, - this.codec3, - ); + const Tuple4Codec(this.codec0, this.codec1, this.codec2, this.codec3); final _i1.Codec codec0; @@ -35,10 +25,7 @@ class Tuple4Codec with _i1.Codec> { final _i1.Codec codec3; @override - void encodeTo( - Tuple4 tuple, - _i1.Output output, - ) { + void encodeTo(Tuple4 tuple, _i1.Output output) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); codec2.encodeTo(tuple.value2, output); @@ -47,12 +34,7 @@ class Tuple4Codec with _i1.Codec> { @override Tuple4 decode(_i1.Input input) { - return Tuple4( - codec0.decode(input), - codec1.decode(input), - codec2.decode(input), - codec3.decode(input), - ); + return Tuple4(codec0.decode(input), codec1.decode(input), codec2.decode(input), codec3.decode(input)); } @override diff --git a/quantus_sdk/lib/generated/schrodinger/types/tuples_3.dart b/quantus_sdk/lib/generated/schrodinger/types/tuples_3.dart index e56f1a7f..aa48d3ff 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/tuples_3.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/tuples_3.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/schrodinger/types/tuples_4.dart b/quantus_sdk/lib/generated/schrodinger/types/tuples_4.dart index 8797ee9f..9f5250f5 100644 --- a/quantus_sdk/lib/generated/schrodinger/types/tuples_4.dart +++ b/quantus_sdk/lib/generated/schrodinger/types/tuples_4.dart @@ -72,10 +72,7 @@ class Tuple10Codec final _i1.Codec codec9; @override - void encodeTo( - Tuple10 tuple, - _i1.Output output, - ) { + void encodeTo(Tuple10 tuple, _i1.Output output) { codec0.encodeTo(tuple.value0, output); codec1.encodeTo(tuple.value1, output); codec2.encodeTo(tuple.value2, output); From 95ff03dce6ed06023d79e0953209e8d7edb1c421 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 16:46:11 +0800 Subject: [PATCH 28/36] delete commented code --- .../screens/high_security/guardian_account_info_sheet.dart | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/guardian_account_info_sheet.dart b/mobile-app/lib/features/main/screens/high_security/guardian_account_info_sheet.dart index a4433dbc..48c65d7d 100644 --- a/mobile-app/lib/features/main/screens/high_security/guardian_account_info_sheet.dart +++ b/mobile-app/lib/features/main/screens/high_security/guardian_account_info_sheet.dart @@ -78,11 +78,6 @@ class _GuardianAccountInfoSheetState extends State { 'The Guardian account should not be in the same wallet as the Entrusted account as in the case of theft both would be exposed.', style: context.themeText.smallParagraph, ), - // const SizedBox(height: 16), - // Text( - // 'The harder the Guardian account is to access, the higher the security. An account on a cold storage wallet is the most secure.', - // style: context.themeText.smallParagraph, - // ), const SizedBox(height: 40), Button( variant: ButtonVariant.primary, From d3a70d5ab4623f43c19a63f6c3c1fbb7127c63fb Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 16:48:13 +0800 Subject: [PATCH 29/36] delete commented code --- .../screens/high_security/high_security_confirmation_sheet.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart index 6f73e39f..9864d6c9 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_confirmation_sheet.dart @@ -69,7 +69,6 @@ class _HighSecurityConfirmationSheetState extends ConsumerState Date: Wed, 14 Jan 2026 16:50:00 +0800 Subject: [PATCH 30/36] cleanup --- .../screens/high_security/high_security_details_screen.dart | 5 ----- mobile-app/lib/providers/wallet_providers.dart | 5 +++++ quantus_sdk/lib/src/services/recovery_service.dart | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart index 180659c6..3f7da1ba 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart @@ -9,11 +9,6 @@ import 'package:resonance_network_wallet/features/styles/app_text_theme.dart'; import 'package:resonance_network_wallet/providers/wallet_providers.dart'; import 'package:resonance_network_wallet/shared/extensions/media_query_data_extension.dart'; -final highSecurityConfigProvider = FutureProvider.family((ref, account) async { - final service = ref.watch(highSecurityServiceProvider); - return service.getHighSecurityConfig(account.accountId); -}); - class HighSecurityDetailsScreen extends ConsumerWidget { final Account account; const HighSecurityDetailsScreen({super.key, required this.account}); diff --git a/mobile-app/lib/providers/wallet_providers.dart b/mobile-app/lib/providers/wallet_providers.dart index 8e447a66..99c68c0d 100644 --- a/mobile-app/lib/providers/wallet_providers.dart +++ b/mobile-app/lib/providers/wallet_providers.dart @@ -117,4 +117,9 @@ BigInt _calculatePendingOutgoing(List pendingTransactio return totalOutgoing; } +final highSecurityConfigProvider = FutureProvider.family((ref, account) async { + final service = ref.watch(highSecurityServiceProvider); + return service.getHighSecurityConfig(account.accountId); +}); + // Deprecated legacy history providers removed in favor of unified pagination diff --git a/quantus_sdk/lib/src/services/recovery_service.dart b/quantus_sdk/lib/src/services/recovery_service.dart index ea44d31e..fd3a26d9 100644 --- a/quantus_sdk/lib/src/services/recovery_service.dart +++ b/quantus_sdk/lib/src/services/recovery_service.dart @@ -8,8 +8,6 @@ import 'package:quantus_sdk/generated/schrodinger/types/sp_runtime/multiaddress/ import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:quantus_sdk/src/rust/api/crypto.dart' as crypto; -import 'substrate_service.dart'; - /// Service for managing account recovery functionality class RecoveryService { static final RecoveryService _instance = RecoveryService._internal(); From 866ca70aede35cd3a0614b092c1189995c4e41e9 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 16:53:14 +0800 Subject: [PATCH 31/36] remove unused code --- .../high_security/high_security_details_screen.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart index 3f7da1ba..f7837241 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart @@ -68,8 +68,6 @@ class HighSecurityDetailsScreen extends ConsumerWidget { ); } - const reminders = ['2 hrs before', '2 days, 8 hrs before']; - return SingleChildScrollView( child: Padding( padding: const EdgeInsets.only(left: 27, right: 27, top: 12), @@ -82,8 +80,8 @@ class HighSecurityDetailsScreen extends ConsumerWidget { _GuardianAccountSection(guardianAccountId: data.guardianAccountId), const SizedBox(height: 20), _SafeguardWindowSection(safeguardWindow: data.safeguardWindow), - const SizedBox(height: 20), - const _RemindersSection(reminders: reminders), + // const SizedBox(height: 20), + // const _RemindersSection(reminders: reminders), SizedBox(height: context.themeSize.bottomButtonSpacing), ], ), @@ -169,6 +167,8 @@ class _SafeguardWindowSection extends StatelessWidget { } } +// TODO: add a reminder service - implement this +// ignore: unused_element class _RemindersSection extends StatelessWidget { final List reminders; const _RemindersSection({required this.reminders}); From 498e07af54af8fd1b8c6bf5a0e794450c917bc66 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 16:54:09 +0800 Subject: [PATCH 32/36] remove commented code --- .../high_security/high_security_details_screen.dart | 9 --------- 1 file changed, 9 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart index f7837241..7818008b 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart @@ -299,15 +299,6 @@ class XIcon extends StatelessWidget { } } -// class _AddReminderIcon extends StatelessWidget { -// const _AddReminderIcon(); - -// @override -// Widget build(BuildContext context) { -// return Transform.rotate(angle: 0.79, child: const SizedBox(width: 12, height: 8, child: Stack())); -// } -// } - class _StatusCard extends StatelessWidget { const _StatusCard(); From c7724df9698d469619dadc8f8863679a6bcc2ab8 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 16:55:25 +0800 Subject: [PATCH 33/36] delete commented code --- .../screens/high_security/high_security_guardian_wizard.dart | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart b/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart index c3023c1a..57a39c58 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart @@ -168,11 +168,6 @@ class _HighSecurityGuardianWizardState extends ConsumerState Date: Wed, 14 Jan 2026 16:58:11 +0800 Subject: [PATCH 34/36] cleanup Invalid address field --- .../high_security/high_security_guardian_wizard.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart b/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart index 57a39c58..dc4e43f0 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart @@ -31,11 +31,11 @@ class HighSecurityGuardianWizard extends ConsumerStatefulWidget { class _HighSecurityGuardianWizardState extends ConsumerState { late final TextEditingController _guardianController; + // return null if the address is not valid Future _getHumanCheckphrase(String address) async { - try { - Address.decode(address); + if (SubstrateService().isValidSS58Address(address)) { return await _checksumService.getHumanReadableName(address); - } catch (e) { + } else { return null; } } @@ -154,7 +154,7 @@ class _HighSecurityGuardianWizardState extends ConsumerState Date: Wed, 14 Jan 2026 16:59:39 +0800 Subject: [PATCH 35/36] remove commented code --- quantus_sdk/lib/src/services/substrate_service.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/quantus_sdk/lib/src/services/substrate_service.dart b/quantus_sdk/lib/src/services/substrate_service.dart index bb1e932a..a37ec465 100644 --- a/quantus_sdk/lib/src/services/substrate_service.dart +++ b/quantus_sdk/lib/src/services/substrate_service.dart @@ -165,7 +165,6 @@ class SubstrateService { // Keep alive for logs await Future.delayed(const Duration(seconds: 20)); - // await provider.disconnect(); // Optional cleanup }); return txHash; From 254444d5a01e8b8f23e9228f566fd25fb32ae270 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 14 Jan 2026 17:02:55 +0800 Subject: [PATCH 36/36] delete warnings --- .../screens/high_security/high_security_details_screen.dart | 2 +- .../screens/high_security/high_security_guardian_wizard.dart | 1 - mobile-app/test/widget/send_screen_widget_test.mocks.dart | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart index 7818008b..133db448 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_details_screen.dart @@ -167,7 +167,7 @@ class _SafeguardWindowSection extends StatelessWidget { } } -// TODO: add a reminder service - implement this +// TO-DO: add a reminder service - implement this // ignore: unused_element class _RemindersSection extends StatelessWidget { final List reminders; diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart b/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart index dc4e43f0..eec50348 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_guardian_wizard.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; -import 'package:ss58/ss58.dart'; import 'package:resonance_network_wallet/features/components/button.dart'; import 'package:resonance_network_wallet/features/components/custom_text_field.dart'; import 'package:resonance_network_wallet/features/components/gradient_text.dart'; diff --git a/mobile-app/test/widget/send_screen_widget_test.mocks.dart b/mobile-app/test/widget/send_screen_widget_test.mocks.dart index 963d835b..b426ac78 100644 --- a/mobile-app/test/widget/send_screen_widget_test.mocks.dart +++ b/mobile-app/test/widget/send_screen_widget_test.mocks.dart @@ -676,7 +676,7 @@ class MockReversibleTransfersService extends _i1.Mock implements _i2.ReversibleT ) as _i3.Future<_i6.Uint8List>); - @override + // @override _i3.Future<_i6.Uint8List> executeTransfer({required _i4.Account? account, required List? transactionId}) => (super.noSuchMethod( Invocation.method(#executeTransfer, [], {#account: account, #transactionId: transactionId}), @@ -705,7 +705,7 @@ class MockReversibleTransfersService extends _i1.Mock implements _i2.ReversibleT (super.noSuchMethod(Invocation.method(#getAccountPendingIndex, [address]), returnValue: _i3.Future.value(0)) as _i3.Future); - @override + // @override _i3.Future isReversibilityEnabled(String? address) => (super.noSuchMethod( Invocation.method(#isReversibilityEnabled, [address]),