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 {
31
31
* @return node The `sha3` (A.K.A. `keccak256`) hash of `first, ...params` as a 32-byte hex string.
32
32
*/
33
33
public static makeLeafNode ( data : string ) : string {
34
- const result = ethers . utils . sha256 ( data ) ;
34
+ const result = ethers . utils . keccak256 ( data ) ;
35
35
36
36
if ( ! result ) {
37
37
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 () {
61
61
} ) ;
62
62
it ( "Should correctly verify all nodes in the tree" , async ( ) => {
63
63
for ( var message of data ) {
64
- const leaf = ethers . utils . sha256 ( message ) ;
64
+ const leaf = ethers . utils . keccak256 ( message ) ;
65
65
proof = mt . getHexProof ( leaf ) ;
66
66
const validation = await merkleProof . validateProof ( proof , message , rootOnChain ) ;
67
67
expect ( validation ) . equal ( true ) ;
You can’t perform that action at this time.
0 commit comments