Skip to content

Commit

Permalink
fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
krlosMata committed Jul 31, 2024
1 parent 262faa9 commit 3f3b029
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/pessimistic-utils.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const ethers = require('ethers');

const VerifierType = {
StateTransition: 0,
Pessimistic: 1
}
Pessimistic: 1,
};

const ConsensusTypes = {
Ecdsa: 0
}
Ecdsa: 0,
};

/**
* Compute input for SNARK circuit: sha256(
Expand All @@ -26,18 +28,18 @@ function computeInputPessimisticBytes(
selectedGlobalExitRoot,
consensusHash,
newLocalExitRoot,
newPessimisticRoot
newPessimisticRoot,
) {
return ethers.solidityPacked(
["bytes32", "bytes32", "bytes32", "bytes32", "bytes32", "bytes32"],
['bytes32', 'bytes32', 'bytes32', 'bytes32', 'bytes32', 'bytes32'],
[
lastLocalExitRoot,
lastPessimisticRoot,
selectedGlobalExitRoot,
consensusHash,
newLocalExitRoot,
newPessimisticRoot,
]
],
);
}

Expand All @@ -47,12 +49,12 @@ function computeInputPessimisticBytes(
* @returns consensus hash
*/
function computeConsensusHashEcdsa(address) {
return ethers.solidityPackedKeccak256(["uint32", "address"], [ConsensusTypes.Ecdsa, address]);
return ethers.solidityPackedKeccak256(['uint32', 'address'], [ConsensusTypes.Ecdsa, address]);
}

module.exports = {
VerifierType,
ConsensusTypes,
computeInputPessimisticBytes,
computeConsensusHashEcdsa,
};
};

0 comments on commit 3f3b029

Please sign in to comment.