Scalecodec

Latest version: v1.2.11

Safety actively analyzes 687881 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 41

2.0.0a2

What's Changed
* Restructured unit tests by arjanz in https://github.com/polkascan/py-scale-codec/pull/124
* ScaleSerializable mixin by arjanz in https://github.com/polkascan/py-scale-codec/pull/125


**Full Changelog**: https://github.com/polkascan/py-scale-codec/compare/v2.0.0a1...v2.0.0a2

2.0.0a1

New from the ground up object based implementation in stead of parsing of type strings, which improves performance, flexibility and readability.

Benchmark of a MetadataV14 SCALE blob of 246kB

python
metadata_obj = MetadataVersioned.new()
metadata_obj.decode(ScaleBytes(metadata_fixture_dict['V14']))

Execution time: 0.11408376693725586 seconds


Version 1 equivalent:

python
metadata_obj = runtime_config.create_scale_object("MetadataVersioned")
metadata_obj.decode(ScaleBytes(metadata_fixture_dict['V14']))

Execution time: 0.40303683280944824 seconds


Other type examples

python
obj = Tuple(Compact(U32), Compact(U32)).new()
obj.decode(ScaleBytes("0x0c00"))

SlotNumber = U64
VrfOutput = Array(U8, 32)
VrfProof = Array(U8, 64)
RawAuraPreDigest = Struct(slot_number=U64)
RawBabePreDigestPrimary = Struct(authority_index=U32, slot_number=SlotNumber, vrf_output=VrfOutput, vrf_proof=VrfProof)
RawBabePreDigestSecondaryPlain = Struct(authority_index=U32, slot_number=SlotNumber)
RawBabePreDigestSecondaryVRF = Struct(authority_index=U32, slot_number=SlotNumber, vrf_output=VrfOutput, vrf_proof=VrfProof)
RawBabePreDigest = Enum(Phantom=None, Primary=RawBabePreDigestPrimary, SecondaryPlain=RawBabePreDigestSecondaryPlain, SecondaryVRF=RawBabePreDigestSecondaryVRF)

1.3.0a5

1.3.0a4

Process `Address` and `ExtrinsicSignature` types from metadata

1.3.0a2

Process Address and ExtrinsicSignature types from metadata

**Full Changelog**: https://github.com/polkascan/py-scale-codec/compare/v1.3.0a...v1.3.0a2

1.3.0a

Alpha release with `MetadataV15` support

**Full Changelog**: https://github.com/polkascan/py-scale-codec/compare/v1.2.7...v1.3.0a

Page 1 of 41

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.