11 breaking releases

0.11.0 Dec 9, 2024
0.9.0 Nov 16, 2024
0.1.0 Jul 8, 2024

#14 in #pint

Download history 25/week @ 2024-09-18 25/week @ 2024-09-25 6/week @ 2024-10-02 6/week @ 2024-10-09 218/week @ 2024-10-16 82/week @ 2024-10-23 111/week @ 2024-10-30 119/week @ 2024-11-06 582/week @ 2024-11-13 51/week @ 2024-11-20 10/week @ 2024-11-27 299/week @ 2024-12-04 93/week @ 2024-12-11 11/week @ 2024-12-18 4/week @ 2025-01-01

129 downloads per month
Used in 2 crates (via pint-abi)

Apache-2.0

115KB
2.5K SLoC

Macros for generating items from pint-generated contract ABI JSON.

The entry points for this crate are:

For a given contract, the following items are generated:

  • A mod representing storage.
  • For each predicate, a module with the following:
    • A Vars struct for the predicate's decision variables.

The aim for the generated items is to ease the construction of solutions including the encoding of keys, values and mutations from higher-level types. Items related to simplifying the process of building sets of Mutations and Keys for Solutions and queries.

See the mutations fn to start constructing a set of Mutations.

See the keys fn to start constructing a set of Keys.

The Mutations and Keys impls provides a set of builder methods that allow for writing Mutations and Keys to an inner Vec from higher-level values.

The final Vec<Mutation> or Vec<Key> can be produced using the From<Mutations> or From<Keys> conversion impls.

Dependencies

~3–4.5MB
~80K SLoC