File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
contracts/test/bridge/merkle Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export class MerkleTree {
3131 * @return node The `sha3` (A.K.A. `keccak256`) hash of `first, ...params` as a 32-byte hex string.
3232 */
3333 public static makeLeafNode ( data : string ) : string {
34- const result = ethers . utils . sha256 ( data ) ;
34+ const result = ethers . utils . keccak256 ( data ) ;
3535
3636 if ( ! result ) {
3737 throw new Error ( "Leaf node must not be empty" ) ;
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ describe("Merkle", function () {
6161 } ) ;
6262 it ( "Should correctly verify all nodes in the tree" , async ( ) => {
6363 for ( var message of data ) {
64- const leaf = ethers . utils . sha256 ( message ) ;
64+ const leaf = ethers . utils . keccak256 ( message ) ;
6565 proof = mt . getHexProof ( leaf ) ;
6666 const validation = await merkleProof . validateProof ( proof , message , rootOnChain ) ;
6767 expect ( validation ) . equal ( true ) ;
You can’t perform that action at this time.
0 commit comments