BenSwap (smartBCH)
English
English
  • Welcome!
  • Roadmap
  • Links
  • Career
  • TOKENOMICS
    • Green Ben (EBEN)
    • PokéBen Crystal (PBC)
  • Products
    • WBCH
    • AMM
    • Farms
    • Pools
    • Analytics for AMM
    • ChartPro
    • IBO (Deprecated)
    • Lottery
    • REST API
    • BenLock
    • SEP-20 Factory
      • Liquidity Generator
      • Annuity
      • MultiMint
      • Inscriptions
    • Ranches
    • IBOv2
    • Candy House
    • Charities
    • PokéBen
      • Hunt
      • Adventure
      • Training
        • Ability
      • Evolution
      • Arena
      • Salon
    • Airdrop
    • DEX Aggregator
    • Bridge
    • NFT Market
    • Gridex
    • Aggregator Pro
    • DAO
    • Market Cap
    • NFT Factory
    • Limit Orders
    • P2P Trading
    • Cemetery
    • Blind Boxes
    • Smartscout
    • Analytics for Gridex
    • Laboratory
      • Anti-Aging Potion
    • Island
  • NFT Collections
    • PokéBen
    • PokéBenItem
    • PokéBenHero
    • BenSwap Lottery Ticket
    • BenSwap Grave
    • BenSwap Tweet
    • BenSwap Tutorial
    • Ben Token Finance 1st Anniversary Souvenir
    • Ben Token Finance 2022 Christmas Souvenir
    • Three Kingdoms 1 (Blind Boxes)
    • Anti-Aging Potion
  • Security
    • No Migrator Code
    • Contracts
    • Timelock
    • RPC Nodes
    • Audits
Powered by GitBook
On this page
  1. Security

No Migrator Code

PreviousAnti-Aging PotionNextContracts

Last updated 11 months ago

The migrator code has been removed from the MasterBreeder contract.

// Set the migrator contract. Can only be called by the owner.
function setMigrator(IMigratorChef _migrator) public onlyOwner {
    migrator = _migrator;
}

// Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
function migrate(uint256 _pid) public {
    require(address(migrator) != address(0), "migrate: no migrator");
    PoolInfo storage pool = poolInfo[_pid];
    BEP20 lpToken = pool.lpToken;
    uint256 bal = lpToken.balanceOf(address(this));
    lpToken.safeApprove(address(migrator), bal);
    IBEP20 newLpToken = migrator.migrate(lpToken);
    require(bal == newLpToken.balanceOf(address(this)), "migrate: bad");
    pool.lpToken = newLpToken;
}

Review the MasterBreeder contract on Github:

And on :

https://github.com/BenTokenFinance/benswapbch-contracts/blob/master/Contracts/MasterBreeder.sol
Smartscout
https://www.smartscout.cash/address/0xDEa721EFe7cBC0fCAb7C8d65c598b21B6373A2b6