Add deployment scripts for TestToken and Storage
This commit is contained in:
parent
3431f77c82
commit
ce4760608b
|
@ -0,0 +1,12 @@
|
||||||
|
module.exports = async ({deployments, getNamedAccounts}) => {
|
||||||
|
const token = await deployments.get('TestToken')
|
||||||
|
const stakeAmount = 100
|
||||||
|
const slashMisses = 3
|
||||||
|
const slashPercentage = 10
|
||||||
|
const args = [token.address, stakeAmount, slashMisses, slashPercentage]
|
||||||
|
const { deployer } = await getNamedAccounts()
|
||||||
|
await deployments.deploy('Storage', { args, from: deployer })
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports.tags = ['Storage']
|
||||||
|
module.exports.dependencies = ['TestToken']
|
|
@ -0,0 +1,6 @@
|
||||||
|
module.exports = async ({deployments, getNamedAccounts}) => {
|
||||||
|
const { deployer } = await getNamedAccounts()
|
||||||
|
await deployments.deploy('TestToken', { args: [[deployer]], from: deployer })
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports.tags = ['TestToken']
|
|
@ -0,0 +1 @@
|
||||||
|
localhost
|
|
@ -3,4 +3,7 @@ require("hardhat-deploy")
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
solidity: "0.8.4",
|
solidity: "0.8.4",
|
||||||
|
namedAccounts: {
|
||||||
|
deployer: { default: 0 }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue