mirror of https://github.com/embarklabs/embark.git
c093cf88ea
Remove the `<12.0.0` restriction re: Node.js version in the `"engines"` settings for all the packages in the monorepo that had that restriction. Add missing `"engines"` settings in `packages/plugins/snark/package.json`. Adjust the Azure Pipelines config to include builds for Node.js v12.x and v13.x. Bump `solc` to `0.4.26` in `dapps/tests/app` and `dapps/tests/contracts`. It was discovered that older versions suffered a fatal `Maximum call stack size exceeded` error when run on Windows with Node.js v12.x or newer. Display a warning re: the bad combo (solc version + Windows + Node version) if it's detected at runtime. Adjust the root `yarn.lock` so that the `sha3` transitive dependency resolves to a newer version that is compatible with Node v13.x. |
||
---|---|---|
.. | ||
src | ||
test | ||
.npmrc | ||
CHANGELOG.md | ||
README.md | ||
package.json | ||
tsconfig.json |
README.md
embark-snark
Snark plugin for Embark
Compiles circom circuits and generate solidity proofs in an Embark DApp.
Installation
In your embark dapp directory:
npm install embark-snark --save
Then add embark-snark to the plugins section in embark.json
:
"plugins": {
"embark-snark": {
"circuits": ["app/circuits/**"],
"inputs": {
"multiplier": {
"a": 3,
"b": 11
}
}
}
}
You can defined where your circuits will be and what are the inputs.
Now you can create your first circuits, for example,
app/circuits/multiplier.circom
:
template Multiplier() {
signal private input a;
signal private input b;
signal output c; c <== a*b;
}
component main = Multiplier();
Embark will now compile the circuits and generate a solidity contracts to verify the proof as well as deploy it.
Requirements
- Embark 5.0.0-alpha.0 or later
Visit embark.status.im to get started with Embark.