Skip to content

Smart Contract

Xane has a smart contract that allows verifying proofs and storing the hash of its state on Mina.

Users of Xane will interact with Xane’s client using methods.

The smart contract of Xane resides in this file.

Contract’s State

There only is a single state called rollupStateHash which represents the hash of Xane’s state.

rollupStateHash

It represents the hash of Xane’s state on Mina blockchain.

By storing it, it is possible to verify that the last updated rollup state is valid.

Contract’s Methods

There only is a single method called updateStateHash which updates the hash of Xane’s state.

updateStateHash

It takes a proof generated by the zk program of Xane as the only parameter.

If the proof is valid, it updates the on-chain rollup state hash using the public output of the proof.