Skip to content

Commit

Permalink
Merge pull request #12 from 1Hive/goerli-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
0xGabi authored Feb 14, 2023
2 parents 535df8c + 3c15af2 commit d94b11f
Show file tree
Hide file tree
Showing 26 changed files with 6,101 additions and 1,051 deletions.
14 changes: 1 addition & 13 deletions deploy/01_deploy_kernel_base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {deployer} = await getNamedAccounts();

const kernelBase = await deploy('Kernel', {
await deploy('Kernel', {
from: deployer,
args: [true], // immediately petrify
log: true,
});

if (process.env.VERIFY) {
await hre.tenderly.persistArtifacts({
name: 'Kernel',
address: kernelBase.address,
});

await hre.tenderly.verify({
name: 'Kernel',
address: kernelBase.address,
});
}
};

export default func;
Expand Down
14 changes: 1 addition & 13 deletions deploy/02_deploy_acl_base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {deployer} = await getNamedAccounts();

const aclBase = await deploy('ACL', {
await deploy('ACL', {
from: deployer,
args: [],
log: true,
});

if (process.env.VERIFY) {
await hre.tenderly.persistArtifacts({
name: 'ACL',
address: aclBase.address,
});

await hre.tenderly.verify({
name: 'ACL',
address: aclBase.address,
});
}
};

export default func;
Expand Down
14 changes: 1 addition & 13 deletions deploy/03_deploy_evm_script_registry_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {deployer} = await getNamedAccounts();

const evmScriptRegsitryFactory = await deploy('EVMScriptRegistryFactory', {
await deploy('EVMScriptRegistryFactory', {
from: deployer,
args: [],
log: true,
});

if (process.env.VERIFY) {
await hre.tenderly.persistArtifacts({
name: 'EVMScriptRegistryFactory',
address: evmScriptRegsitryFactory.address,
});

await hre.tenderly.verify({
name: 'EVMScriptRegistryFactory',
address: evmScriptRegsitryFactory.address,
});
}
};

export default func;
Expand Down
14 changes: 1 addition & 13 deletions deploy/04_deploy_dao_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const aclBase = await get('ACL');
const evmScriptRegistryFactory = await get('EVMScriptRegistryFactory');

const daoFactory = await deploy('DAOFactory', {
await deploy('DAOFactory', {
from: deployer,
args: [
kernelBase.address,
Expand All @@ -22,18 +22,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
],
log: true,
});

if (process.env.VERIFY) {
await hre.tenderly.persistArtifacts({
name: 'DAOFactory',
address: daoFactory.address,
});

await hre.tenderly.verify({
name: 'DAOFactory',
address: daoFactory.address,
});
}
};

export default func;
Expand Down
14 changes: 1 addition & 13 deletions deploy/05_deploy_apm_registry_base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {deployer} = await getNamedAccounts();

const apmRegistryBase = await deploy('APMRegistry', {
await deploy('APMRegistry', {
from: deployer,
args: [],
log: true,
});

if (process.env.VERIFY) {
await hre.tenderly.persistArtifacts({
name: 'APMRegistry',
address: apmRegistryBase.address,
});

await hre.tenderly.verify({
name: 'APMRegistry',
address: apmRegistryBase.address,
});
}
};

export default func;
Expand Down
14 changes: 1 addition & 13 deletions deploy/06_deploy_repo_base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {deployer} = await getNamedAccounts();

const apmRepoBase = await deploy('Repo', {
await deploy('Repo', {
from: deployer,
args: [],
log: true,
});

if (process.env.VERIFY) {
await hre.tenderly.persistArtifacts({
name: 'Repo',
address: apmRepoBase.address,
});

await hre.tenderly.verify({
name: 'Repo',
address: apmRepoBase.address,
});
}
};

export default func;
Expand Down
14 changes: 1 addition & 13 deletions deploy/07_deploy_ens_subdomain_registrar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {deployer} = await getNamedAccounts();

const ensSubdomainRegistrarBase = await deploy('ENSSubdomainRegistrar', {
await deploy('ENSSubdomainRegistrar', {
from: deployer,
args: [],
log: true,
});

if (process.env.VERIFY) {
await hre.tenderly.persistArtifacts({
name: 'ENSSubdomainRegistrar',
address: ensSubdomainRegistrarBase.address,
});

await hre.tenderly.verify({
name: 'ENSSubdomainRegistrar',
address: ensSubdomainRegistrarBase.address,
});
}
};

export default func;
Expand Down
14 changes: 1 addition & 13 deletions deploy/08_deploy_ens_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {deployer} = await getNamedAccounts();

const ensFactory = await deploy('ENSFactory', {
await deploy('ENSFactory', {
from: deployer,
args: [],
log: true,
});

if (process.env.VERIFY) {
await hre.tenderly.persistArtifacts({
name: 'ENSFactory',
address: ensFactory.address,
});

await hre.tenderly.verify({
name: 'ENSFactory',
address: ensFactory.address,
});
}
};

export default func;
Expand Down
26 changes: 1 addition & 25 deletions deploy/09_deploy_apm_registry_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
log('ENS:', ensAddress);

// Deploy APMRegistryFactory
const apmFactory = await deploy('APMRegistryFactory', {
await deploy('APMRegistryFactory', {
from: deployer,
args: [
daoFactory.address,
Expand All @@ -41,30 +41,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
],
log: true,
});

if (process.env.VERIFY) {
await hre.tenderly.persistArtifacts(
{
name: 'ENS',
address: ensAddress,
},
{
name: 'APMRegistryFactory',
address: apmFactory.address,
}
);

await hre.tenderly.verify(
{
name: 'ENS',
address: ensAddress,
},
{
name: 'APMRegistryFactory',
address: apmFactory.address,
}
);
}
};

export default func;
Expand Down
32 changes: 4 additions & 28 deletions deploy/10_deploy_apm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
// New APM instance
const {events} = await execute(
'APMRegistryFactory',
{from: deployer, log: true},
{from: deployer, log: true, gasLimit: 9000000},
'newAPM',
tldHash,
labelHash,
deployer
deployer,
);

const {apm: apmAddress} = events?.find(
Expand Down Expand Up @@ -82,11 +82,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
// New Open APM instance
const {events: newApmEvents} = await execute(
'APMRegistryFactory',
{from: deployer, log: true},
{from: deployer, log: true, gasLimit: 9000000},
'newAPM',
openTldHash,
openLabelHash,
deployer
deployer,
);

const {apm: openApmAddress} = newApmEvents?.find(
Expand Down Expand Up @@ -131,30 +131,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
);
log('Grant ANY_ADDRESS the CREATE_REPO_ROLE permission');
await openAcl.grantPermission(ANY_ENTITY, openApmAddress, CREATE_REPO_ROLE);

if (process.env.VERIFY) {
await hre.tenderly.persistArtifacts(
{
name: 'APMRegistry',
address: apmAddress,
},
{
name: 'APMRegistry',
address: openApmAddress,
}
);

await hre.tenderly.verify(
{
name: 'APMRegistry',
address: apmAddress,
},
{
name: 'APMRegistry',
address: openApmAddress,
}
);
}
};

export default func;
Expand Down
14 changes: 1 addition & 13 deletions deploy/11_deploy_aragon_id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
log('Assigning owner name');
await execute(
'FIFSResolvingRegistrar',
{from: deployer, log: true, gasLimit: 500000},
{from: deployer, log: true, gasLimit: 5000000},
'register',
ownerHash,
deployer
);

if (process.env.VERIFY) {
await hre.tenderly.persistArtifacts({
name: 'FIFSResolvingRegistrar',
address: aragonID.address,
});

await hre.tenderly.verify({
name: 'FIFSResolvingRegistrar',
address: aragonID.address,
});
}
};

export default func;
Expand Down
1 change: 1 addition & 0 deletions deployments/goerli/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5
Loading

0 comments on commit d94b11f

Please sign in to comment.