From 248873bdb03294127089da99d9c033d7f17ede56 Mon Sep 17 00:00:00 2001 From: Baptiste Guerin <38328426+BaptistG@users.noreply.github.com> Date: Mon, 3 Jun 2024 18:59:24 +0200 Subject: [PATCH] feat: add mint mock token (#67) --- scripts/mintMockToken.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 scripts/mintMockToken.ts diff --git a/scripts/mintMockToken.ts b/scripts/mintMockToken.ts new file mode 100644 index 0000000..23730a6 --- /dev/null +++ b/scripts/mintMockToken.ts @@ -0,0 +1,26 @@ +import { parseEther, parseUnits } from 'ethers/lib/utils'; +import { ethers } from 'hardhat'; + +import { MAX_UINT256 } from '../test/hardhat/utils/helpers'; +import { MockToken__factory } from '../typechain'; + +async function main() { + const { deployer } = await ethers.getNamedSigners(); + + const MockToken = MockToken__factory.connect('0xA7c167f58833c5e25848837f45A1372491A535eD', deployer); + + console.log(`Minting MockToken to ${deployer.address}...`); + await ( + await MockToken.mint(deployer.address, parseUnits('100000', 6), { + // gasLimit: 300_000, + // maxPriorityFeePerGas: 100e9, + // maxFeePerGas: 700e9, + }) + ).wait(); + console.log(`...Minted mock token to address ${deployer.address} ✅`); +} + +main().catch(error => { + console.error(error); + process.exit(1); +});