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.

8 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.

7 Likes