合约构造函数参数也是一个合约

Contract constructor parameter which is also a contract

我有合同 MasterChef.sol 可以在下面的 link 中看到 https://github.com/pancakeswap/pancake-farm/tree/master/contracts 我想在 Binance 智能链上使用 truffle 部署它,问题是 MasterChef.sol 的构造函数接受 5 个参数,其中两个是合约 我想知道如何传递其他两个合约,即 CakeToken.sol 和 SyrupBar.sol 作为 deploy_contracts.js 文件中的前两个参数。

您需要预先部署其他合约,记下它们的地址并在部署MasterChef时传递地址。