ETH Price: $3,094.16 (+0.03%)

Contract

0x8998822a08ca96bb23491e8279E2978618fc903c

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Set LBTC Address177853702025-11-30 18:43:0139 days ago1764528181IN
0x8998822a...618fc903c
0 ETH0.000001350.00000026

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:
YechoLombardLBTCHelper

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
No with 200 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: BSL 1.1
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";

/*
  ██    ██ ███████  ██████ ██   ██  ██████  
   ██  ██  ██      ██      ██   ██ ██    ██ 
    ████   █████   ██      ███████ ██    ██ 
     ██    ██      ██      ██   ██ ██    ██ 
     ██    ███████  ██████ ██   ██  ██████  

  Yecho - Know Your Yield
  LBTC (Lombard) Helper Smartcontract

  https://www.yecho.app | https://x.com/YechoApp
  By https://x.com/TRTtheSalad
*/

interface ILBTC {
    function balanceOf(address account) external view returns (uint256);
    function getRate() external view returns (uint256);
}

contract YechoLombardLBTCHelper is Ownable {
    ILBTC public lbtc;

    event LBTCAddressUpdated(address newAddress);

    constructor(address _lbtcAddress) Ownable(msg.sender) {
        require(_lbtcAddress != address(0), "Invalid LBTC address");
        lbtc = ILBTC(_lbtcAddress);
    }

    function setLBTCAddress(address _newLBTCAddress) external onlyOwner {
        require(_newLBTCAddress != address(0), "Invalid LBTC address");
        lbtc = ILBTC(_newLBTCAddress);
        emit LBTCAddressUpdated(_newLBTCAddress);
    }

    function getHelper(address user) external view returns (uint256) {
        uint256 balance = lbtc.balanceOf(user);
        uint256 rate = lbtc.getRate();
        return (balance * rate) / 1e18;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "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":"address","name":"_lbtcAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"LBTCAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getHelper","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lbtc","outputs":[{"internalType":"contract ILBTC","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newLBTCAddress","type":"address"}],"name":"setLBTCAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561000f575f80fd5b50604051610c0b380380610c0b83398181016040528101906100319190610285565b335f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036100a2575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161009991906102bf565b60405180910390fd5b6100b18161016660201b60201c565b505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610120576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011790610332565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610350565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102548261022b565b9050919050565b6102648161024a565b811461026e575f80fd5b50565b5f8151905061027f8161025b565b92915050565b5f6020828403121561029a57610299610227565b5b5f6102a784828501610271565b91505092915050565b6102b98161024a565b82525050565b5f6020820190506102d25f8301846102b0565b92915050565b5f82825260208201905092915050565b7f496e76616c6964204c42544320616464726573730000000000000000000000005f82015250565b5f61031c6014836102d8565b9150610327826102e8565b602082019050919050565b5f6020820190508181035f83015261034981610310565b9050919050565b6108ae8061035d5f395ff3fe608060405234801561000f575f80fd5b5060043610610060575f3560e01c806368b3c91014610064578063715018a61461008257806375d393561461008c5780637997975f146100bc5780638da5cb5b146100d8578063f2fde38b146100f6575b5f80fd5b61006c610112565b6040516100799190610604565b60405180910390f35b61008a610137565b005b6100a660048036038101906100a1919061065c565b61014a565b6040516100b3919061069f565b60405180910390f35b6100d660048036038101906100d1919061065c565b6102a0565b005b6100e0610390565b6040516100ed91906106c7565b60405180910390f35b610110600480360381019061010b919061065c565b6103b7565b005b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61013f61043b565b6101485f6104c2565b565b5f8060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b81526004016101a691906106c7565b602060405180830381865afa1580156101c1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e5919061070a565b90505f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663679aefce6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610252573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610276919061070a565b9050670de0b6b3a7640000818361028d9190610762565b61029791906107d0565b92505050919050565b6102a861043b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d9061085a565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f5ebaba5f5e2e541dee4d044137b9cf4dcb265274c97df39414b78820e2787f268160405161038591906106c7565b60405180910390a150565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6103bf61043b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361042f575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161042691906106c7565b60405180910390fd5b610438816104c2565b50565b610443610583565b73ffffffffffffffffffffffffffffffffffffffff16610461610390565b73ffffffffffffffffffffffffffffffffffffffff16146104c057610484610583565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016104b791906106c7565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6105cc6105c76105c28461058a565b6105a9565b61058a565b9050919050565b5f6105dd826105b2565b9050919050565b5f6105ee826105d3565b9050919050565b6105fe816105e4565b82525050565b5f6020820190506106175f8301846105f5565b92915050565b5f80fd5b5f61062b8261058a565b9050919050565b61063b81610621565b8114610645575f80fd5b50565b5f8135905061065681610632565b92915050565b5f602082840312156106715761067061061d565b5b5f61067e84828501610648565b91505092915050565b5f819050919050565b61069981610687565b82525050565b5f6020820190506106b25f830184610690565b92915050565b6106c181610621565b82525050565b5f6020820190506106da5f8301846106b8565b92915050565b6106e981610687565b81146106f3575f80fd5b50565b5f81519050610704816106e0565b92915050565b5f6020828403121561071f5761071e61061d565b5b5f61072c848285016106f6565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61076c82610687565b915061077783610687565b925082820261078581610687565b9150828204841483151761079c5761079b610735565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6107da82610687565b91506107e583610687565b9250826107f5576107f46107a3565b5b828204905092915050565b5f82825260208201905092915050565b7f496e76616c6964204c42544320616464726573730000000000000000000000005f82015250565b5f610844601483610800565b915061084f82610810565b602082019050919050565b5f6020820190508181035f83015261087181610838565b905091905056fea2646970667358221220cf0ed2b55eb4e14a0fcead172600cb33b6fe43c0412f10d163e118fdd2bf162964736f6c634300081a00330000000000000000000000008236a87084f8b84306f72007f36f2618a5634494

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610060575f3560e01c806368b3c91014610064578063715018a61461008257806375d393561461008c5780637997975f146100bc5780638da5cb5b146100d8578063f2fde38b146100f6575b5f80fd5b61006c610112565b6040516100799190610604565b60405180910390f35b61008a610137565b005b6100a660048036038101906100a1919061065c565b61014a565b6040516100b3919061069f565b60405180910390f35b6100d660048036038101906100d1919061065c565b6102a0565b005b6100e0610390565b6040516100ed91906106c7565b60405180910390f35b610110600480360381019061010b919061065c565b6103b7565b005b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61013f61043b565b6101485f6104c2565b565b5f8060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b81526004016101a691906106c7565b602060405180830381865afa1580156101c1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e5919061070a565b90505f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663679aefce6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610252573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610276919061070a565b9050670de0b6b3a7640000818361028d9190610762565b61029791906107d0565b92505050919050565b6102a861043b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d9061085a565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f5ebaba5f5e2e541dee4d044137b9cf4dcb265274c97df39414b78820e2787f268160405161038591906106c7565b60405180910390a150565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6103bf61043b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361042f575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161042691906106c7565b60405180910390fd5b610438816104c2565b50565b610443610583565b73ffffffffffffffffffffffffffffffffffffffff16610461610390565b73ffffffffffffffffffffffffffffffffffffffff16146104c057610484610583565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016104b791906106c7565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6105cc6105c76105c28461058a565b6105a9565b61058a565b9050919050565b5f6105dd826105b2565b9050919050565b5f6105ee826105d3565b9050919050565b6105fe816105e4565b82525050565b5f6020820190506106175f8301846105f5565b92915050565b5f80fd5b5f61062b8261058a565b9050919050565b61063b81610621565b8114610645575f80fd5b50565b5f8135905061065681610632565b92915050565b5f602082840312156106715761067061061d565b5b5f61067e84828501610648565b91505092915050565b5f819050919050565b61069981610687565b82525050565b5f6020820190506106b25f830184610690565b92915050565b6106c181610621565b82525050565b5f6020820190506106da5f8301846106b8565b92915050565b6106e981610687565b81146106f3575f80fd5b50565b5f81519050610704816106e0565b92915050565b5f6020828403121561071f5761071e61061d565b5b5f61072c848285016106f6565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61076c82610687565b915061077783610687565b925082820261078581610687565b9150828204841483151761079c5761079b610735565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6107da82610687565b91506107e583610687565b9250826107f5576107f46107a3565b5b828204905092915050565b5f82825260208201905092915050565b7f496e76616c6964204c42544320616464726573730000000000000000000000005f82015250565b5f610844601483610800565b915061084f82610810565b602082019050919050565b5f6020820190508181035f83015261087181610838565b905091905056fea2646970667358221220cf0ed2b55eb4e14a0fcead172600cb33b6fe43c0412f10d163e118fdd2bf162964736f6c634300081a0033

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

0000000000000000000000008236a87084f8b84306f72007f36f2618a5634494

-----Decoded View---------------
Arg [0] : _lbtcAddress (address): 0x8236a87084f8B84306f72007F36F2618A5634494

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000008236a87084f8b84306f72007f36f2618a5634494


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
[ 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.