| 9 | * @returns The address of the deployed DARC contract. |
| 10 | */ |
| 11 | export async function deployDARC(): Promise<string> { |
| 12 | |
| 13 | const DARC = await ethers.getContractFactory("DARC"); |
| 14 | const darc = await DARC.deploy(); |
| 15 | |
| 16 | |
| 17 | const signers = await ethers.getSigners(); |
| 18 | // for(let i = 0; i < signers.length; i++){ |
| 19 | // console.log("signer: " + signers[i].address); |
| 20 | // } |
| 21 | |
| 22 | // console.log("DARC address: ", darc.address); |
| 23 | await darc.deployed(); |
| 24 | await darc.initialize(); |
| 25 | return darc.address; |
| 26 | } |
| 27 | |
| 28 | // We recommend this pattern to be able to use async/await everywhere |
| 29 | // and properly handle errors. |