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

Function deploy

contracts/scripts/deploy-registry.template.ts:10–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const { getSelectors, FacetCutAction } = require('./js/diamond.js')
9
10export async function deploy() {
11 const [deployer] = await ethers.getSigners()
12 const balance = await deployer.getBalance()
13
14 console.log(
15 `Deploying contracts with account: ${
16 deployer.address
17 } and balance: ${balance.toString()}`,
18 )
19
20 const mode = subnetCreationPrivileges()
21 console.log(
22 `
23 ***************************************************************
24 ** **
25 ** Subnet creation privileges: ${mode} **
26 ** **
27 ***************************************************************
28 `,
29 )
30
31 const gatewayAddress = GATEWAY.Gateway
32 const txArgs = await getTransactionFees()
33
34 const subnetActorDeployFacets = []
35
36 // deploy
37 const getterFacet = await deployContractWithDeployer(
38 deployer,
39 'SubnetActorGetterFacet',
40 {
41 SubnetIDHelper: LIBMAP['SubnetIDHelper'],
42 },
43 txArgs,
44 )
45 const getterSelectors = getSelectors(getterFacet)
46
47 subnetActorDeployFacets.push({
48 name: 'SubnetActorGetterFacet',
49 libs: {
50 SubnetIDHelper: LIBMAP['SubnetIDHelper'],
51 },
52 address: getterFacet.address,
53 })
54
55 const managerFacet = await deployContractWithDeployer(
56 deployer,
57 'SubnetActorManagerFacet',
58 {},
59 txArgs,
60 )
61 const managerSelectors = getSelectors(managerFacet)
62
63 subnetActorDeployFacets.push({
64 name: 'SubnetActorManagerFacet',
65 libs: {},
66 address: managerFacet.address,
67 })

Callers

nothing calls this directly

Calls 5

subnetCreationPrivilegesFunction · 0.90
getTransactionFeesFunction · 0.90
getSelectorsFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected