Privacy smart contract coding

Can I specify separate privacy or public function when writing a smart contract? Similar to Aleo, where privacy is executed locally to generate proofs and public data is stored on the chain. The privacy and public functions need to be declared separately.

21 Likes

Yes you can!

You are correct, private functions are executed locally, whereas public functions are executed by the sequencer. You can see an in depth example of how public and private functions are defined together in the same contract in this example contract tutorial.

23 Likes

What specific security measures do Aztec developers implement to ensure the safety of smart contracts handling sensitive data? Are there specialized auditing tools designed for private contracts within the Aztec ecosystem?

1 Like

We are still aligning on community standards and best practices for writing contracts and handling sensitive user information as the protocol is still under active development. We don’t yet have any specialized auditing tools designed for Aztec contracts. If you (or anyone else reading this) are interesting in helping develop tools or resources along these lines definitely let me know!