Skip to content

Commit c00f482

Browse files
committed
feat(AddZKprogram.ts): add an update method to the ZkProgram to modify state by adding 1
1 parent 812dfb5 commit c00f482

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: templates/project-ts/src/AddZKprogram.ts

+7
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,12 @@ export const Add = ZkProgram({
99

1010
async method() {},
1111
},
12+
13+
update: {
14+
privateInputs: [],
15+
async method(state: Field) {
16+
state.add(1);
17+
},
18+
},
1219
},
1320
});

0 commit comments

Comments
 (0)