Skip to content

Commit

Permalink
add options
Browse files Browse the repository at this point in the history
  • Loading branch information
YouStillAlive committed Dec 14, 2023
1 parent 70fe50a commit 436dc11
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 39 deletions.
6 changes: 5 additions & 1 deletion scripts/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,21 @@ async function displayMenu(): Promise<void> {
// Handling the selection
switch (answer.menuItem) {
case menuItems[0].name:
exec("npx hardhat run ./scripts/utility/deployment.ts --network truffleDashboard")
exec("npx hardhat run ./scripts/utility/deployment/VaultAndLockDealNFT.ts --network truffleDashboard")
break
case menuItems[1].name:
exec("npx hardhat run ./scripts/utility/deployment/SimpleProviders.ts --network truffleDashboard")
break
case menuItems[2].name:
exec("npx hardhat run ./scripts/utility/deployment/RefundAndCollateral.ts --network truffleDashboard")
break
case menuItems[3].name:
exec("npx hardhat run ./scripts/utility/deployment/Builders.ts --network truffleDashboard")
break
case menuItems[4].name:
break
case menuItems[5].name:
exec("npx hardhat run ./deploy.ts --network truffleDashboard")
break
default:
break
Expand Down
11 changes: 11 additions & 0 deletions scripts/utility/dashboard/Builders.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { LockDealNFT, RefundProvider, CollateralProvider } from "../../../typechain-types"
import { deploy } from "../../deploy"

export async function deployBuilders(
lockDealNFT: LockDealNFT,
refundProvider: RefundProvider,
collateralProvider: CollateralProvider
) {
await deploy("SimpleBuilder", lockDealNFT.address)
await deploy("SimpleRefundBuilder", lockDealNFT.address, refundProvider.address, collateralProvider.address)
}
11 changes: 11 additions & 0 deletions scripts/utility/dashboard/RefundAndCollateral.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { CollateralProvider, LockDealNFT, DealProvider } from "../../../typechain-types"
import { deploy } from "../../deploy"

export async function deployRefundWithCollateral(lockDealNFT: LockDealNFT, dealProvider: DealProvider) {
const collateralProvider: CollateralProvider = await deploy(
"CollateralProvider",
lockDealNFT.address,
dealProvider.address
)
await deploy("RefundProvider", lockDealNFT.address, collateralProvider.address)
}
8 changes: 8 additions & 0 deletions scripts/utility/dashboard/SimpleProviders.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { LockDealNFT, DealProvider, LockDealProvider } from "../../../typechain-types"
import { deploy } from "../../deploy"

export async function deploySimpleProviders(lockDealNFT: LockDealNFT) {
const dealProvider: DealProvider = await deploy("DealProvider", lockDealNFT.address)
const lockProvider: LockDealProvider = await deploy("LockDealProvider", lockDealNFT.address, dealProvider.address)
await deploy("TimedDealProvider", lockDealNFT.address, lockProvider.address)
}
9 changes: 9 additions & 0 deletions scripts/utility/dashboard/VaultAndLockDealNFT.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { VaultManager } from "../../../typechain-types"
import { deploy } from "../../deploy"

export async function deployNFTandVaultManager(baseURI: string = "") {
const vaultManager: VaultManager = await deploy("VaultManager")
await deploy("LockDealNFT", vaultManager.address, baseURI)
}

deployNFTandVaultManager()
38 changes: 0 additions & 38 deletions scripts/utility/deployment.ts

This file was deleted.

0 comments on commit 436dc11

Please sign in to comment.