Contract constructor parameter which is also a contract

476 Views Asked by At

I have contract in solidity MasterChef.sol which can be seen at the link below https://github.com/pancakeswap/pancake-farm/tree/master/contracts I want to deploy it using truffle on the Binance smart chain and the question is that the constructor of the MasterChef.sol takes in 5 args and two of them are contracts I want to know that how to pass the other two contracts i.e CakeToken.sol and SyrupBar.sol as the first two args in the deploy_contracts.js file.

1

There are 1 best solutions below

5
On BEST ANSWER

You need deploy other contracts beforehand, write down their addresses and pass addresses when MasterChef is deployed.