Error migrating multiple contracts

Hello, I’m new to solidity and to this forum. I forked a yield farming defi project (goose - ).

The project compiles and the token.sol contract migrates without error but when it gets to Timelock and MasterChef migration, I get errors:
“Timelock” – Invalid number of parameters for “undefined”. Got 0 expected 2!. - error…
“MasterChef” – Invalid number of parameters for “undefined”. Got 0 expected 5!. - error…

I’m not sure what variables were expected and how to pass those…

This is excerpt of my 2_deploy-contracts.js file:

const Timelock = artifacts.require("Timelock");
const Token = artifacts.require("Token");
const MasterChef = artifacts.require("MasterChef");

module.exports = async function(deployer) {

await deployer.deploy(Token);



Truffle, solc 0.6.4

:computer: Environment


:1234: Code to reproduce

1 Like

Just like followings:

await deployer.deploy(Token, "TokenName", "xx");
token = await Token.deployed();

Hi @bscdev,

Welcome to the community :wave:

You need to provide the appropriate number of parameters to the constructor when deploying, as per the example @Skyge gave.

See the Truffle documentation for more details:

1 Like