ETH Price: $2,131.19 (+3.74%)

Contract

0xd2cd8027F8c4B8ddCd1bFcD4e47587f41F2712f2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Create234188172025-09-22 13:18:59163 days ago1758547139IN
0xd2cd8027...41F2712f2
0 ETH0.000205280.61814262
Create218181642025-02-10 19:19:35387 days ago1739215175IN
0xd2cd8027...41F2712f2
0 ETH0.000474881.4299413
Create218181522025-02-10 19:17:11387 days ago1739215031IN
0xd2cd8027...41F2712f2
0 ETH0.000498851.50217862
Create217664592025-02-03 14:04:47394 days ago1738591487IN
0xd2cd8027...41F2712f2
0 ETH0.0039283611.82889483

Latest 4 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x60806040234188172025-09-22 13:18:59163 days ago1758547139
0xd2cd8027...41F2712f2
 Contract Creation0 ETH
0x60806040218181642025-02-10 19:19:35387 days ago1739215175
0xd2cd8027...41F2712f2
 Contract Creation0 ETH
0x60806040218181522025-02-10 19:17:11387 days ago1739215031
0xd2cd8027...41F2712f2
 Contract Creation0 ETH
0x60806040217664592025-02-03 14:04:47394 days ago1738591487
0xd2cd8027...41F2712f2
 Contract Creation0 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CombinedRateProviderFactory

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

pragma solidity ^0.8.0;

import "./BaseRateProviderFactory.sol";
import "./CombinedRateProvider.sol";

/**
 * @title  Combined Rate Provider Factory
 * @notice This contract is a factory for creating instances of CombinedRateProvider.
 * @dev    This factory contract allows for the deployment of CombinedRateProvider contracts, 
 *         which are used to combine market rates from two individual rate providers.
 */


contract CombinedRateProviderFactory is BaseRateProviderFactory {
    /**
     * @notice Deploys a new CombinedRateProvider contract using a price feed.
     * @param _rateProvider1 - The first of two rate providers the user wishes to multiply
     * @param _rateProvider2 - The second of two rate providers the user wishes to multiply
     */
    function create(address _rateProvider1, address _rateProvider2) external returns (CombinedRateProvider) {
        CombinedRateProvider rateProvider = new CombinedRateProvider(_rateProvider1, _rateProvider2);
        _onCreate(address(rateProvider));
        return rateProvider;
    }
}

File 2 of 5 : CombinedRateProvider.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

pragma solidity ^0.8.0;

import "./interfaces/IRateProvider.sol";

contract CombinedRateProvider {
    address public rateProvider1;
    address public rateProvider2;

    constructor(address _rateProvider1, address _rateProvider2) {
        rateProvider1 = _rateProvider1;
        rateProvider2 = _rateProvider2;
    }

    // Function to combine both of the rate providers via multiplication
    function getRate() external view returns (uint256) {
        // rateProvider1 and rateProvider2 must respect the proper interface.
        uint256 rate1 = IRateProvider(rateProvider1).getRate();
        uint256 rate2 = IRateProvider(rateProvider2).getRate();
        return rate1 * rate2 / 1e18; // Multiplies the rates respecting the proper interface together and divides by 1e18 to normalize.
    }
}

// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

pragma solidity ^0.8.0;

import "./interfaces/IBaseRateProviderFactory.sol";

/**
 * @title Base Rate Provider Factory
 * @notice Base Factory for creating RateProviders
 * @dev This is a base contract for building factories that create RateProviders.
 */
contract BaseRateProviderFactory is IBaseRateProviderFactory {
    // Mapping of rate providers created by this factory.
    mapping(address => bool) private _isRateProviderFromFactory;

    event RateProviderCreated(address indexed rateProvider);

    function isRateProviderFromFactory(address rateProvider) external view returns (bool) {
        return _isRateProviderFromFactory[rateProvider];
    }

    function _onCreate(address rateProvider) internal {
        _isRateProviderFromFactory[rateProvider] = true;
        emit RateProviderCreated(rateProvider);
    }
}

