mirror of
https://github.com/status-im/dagger-contracts.git
synced 2025-01-19 11:03:11 +00:00
afb89c9233
Rationale: it was already a very thin wrapper around Marketplace, and now that its remaining functionality has been moved to Proofs and Marketplace, we no longer need it.
37 lines
965 B
JavaScript
37 lines
965 B
JavaScript
async function deployMarketplace({ deployments, getNamedAccounts }) {
|
|
const token = await deployments.get("TestToken")
|
|
const proofPeriod = 10
|
|
const proofTimeout = 5
|
|
const proofDowntime = 64
|
|
const collateralAmount = 100
|
|
const slashMisses = 3
|
|
const slashPercentage = 10
|
|
const minCollateralThreshold = 40
|
|
const args = [
|
|
token.address,
|
|
collateralAmount,
|
|
minCollateralThreshold,
|
|
slashMisses,
|
|
slashPercentage,
|
|
proofPeriod,
|
|
proofTimeout,
|
|
proofDowntime,
|
|
]
|
|
const { deployer } = await getNamedAccounts()
|
|
await deployments.deploy("Marketplace", { args, from: deployer })
|
|
}
|
|
|
|
async function mine256blocks({ network, ethers }) {
|
|
if (network.tags.local) {
|
|
await ethers.provider.send("hardhat_mine", ["0x100"])
|
|
}
|
|
}
|
|
|
|
module.exports = async (environment) => {
|
|
await mine256blocks(environment)
|
|
await deployMarketplace(environment)
|
|
}
|
|
|
|
module.exports.tags = ["Marketplace"]
|
|
module.exports.dependencies = ["TestToken"]
|