instances/scripts/instances.js

40 lines
988 B
JavaScript
Raw Normal View History

require('dotenv').config()
const hre = require('hardhat')
const { ethers } = hre
async function main() {
const mf = await ethers.getContractAt(
'MinimalInstanceFactory',
'0x9d00007c0f5037157b5be8bff174b194a99118d0',
)
const crvUSD = '0xf939e0a03fb07f59a73314e73794be0e57ac1b4e'
let response = await mf.createInstanceClone(ethers.utils.parseUnits('100'), crvUSD)
await response.wait()
console.log('Deployed')
response = await mf.createInstanceClone(ethers.utils.parseUnits('1000'), crvUSD)
await response.wait()
console.log('Deployed')
response = await mf.createInstanceClone(ethers.utils.parseUnits('10000'), crvUSD)
await response.wait()
console.log('Deployed')
response = await mf.createInstanceClone(ethers.utils.parseUnits('100000'), crvUSD)
await response.wait()
console.log('Deployed')
response = await mf.createInstanceClone(ethers.utils.parseUnits('1000000'), crvUSD)
await response.wait()
console.log('Deployed')
}
main()