Skip to content
Verified contractExactMIT

TransparentUpgradeableProxy

Address0x0a00a2d8121e4cd5c49d5ae366f37a79fc72098b
Balance

0 ETH

 

Transactions

45

 

Compiler

solc 0.8.20

 

Same code

1,298 more contracts

 

Details

Compiler
solc 0.8.20+commit.a1b79de6
Language
solidity
Optimization
Yes, 200 runs
EVM version
paris
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
20,341,577
Creation transaction
0xe40ba2c87e…93317b3e2c
Proxy implementation
0xa7973e8c…cacbc9d5Treasury
Main copy (most transactions)
0xda5e1988…847cbef6

112 files

The source code is large: one file is shown at a time. Choose a file in the list.

contracts/rate_providers/InceptionRateProvider.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

// import "@openzeppelin/contracts/utils/math/SafeMath.sol";

import "../interfaces/IRateProvider.sol";
import "../interfaces/IInceptionRatioFeed.sol";

/// @author The InceptionLRT team
/// @title The InceptionRateProvider contract
/// @notice Inheritable standard rate provider interface.
abstract contract InceptionRateProvider is IRateProvider {
    //using SafeMath for uint256;

    IInceptionRatioFeed public ratioFeed;
    address internal _asset;

    constructor(address ratioFeedAddress, address assetAddress) payable {
        ratioFeed = IInceptionRatioFeed(ratioFeedAddress);
        _asset = assetAddress;
    }

    function getRate() external view override returns (uint256) {
        return
            safeFloorMultiplyAndDivide(
                1e18,
                1e18,
                ratioFeed.getRatioFor(_asset)
            );
    }

    function safeFloorMultiplyAndDivide(
        uint256 a,
        uint256 b,
        uint256 c
    ) internal pure returns (uint256) {
        // uint256 remainder = a.mod(c);
        // uint256 result = a.div(c);
        // bool safe;
        // (safe, result) = result.tryMul(b);
        // if (!safe) {
        //     return
        //         0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
        // }
        // (safe, result) = result.tryAdd(remainder.mul(b).div(c));
        // if (!safe) {
        //     return
        //         0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
        // }
        return 0;
    }
}
Compiler settingsShow
{
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "paris",
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.