nacho-rollup-contract
v1.0.0
Published
The rollup smart contract built for Nacho using o1js.
Downloads
20
Maintainers
Readme
nacho-rollup-contract
The rollup smart contract of Nacho built using o1js.
nacho-rollup-contract
package is intended to be used for Nacho only as it is a naive implementation.
📦 Installation
If you are using npm
:
npm install nacho-rollup-contract
If you are using yarn
:
yarn add nacho-rollup-contract
If you are using pnpm
:
pnpm add nacho-rollup-contract
🔍 Details
Nacho's rollup contract extends o1js's SmartContract
by overriding existing init
method and adding a new method called settle
.
The method init
is overridden to initialize the state of the contract as empty root hashes of Merkle trees that hold the rollup's state.
🛠️ Smart Contract Methods
Takes a
ZkProof
as the only parameter and checks if its public input is equal to the settled one, then updates the contract's state accordingly.
📝 License
This project is licensed under the MIT License.
You may use the source code of this project accordingly.
👤 About Me
I am Berzan and I am developing Nacho to express my skills in the real world.
I built this library to use inside Nacho.