mirror of
https://github.com/vacp2p/rln-interep-contract.git
synced 2025-02-28 22:20:42 +00:00
feat(poseidon): add hash test for random value
This commit is contained in:
parent
20d98afcda
commit
8a70eb7c28
@ -0,0 +1,21 @@
|
|||||||
|
import { expect } from "chai";
|
||||||
|
import { ethers } from "hardhat";
|
||||||
|
|
||||||
|
describe("Rln", function () {
|
||||||
|
it("Deploying", async function () {
|
||||||
|
const PoseidonHasher = await ethers.getContractFactory("PoseidonHasher");
|
||||||
|
const poseidonHasher = await PoseidonHasher.deploy();
|
||||||
|
|
||||||
|
await poseidonHasher.deployed();
|
||||||
|
|
||||||
|
console.log("PoseidonHasher deployed to:", poseidonHasher.address);
|
||||||
|
|
||||||
|
// We test hashing for a random number
|
||||||
|
const hash = await poseidonHasher.hash("19014214495641488759237505126948346942972912379615652741039992445865937985820");
|
||||||
|
|
||||||
|
console.log("Hash:", hash);
|
||||||
|
|
||||||
|
//Expect 0x0c3ac305f6a4fe9bfeb3eba978bc876e2a99208b8b56c80160cfb54ba8f02368
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user