6 releases (breaking)
new 0.5.0 | Nov 5, 2024 |
---|---|
0.4.0 | Oct 29, 2024 |
0.3.0 | Oct 16, 2024 |
0.2.0 | Aug 21, 2024 |
0.0.0-release | Jul 8, 2024 |
#11 in #pint
372 downloads per month
Used in pint-abi
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
representingstorage
. - For each
predicate
, a module with the following:- A
Vars
struct for the predicate's decision variables. - A
PubVars
struct for the predicate's public decision variables.
- A
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
Mutation
s and
Key
s for
Solution
s 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 Mutation
s and Key
s 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