Skip to content

Commit 2a374cf

Browse files
committed
refactor(Add.ts): remove redundant init and update methods from Add class to improve code readability and maintainability
1 parent 113fadf commit 2a374cf

File tree

1 file changed

+0
-11
lines changed
  • templates/project-ts/src

1 file changed

+0
-11
lines changed

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

-11
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,6 @@ export class Add extends SmartContract {
1414
@state(Field) num = State<Field>();
1515
@state(Field) zkProgramNum = State<Field>();
1616

17-
init() {
18-
super.init();
19-
this.num.set(Field(1));
20-
}
21-
22-
@method async update() {
23-
const currentState = this.num.getAndRequireEquals();
24-
const newState = currentState.add(2);
25-
this.num.set(newState);
26-
}
27-
2817
@method async settleAddProgramState(proof: AddProgramProof) {
2918
proof.verify();
3019
const addProgramState = proof.publicOutput;

0 commit comments

Comments
 (0)