MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / readSubnetActor

Function readSubnetActor

contracts/hardhat.config.ts:84–98  ·  view source on GitHub ↗
(subnetActorAddress, network)

Source from the content-addressed store, hash-verified

82}
83
84async function readSubnetActor(subnetActorAddress, network) {
85 const subnetActorJsonPath = `${process.cwd()}/subnet.actor-${subnetActorAddress}.json`
86 if (fs.existsSync(subnetActorJsonPath)) {
87 const subnetActor = JSON.parse(
88 fs.readFileSync(subnetActorJsonPath).toString(),
89 )
90 return subnetActor
91 }
92 const subnetRegistry = await getSubnetRegistry(network)
93 const deployments = {
94 SubnetActorDiamond: subnetActorAddress,
95 Facets: subnetRegistry.SubnetActorFacets,
96 }
97 return deployments
98}
99
100async function saveSubnetActor(
101 deployments,

Callers 1

hardhat.config.tsFile · 0.85

Calls 2

getSubnetRegistryFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected