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.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 718c99809fa5016476d33b624bd87957dc0271c5cde82256e36eb4fd7cdf0d07 |
|
MD5 | 0a1cf806367814fbb9c029d3ce15a20f |
|
BLAKE2b-256 | 4be2a0a3d03f15fbe8923e21ca7efd10cd59a4d45c6a04e05148cb046310b428 |
Hashes for ccdexplorer_schema_parser-0.1.12-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b501774a49487acc100b4bac0348ef0d8cc3b958311953baf898a8155b87eff |
|
MD5 | 876f9d8d14ebfe6463aef01d1d7e809d |
|
BLAKE2b-256 | 5c48053384baea8becddadb2d86e00febfe64a6ba3eb4ed52dfcd81808d0a736 |
Hashes for ccdexplorer_schema_parser-0.1.12-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ea146335c93ac1513610ca771b644a9f9b18ab8e091f66c778ddf3eb7cdf1e3 |
|
MD5 | e4fc88c74955083ddc0305252c214763 |
|
BLAKE2b-256 | 06d7d27016435553d89016610fbdfcff479e6d077dc0c84e031fee176a6680e9 |
Hashes for ccdexplorer_schema_parser-0.1.12-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4b935af62569c6e2d6b0943f1c3eeeacb6fd012297e170e6c3d55c3dcd4ff3f |
|
MD5 | 2ef250d23789e4ec71d12f00f47bdd7b |
|
BLAKE2b-256 | 86ffec6e98e7856498978cf69853251d693c7c6f7e247e4833442b18e421fc35 |
Hashes for ccdexplorer_schema_parser-0.1.12-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c532dde5e732d57be5294f74abcd257f853d673c9b59cdbf7ff74d1cf9e545d |
|
MD5 | 9e9c26be695355c533543a5af3111f07 |
|
BLAKE2b-256 | 14b175b20751bcdb4b1ae15ad84f1232b0cad7ee388137a59cfc56db7c628344 |
Hashes for ccdexplorer_schema_parser-0.1.12-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1e5b4b0845d06f070acd73c908f5a459f79602cd117b1a0c0f09af2085c5ba6 |
|
MD5 | a139cf4d3828b3a6ef84c4e0cb6bb066 |
|
BLAKE2b-256 | 1684b90a873b1a5348c28038f864e55862a03a52ac7cdf093180186bfff44692 |
Hashes for ccdexplorer_schema_parser-0.1.12-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba7acee6f98db98d844dd6260d6a3a700a52678cfbc94f72a1c55a462bd84c18 |
|
MD5 | 991d0f039e7a802d63811a7827a6d786 |
|
BLAKE2b-256 | b99ab12781fca7b211787a97e801751e4da3cebc5ac073dfd592f6d72230a967 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 337d2613d642b420052fc8992885eca9a11f670d6f065da0259aafdc774073d6 |
|
MD5 | 34eccf2d3405ec9aadcee77f8ccd5c09 |
|
BLAKE2b-256 | 9a415a18ecda12fbaf27fbe82af0aeac11a55224de0c365d1ab1dd91954eee2d |
Hashes for ccdexplorer_schema_parser-0.1.12-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78fa91970216f8990bff4297325fadeb5dc4ed98c7749db2475ba12a51eb3b09 |
|
MD5 | 29cd45a7bb68abc4a0d51432c471a33d |
|
BLAKE2b-256 | 0859269b066f04c81e5662cd840596d4c582bae56ac1a9c553d9889bc2486043 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccf932212615c72a6a862f8ff1da41665494933cca252a615a0f4f410031a8bf |
|
MD5 | 634d2e6831cf670cdf93a61da4e22890 |
|
BLAKE2b-256 | 4e03d6c2835bc1b09b197e0823e857e68740df138960ef5600c0429c10cc9e08 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 619f50b3f9fd9715b01893625e5618b4a41279bc89d4a60231f3d646d1b4132b |
|
MD5 | 88d475bc8841f381da07c891648408b1 |
|
BLAKE2b-256 | 0ef45e40fd7b2cd4e24918e6815bf38550f038bc0ea084a5c6df0e555462be0c |
Hashes for ccdexplorer_schema_parser-0.1.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62bf2fe12df2ef73500774c6e59fda851d1b4b2ee156716aba362c2852c39857 |
|
MD5 | d386c928a61e588ac448dc65df05e8e1 |
|
BLAKE2b-256 | 27ccef2143ea1b595ef52f3969bbaf6d764e446e698c49f3e29d3b248560e435 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45bef983ad8bfb30552768ac5787fa3c4e770a271f7a28f77e833f9f743953e2 |
|
MD5 | 3c9c8cd03d412b18608966732352b2d7 |
|
BLAKE2b-256 | 6eefd40f30ea887a05cd37303c354f6a23621bf06950efa5a9cbb3e8c686a1fd |
Hashes for ccdexplorer_schema_parser-0.1.12-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64bf1e9516afe7af6a78a27a3cba622334bb33f068f56224c4aa14904e99460b |
|
MD5 | 30bd7747c340f6fbf4f8b1546a310281 |
|
BLAKE2b-256 | 0085aeb628ef45da6c56f8cb7d582cf8f840305c6cf0311267101cac23da012f |
Hashes for ccdexplorer_schema_parser-0.1.12-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d81d6949d867f0de6e2165a56080aab69db5dfdd6540bec71a58f584d8e56bd2 |
|
MD5 | 77190e81bc3d4e4410cc555aa0088cd9 |
|
BLAKE2b-256 | d4fd0e19a5f96baeb69b65663e788758488e821ea575110037e21bd98ad787d2 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59aa31759d679f235d92b3ea56f25f9cda323eb59d2f28cc5cb88373cce982c6 |
|
MD5 | a2b46f82f4b3516f0d926b85ad20d6c2 |
|
BLAKE2b-256 | 3058daeb236e1e5ecdf8b9372f4ea11e81d95a27b8f335c921b79e0584994078 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 664beefeb92271abdbaa5d23a4e49ef363e6356b5b186b6c4ae886c89094b117 |
|
MD5 | 78da11db1c3f335aa4f681958f1822c6 |
|
BLAKE2b-256 | f77b96646fc349577725c54819fd3182d6337092ebd880cb705e5011e8b6f0c2 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81c5f2fc9df241f1053f9744ac1d8bb5de286764a950925c0debc32a78791968 |
|
MD5 | 4cb25943cccaf18ea61b013f1cdcf8bd |
|
BLAKE2b-256 | f7f213e77c997218fbe083fc69f7ba39646ae2d579d42ab48d740397a09002b3 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7772e56a4a6b4942aba1adc2dbe4f6e904d365e7e1743471e8cfbee758c4b3dc |
|
MD5 | 26b57560624eab2fb34badec515eaa33 |
|
BLAKE2b-256 | e338535d6198f925192f3f74abe079e730d58178ea6192d02cc59b95f182a777 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a357e7b3c8afd1736afb6beddb3a4f64735404b4029730a446c7061ee5c55e8 |
|
MD5 | b5b00050216a6e87bfff17158135dbf6 |
|
BLAKE2b-256 | 79a64c1e165d71dfeb331c8638e286115b566d506909df87e7b7faad94cf6043 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 964f3b00ba13a30a33457d83fb3240580b01f52b5ff21956eba51725de6fd380 |
|
MD5 | a240d448587feca3dc5f14b298b9dc32 |
|
BLAKE2b-256 | 353008d654a739801f6bb62e6cd5c0c4636d0b9ff1f4d45493ab318a4bb80323 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04c486c7a21225ba897ef5ab053eeb48cefd4dc2bf3a91b79f8d102f0c002fc3 |
|
MD5 | 166c1ec65240e867079c05de288c4e0f |
|
BLAKE2b-256 | e76dacb5d3c9317349ca60b046a9a73cee3b2d45dd008ac62db7546d085da601 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edecbab3095e2763518848c60596c9aacffb538339b6167a8c283acdb5f5ecc1 |
|
MD5 | e1fe16d0a3fb12b67727ef7b30a26cc9 |
|
BLAKE2b-256 | 4bb3d203d1c354aa00f8471a44411808656a05bb832b649d99853326f87b2136 |
Hashes for ccdexplorer_schema_parser-0.1.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df047ef1fd5a87c93f5f6ef1eb4d8e28eccd8660c3f43eb8a9257d6673e0a391 |
|
MD5 | 781529b858072788796a701143d7967d |
|
BLAKE2b-256 | bcab1db2db881c0138b698fd73b1a7aa5d3073cfe94d96824da8c1f1052acd5f |
Hashes for ccdexplorer_schema_parser-0.1.12-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d850b442d6ea58adf57e027f153b07026b0297adaaefe6c02813bc872af34803 |
|
MD5 | f5d727e71b75757be9627bc44e62f4fd |
|
BLAKE2b-256 | 41a928abaf0331813c214c646056bd256580419d8248e8b59f213f50f3fbcac0 |