mirror of
https://github.com/interep-project/contracts.git
synced 2026-04-17 03:00:51 -04:00
15 lines
637 B
TypeScript
15 lines
637 B
TypeScript
import { task } from "hardhat/config"
|
|
|
|
task("mint", "Mint a token in the ReputationBadge contract")
|
|
.addParam("contractAddress", "The address of the ReputationBadge contract")
|
|
.addParam("to", "The address of the token owner")
|
|
.addParam("tokenId", "The id of the token")
|
|
.setAction(async ({ contractAddress, to, tokenId }, { ethers }) => {
|
|
const [signer] = await ethers.getSigners()
|
|
const reputationBadge = await ethers.getContractAt("ReputationBadge", contractAddress)
|
|
|
|
await reputationBadge.connect(signer).safeMint(to, tokenId)
|
|
|
|
console.log(`The token has been minted correctly`)
|
|
})
|