HYPE Price: $22.90 (-1.29%)
 

Overview

HYPE Balance

HyperEVM LogoHyperEVM LogoHyperEVM Logo0 HYPE

HYPE Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
KHypeRateProvider

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion, GNU GPLv3 license
// 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.22;

import "@balancer-v3-monorepo/interfaces/solidity-utils/helpers/IRateProvider.sol";

interface IStakingAccountant {
    function kHYPEToHYPE(uint256 kHYPEAmount) external view returns (uint256);
    function HYPEToKHYPE(uint256 HYPEAmount) external view returns (uint256);
}

/**
 * @title kHype Rate Provider
 * @notice Implements the getRate function for kHYPE
 */
contract KHypeRateProvider is IRateProvider {
    IStakingAccountant public constant accountant = IStakingAccountant(0x9209648Ec9D448EF57116B73A2f081835643dc7A);
    uint256 private constant FP_ONE = 1e18;


    constructor() {
    }

    /**
     * @return The exchange rate of 1e18 kHYPE to HYPE
     */
    function getRate() external view override returns (uint256) {
        return accountant.kHYPEToHYPE(FP_ONE);
    }
}

File 2 of 2 : IRateProvider.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.24;

/// @notice General interface for token exchange rates.
interface IRateProvider {
    /**
     * @notice An 18 decimal fixed point number representing the exchange rate of one token to another related token.
     * @dev The meaning of this rate depends on the context. Note that there may be an error associated with a token
     * rate, and the caller might require a certain rounding direction to ensure correctness. This (legacy) interface
     * does not take a rounding direction or return an error, so great care must be taken when interpreting and using
     * rates in downstream computations.
     *
     * @return rate The current token rate
     */
    function getRate() external view returns (uint256 rate);
}

Settings
{
  "remappings": [
    "@balancer-v3-monorepo/interfaces/=lib/balancer-v3-monorepo/pkg/interfaces/contracts/",
    "@balancer-v3-monorepo/vault/=lib/balancer-v3-monorepo/pkg/vault/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@permit2/=lib/permit2/src/",
    "@balancer-labs/=lib/balancer-v3-monorepo/node_modules/@balancer-labs/",
    "balancer-v3-monorepo/=lib/balancer-v3-monorepo/",
    "ds-test/=lib/balancer-v3-monorepo/node_modules/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "eth-gas-reporter/=lib/balancer-v3-monorepo/node_modules/eth-gas-reporter/",
    "forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "hardhat/=lib/balancer-v3-monorepo/node_modules/hardhat/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "permit2/=lib/permit2/",
    "solmate/=lib/permit2/lib/solmate/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"accountant","outputs":[{"internalType":"contract IStakingAccountant","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080604052348015600f57600080fd5b5061015b8061001f6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634fb3ccc51461003b578063679aefce14610073575b600080fd5b610056739209648ec9d448ef57116b73a2f081835643dc7a81565b6040516001600160a01b0390911681526020015b60405180910390f35b61007b610089565b60405190815260200161006a565b604051631d66f0bf60e21b8152670de0b6b3a76400006004820152600090739209648ec9d448ef57116b73a2f081835643dc7a9063759bc2fc90602401602060405180830381865afa1580156100e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610107919061010c565b905090565b60006020828403121561011e57600080fd5b505191905056fea264697066735822122008837efd24ff1c51bdd737eaa336c9f1d8887b62fb8411b2753b546e21547c3664736f6c634300081b0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634fb3ccc51461003b578063679aefce14610073575b600080fd5b610056739209648ec9d448ef57116b73a2f081835643dc7a81565b6040516001600160a01b0390911681526020015b60405180910390f35b61007b610089565b60405190815260200161006a565b604051631d66f0bf60e21b8152670de0b6b3a76400006004820152600090739209648ec9d448ef57116b73a2f081835643dc7a9063759bc2fc90602401602060405180830381865afa1580156100e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610107919061010c565b905090565b60006020828403121561011e57600080fd5b505191905056fea264697066735822122008837efd24ff1c51bdd737eaa336c9f1d8887b62fb8411b2753b546e21547c3664736f6c634300081b0033

Deployed Bytecode Sourcemap

1081:426:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1131:110;;1198:42;1131:110;;;;;-1:-1:-1;;;;;203:32:2;;;185:51;;173:2;158:18;1131:110:1;;;;;;;;1391:114;;;:::i;:::-;;;393:25:2;;;381:2;366:18;1391:114:1;247:177:2;1391:114:1;1468:30;;-1:-1:-1;;;1468:30:1;;1281:4;1468:30;;;393:25:2;1442:7:1;;1198:42;;1468:22;;366:18:2;;1468:30:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1461:37;;1391:114;:::o;429:184:2:-;499:6;552:2;540:9;531:7;527:23;523:32;520:52;;;568:1;565;558:12;520:52;-1:-1:-1;591:16:2;;429:184;-1:-1:-1;429:184:2:o

Swarm Source

ipfs://08837efd24ff1c51bdd737eaa336c9f1d8887b62fb8411b2753b546e21547c36

Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

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

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.