Skip to content

Commit

Permalink
Add new is_unconstrained flag to transpiler
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Mar 7, 2024
1 parent 8da721d commit 0df8ad3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions avm-transpiler/src/transpile_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub struct CompiledAcirContract {
#[derive(Debug, Serialize, Deserialize)]
pub struct AvmContractFunction {
pub name: String,
pub is_unconstrained: bool,
pub custom_attributes: Vec<String>,
pub abi: serde_json::Value,
pub bytecode: String, // base64
Expand All @@ -50,6 +51,7 @@ pub struct AvmContractFunction {
#[derive(Debug, Serialize, Deserialize)]
pub struct AcirContractFunction {
pub name: String,
pub is_unconstrained: bool,
pub custom_attributes: Vec<String>,
pub abi: serde_json::Value,
#[serde(
Expand Down Expand Up @@ -98,6 +100,7 @@ impl From<CompiledAcirContract> for TranspiledContract {
// Push modified function entry to ABI
functions.push(AvmOrAcirContractFunction::Avm(AvmContractFunction {
name: function.name,
is_unconstrained: function.is_unconstrained,
custom_attributes: function.custom_attributes,
abi: function.abi,
bytecode: base64::prelude::BASE64_STANDARD.encode(avm_bytecode),
Expand Down

0 comments on commit 0df8ad3

Please sign in to comment.