Files
fhevm-solidity/tasks/mint.ts
Joseph-André Turk 6faf13648d Fixed tasks and readme
2024-01-18 15:17:44 +01:00

18 lines
601 B
TypeScript

import { task } from 'hardhat/config';
import type { TaskArguments } from 'hardhat/types';
task('task:mint')
.addParam('mint', 'Tokens to mint')
.setAction(async function (taskArguments: TaskArguments, hre) {
const { ethers, deployments } = hre;
const EncryptedERC20 = await deployments.get('EncryptedERC20');
const signers = await ethers.getSigners();
const encryptedERC20 = await ethers.getContractAt('EncryptedERC20', EncryptedERC20.address);
await encryptedERC20.connect(signers[0]).mint(+taskArguments.mint);
console.log('Mint done: ', taskArguments.mint);
});