合约构造函数参数,也是合约

时间:2021-05-26 10:04:31

标签: blockchain ethereum solidity binance-smart-chain binance-chain

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

1 个答案:

答案 0 :(得分:1)

需要提前部署其他合约,写下地址,部署MasterChef时传递地址。