Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
feat(acvm): add eth_contract_from_vk to `SmartContract (#113)
Browse files Browse the repository at this point in the history
feat(acvm)!: add `eth_contract_from_vk` to `SmartContract

chore: deprecate `eth_contract_from_cs`

chore: re-add note on multiple platforms
  • Loading branch information
TomAFrench authored Feb 22, 2023
1 parent 39b8a41 commit 373c18f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions acvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,7 @@ pub trait PartialWitnessGenerator {
}

pub trait SmartContract {
// Takes a verification key and produces a smart contract
// The platform indicator allows a backend to support multiple smart contract platforms
//
// fn verification_key(&self, platform: u8, vk: &[u8]) -> &[u8] {
// todo!("currently the backend is not configured to use this.")
// }
// TODO: Allow a backend to support multiple smart contract platforms

/// Takes an ACIR circuit, the number of witnesses and the number of public inputs
/// Then returns an Ethereum smart contract
Expand All @@ -129,7 +124,11 @@ pub trait SmartContract {
/// This deprecation may happen in two stages:
/// The first stage will remove `num_witnesses` and `num_public_inputs` parameters.
/// If we cannot avoid `num_witnesses`, it can be added into the Circuit struct.
#[deprecated]
fn eth_contract_from_cs(&self, circuit: Circuit) -> String;

/// Returns an Ethereum smart contract to verify proofs against a given verification key.
fn eth_contract_from_vk(&self, verification_key: &[u8]) -> String;
}

pub trait ProofSystemCompiler {
Expand Down

0 comments on commit 373c18f

Please sign in to comment.