Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • DanBaDo/ginkgo
  • flodef/ginkgo
  • zicmama/ginkgo
  • vjrj/ginkgo
  • pokapow/ginkgo
  • weblate/ginkgo
6 results
Show changes
Showing
with 1575 additions and 0 deletions
// 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<String, int> 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<PerDispatchClass> {
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;
}
}
// 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<String, dynamic> 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<RawOrigin> {
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<String, dynamic> 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<String, List<int>> 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<String, dynamic> 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;
}
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:polkadart/scale_codec.dart' as _i1;
typedef PalletId = List<int>;
class PalletIdCodec with _i1.Codec<PalletId> {
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);
}
}
// 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<String, dynamic> toJson();
}
class $Bounded {
const $Bounded();
Legacy legacy({required _i3.H256 hash}) {
return Legacy(hash: hash);
}
Inline inline(List<int> value0) {
return Inline(value0);
}
Lookup lookup({
required _i3.H256 hash,
required int len,
}) {
return Lookup(
hash: hash,
len: len,
);
}
}
class $BoundedCodec with _i1.Codec<Bounded> {
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<String, Map<String, List<int>>> 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<int> value0;
@override
Map<String, List<int>> 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<String, Map<String, dynamic>> 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,
);
}
// 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<BalanceStatus> {
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,
);
}
}
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:typed_data' as _i3;
import 'package:polkadart/scale_codec.dart' as _i1;
import '../../../../gdev_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<String, dynamic> 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<IdAmount> {
const $IdAmountCodec();
@override
void encodeTo(
IdAmount obj,
_i1.Output output,
) {
_i2.RuntimeHoldReason.codec.encodeTo(
obj.id,
output,
);
_i1.U64Codec.codec.encodeTo(
obj.amount,
output,
);
}
@override
IdAmount decode(_i1.Input input) {
return IdAmount(
id: _i2.RuntimeHoldReason.codec.decode(input),
amount: _i1.U64Codec.codec.decode(input),
);
}
@override
int sizeHint(IdAmount obj) {
int size = 0;
size = size + _i2.RuntimeHoldReason.codec.sizeHint(obj.id);
size = size + _i1.U64Codec.codec.sizeHint(obj.amount);
return size;
}
}
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:typed_data' as _i2;
import 'package:polkadart/scale_codec.dart' as _i1;
class IdAmount {
const IdAmount({
required this.id,
required this.amount,
});
factory IdAmount.decode(_i1.Input input) {
return codec.decode(input);
}
/// Id
final dynamic id;
/// Balance
final BigInt amount;
static const $IdAmountCodec codec = $IdAmountCodec();
_i2.Uint8List encode() {
return codec.encode(this);
}
Map<String, dynamic> 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<IdAmount> {
const $IdAmountCodec();
@override
void encodeTo(
IdAmount obj,
_i1.Output output,
) {
_i1.NullCodec.codec.encodeTo(
obj.id,
output,
);
_i1.U64Codec.codec.encodeTo(
obj.amount,
output,
);
}
@override
IdAmount decode(_i1.Input input) {
return IdAmount(
id: _i1.NullCodec.codec.decode(input),
amount: _i1.U64Codec.codec.decode(input),
);
}
@override
int sizeHint(IdAmount obj) {
int size = 0;
size = size + _i1.NullCodec.codec.sizeHint(obj.id);
size = size + _i1.U64Codec.codec.sizeHint(obj.amount);
return size;
}
}
// 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_duniter_account/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<String, dynamic> 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<AccountInfo> {
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;
}
}
// 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<String, dynamic> 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<CodeUpgradeAuthorization> {
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;
}
}
// 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 '../gdev_runtime/runtime_event.dart' as _i3;
import '../primitive_types/h256.dart' as _i4;
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<T>
final List<_i4.H256> topics;
static const $EventRecordCodec codec = $EventRecordCodec();
_i5.Uint8List encode() {
return codec.encode(this);
}
Map<String, dynamic> 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<EventRecord> {
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;
}
}
// 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<CheckGenesis> {
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);
}
}
// 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<CheckMortality> {
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);
}
}
// 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<CheckNonZeroSender> {
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);
}
}
// 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<CheckNonce> {
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);
}
}
// 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<CheckSpecVersion> {
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);
}
}
// 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<CheckTxVersion> {
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);
}
}
// 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<CheckWeight> {
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);
}
}
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:typed_data' as _i2;
import 'package:polkadart/scale_codec.dart' as _i1;
class LastRuntimeUpgradeInfo {
const LastRuntimeUpgradeInfo({
required this.specVersion,
required this.specName,
});
factory LastRuntimeUpgradeInfo.decode(_i1.Input input) {
return codec.decode(input);
}
/// codec::Compact<u32>
final BigInt specVersion;
/// sp_runtime::RuntimeString
final String specName;
static const $LastRuntimeUpgradeInfoCodec codec =
$LastRuntimeUpgradeInfoCodec();
_i2.Uint8List encode() {
return codec.encode(this);
}
Map<String, dynamic> 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<LastRuntimeUpgradeInfo> {
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 + _i1.StrCodec.codec.sizeHint(obj.specName);
return size;
}
}
// 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<u32>
final _i2.PerDispatchClass max;
static const $BlockLengthCodec codec = $BlockLengthCodec();
_i3.Uint8List encode() {
return codec.encode(this);
}
Map<String, Map<String, int>> 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<BlockLength> {
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;
}
}
// 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<WeightsPerClass>
final _i3.PerDispatchClass perClass;
static const $BlockWeightsCodec codec = $BlockWeightsCodec();
_i4.Uint8List encode() {
return codec.encode(this);
}
Map<String, Map<String, dynamic>> 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<BlockWeights> {
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;
}
}