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.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a37b52f3743539a3013cfc651867ac61560b2840350e82a6b36dc17f373703b7 |
|
MD5 | adf10dd59b3e0278f8de66e9a2cedca4 |
|
BLAKE2b-256 | 99a276aefd81d81f4cb798b8fe9f4b1c880a15fc2fe1e996b442b06821aa5b1c |
Hashes for ccdexplorer_schema_parser-0.1.13-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce21394baf7b914a83fadd081f40aa1b9b0fd7d53948ec60fa5445caaef97621 |
|
MD5 | 3eaf027bda0b19c1fb6fb6ff50f3a033 |
|
BLAKE2b-256 | 61108fd1492a3946b96a36e323dd52f3f16664335e613dfa47ed6d210179fd22 |
Hashes for ccdexplorer_schema_parser-0.1.13-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c456d8519404b3c69b66427663bcc19c73a492a1359be4303e7b9095ab19076a |
|
MD5 | 97e975b12b3c8580e1721b0963b0a04d |
|
BLAKE2b-256 | 4bf85ef944d0c05e1e95ed09f862c76e80065a78096b7c1288c98f23d0160dcf |
Hashes for ccdexplorer_schema_parser-0.1.13-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 790d92d00878ba87b3fbf07e8dbc81ea9468c547c8812c1a4e76a096679f2af0 |
|
MD5 | f1827c7fa377bcbdf992eb75ab00fc10 |
|
BLAKE2b-256 | fa7bef0d13f872f0609fe2785386a654b87814aabcda4e6073c5f6f7252d2b6c |
Hashes for ccdexplorer_schema_parser-0.1.13-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9081e15a8690875d0f83194c553495dee067977398d965a80aaa189146bc3013 |
|
MD5 | 80e22834b265d29583927fdbe5defa86 |
|
BLAKE2b-256 | 71605ee6a584034feb26f23a517ca4e31f25da95f3b21ee146b66cf6e1ed773f |
Hashes for ccdexplorer_schema_parser-0.1.13-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99f011362d8637fde071c4cede3d2fbffe256ff6a85cb3bf27e9da4502c1e4c5 |
|
MD5 | a9328e0f1d59e12456815d46eb792422 |
|
BLAKE2b-256 | 913ef12d935ed6978400f5905e87bbc973abf754cf8408a39709a7867becb011 |
Hashes for ccdexplorer_schema_parser-0.1.13-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b037fd93c4c5eec82dc630e807b006547fcbf8308f34cb48a3fb1f4158838e5 |
|
MD5 | 84800afee2c058306c938b65a8a1d034 |
|
BLAKE2b-256 | b299cdc4403dad6acaff9ba77a22320b1eefdca3228324f637d3104cb1c018e5 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcb4eac3febce92cc65877fe81ee82337ef5aef609393494a723f15c30b5f424 |
|
MD5 | 1210f1c3948978618b0429e708fa7136 |
|
BLAKE2b-256 | 3824c6e3897ee54c691b2eac80a6791983ec84f29842a25623a41a4cd410908d |
Hashes for ccdexplorer_schema_parser-0.1.13-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3819bc12a6216eb3bf628d3eecab80acfb3301bbe2f92c7587cdb710f0b2e65c |
|
MD5 | 91971f1ab8b8df0d39eeb3f2de603988 |
|
BLAKE2b-256 | e28009bb899428edfec7badaf7c97b24b3da9a7e9d3fcd74e5d099a62832a453 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9306ceacff248bfc2da9ec755a36a9ba771ad0489f1ec76a590b173d80e3c8a8 |
|
MD5 | 49dacf187d33e0d5621ae3b101f80587 |
|
BLAKE2b-256 | 218a416fcab657002323027c9b4922760c52e8ce858119084a8ace2da00deabe |
Hashes for ccdexplorer_schema_parser-0.1.13-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bfb906d5cc56e07b039b44bd84b01ce00477c7fb6eb2712881a35613b1a4eed |
|
MD5 | 90a49b4c1a8a7cb2bc3010cca4d04596 |
|
BLAKE2b-256 | 28db3c0fea037117130519df9111685e95330c6d9820ab9f32e8f62da0ae46ee |
Hashes for ccdexplorer_schema_parser-0.1.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ae213feadbdd9eb9389b029ba8e0350e4d57e102fd9f85bb7ac5085c66a052b |
|
MD5 | bd70302c8b02d2da5e4039cd1a477f89 |
|
BLAKE2b-256 | 8ed4e7303ff9ca94b202b9df5ae1077a3208cd061dc77c3ea9a0f4de3a9a69e3 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88323e54139c724d173132c4caec3e28dfc83aefe2a4225b9f8a3e64abd2e81b |
|
MD5 | 0de989726969caa9489bcca67cd5768c |
|
BLAKE2b-256 | 514378d790fc09958b25667ee7aab8d1a4a854505ddcafe9408c31a59805b0eb |
Hashes for ccdexplorer_schema_parser-0.1.13-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0690b1691ed7160655de98b3197ee7ae7f2af4ee1114a23bee6ec6c62062bc20 |
|
MD5 | 308877eb8ac7e1ecee6d50489c134ccb |
|
BLAKE2b-256 | 4c44bc8732063b9f4ff2f835e5cd4ef5d6ec4850ac83918c0c8adcb11dfbf646 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb15235d6d9267811027cbf1072c2bf2514b2f5f54433c3588d1b77fd009df6b |
|
MD5 | c78d1c3a85ea5c1264956aba6b06d4e8 |
|
BLAKE2b-256 | fe3252ee83114a7f72c40f632cfba829bae1425baafb8c58d3c9dec258039245 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f5b6fef98629bb67d2b7e8c6b869470dddfadd75d5e52be4998900bc243465e |
|
MD5 | afcd592ed69fd00c67eb8010023d2a82 |
|
BLAKE2b-256 | aa84485c6e1b9e0119175abe0eb1cae9de812566730d81b2a50a76fc5bc0c4f6 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7e72f3d81dd5a80f827062e5217f2114ea828dcaeb1a0e0b2808b47feb7282f |
|
MD5 | 71fc30351f22108c27edcf0ba6aa0e6d |
|
BLAKE2b-256 | 30dbd511eb100168bc4259e543d254516799a628572aaaca5f89ecc1f081fa7c |
Hashes for ccdexplorer_schema_parser-0.1.13-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f7171ebd26d0e5d9c073e1259b0261e70dff6bbc22d2296cb3935952bf43a33 |
|
MD5 | 716d3a0e7925c1de912b3e4e39bc1fd5 |
|
BLAKE2b-256 | 2e10250538075f5face8ba30294aa79a2a75cb0910721e4738636fd73bc2d902 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7a0a61f8e86725f2863cac1754e146d3a4a80906137df01d797043ce0d1a994 |
|
MD5 | 5da62e1353c0df0e674124076abbfca7 |
|
BLAKE2b-256 | 7530c52ab2ae2fcf10d61e89f8d81fb4a00bc4f63b13c215d77f03ab5bbbbc95 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74c3ad3f928ba4a83bf0ef1de466e10cb6bed94bcdc9e20bf5e23ab31267905d |
|
MD5 | 7c99960d00a09ef81b49e3554a40324c |
|
BLAKE2b-256 | 73dee0da47fa9858abdb626d17e5bb7eff415a3b4cfc19a6c63789e6d9f923d8 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9301d6276efcf344acc34dde1f2501cc3d0fe70b6b41ef34414dd1189765cd3a |
|
MD5 | 00c2e9596c4ef5d5757d280d6c0e6d6a |
|
BLAKE2b-256 | d4885b177552e9a9a8e2bd26c58f8ad6f3cc48c4fd57c54921418a4e6bdb13a1 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4ec621c2c947483e6487290fe835f6e3cb31e10c99096b6e5dbfd1c99202386 |
|
MD5 | c5c838238f5c035a7819f142ffb6e5e6 |
|
BLAKE2b-256 | 491a1aed7c82857d9d2678fdaf64395b34fa0412d6da021706b6e55cfe0e6dc6 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85cad5175366b9bd528d1ba23b449421b40462214a19a24e46ddc5457b7646d7 |
|
MD5 | bd95bebb9e1d763be7bc6b1baa3ecb66 |
|
BLAKE2b-256 | 0f0ac4f7f1b40c6ea405c5d22d6ae1b3480a4d5c98aeec59b49db2fd29520ab0 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 482d4005b4cd9d1b66b993027096d80f30a012ed64ac5e69d871f2db99fadcb3 |
|
MD5 | e8f24f3ee01cbd029748d51020735954 |
|
BLAKE2b-256 | 3ae627866885f498845051486fc99090b13800cb14e028407f2e11c0e8d6c9b7 |
Hashes for ccdexplorer_schema_parser-0.1.13-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5866188d7f3ca43c0e908b3c8b67ab30e9c6660a420d3494f8653496d280e0d8 |
|
MD5 | 4f24d0c907af104a07aa098e2b99f479 |
|
BLAKE2b-256 | fcd90bc03eef1e558a27010970f67c6078738c5e0ad5b8d4ea14f167d19114ab |