Перейти к содержимому
Проверенный контрактТочноеGPL-3.0-or-later

StableLPOracleFactory

Адрес0x765ce16dbb3d7e89a9bebc834c5d6894e7faa93c
Баланс

0 ETH

 

Транзакций

2

 

Компилятор

solc 0.8.27

 

Тот же код

ещё 1 контракт

 

Подробности

Компилятор
solc 0.8.27+commit.40a35a09
Язык
solidity
Оптимизация
Да, 9 999 прогонов
Версия EVM
cancun
Через IR
да
Лицензия
GPL-3.0-or-later
Совпадение
Точноекод создания: да, код в сети: да
Проверен на Sourcify
Создан в блоке
24 541 754
Транзакция создания
0x6cf2ca6db2…be201f7fe3

61 файл

Исходный код большой: показывается один файл. Выберите файл в списке.

contracts/StableLPOracleFactory.sol

// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.24;

import { AggregatorV3Interface } from "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol";

import { ILPOracleBase } from "@balancer-labs/v3-interfaces/contracts/oracles/ILPOracleBase.sol";
import { IStablePool } from "@balancer-labs/v3-interfaces/contracts/pool-stable/IStablePool.sol";
import { IBasePool } from "@balancer-labs/v3-interfaces/contracts/vault/IBasePool.sol";
import { IVault } from "@balancer-labs/v3-interfaces/contracts/vault/IVault.sol";

import { LPOracleFactoryBase } from "./LPOracleFactoryBase.sol";
import { StableLPOracle } from "./StableLPOracle.sol";

/// @notice Factory for deploying and managing Stable Pool oracles.
contract StableLPOracleFactory is LPOracleFactoryBase {
    /**
     * @notice A new Stable Pool oracle was created.
     * @param pool The address of the Stable Pool
     * @param shouldUseBlockTimeForOldestFeedUpdate If true, `latestRoundData` returns the current time for `updatedAt`
     * @param shouldRevertIfVaultUnlocked If true, revert if the Vault is unlocked (i.e., processing a transaction)
     * @param feeds The array of price feeds for the tokens in the pool
     * @param oracle The address of the deployed oracle
     */
    event StableLPOracleCreated(
        IStablePool indexed pool,
        bool shouldUseBlockTimeForOldestFeedUpdate,
        bool shouldRevertIfVaultUnlocked,
        AggregatorV3Interface[] feeds,
        ILPOracleBase oracle
    );

    constructor(
        IVault vault,
        AggregatorV3Interface sequencerUptimeFeed,
        uint256 uptimeResyncWindow,
        string memory factoryVersion,
        uint256 oracleVersion
    ) LPOracleFactoryBase(vault, sequencerUptimeFeed, uptimeResyncWindow, factoryVersion, oracleVersion) {
        // solhint-disable-previous-line no-empty-blocks
    }

    function _create(
        IVault vault,
        IBasePool pool,
        bool shouldUseBlockTimeForOldestFeedUpdate,
        bool shouldRevertIfVaultUnlocked,
        AggregatorV3Interface[] memory feeds
    ) internal override returns (ILPOracleBase oracle) {
        oracle = new StableLPOracle(
            vault,
            IStablePool(address(pool)),
            feeds,
            _sequencerUptimeFeed,
            _uptimeResyncWindow,
            shouldUseBlockTimeForOldestFeedUpdate,
            shouldRevertIfVaultUnlocked,
            _oracleVersion
        );
        emit StableLPOracleCreated(
            IStablePool(address(pool)),
            shouldUseBlockTimeForOldestFeedUpdate,
            shouldRevertIfVaultUnlocked,
            feeds,
            oracle
        );
    }
}
Настройки компилятораПоказать
{
  "viaIR": true,
  "optimizer": {
    "runs": 9999,
    "details": {
      "yulDetails": {
        "optimizerSteps": "dhfoDgvulfnTUtnIf [ xa[r]EscLM cCTUtTOntnfDIul Lcul Vcul [j] Tpeul xa[rul] xa[r]cL gvif CTUca[r]LSsTFOtfDnca[r]Iulc ] jmul[jul] VcTOcul jmul : fDnTOcmu"
      }
    },
    "enabled": true
  },
  "evmVersion": "cancun"
}

Исходный код и метаданные: Sourcify.

Исходный код принадлежит авторам контракта.