No Migrator Code
The migrator code has been removed from the MasterBreeder contract.
1
// Set the migrator contract. Can only be called by the owner.
2
function setMigrator(IMigratorChef _migrator) public onlyOwner {
3
migrator = _migrator;
4
}
5
6
// Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
7
function migrate(uint256 _pid) public {
8
require(address(migrator) != address(0), "migrate: no migrator");
9
PoolInfo storage pool = poolInfo[_pid];
10
BEP20 lpToken = pool.lpToken;
11
uint256 bal = lpToken.balanceOf(address(this));
12
lpToken.safeApprove(address(migrator), bal);
13
IBEP20 newLpToken = migrator.migrate(lpToken);
14
require(bal == newLpToken.balanceOf(address(this)), "migrate: bad");
15
pool.lpToken = newLpToken;
16
}
Copied!
Last modified 1mo ago
Copy link