Skip to content

Commit 6f4eff9

Browse files
committed
fix(scripts): breakerBox cmd had issues with native BigInts
1 parent 4add446 commit 6f4eff9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/shared/rateFeedUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function toRateFeedId(rateFeed: string): string {
99
const hashAsBigInt = BigInt(hashedBytes);
1010

1111
// 3. Mask to 160 bits (equivalent to uint160)
12-
const maskedToUint160 = hashAsBigInt & ((1n << 160n) - 1n);
12+
const maskedToUint160 = hashAsBigInt & ((BigInt(1) << BigInt(160)) - BigInt(1));
1313

1414
// 4. Convert to address (hex string)
1515
const addressHex = "0x" + maskedToUint160.toString(16).padStart(40, "0");

0 commit comments

Comments
 (0)