ETH Price: $3,447.93 (+3.65%)
Gas: 0.26 Gwei

Contract

0x26D1B72f2A7bd6B0BA88e58aBc7206ADac76c173
 

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

1 Internal Transaction and 2 Token Transfers found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x3d602d80237373652025-11-06 2:48:592 hrs ago1762397339  Contract Creation0 ETH
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

Minimal Proxy Contract for 0x7b4cb30d13983bf81767531433cebd4214908a99

Contract Name:
LockstakeUrn

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 200 runs

Other Settings:
shanghai EvmVersion, GNU AGPLv3 license

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-FileCopyrightText: © 2023 Dai Foundation <www.daifoundation.org>
// SPDX-License-Identifier: AGPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero 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 Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

pragma solidity ^0.8.21;

interface VatLike {
    function hope(address) external;
}

interface GemLike {
    function balanceOf(address) external view returns (uint256);
    function approve(address, uint256) external;
    function transfer(address, uint256) external;
}

interface StakingRewardsLike {
    function rewardsToken() external view returns (GemLike);
    function stake(uint256, uint16) external;
    function withdraw(uint256) external;
    function getReward() external;
}

contract LockstakeUrn {
    // --- immutables ---

    address immutable public engine;
    GemLike immutable public lssky;
    VatLike immutable public vat;

    // --- modifiers ---

    modifier isEngine {
        require(msg.sender == engine, "LockstakeUrn/not-engine");
        _;
    }

    // --- constructor & init ---

    constructor(address vat_, address lssky_) {
        engine = msg.sender;
        vat = VatLike(vat_);
        lssky = GemLike(lssky_);
    }

    function init() external isEngine {
        vat.hope(msg.sender);
        lssky.approve(msg.sender, type(uint256).max);
    }

    // --- staking functions ---

    function stake(address farm, uint256 wad, uint16 ref) external isEngine {
        lssky.approve(farm, wad);
        StakingRewardsLike(farm).stake(wad, ref);
    }

    function withdraw(address farm, uint256 wad) external isEngine {
        StakingRewardsLike(farm).withdraw(wad);
    }

    function getReward(address farm, address to) external isEngine returns (uint256 amt) {
        StakingRewardsLike(farm).getReward();
        GemLike rewardsToken = StakingRewardsLike(farm).rewardsToken();
        amt = rewardsToken.balanceOf(address(this));
        rewardsToken.transfer(to, amt);
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "viaIR": false,
  "libraries": {}
}

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"vat_","type":"address"},{"internalType":"address","name":"lssky_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"engine","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"farm","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"getReward","outputs":[{"internalType":"uint256","name":"amt","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lssky","outputs":[{"internalType":"contract GemLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"farm","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"},{"internalType":"uint16","name":"ref","type":"uint16"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vat","outputs":[{"internalType":"contract VatLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"farm","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

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