@mazito/zkapp-contracts-add
v0.1.0
Published
A MINA zkApp example contract which adds 2 to the current state.
Downloads
1
Maintainers
Readme
MINA zkApp Add example contract
A MINA Protocol zkApp example contract which adds 2 to the current state.
This template uses TypeScript
and Node 18+
.
Built with SnarkyJS 0.10
so may not work with different Snarky versions.
Install
npm install @mazito/zkapp-contracts-add
Use
Please see: MINA Docs / How to Write a zkApp UI
Loading at app initialization:
import { Add } from "@mazito/zkapp-contracts-add";
Dynamic loading your contract with React:
useEffect(() => {
(async () => {
const { YourSmartContract } = await import('your-package-name');
})();
}, []);
Dynamic loading your contract with Svelte
onMount(async () => {
const { YourSmartContract } = await import('your-package-name');
});
Dynamic loading your contract with Vue
onMounted(async () => {
const { YourSmartContract } = await import('your-package-name');
});