forked from allo-protocol/allo-contracts
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a single task to deploy all contracts together
- Loading branch information
1 parent
00ee386
commit 4f124fd
Showing
28 changed files
with
500 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,3 @@ | ||
export SKIP_CONFIRMATIONS=true | ||
|
||
TIMEFORMAT='(🟢 %3R seconds)'; | ||
|
||
time pnpm run deploy-project-registry dev && \ | ||
time pnpm run deploy-program-factory dev && \ | ||
time pnpm run deploy-program-implementation dev && \ | ||
time pnpm run link-program-implementation dev && \ | ||
\ | ||
time pnpm run deploy-qf-factory dev && \ | ||
time pnpm run deploy-qf-implementation dev && \ | ||
time pnpm run link-qf-implementation dev && \ | ||
\ | ||
time pnpm run deploy-merkle-factory dev && \ | ||
time pnpm run deploy-merkle-implementation dev && \ | ||
time pnpm run link-merkle-implementation dev && \ | ||
\ | ||
time pnpm run deploy-direct-factory dev && \ | ||
time pnpm run deploy-direct-implementation dev && \ | ||
time pnpm run link-direct-implementation dev && \ | ||
\ | ||
time pnpm run deploy-allo-settings dev && \ | ||
time pnpm run set-protocol-fee dev && \ | ||
\ | ||
time pnpm run deploy-round-factory dev && \ | ||
time pnpm run deploy-round-implementation dev && \ | ||
time pnpm run link-round-implementation dev && \ | ||
time pnpm run link-allo-settings dev && \ | ||
|
||
echo "🟢 Allo V1 deployed and populated" | ||
|
||
# pnpm run create-program dev | ||
# pnpm run create-qf-contract dev | ||
# pnpm run create-merkle-contract dev | ||
# pnpm run create-round dev | ||
pnpm hardhat run scripts/dev/deployAllContracts.ts --network dev; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import { main as deployRegistry } from "../projectRegistry/deployProjectRegistry"; | ||
|
||
import { main as deployProgramFactory } from "../program/deployProgramFactory"; | ||
import { main as deployProgramImplementation } from "../program/deployProgramImplementation"; | ||
import { main as linkProgramImplementation } from "../program/linkProgramImplementation"; | ||
|
||
import { main as deployQFVotingStrategyFactory } from "../votingStrategy/quadraticFunding/deployQFVotingStrategyFactory"; | ||
import { main as deployQFVotingStrategyImplementation } from "../votingStrategy/quadraticFunding/deployQFVotingStrategyImplementation"; | ||
import { main as linkQFVotingStrategyImplementation } from "../votingStrategy/quadraticFunding/linkQFVotingStrategyImplementation"; | ||
|
||
import { main as deployMerklePayoutStrategyFactory } from "../payoutStrategy/merkle/deployMerklePayoutStrategyFactory"; | ||
import { main as deployMerklePayoutStrategyImplementation } from "../payoutStrategy/merkle/deployMerklePayoutStrategyImplementation"; | ||
import { main as linkMerklePayoutStrategyImplementation } from "../payoutStrategy/merkle/linkMerklePayoutStrategyImplementation"; | ||
|
||
import { main as deployDirectPayoutStrategyFactory } from "../payoutStrategy/direct/deployDirectPayoutStrategyFactory"; | ||
import { main as deployDirectPayoutStrategyImplementation } from "../payoutStrategy/direct/deployDirectPayoutStrategyImplementation"; | ||
import { main as linkDirectPayoutStrategyImplementation } from "../payoutStrategy/direct/linkDirectPayoutStrategyImplementation"; | ||
|
||
import { main as deployAlloSettings } from "../settings/deployAlloSettings"; | ||
import { main as setProtocolFeeDetails } from "../settings/setProtocolFeeDetails"; | ||
|
||
import { main as deployRoundFactory } from "../round/deployRoundFactory"; | ||
import { main as deployRoundImplementation } from "../round/deployRoundImplementation"; | ||
import { main as linkRoundImplementation } from "../round/linkRoundImplementation"; | ||
import { main as linkAlloSettings } from "../round/linkAlloSettings"; | ||
|
||
async function main() { | ||
const registry = await deployRegistry(); | ||
|
||
const programFactory = await deployProgramFactory(); | ||
const programImplementation = await deployProgramImplementation(); | ||
await linkProgramImplementation(); | ||
|
||
const qfVotingStrategyFactory = await deployQFVotingStrategyFactory(); | ||
const qfVotingStrategyImplementation = | ||
await deployQFVotingStrategyImplementation(); | ||
await linkQFVotingStrategyImplementation(); | ||
|
||
const merklePayoutStrategyFactory = await deployMerklePayoutStrategyFactory(); | ||
const merklePayoutStrategyImplementation = | ||
await deployMerklePayoutStrategyImplementation(); | ||
await linkMerklePayoutStrategyImplementation(); | ||
|
||
const directPayoutStrategyFactory = await deployDirectPayoutStrategyFactory(); | ||
const directPayoutStrategyImplementation = | ||
await deployDirectPayoutStrategyImplementation(); | ||
await linkDirectPayoutStrategyImplementation(); | ||
|
||
const alloSettings = await deployAlloSettings(); | ||
await setProtocolFeeDetails(); | ||
|
||
const roundFactory = await deployRoundFactory(); | ||
const roundImplementation = await deployRoundImplementation(); | ||
|
||
await linkRoundImplementation(); | ||
await linkAlloSettings(); | ||
|
||
console.log("---------------------------------------"); | ||
console.log("\nAllo V1 contracts deployed successfully\n"); | ||
console.table({ | ||
Registry: registry, | ||
ProgramFactory: programFactory, | ||
ProgramImplementation: programImplementation, | ||
QFVotingStrategyFactory: qfVotingStrategyFactory, | ||
QFVotingStrategyImplementation: qfVotingStrategyImplementation, | ||
MerklePayoutStrategyFactory: merklePayoutStrategyFactory, | ||
MerklePayoutStrategyImplementation: merklePayoutStrategyImplementation, | ||
DirectPayoutStrategyFactory: directPayoutStrategyFactory, | ||
DirectPayoutStrategyImplementation: directPayoutStrategyImplementation, | ||
AlloSettings: alloSettings, | ||
RoundFactory: roundFactory, | ||
RoundImplementation: roundImplementation, | ||
}); | ||
} | ||
|
||
main().catch((error) => { | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.