I am MAC!, or Mina Arbitrated Contracts if you want to be formal. I am an zkApp that makes zkApps (yes, really!).
The best part is you do not even need to know how to code! Go visit https://mac.sqrtxx.com/ to read more about me and try me!
Install the dependencies for the smart contract, from the root of this repo run
cd contractsthen install the dependencies
npm installand build it
npm run buildgenerate the cache
npx tsx scripts/gencompilecache.ts( re-run it few times to see how the compile time improves with the cache )
and copy the cache to speed-up the compilation in the UI
cd ../
sh copy_cache_ui.shpack it to be imported from the UI
npm packit should create a file mac-contracts-0.3.0.tgz under same directory. Note the directory path and filename.
now to prepare the UI of the MAC! app, from same directory run
cd uito change the UI directory, now update the package.json and set the pack of maccon to the path of mac-contracts-0.3.0.tzg you built in the last step, then install the dependencies
npm installand run the app locally
npm run devcd ui/
npm run build
npm run exportIf you notice problems connecting to the network via the frontend you can double check possibility to connect via command line as follows
npx tsx contracts/scripts/networkcheck.ts example output
testing https://proxy.testworld.minaexplorer.com/graphql
successfully set active instance
failed to fetch last block
testing https://proxy.berkeley.minaexplorer.com/graphql
successfully set active instance
blockchain length 37605
check the address
npx tsx contracts/scripts/accountcheck.ts https://proxy.berkeley.minaexplorer.com/graphql B62qkThtJWtKXN56efqC4ZXqv5NMD3mvjoVg5GpLLHRv9b3z2uMrkN4example output
{
account: {
publicKey: PublicKey { x: [Field], isOdd: [Bool] },
tokenId: Field { value: [Array] },
tokenSymbol: '',
balance: UInt64 { value: [Field] },
nonce: UInt32 { value: [Field] },
receiptChainHash: Field { value: [Array] },
delegate: PublicKey { x: [Field], isOdd: [Bool] },
votingFor: Field { value: [Array] },
timing: {
isTimed: [Bool],
initialMinimumBalance: [UInt64],
cliffTime: [UInt32],
cliffAmount: [UInt64],
vestingPeriod: [UInt32],
vestingIncrement: [UInt64]
},
permissions: {
editState: [Object],
access: [Object],
send: [Object],
receive: [Object],
setDelegate: [Object],
setPermissions: [Object],
setVerificationKey: [Object],
setZkappUri: [Object],
editActionState: [Object],
setTokenSymbol: [Object],
incrementNonce: [Object],
setVotingFor: [Object],
setTiming: [Object]
},
zkapp: undefined
},
error: undefined
}