Skip to content

Commit 2aed0e0

Browse files
committed
fix: keeping the linter happy
1 parent f007411 commit 2aed0e0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

subgraph-fastbridge/src/FastBridgeSender.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function handleBatchOutgoing(event: BatchOutgoing): void {
6363
const batchSize = event.params.batchSize;
6464
const currentBatchID = event.params.batchID;
6565

66-
let batch = new Batch(currentBatchID.toString());
66+
const batch = new Batch(currentBatchID.toString());
6767

6868
batch.epochFinal = epochFinal;
6969
batch.batchSize = batchSize;
@@ -87,8 +87,8 @@ export function handleBatchOutgoing(event: BatchOutgoing): void {
8787

8888
// PROOF
8989
for (let idx = 0; idx < layerZero.length; idx++) {
90-
let proof: ByteArray[] = [];
91-
let _proof = new Proof(currentBatchID.toString() + "," + idx.toString());
90+
const proof: ByteArray[] = [];
91+
const _proof = new Proof(currentBatchID.toString() + "," + idx.toString());
9292
let _idx = idx;
9393
for (let i = 0; i < layers.length; i++) {
9494
const pairIdx = idx % 2 === 0 ? idx + 1 : idx - 1;
@@ -109,7 +109,7 @@ export function handleBatchOutgoing(event: BatchOutgoing): void {
109109
}
110110

111111
function Flatten(a: ByteArray[]): ByteArray {
112-
let out = new ByteArray(32 * a.length);
112+
const out = new ByteArray(32 * a.length);
113113
for (let i = 0; i < a.length; i++) out.set(a[i], i * 32);
114114
return out;
115115
}
@@ -118,7 +118,7 @@ function getNextLayer(elements: ByteArray[]): ByteArray[] {
118118
return elements.reduce((layer, el, idx, arr) => {
119119
if (idx % 2 === 0) {
120120
// Hash the current element with its pair element
121-
if (idx == arr.length - 1) {
121+
if (idx === arr.length - 1) {
122122
layer.push(el);
123123
} else {
124124
layer.push(crypto.keccak256(concatAndSortByteArrays(el, arr[idx + 1])));
@@ -130,13 +130,13 @@ function getNextLayer(elements: ByteArray[]): ByteArray[] {
130130
}
131131

132132
function firstSlotReverse(a: ByteArray): ByteArray {
133-
let out = new ByteArray(32);
133+
const out = new ByteArray(32);
134134
for (let i = 0; i < 32; i++) out[i] = a[31 - i];
135135
return out;
136136
}
137137

138138
function getAddress(input: ByteArray, offset: i32): ByteArray {
139-
let out = new ByteArray(20);
139+
const out = new ByteArray(20);
140140
for (let i = 0; i < 20; i++) out[i] = input[i + offset];
141141
return out;
142142
}

0 commit comments

Comments
 (0)