41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
|
|
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
||
|
|
|
||
|
|
export default async function deploy(hre: HardhatRuntimeEnvironment) {
|
||
|
|
const { ethers, deployments, getNamedAccounts } = hre;
|
||
|
|
const { deploy } = deployments;
|
||
|
|
const { deployer } = await getNamedAccounts();
|
||
|
|
|
||
|
|
// Deploy AdapterRegistry
|
||
|
|
const adapterRegistry = await deploy("AdapterRegistry", {
|
||
|
|
from: deployer,
|
||
|
|
args: [],
|
||
|
|
log: true,
|
||
|
|
});
|
||
|
|
|
||
|
|
// Deploy NotaryRegistry
|
||
|
|
const notaryRegistry = await deploy("NotaryRegistry", {
|
||
|
|
from: deployer,
|
||
|
|
args: [],
|
||
|
|
log: true,
|
||
|
|
});
|
||
|
|
|
||
|
|
// Deploy ComboHandler
|
||
|
|
const comboHandler = await deploy("ComboHandler", {
|
||
|
|
from: deployer,
|
||
|
|
args: [adapterRegistry.address, notaryRegistry.address],
|
||
|
|
log: true,
|
||
|
|
});
|
||
|
|
|
||
|
|
console.log("✅ Contracts deployed:");
|
||
|
|
console.log(` AdapterRegistry: ${adapterRegistry.address}`);
|
||
|
|
console.log(` NotaryRegistry: ${notaryRegistry.address}`);
|
||
|
|
console.log(` ComboHandler: ${comboHandler.address}`);
|
||
|
|
|
||
|
|
return {
|
||
|
|
adapterRegistry: adapterRegistry.address,
|
||
|
|
notaryRegistry: notaryRegistry.address,
|
||
|
|
comboHandler: comboHandler.address,
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|