added small condition to avoid race condition

This commit is contained in:
Thrilok kumar 2024-07-03 20:16:10 -04:00
parent 0cd5dd2535
commit 93fb3acb04

View File

@ -326,6 +326,8 @@ interface IFluidVaultT1Factory {
function readFromStorage( function readFromStorage(
bytes32 slot_ bytes32 slot_
) external view returns (uint256 result_); ) external view returns (uint256 result_);
function totalVaults() external view returns (uint256);
} }
interface IFluidVaultT1DeploymentLogic { interface IFluidVaultT1DeploymentLogic {
@ -476,6 +478,10 @@ contract PayloadIGP31 {
/// @notice Action 1: Deploy wBTC/ETH and ETH/wBTC vaults. /// @notice Action 1: Deploy wBTC/ETH and ETH/wBTC vaults.
function action1() internal { function action1() internal {
{
require(VAULT_T1_FACTORY.totalVaults() == 22, "total-vaults-doesn't-match");
}
VaultConfig memory vaultConfig = VaultConfig({ VaultConfig memory vaultConfig = VaultConfig({
// user supply config for the vault on Liquidity Layer. // user supply config for the vault on Liquidity Layer.
supplyToken: address(0), supplyToken: address(0),