()
| 5 | import { ethers } from 'hardhat' |
| 6 | |
| 7 | export async function deploy() { |
| 8 | await hre.run('compile') |
| 9 | |
| 10 | const [deployer] = await ethers.getSigners() |
| 11 | const balance = await ethers.provider.getBalance(deployer.address) |
| 12 | console.log( |
| 13 | 'Deploying libraries with the account:', |
| 14 | deployer.address, |
| 15 | ' balance:', |
| 16 | ethers.utils.formatEther(balance), |
| 17 | ) |
| 18 | |
| 19 | const txArgs = await getTransactionFees() |
| 20 | |
| 21 | const { address: accountHelperAddress } = await deployContractWithDeployer( |
| 22 | deployer, |
| 23 | 'AccountHelper', |
| 24 | {}, |
| 25 | txArgs, |
| 26 | ) |
| 27 | const { address: libStakingAddress } = await deployContractWithDeployer( |
| 28 | deployer, |
| 29 | 'LibStaking', |
| 30 | {}, |
| 31 | txArgs, |
| 32 | ) |
| 33 | |
| 34 | const { address: subnetIDHelperAddress } = await deployContractWithDeployer( |
| 35 | deployer, |
| 36 | 'SubnetIDHelper', |
| 37 | {}, |
| 38 | txArgs, |
| 39 | ) |
| 40 | |
| 41 | const { address: libQuorumAddress } = await deployContractWithDeployer( |
| 42 | deployer, |
| 43 | 'LibQuorum', |
| 44 | {}, |
| 45 | txArgs, |
| 46 | ) |
| 47 | |
| 48 | // nested libs |
| 49 | const { address: crossMsgHelperAddress } = await deployContractWithDeployer( |
| 50 | deployer, |
| 51 | 'CrossMsgHelper', |
| 52 | { SubnetIDHelper: subnetIDHelperAddress }, |
| 53 | txArgs, |
| 54 | ) |
| 55 | |
| 56 | return { |
| 57 | AccountHelper: accountHelperAddress, |
| 58 | SubnetIDHelper: subnetIDHelperAddress, |
| 59 | CrossMsgHelper: crossMsgHelperAddress, |
| 60 | LibStaking: libStakingAddress, |
| 61 | LibQuorum: libQuorumAddress, |
| 62 | } |
| 63 | } |
| 64 |
no test coverage detected