File 4 of 5 : IRateProvider.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

pragma solidity ^0.8.0;

// TODO: pull this from the monorepo
interface IRateProvider {
    function getRate() external view returns (uint256);
}

// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

pragma solidity ^0.8.0;

interface IBaseRateProviderFactory {
    /**
     * @dev Checks if a rate provider was created by the derived factory.
     * @param rateProvider - Address of the rate provider to check.
     * @return bool - True if the rate provider was created by the derived factory.
     */
    function isRateProviderFromFactory(address rateProvider) external view returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "remappings": []
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rateProvider","type":"address"}],"name":"RateProviderCreated","type":"event"},{"inputs":[{"internalType":"address","name":"_rateProvider1","type":"address"},{"internalType":"address","name":"_rateProvider2","type":"address"}],"name":"create","outputs":[{"internalType":"contract CombinedRateProvider","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"rateProvider","type":"address"}],"name":"isRateProviderFromFactory","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

6080604052348015600e575f80fd5b506109238061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c806319912f71146100385780633e68680a14610068575b5f80fd5b610052600480360381019061004d9190610238565b610098565b60405161005f919061027d565b60405180910390f35b610082600480360381019061007d9190610296565b6100e9565b60405161008f919061032f565b60405180910390f35b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff169050919050565b5f8083836040516100f9906101cd565b610104929190610357565b604051809103905ff08015801561011d573d5f803e3d5ffd5b50905061012981610133565b8091505092915050565b60015f808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f7a8e6b463d413484480a3a8120e5fb841491c52541ac3f649ac41d9b0d088aa660405160405180910390a250565b61056f8061037f83390190565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610207826101de565b9050919050565b610217816101fd565b8114610221575f80fd5b50565b5f813590506102328161020e565b92915050565b5f6020828403121561024d5761024c6101da565b5b5f61025a84828501610224565b91505092915050565b5f8115159050919050565b61027781610263565b82525050565b5f6020820190506102905f83018461026e565b92915050565b5f80604083850312156102ac576102ab6101da565b5b5f6102b985828601610224565b92505060206102ca85828601610224565b9150509250929050565b5f819050919050565b5f6102f76102f26102ed846101de565b6102d4565b6101de565b9050919050565b5f610308826102dd565b9050919050565b5f610319826102fe565b9050919050565b6103298161030f565b82525050565b5f6020820190506103425f830184610320565b92915050565b610351816101fd565b82525050565b5f60408201905061036a5f830185610348565b6103776020830184610348565b939250505056fe608060405234801561000f575f80fd5b5060405161056f38038061056f83398181016040528101906100319190610115565b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610153565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e4826100bb565b9050919050565b6100f4816100da565b81146100fe575f80fd5b50565b5f8151905061010f816100eb565b92915050565b5f806040838503121561012b5761012a6100b7565b5b5f61013885828601610101565b925050602061014985828601610101565b9150509250929050565b61040f806101605f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c806362ced09214610043578063679aefce14610061578063a92563421461007f575b5f80fd5b61004b61009d565b604051610058919061026b565b60405180910390f35b6100696100c0565b604051610076919061029c565b60405180910390f35b610087610207565b604051610094919061026b565b60405180910390f35b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663679aefce6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561012a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061014e91906102e3565b90505f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663679aefce6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101bb573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101df91906102e3565b9050670de0b6b3a764000081836101f6919061033b565b61020091906103a9565b9250505090565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102558261022c565b9050919050565b6102658161024b565b82525050565b5f60208201905061027e5f83018461025c565b92915050565b5f819050919050565b61029681610284565b82525050565b5f6020820190506102af5f83018461028d565b92915050565b5f80fd5b6102c281610284565b81146102cc575f80fd5b50565b5f815190506102dd816102b9565b92915050565b5f602082840312156102f8576102f76102b5565b5b5f610305848285016102cf565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61034582610284565b915061035083610284565b925082820261035e81610284565b915082820484148315176103755761037461030e565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6103b382610284565b91506103be83610284565b9250826103ce576103cd61037c565b5b82820490509291505056fea2646970667358221220042d4c13ed70d27e86c91dfcf978a722bc8db0acc6a08b28fc446f0e294f5f7c64736f6c634300081a0033a264697066735822122026019063da524d12d7c0684c3aa760783c6b8b401ec6c18474f6464ac65aaa6464736f6c634300081a0033

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610034575f3560e01c806319912f71146100385780633e68680a14610068575b5f80fd5b610052600480360381019061004d9190610238565b610098565b60405161005f919061027d565b60405180910390f35b610082600480360381019061007d9190610296565b6100e9565b60405161008f919061032f565b60405180910390f35b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff169050919050565b5f8083836040516100f9906101cd565b610104929190610357565b604051809103905ff08015801561011d573d5f803e3d5ffd5b50905061012981610133565b8091505092915050565b60015f808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f7a8e6b463d413484480a3a8120e5fb841491c52541ac3f649ac41d9b0d088aa660405160405180910390a250565b61056f8061037f83390190565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610207826101de565b9050919050565b610217816101fd565b8114610221575f80fd5b50565b5f813590506102328161020e565b92915050565b5f6020828403121561024d5761024c6101da565b5b5f61025a84828501610224565b91505092915050565b5f8115159050919050565b61027781610263565b82525050565b5f6020820190506102905f83018461026e565b92915050565b5f80604083850312156102ac576102ab6101da565b5b5f6102b985828601610224565b92505060206102ca85828601610224565b9150509250929050565b5f819050919050565b5f6102f76102f26102ed846101de565b6102d4565b6101de565b9050919050565b5f610308826102dd565b9050919050565b5f610319826102fe565b9050919050565b6103298161030f565b82525050565b5f6020820190506103425f830184610320565b92915050565b610351816101fd565b82525050565b5f60408201905061036a5f830185610348565b6103776020830184610348565b939250505056fe608060405234801561000f575f80fd5b5060405161056f38038061056f83398181016040528101906100319190610115565b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610153565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e4826100bb565b9050919050565b6100f4816100da565b81146100fe575f80fd5b50565b5f8151905061010f816100eb565b92915050565b5f806040838503121561012b5761012a6100b7565b5b5f61013885828601610101565b925050602061014985828601610101565b9150509250929050565b61040f806101605f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c806362ced09214610043578063679aefce14610061578063a92563421461007f575b5f80fd5b61004b61009d565b604051610058919061026b565b60405180910390f35b6100696100c0565b604051610076919061029c565b60405180910390f35b610087610207565b604051610094919061026b565b60405180910390f35b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663679aefce6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561012a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061014e91906102e3565b90505f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663679aefce6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101bb573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101df91906102e3565b9050670de0b6b3a764000081836101f6919061033b565b61020091906103a9565b9250505090565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102558261022c565b9050919050565b6102658161024b565b82525050565b5f60208201905061027e5f83018461025c565b92915050565b5f819050919050565b61029681610284565b82525050565b5f6020820190506102af5f83018461028d565b92915050565b5f80fd5b6102c281610284565b81146102cc575f80fd5b50565b5f815190506102dd816102b9565b92915050565b5f602082840312156102f8576102f76102b5565b5b5f610305848285016102cf565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61034582610284565b915061035083610284565b925082820261035e81610284565b915082820484148315176103755761037461030e565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6103b382610284565b91506103be83610284565b9250826103ce576103cd61037c565b5b82820490509291505056fea2646970667358221220042d4c13ed70d27e86c91dfcf978a722bc8db0acc6a08b28fc446f0e294f5f7c64736f6c634300081a0033a264697066735822122026019063da524d12d7c0684c3aa760783c6b8b401ec6c18474f6464ac65aaa6464736f6c634300081a0033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.