Skip to content

Commit 6150895

Browse files
authored
Merge pull request #826 from EYBlockchain/ilyas/small-fixes
Small changes to Poseidon Sol
2 parents 7056824 + 582ba73 commit 6150895

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎common-files/utils/crypto/merkle-tree/utils.mjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ function shaHash(...items) {
182182
function poseidonHash(...items) {
183183
const inputs = items.map(i => generalise(i));
184184
const hash = poseidonHashFunction(inputs);
185-
console.log('--------------------------------------------');
186-
return `0x${hash.hex().slice(2).padStart(64, '0')}`;
185+
return hash.hex(32);
187186
}
188187

189188
function concatenateThenHash(hashType, ...items) {

‎nightfall-deployer/contracts/Poseidon.sol

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: CC0-1.0
2+
// This is adapted from https://.com/Loopring/
3+
// but converted for our specific 2-input hash variety
4+
// We are grateful for the work done by Loopring.
15
pragma solidity ^0.8.0;
26

37
library Poseidon

0 commit comments

Comments
 (0)