-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f339e1
commit 5e2c311
Showing
7 changed files
with
80 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
import { Field, method, PublicKey } from 'o1js'; | ||
import { Field, method } from 'o1js'; | ||
import { CommitValue, RandomManager } from '../../Random/RandomManager'; | ||
|
||
export class MockedRandomManager extends RandomManager { | ||
public checkPermission(address: PublicKey) {} | ||
} | ||
@method async mockReceiveZkonResponse(randomValue: Field) { | ||
this.curRandomValue.set(randomValue); | ||
} | ||
|
||
@method override async commitValue(commitValue: CommitValue) { | ||
this.permissionCheck(); | ||
|
||
// this.checkRoundPass(); | ||
|
||
const currentCommit = this.commit.getAndRequireEquals(); | ||
currentCommit.assertEquals(Field(0), 'Already committed'); | ||
|
||
this.commit.set(commitValue.hash()); | ||
|
||
// await this.callZkon(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.