Skip to content

Commit

Permalink
remove populate action from deploy script and update contracts addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
gravityblast committed Feb 11, 2024
1 parent d07c68a commit f105e41
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 24 deletions.
2 changes: 0 additions & 2 deletions docker/deploy-contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ export SKIP_CONFIRMATIONS=true
TIMEFORMAT='(🟢 %3R seconds)';

time pnpm run deploy-project-registry dev && \
time pnpm hardhat run scripts/dev/populate/projects.ts --network dev && \
\
time pnpm run deploy-program-factory dev && \
time pnpm run deploy-program-implementation dev && \
time pnpm run link-program-implementation dev && \
Expand Down
2 changes: 1 addition & 1 deletion scripts/config/allo.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type DeployParams = Record<string, AlloSettingsParams>;

export const AlloSettingsParams: DeployParams = {
dev: {
alloSettingsContract: "0x59b670e9fA9D0A427751Af201D676719a970857b",
alloSettingsContract: "0x3Aa5ebB10DC797CAC828524e59A333d0A371443c",
newProtocolFeePercentage: 0,
newProtocolTreasury: "",
},
Expand Down
4 changes: 2 additions & 2 deletions scripts/config/payoutStrategy.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type DeployParams = Record<string, PayoutParams>;

export const MerklePayoutParams: DeployParams = {
dev: {
factory: "0x0B306BF915C4d645ff596e518fAf3F9669b97016",
implementation: "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
factory: "0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0",
implementation: "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
contract: "",
},
mainnet: {
Expand Down
4 changes: 2 additions & 2 deletions scripts/config/votingStrategy.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type DeployParams = Record<string, QFVotingParams>;

export const QFVotingParams: DeployParams = {
dev: {
factory: "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
implementation: "0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0",
factory: "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6",
implementation: "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318",
contract: "",
},
mainnet: {
Expand Down
6 changes: 3 additions & 3 deletions scripts/dev/populate/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ async function main() {
console.log(`🟡 Creating projects (pinataBaseUrl ${pinataBaseUrl})`);
const network = hre.network;

const [account1] = await ethers.getSigners();

if (hre.network.name !== "dev") {
console.error("This script can only be use in local dev environments");
process.exit(1);
Expand Down Expand Up @@ -82,9 +80,11 @@ async function main() {
metadata.logoImg = logoCid;
metadata.bannerImg = bannerCid;
metadataCid = await uploadJSONToPinata(metadata);
console.log("Created project", metadata.title);
}

await projectRegistry.connect(account1).createProject({
console.log(`Creating project ${i}...`);
await projectRegistry.createProject({
protocol: 1,
pointer: metadataCid,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ export async function main() {
"DirectPayoutStrategyFactory"
);
const contract = await upgrades.deployProxy(contractFactory);
const address = await contract.getAddress();

console.log(
`Deploying Upgradable DirectPayoutStrategyFactory to ${contract.address}`
);
console.log(`Deploying Upgradable DirectPayoutStrategyFactory to ${address}`);

const resp = contract.deploymentTransaction();
await resp.wait(getBlocksToWait(hre.network.name));

console.log("✅ Deployed.");

return await contract.getAddress();
return await address;
}

main().catch((error) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ export async function main() {
"MerklePayoutStrategyFactory"
);
const contract = await upgrades.deployProxy(contractFactory);
const address = await contract.getAddress();

console.log(
`Deploying Upgradable MerklePayoutStrategyFactory to ${contract.address}`
);
console.log(`Deploying Upgradable MerklePayoutStrategyFactory to ${address}`);

const resp = contract.deploymentTransaction();
await resp.wait(getBlocksToWait(hre.network.name));

console.log("✅ Deployed.");

return await contract.getAddress();
return address;
}

main().catch((error) => {
Expand Down
5 changes: 3 additions & 2 deletions scripts/program/deployProgramFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ export async function main() {
// Deploy ProgramFactory
const contractFactory = await ethers.getContractFactory("ProgramFactory");
const contract = await upgrades.deployProxy(contractFactory, []);
const address = await contract.getAddress();

console.log(`Deploying Upgradable ProgramFactory to ${contract.address}`);
console.log(`Deploying Upgradable ProgramFactory to ${address}`);

const resp = contract.deploymentTransaction();
await resp.wait(getBlocksToWait(hre.network.name));

console.log("✅ Deployed.");

return await contract.getAddress();
return address;
}

main().catch((error) => {
Expand Down
5 changes: 3 additions & 2 deletions scripts/round/deployRoundFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ export async function main() {
// Deploy RoundImplementation
const contractFactory = await ethers.getContractFactory("RoundFactory");
const contract = await upgrades.deployProxy(contractFactory);
const address = await contract.getAddress();

console.log(`Deploying Upgradable RoundFactory to ${contract.address}`);
console.log(`Deploying Upgradable RoundFactory to ${address}`);

const resp = contract.deploymentTransaction();
await resp.wait(getBlocksToWait(hre.network.name));

console.log("✅ Deployed.");

return await contract.getAddress();
return address;
}

main().catch((error) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ export async function main() {
"QuadraticFundingVotingStrategyFactory"
);
const contract = await upgrades.deployProxy(contractFactory);
const address = await contract.getAddress();

console.log(
`Deploying Upgradable QuadraticFundingVotingStrategyFactory to ${contract.address}`
`Deploying Upgradable QuadraticFundingVotingStrategyFactory to ${address}`
);

const resp = contract.deploymentTransaction();
await resp.wait(getBlocksToWait(hre.network.name));
console.log("✅ Deployed.");

return await contract.getAddress();
return address;
}

main().catch((error) => {
Expand Down

0 comments on commit f105e41

Please sign in to comment.