ETH Price: $3,037.29 (+0.35%)

Contract

0xb345C00DB684DfCc1519D23d031747E91cdD0c8a

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

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TargetICRHook

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 1 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT

pragma solidity 0.8.26;

import {ITargetICRHook} from "src/interfaces/utils/ITargetICRHook.sol";
import {IEverlongCore} from "src/interfaces/core/IEverlongCore.sol";

/**
 * @title TargetICRHook
 * @author Everlong Labs
 * @notice Simple settable target ICR for MLVs
 */
contract TargetICRHook is ITargetICRHook {
    uint256 targetICR;
    IEverlongCore immutable public everlongCore;

    error NotOwner(address caller);

    constructor(uint256 _targetICR, address _everlongCore) {
        targetICR = _targetICR;
        everlongCore = IEverlongCore(_everlongCore);
    }

    function setTargetICR(uint256 _targetICR) external {
        if (msg.sender != everlongCore.owner()) revert NotOwner(msg.sender);

        targetICR = _targetICR;
    }

    function calcTargetICR() external view returns (uint256) {
        return targetICR;
    }
}

File 2 of 3 : ITargetICRHook.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.26;

interface ITargetICRHook {
    function calcTargetICR()
        external
        view
        returns (uint256 targetICR);
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.26;

/**
 * @title EverlongCore
 * @author Everlong Labs
 * @notice Single source of truth across all Everlong contracts for key administrative data
 */
interface IEverlongCore {
    function owner() external view returns (address);
    function feeReceiver() external view returns (address);
    function priceFeed() external view returns (address);

    function setFeeReceiver(address _feeReceiver) external;
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin-upgradeable/contracts/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "forge-std/=lib/forge-std/src/",
    "@uniswap/v3-core/=lib/v3-core/",
    "@uniswap/v3-periphery/=lib/v3-periphery/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "v3-core/=lib/v3-core/contracts/",
    "v3-periphery/=lib/v3-periphery/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": false
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"uint256","name":"_targetICR","type":"uint256"},{"internalType":"address","name":"_everlongCore","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"NotOwner","type":"error"},{"inputs":[],"name":"calcTargetICR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"everlongCore","outputs":[{"internalType":"contract IEverlongCore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_targetICR","type":"uint256"}],"name":"setTargetICR","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0604052348015600e575f80fd5b50604051610288380380610288833981016040819052602b916040565b5f919091556001600160a01b03166080526078565b5f80604083850312156050575f80fd5b825160208401519092506001600160a01b0381168114606d575f80fd5b809150509250929050565b6080516101f36100955f395f81816048015260a701526101f35ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c806321216ba314610043578063404adb3114610080578063b613933c14610090575b5f80fd5b61006a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516100779190610165565b60405180910390f35b5f54604051908152602001610077565b6100a361009e366004610179565b6100a5565b005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610101573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101259190610190565b6001600160a01b0316336001600160a01b031614610161573360405163245aecd360e01b81526004016101589190610165565b60405180910390fd5b5f55565b6001600160a01b0391909116815260200190565b5f60208284031215610189575f80fd5b5035919050565b5f602082840312156101a0575f80fd5b81516001600160a01b03811681146101b6575f80fd5b939250505056fea264697066735822122075365cf5ced6e71eb648fd06df30c4599514b5651c6f1743816886a0313659e564736f6c634300081a00330000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000776d3a1591e3f8b466b9cee9dd1d849c92b30ca5

Deployed Bytecode

0x608060405234801561000f575f80fd5b506004361061003f575f3560e01c806321216ba314610043578063404adb3114610080578063b613933c14610090575b5f80fd5b61006a7f000000000000000000000000776d3a1591e3f8b466b9cee9dd1d849c92b30ca581565b6040516100779190610165565b60405180910390f35b5f54604051908152602001610077565b6100a361009e366004610179565b6100a5565b005b7f000000000000000000000000776d3a1591e3f8b466b9cee9dd1d849c92b30ca56001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610101573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101259190610190565b6001600160a01b0316336001600160a01b031614610161573360405163245aecd360e01b81526004016101589190610165565b60405180910390fd5b5f55565b6001600160a01b0391909116815260200190565b5f60208284031215610189575f80fd5b5035919050565b5f602082840312156101a0575f80fd5b81516001600160a01b03811681146101b6575f80fd5b939250505056fea264697066735822122075365cf5ced6e71eb648fd06df30c4599514b5651c6f1743816886a0313659e564736f6c634300081a0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000776d3a1591e3f8b466b9cee9dd1d849c92b30ca5

-----Decoded View---------------
Arg [0] : _targetICR (uint256): 2000000000000000000
Arg [1] : _everlongCore (address): 0x776D3a1591E3F8b466B9Cee9DD1D849C92B30Ca5

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [1] : 000000000000000000000000776d3a1591e3f8b466b9cee9dd1d849c92b30ca5


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.