Azeem Lodhi
Azeem Lodhi

Reputation: 53

Contract constructor parameter which is also a contract

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.

Upvotes: 1

Views: 520

Answers (1)

Mikko Ohtamaa
Mikko Ohtamaa

Reputation: 83768

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

Upvotes: 1

Related Questions