mirror of
https://github.com/selfxyz/self.git
synced 2026-02-19 02:24:25 -05:00
15 lines
700 B
TypeScript
15 lines
700 B
TypeScript
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";
|
|
import { getCSCAModulusMerkleTree } from "../../../../common/src/utils/csca";
|
|
import { formatRoot } from "../../../../common/src/utils/utils";
|
|
|
|
module.exports = buildModule("UpdateMerkleRoot", (m) => {
|
|
|
|
const registryAddress = "0xBabF700EdE592Aa69e14B5BAE1859ee4164C3323";
|
|
|
|
const deployedRocketInstance = m.contractAt("Registry", registryAddress);
|
|
console.log("Deployed registry instance", deployedRocketInstance);
|
|
const merkleRoot = formatRoot(getCSCAModulusMerkleTree().root);
|
|
console.log("Merkle root", merkleRoot);
|
|
m.call(deployedRocketInstance, "update", [merkleRoot]);
|
|
return { deployedRocketInstance };
|
|
}); |