Skip to content

Commit

Permalink
feat(ai): introduce AIServiceRegistry contract
Browse files Browse the repository at this point in the history
This commit adds the AIServiceRegistry contract, facilitating the
registration and discoverability of AI subnet orchestrators'
services.
  • Loading branch information
rickstaa committed Apr 17, 2024
1 parent f225b10 commit b293c4e
Show file tree
Hide file tree
Showing 5 changed files with 1,159 additions and 0 deletions.
25 changes: 25 additions & 0 deletions deploy/deploy_ai_service_registry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import {HardhatRuntimeEnvironment} from "hardhat/types"
import {DeployFunction} from "hardhat-deploy/types"

import ContractDeployer from "../utils/deployer"

const func: DeployFunction = async function(hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre // Get the deployments and getNamedAccounts which are provided by hardhat-deploy

const {deployer} = await getNamedAccounts() // Fetch named accounts from hardhat.config.ts

const contractDeployer = new ContractDeployer(deployer, deployments)
const controller = await contractDeployer.fetchDeployedController()

const deploy = contractDeployer.deploy.bind(contractDeployer)

await deploy({
contract: "ServiceRegistry",
name: "AIServiceRegistry",
args: [controller.address],
proxy: true
})
}

func.tags = ["AI_SERVICE_REGISTRY"]
export default func
Loading

0 comments on commit b293c4e

Please sign in to comment.