essential-contributions / pint

Pint, the constraint-based programming language for declarative blockchains
Apache License 2.0
14 stars 0 forks source link

Only generate `.json` on successful compile #793

Closed lethalgem closed 1 month ago

lethalgem commented 1 month ago

Closes #704

Will no longer generate a -abi.json unless the contract can be compiled. This means any compilation error during parsing, flattening, and asm-gen will prevent the file from being generated/modified

ex.


--parse error--
predicate test {
    type MyMap = (int => int);
}

--flatten error--
predicate test {
    var x = 2;
    var y: ( int => int );
}

--asm-gen error--
predicate test {
    state x = __storage_get(123);
}