From 0f5c58cd028c8b0b6ac02225e40fa6a45de624f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szynwelski?= Date: Tue, 7 Nov 2023 17:40:22 +0100 Subject: [PATCH] Code review fixes --- src/legacy/smartweave-global.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/legacy/smartweave-global.ts b/src/legacy/smartweave-global.ts index d187661..bf25c6f 100644 --- a/src/legacy/smartweave-global.ts +++ b/src/legacy/smartweave-global.ts @@ -6,6 +6,7 @@ import { CacheKey, SortKeyCache } from '../cache/SortKeyCache'; import { SortKeyCacheRangeOptions } from '../cache/SortKeyCacheRangeOptions'; import { InteractionState } from '../contract/states/InteractionState'; import { safeGet } from '../utils/utils'; +import { Buffer } from 'warp-isomorphic'; /** * @@ -266,6 +267,9 @@ export class SWBlock { } } +/** + * @deprecated VRF mechanism will not be used after the decentralized sequencer is launched + */ export class SWVrf { constructor(private readonly smartWeaveGlobal: SmartWeaveGlobal) {} @@ -278,7 +282,9 @@ export class SWVrf { return this.smartWeaveGlobal._activeTx.vrf.bigint; } - // returns a random value in a range from 1 to maxValue + /** + * @deprecated use SmartWeave.randomNumber function instead + */ randomInt(maxValue: number): number { if (this.smartWeaveGlobal._activeTx?.random) { return this.smartWeaveGlobal.randomNumber(maxValue);