No project description provided
Project description
Schema parsing via Rust bindings
This repository holds the Rust bindings in src/lib.rs
. They are simple exports of functionality
from concordium-contracts-common
. To build them locally, you require maturin and Rust installed.
We've tested with Rust 1.74 and 1.77.
Project structure
The entrypoint for Python consumers is the ccdexplorer_schema_parser
package which has a
single class Schema
. The constructor will instantiate the schema from a
deployed Wasm module.
After that the constructed object can be used to parse events or return values using the schema in the module.
from ccdexplorer_schema_parser.Schema import Schema
from ccdexplorer_fundamentals.enums import NET
from ccdexplorer_fundamentals.GRPCClient import GRPCClient
from ccdexplorer_fundamentals.GRPCClient.types_pb2 import VersionedModuleSource
versioned_module: VersionedModuleSource = (
self.grpcclient.get_module_source_original_classes(
module_ref, "last_final", net=NET(net)
)
)
schema = Schema(versioned_module.v1.value, 1) if versioned_module.v1
else Schema(versioned_module.v0.value, 0)
To parse a logged event from an account_transaction
, use the following call:
event_json = schema.event_to_json(
source_module_name, bytes.fromhex(event)
)
Where source_module_name
is the name of the module (corresponding to the module_ref
you have used to parse the schema and event
is the hex
representation of the logged event).
If this can be parsed, the result will be a dictionary.
Building
Run pip install -r requirements.txt
to install dependencies.
Run maturin build
to build the project.
This will produce a python wheel in target/wheels
that will contain both the
compiled Rust binaries and python wrappers. The compiled package is platform
specific, so a package built on, e.g., Linux will not work on Windows.
Deploy
This repository has a CI.yml
that builds this package for various configurations and publishes this to Pypi.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for ccdexplorer_schema_parser-0.1.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 476ff60396aa8729ef293cc013a5eb316f8bd14583f2c700f6072ff850691999 |
|
MD5 | 956355b7d74d3af2ccfd07e8a0cc92ed |
|
BLAKE2b-256 | 9c8e1532333d9ef9e4168eb2e9545626c21ccfc05172c56008d7bdbe7a10e64d |
Hashes for ccdexplorer_schema_parser-0.1.10-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2d7c36eb7c78945eddf46dce9bd3201de58c91b5e93cee646d1c70a685a74f4 |
|
MD5 | f48a18c94a2edbb812c401897faaf69a |
|
BLAKE2b-256 | 39c32da79a3e19f0d061f1a4f534604c49d98c5c819e659f38eadb928a7380ae |
Hashes for ccdexplorer_schema_parser-0.1.10-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e04c05aaad254cd9ff952a6f2639e543cb9b6eed977381552f3e2eca47aa9de |
|
MD5 | 43b5463e13fca0121727ed5cb55689f6 |
|
BLAKE2b-256 | 46c91a5fa54dd287c83c7650cc0126a2c1071a33c13f863f2bcc9512058f59d3 |
Hashes for ccdexplorer_schema_parser-0.1.10-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dda7dee4329d0c62bd818a7c875b586ec29a21545000b7ddb6c5d7553bce87b |
|
MD5 | 34a8a9b2096a3862dac2f6473d2463ff |
|
BLAKE2b-256 | d741073a356cb736d04e65e8b1bd59824da61c059861d018c9eeb1083bbfbb27 |
Hashes for ccdexplorer_schema_parser-0.1.10-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bde165b1499d89339bd80ed599b7a17548b2d7e79aa733bf39fd28210fa0eb7 |
|
MD5 | ca1b6a3c82ed8deea681d922a6572a12 |
|
BLAKE2b-256 | 4e52cc5352935229c8bc438b93fe88ae80ca0a4617498f74c5735d255b74665c |
Hashes for ccdexplorer_schema_parser-0.1.10-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9193a991a8b53b28638be42a264a96798065a33f66dd3c58d9bfd6c70ef96767 |
|
MD5 | 7d6a3f668961b5e291b29475cb3d0a83 |
|
BLAKE2b-256 | 0f3e28e8530eeefe7f730ab33909db63a7706ba3702d3bc765b01ba7815f3f82 |
Hashes for ccdexplorer_schema_parser-0.1.10-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cd61255e7bfeb81775e07c183b982ecad5235c92c3f4c466dfae07e03af0ff5 |
|
MD5 | 80e23ab8e7caeb978e88d0f7473caa0d |
|
BLAKE2b-256 | c102d9ed803393f13b7331faa25a7084aa777d825b8ef9a66ce1bc4d9507be08 |
Hashes for ccdexplorer_schema_parser-0.1.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7af0d606687f1ed0a1d3527fe6880e7f1d2c5e1e3ec74803976e805f4ba9ecd1 |
|
MD5 | 2479c1b06f338a090edea07418b71d70 |
|
BLAKE2b-256 | b823e80a1e54040f89dbfb36793a6d5b0c2120ef59f6963d1bb1748b4a0bf59c |
Hashes for ccdexplorer_schema_parser-0.1.10-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b24af41c0089f8b933fe602bb3eaf985efc177dba20ff98fea32afcb5c302a6 |
|
MD5 | 88a5802aa6cfd8ae9efd98ad17669a29 |
|
BLAKE2b-256 | 1e6593f01e5e2a097ba7a96c216bc6b2f242a4c9bb5ff3d5e79aba208da1347a |
Hashes for ccdexplorer_schema_parser-0.1.10-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a87acd986cd7d0504d9d12ff71daf9b417d140292d5cf55e49b8f25007a0857d |
|
MD5 | 8ac84002399d4cff613eb6b9bdbae787 |
|
BLAKE2b-256 | d8d7ff46b85f3575ba3fc4b8e4f03480abd97bbe8399b88ffdf33933a46767d1 |
Hashes for ccdexplorer_schema_parser-0.1.10-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 312621cc8de76634b55da08c45d845faf7204228ca8d6734c54f3fa8f35d1eaa |
|
MD5 | e6507af061da3aff8dc4d8c7f9cc867b |
|
BLAKE2b-256 | 65b063399bcce1941130777798431f191479264376fea234c2b595343f25ddbc |
Hashes for ccdexplorer_schema_parser-0.1.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2f37b3dc93810165a9ffa075463e289b8afbf5208c68cf1a75f549b3e8fb88e |
|
MD5 | d0060dfff9b6c342769131b04767ef2c |
|
BLAKE2b-256 | b4f7215e816beb8e58bf0a2ce639e5963cadda227187b71726819321020796b8 |
Hashes for ccdexplorer_schema_parser-0.1.10-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad6d0727af154b9c1a4953fbd6b0eeb148f291d7a9ae0f227f6f6d4dd14bc07d |
|
MD5 | 8bd9945b8505d856efaabff8991cbcc5 |
|
BLAKE2b-256 | dd9c9aa5867b0def64bad2f66c9f4ff18bfc1e8aa7da670cfae78a2ebf4cd50f |
Hashes for ccdexplorer_schema_parser-0.1.10-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1443802aeea90768149a351198192d585a92f5cd745bbc0b7f3c90a13d561877 |
|
MD5 | 50ce558273e25203f9eb17313e07f653 |
|
BLAKE2b-256 | d35b3de39b260048116acf0488aba7b80d985e81612001d4dd5e53a7acd6f212 |
Hashes for ccdexplorer_schema_parser-0.1.10-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 936828b4c7c0125e07792f449cd83d1f44a7418ee628de03b29d42ebbf919114 |
|
MD5 | a174293883aa25ec73911cf96f46e56c |
|
BLAKE2b-256 | 2a453fd31913cfe905a89dc982a5e0af3c6019ba1f8413e6bebf777d8bd2da1e |
Hashes for ccdexplorer_schema_parser-0.1.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb0b989184bb872ddf95070a1a063079f6ebce2a94155de91edf3b87c200874a |
|
MD5 | 886170f466cbdda1611f68446e9f2e72 |
|
BLAKE2b-256 | 3c09032dfaec60afba28157f167ae82675a72dc9622a926bba0e6823d3f80e3a |
Hashes for ccdexplorer_schema_parser-0.1.10-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5749dcf65d0a4a1d6e84367cb44362f426d2ed69171e02154a3e2c99764e141c |
|
MD5 | 785eb9ddc3cae4dd0d0f15109839d9e5 |
|
BLAKE2b-256 | cc622873726fcc250730c326719b2da113071cb44dc4d392e2c56f9408ed74d8 |
Hashes for ccdexplorer_schema_parser-0.1.10-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21d7ef69b85dbf958d6ef772628ad3f8a0d755b2d3f5936e1f32faa564647614 |
|
MD5 | d31d5f989f3c5d7efdef302b7fb3f2e7 |
|
BLAKE2b-256 | 44fdcb47ce0d578aeeaf68c5660336254b18b59492d2bebecb6db4122d282a87 |
Hashes for ccdexplorer_schema_parser-0.1.10-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 140387132f47d687fa60091bda565024259b12219308e467394bc372a3f0df9a |
|
MD5 | 241acd43393a4c2b2ed7454694413efe |
|
BLAKE2b-256 | 2cb169f96186b4ad5ea5365fa9b838d0a93b51196752c629cf0b7fc653f9370a |
Hashes for ccdexplorer_schema_parser-0.1.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2f6289a05b1909d3a458913791697fd0f7f0218322c4732a62c5c84e917f364 |
|
MD5 | d879c6e9943dc6ca3fa4e5377a5b8653 |
|
BLAKE2b-256 | 3ca8c7467603be153db418fa6aa5ed6a119493460387b4ddef09e49ed8ca4f7c |
Hashes for ccdexplorer_schema_parser-0.1.10-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90075d935233640fc13a781c85e553d1e7f2ea20ca2d5fd4b47efe63d9b4b10b |
|
MD5 | 704492045ec36aaa5623f5617951f923 |
|
BLAKE2b-256 | 3174cf5e15c5c010756299816a3a02bda4930967dbff07b70c4bef294099e683 |
Hashes for ccdexplorer_schema_parser-0.1.10-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa6a545deaf81c3c4939bb6414ec4b1ee99d957fe54cad5bcf53c93903604afc |
|
MD5 | fffc0c404d22e4d144196dac4bb0ed29 |
|
BLAKE2b-256 | e2fe7af07553fe818000ca0f293f429678eeb7c06b98cf3c9b99a7234881f5a0 |
Hashes for ccdexplorer_schema_parser-0.1.10-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ab697e1ed4dc193d69505947d95887165a3a3dfcd68179872e59497b027c8e7 |
|
MD5 | 8b54d0e3848e1b9fbaefdd9f5ce1ed48 |
|
BLAKE2b-256 | 42dd353d2dac783a7666984f61330b02d0f46cfaac856dc684b459f27abedba2 |
Hashes for ccdexplorer_schema_parser-0.1.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acb951b47fdfa3a3cb76819c4498494b3ec8b82fb2dba8d292df6ea6c797fbff |
|
MD5 | dffbd2f6819e7a424ae83d7b49ddc777 |
|
BLAKE2b-256 | f8dc922004fdbf39f3729474b949b2c6a36303db198052befa51852b5e8a9d2f |
Hashes for ccdexplorer_schema_parser-0.1.10-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1828f27d46b08bcb3a2b21edbc950e1b6fdc12a6951a22bba0ca0f2f26bfa9f6 |
|
MD5 | b37b3a2c6cd8c1ba094f5643d5249edb |
|
BLAKE2b-256 | b9687dffbcad10b08b5b158006dbbac1975912f28f38112760dc5bf99e70796b |