We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4add446 commit 6f4eff9Copy full SHA for 6f4eff9
scripts/shared/rateFeedUtils.ts
@@ -9,7 +9,7 @@ export function toRateFeedId(rateFeed: string): string {
9
const hashAsBigInt = BigInt(hashedBytes);
10
11
// 3. Mask to 160 bits (equivalent to uint160)
12
- const maskedToUint160 = hashAsBigInt & ((1n << 160n) - 1n);
+ const maskedToUint160 = hashAsBigInt & ((BigInt(1) << BigInt(160)) - BigInt(1));
13
14
// 4. Convert to address (hex string)
15
const addressHex = "0x" + maskedToUint160.toString(16).padStart(40, "0");
0 commit comments