ive just started learning solidity and I tried to make a contract and encounter error during running hardhat test .
1) FortuneTigersPunk
"before each" hook for "should deploy successfully":
Error: too many arguments: in Contract constructor (count=4, expectedCount=0, code=UNEXPECTED_ARGUMENT, version=contracts/5.5.0)
at Logger.makeError (node_modules\@ethersproject\logger\src.ts\index.ts:225:28)
at Logger.throwError (node_modules\@ethersproject\logger\src.ts\index.ts:237:20)
at Logger.checkArgumentCount (node_modules\@ethersproject\logger\src.ts\index.ts:303:18)
at ContractFactory.<anonymous> (node_modules\@ethersproject\contracts\src.ts\index.ts:1227:16)
at step (node_modules\@ethersproject\contracts\lib\index.js:48:23)
at Object.next (node_modules\@ethersproject\contracts\lib\index.js:29:53)
at C:\Users\loobj\hardhat-tutorial\node_modules\@ethersproject\contracts\lib\index.js:23:71
at new Promise (<anonymous>)
at __awaiter (node_modules\@ethersproject\contracts\lib\index.js:19:12)
at ContractFactory.deploy (node_modules\@ethersproject\contracts\lib\index.js:1132:16)
below is my test script :
describe("FortuneTigersPunk", async () => {
let FTPContract: Contract;
let owner: SignerWithAddress;
let alice: SignerWithAddress;
beforeEach(async () => {
const FTPFactory = await ethers.getContractFactory("TigerNft") ;
[owner, alice] = await ethers.getSigners();
FTPContract = await FTPFactory.deploy(
"FortuneTigersPunk",
"FTP",
10000,
1
);
console.log(`owner: ${owner.address} alice: ${alice.address}`);
});
it("should deploy successfully", async() => {
console.log("contract address", FTPContract.address);
});