typecccccccccccc
Version:
p align="center" > <img src="https://xord.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F283b98b7-fdae-4e5a-acaf-248242084e4a%2FICON.png?table=block&id=5306223c-a4f7-45d1-9f54-b9a5f4004cd6&spaceId=49976899-64a1-40f
29 lines (22 loc) • 1.02 kB
JavaScript
// We require the Hardhat Runtime Environment explicitly here. This is optional
// but useful for running the script in a standalone fashion through `node <script>`.
//
// You can also run a script with `npx hardhat run <script>`. If you do that, Hardhat
// will compile your contracts, add the Hardhat Runtime Environment's members to the
// global scope, and execute the script.
const hre = require("hardhat");
async function main() {
const Verifier = await ethers.getContractFactory("MultiplierVerifier");
const verifier = await Verifier.deploy();
console.log("Verifier deployed to:", verifier.address);
const Multiplier = await ethers.getContractFactory("Multiplier");
const multiplier = await Multiplier.deploy(verifier.address);
await multiplier.deployed();
console.log("Multiplier deployed to:", multiplier.address);
}
// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});