Add SmartContracts test flow with 3 deposits

This commit is contained in:
arnaucube
2020-05-17 17:59:21 +02:00
parent c3b5165006
commit 4b2a229bd9
5 changed files with 198 additions and 164 deletions

View File

@@ -35,6 +35,7 @@ template Deposit(nLevels) {
signal input amount;
signal private input secret;
signal private input nullifier;
signal private input oldKey;
signal private input siblingsOld[nLevels];
signal private input siblingsNew[nLevels];
signal input rootOld;
@@ -61,7 +62,8 @@ template Deposit(nLevels) {
for (var i=0; i<nLevels; i++) {
smtOld.siblings[i] <== siblingsOld[i];
}
smtOld.oldKey <== 1;
/* smtOld.oldKey <== 1; */
smtOld.oldKey <== oldKey;
smtOld.oldValue <== 0;
smtOld.isOld0 <== 0;
smtOld.key <== hash.out;