Skip to content

Commit ffa85e4

Browse files
committed
fix: backport Tag.random() to fix log_service.test.ts build
1 parent bb59b1d commit ffa85e4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • yarn-project/stdlib/src/logs

yarn-project/stdlib/src/logs/tag.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { poseidon2Hash } from '@aztec/foundation/crypto/poseidon';
2-
import type { Fr } from '@aztec/foundation/curves/bn254';
2+
import { Fr } from '@aztec/foundation/curves/bn254';
33
import type { ZodFor } from '@aztec/foundation/schemas';
44

55
import { schemas } from '../schemas/schemas.js';
@@ -36,6 +36,10 @@ export class Tag {
3636
return this.value.equals(other.value);
3737
}
3838

39+
static random(): Tag {
40+
return new Tag(Fr.random());
41+
}
42+
3943
static get schema(): ZodFor<Tag> {
4044
return schemas.Fr.transform((fr: Fr) => new Tag(fr));
4145
}

0 commit comments

Comments
 (0)