Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VEN-1715]: remove BIFI market from DeFi Pool #45

Merged
merged 6 commits into from
Aug 7, 2023
Merged

Conversation

GitGuru7
Copy link
Contributor

@GitGuru7 GitGuru7 commented Jul 19, 2023

Temp comptroller impl address (testnet): 0xc340b7d3406502F43dC11a988E4EC5bbE536E642
Temp comptroller impl address (mainnet): 0x4E78A2a804F0c87Fa9e1b08f70733fB775b4f920
New function:

function removeMarket(address vToken) external {
    _checkAccessAllowed("removeMarket(address)");
    // Check if the market is listed.
    Market storage market = markets[address(vToken)];
    if (!market.isListed) {
        revert MarketNotListed(vToken);
    }

    // Remove the market from the list of all markets.
    uint256 marketsCount = allMarkets.length;
    for (uint256 i = 0; i < marketsCount; ++i) {
        if (allMarkets[i] == VToken(vToken)) {
            allMarkets[i] = allMarkets[marketsCount - 1];
            break;
        }
    }
    allMarkets.pop();
    // Delete the market struct from memory.
    delete markets[address(vToken)];
}

Temp poolRegistry impl address (testnet): 0x77c580e90D425e650A90b01473E0bA0604fc1926
Temp poolRegistry impl address (mainnet): 0xA5501fEDb2C265091123C6EF8Ed5897A020B5590
New function:

function removeMarket(address comptroller, address underlying) external {
    _checkAccessAllowed("removeMarket(address,address)");
    delete _vTokens[comptroller][underlying];
    delete _supportedPools[underlying];
}

Resolves VEN-1715

@GitGuru7 GitGuru7 requested a review from chechu July 19, 2023 12:28
@Debugger022 Debugger022 self-requested a review July 20, 2023 08:31
vips/vip-144/vip-144-testnet.ts Outdated Show resolved Hide resolved
vips/vip-144/vip-144-testnet.ts Outdated Show resolved Hide resolved
@chechu
Copy link
Member

chechu commented Jul 26, 2023

I think we should also remove the following files in the IL repo:

  • bscmainnet/VToken_vBIFI_DeFi.json
  • bsctestnet/VToken_vBIFI_DeFi.json
  • bsctestnet/MockBIFI.json

Copy link
Member

@chechu chechu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GitGuru7 GitGuru7 changed the title [VEN-1715]: remove BIFI market from DeFi in testnet [VEN-1715]: remove BIFI market from DeFi Pool Jul 28, 2023
@GitGuru7 GitGuru7 requested a review from chechu July 28, 2023 17:55
@chechu
Copy link
Member

chechu commented Aug 7, 2023

@GitGuru7 GitGuru7 merged commit 2bb27d0 into develop Aug 7, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants