ETH Price: $1,975.62 (+0.68%)
Gas: 0.03 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

ContractCreator

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Renew244422212026-02-12 17:35:239 days ago1770917723IN
0xf55575Bd...74d8fA81A
1.70946731 ETH0.00002290.19067315
VIEW ADVANCED FILTER
Amount:Between 1-10k
Reset Filter

Showing the last 1 internal transaction (View Advanced Filter)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Renew244422212026-02-12 17:35:239 days ago1770917723
0xf55575Bd...74d8fA81A
1.70946731 ETH
VIEW ADVANCED FILTER
Loading...
Loading
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

Contract Source Code Verified (Exact Match)

Contract Name:
UniversalRegistrarRenewalWithReferrer

Compiler Version
v0.8.29+commit.ab55807c

Optimization Enabled:
No with 200 runs

Other Settings:
prague EvmVersion
File 1 of 7 : UniversalRegistrarRenewalWithReferrer.sol
//SPDX-License-Identifier: MIT
pragma solidity ~0.8.17;

import {ENS} from "ens-contracts/registry/ENS.sol";
import {ReverseClaimer} from "ens-contracts/reverseRegistrar/ReverseClaimer.sol";
import {IWrappedEthRegistrarController} from "./IWrappedEthRegistrarController.sol";
import {IRegistrarRenewalWithReferral} from "./IRegistrarRenewalWithReferral.sol";

/**
 * @title UniversalRegistrarRenewalWithReferrer
 * @notice A contract for renewing ENS names via the WrappedEthRegistrarController with referral tracking.
 *
 * This contract provides a simplified renewal process that:
 * 1. Calls WRAPPED_ETH_REGISTRAR_CONTROLLER.renew(),
 * 2. Emits the RenewalReferred event for referral tracking, and
 * 3. Refunds the sender any overpayment.
 *
 * To use, replace UnwrappedEthRegistrarController.renew() with UniversalRegistrarRenewalWithReferrer.renew()
 * and all renewal transactions will include the referrer event.
 */
contract UniversalRegistrarRenewalWithReferrer is IRegistrarRenewalWithReferral, ReverseClaimer {
    IWrappedEthRegistrarController immutable WRAPPED_ETH_REGISTRAR_CONTROLLER;

    /// @notice Emitted when a name is renewed with a referrer.
    ///
    /// @param label The .eth subname label
    /// @param labelHash The keccak256 hash of the .eth subname label
    /// @param cost The actual cost of the renewal
    /// @param duration The duration of the renewal
    /// @param referrer The referrer of the renewal
    event RenewalReferred(string label, bytes32 indexed labelHash, uint256 cost, uint256 duration, bytes32 referrer);

    constructor(ENS ens, IWrappedEthRegistrarController _wrappedEthRegistrarController) ReverseClaimer(ens, msg.sender) {
        WRAPPED_ETH_REGISTRAR_CONTROLLER = _wrappedEthRegistrarController;
    }

    /**
     * @notice Renews an ENS name with referral tracking
     * @param label The label of the .eth subname to renew
     * @param duration The duration to extend the registration
     * @param referrer The referrer of the renewal
     * @dev Gas usage: ~117k
     */
    function renew(string calldata label, uint256 duration, bytes32 referrer) external payable {
        // 1. Call WRAPPED_ETH_REGISTRAR_CONTROLLER.renew() & infer cost
        uint256 prevBalance = address(this).balance;
        WRAPPED_ETH_REGISTRAR_CONTROLLER.renew{value: msg.value}(label, duration);
        uint256 currBalance = address(this).balance;
        uint256 cost = prevBalance - currBalance;

        // 2. Emit the RenewalReferred event with actual cost spent and indexed labelHash for searchability
        // NOTE: we emit `duration` instead of `expiry` to avoid the gas cost of reading the new
        // expiry from the Registry
        emit RenewalReferred(label, keccak256(bytes(label)), cost, duration, referrer);

        // 3. Refund sender contract balance
        if (currBalance > 0) {
            (bool success,) = msg.sender.call{value: currBalance}("");
            require(success, "ETH transfer failed");
        }
    }

    receive() external payable {}
}

//SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface ENS {
    // Logged when the owner of a node assigns a new owner to a subnode.
    event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);

    // Logged when the owner of a node transfers ownership to a new account.
    event Transfer(bytes32 indexed node, address owner);

    // Logged when the resolver for a node changes.
    event NewResolver(bytes32 indexed node, address resolver);

    // Logged when the TTL of a node changes
    event NewTTL(bytes32 indexed node, uint64 ttl);

    // Logged when an operator is added or removed.
    event ApprovalForAll(
        address indexed owner,
        address indexed operator,
        bool approved
    );

    function setRecord(
        bytes32 node,
        address owner,
        address resolver,
        uint64 ttl
    ) external;

    function setSubnodeRecord(
        bytes32 node,
        bytes32 label,
        address owner,
        address resolver,
        uint64 ttl
    ) external;

    function setSubnodeOwner(
        bytes32 node,
        bytes32 label,
        address owner
    ) external returns (bytes32);

    function setResolver(bytes32 node, address resolver) external;

    function setOwner(bytes32 node, address owner) external;

    function setTTL(bytes32 node, uint64 ttl) external;

    function setApprovalForAll(address operator, bool approved) external;

    function owner(bytes32 node) external view returns (address);

    function resolver(bytes32 node) external view returns (address);

    function ttl(bytes32 node) external view returns (uint64);

    function recordExists(bytes32 node) external view returns (bool);

    function isApprovedForAll(
        address owner,
        address operator
    ) external view returns (bool);
}

File 3 of 7 : ReverseClaimer.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.17 <0.9.0;

import {ENS} from "../registry/ENS.sol";
import {IReverseRegistrar} from "../reverseRegistrar/IReverseRegistrar.sol";

contract ReverseClaimer {
    bytes32 constant ADDR_REVERSE_NODE =
        0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;

    constructor(ENS ens, address claimant) {
        IReverseRegistrar reverseRegistrar = IReverseRegistrar(
            ens.owner(ADDR_REVERSE_NODE)
        );
        reverseRegistrar.claim(claimant);
    }
}

//SPDX-License-Identifier: MIT
pragma solidity ~0.8.17;

import {IPriceOracle} from "ens-contracts/ethregistrar/IPriceOracle.sol";

/**
 * ABI for the WrappedEthRegistrarController.
 * @dev Mainnet Address: 0x253553366da8546fc250f225fe3d25d0c782303b
 */
interface IWrappedEthRegistrarController {
    function renew(string calldata name, uint256 duration) external payable;
    function rentPrice(string memory name, uint256 duration) external view returns (IPriceOracle.Price memory price);
}

//SPDX-License-Identifier: MIT
pragma solidity ~0.8.17;

interface IRegistrarRenewalWithReferral {
    function renew(string calldata label, uint256 duration, bytes32 referrer) external payable;
}

pragma solidity >=0.8.4;

interface IReverseRegistrar {
    function setDefaultResolver(address resolver) external;

    function claim(address owner) external returns (bytes32);

    function claimForAddr(
        address addr,
        address owner,
        address resolver
    ) external returns (bytes32);

    function claimWithResolver(
        address owner,
        address resolver
    ) external returns (bytes32);

    function setName(string memory name) external returns (bytes32);

    function setNameForAddr(
        address addr,
        address owner,
        address resolver,
        string memory name
    ) external returns (bytes32);

    function node(address addr) external pure returns (bytes32);
}

File 7 of 7 : IPriceOracle.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.17 <0.9.0;

interface IPriceOracle {
    struct Price {
        uint256 base;
        uint256 premium;
    }

    /// @dev Returns the price to register or renew a name.
    /// @param name The name being registered or renewed.
    /// @param expires When the name presently expires (0 if this is a new registration).
    /// @param duration How long the name is being registered or extended for, in seconds.
    /// @return base premium tuple of base price + premium price
    function price(
        string calldata name,
        uint256 expires,
        uint256 duration
    ) external view returns (Price calldata);
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ens-contracts/=lib/ens-contracts/contracts/",
    "forge-std/=lib/forge-std/src/",
    "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "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": "prague",
  "viaIR": false
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract ENS","name":"ens","type":"address"},{"internalType":"contract IWrappedEthRegistrarController","name":"_wrappedEthRegistrarController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"label","type":"string"},{"indexed":true,"internalType":"bytes32","name":"labelHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"cost","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"referrer","type":"bytes32"}],"name":"RenewalReferred","type":"event"},{"inputs":[{"internalType":"string","name":"label","type":"string"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"bytes32","name":"referrer","type":"bytes32"}],"name":"renew","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a060405234801561000f575f5ffd5b5060405161093638038061093683398181016040528101906100319190610232565b81335f8273ffffffffffffffffffffffffffffffffffffffff166302571be37f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e25f1b6040518263ffffffff1660e01b815260040161008f9190610288565b602060405180830381865afa1580156100aa573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100ce91906102cb565b90508073ffffffffffffffffffffffffffffffffffffffff16631e83409a836040518263ffffffff1660e01b81526004016101099190610305565b6020604051808303815f875af1158015610125573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101499190610348565b505050508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505050610373565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101b58261018c565b9050919050565b5f6101c6826101ab565b9050919050565b6101d6816101bc565b81146101e0575f5ffd5b50565b5f815190506101f1816101cd565b92915050565b5f610201826101ab565b9050919050565b610211816101f7565b811461021b575f5ffd5b50565b5f8151905061022c81610208565b92915050565b5f5f6040838503121561024857610247610188565b5b5f610255858286016101e3565b92505060206102668582860161021e565b9150509250929050565b5f819050919050565b61028281610270565b82525050565b5f60208201905061029b5f830184610279565b92915050565b6102aa816101ab565b81146102b4575f5ffd5b50565b5f815190506102c5816102a1565b92915050565b5f602082840312156102e0576102df610188565b5b5f6102ed848285016102b7565b91505092915050565b6102ff816101ab565b82525050565b5f6020820190506103185f8301846102f6565b92915050565b61032781610270565b8114610331575f5ffd5b50565b5f815190506103428161031e565b92915050565b5f6020828403121561035d5761035c610188565b5b5f61036a84828501610334565b91505092915050565b6080516105ac61038a5f395f604e01526105ac5ff3fe608060405260043610610021575f3560e01c806318026ad11461002c57610028565b3661002857005b5f5ffd5b610046600480360381019061004191906102cc565b610048565b005b5f4790507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663acf1a841348787876040518563ffffffff1660e01b81526004016100aa939291906103a6565b5f604051808303818588803b1580156100c1575f5ffd5b505af11580156100d3573d5f5f3e3d5ffd5b50505050505f4790505f81836100e99190610403565b905086866040516100fb929190610464565b60405180910390207fbdc63144ed642739de589db600d0c625e01c4994358ad6591b3f6e424ea59945888884898960405161013a95949392919061048b565b60405180910390a25f8211156101f4575f3373ffffffffffffffffffffffffffffffffffffffff168360405161016f906104fa565b5f6040518083038185875af1925050503d805f81146101a9576040519150601f19603f3d011682016040523d82523d5f602084013e6101ae565b606091505b50509050806101f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101e990610558565b60405180910390fd5b505b50505050505050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261022657610225610205565b5b8235905067ffffffffffffffff81111561024357610242610209565b5b60208301915083600182028301111561025f5761025e61020d565b5b9250929050565b5f819050919050565b61027881610266565b8114610282575f5ffd5b50565b5f813590506102938161026f565b92915050565b5f819050919050565b6102ab81610299565b81146102b5575f5ffd5b50565b5f813590506102c6816102a2565b92915050565b5f5f5f5f606085870312156102e4576102e36101fd565b5b5f85013567ffffffffffffffff81111561030157610300610201565b5b61030d87828801610211565b9450945050602061032087828801610285565b9250506040610331878288016102b8565b91505092959194509250565b5f82825260208201905092915050565b828183375f83830152505050565b5f601f19601f8301169050919050565b5f610376838561033d565b935061038383858461034d565b61038c8361035b565b840190509392505050565b6103a081610266565b82525050565b5f6040820190508181035f8301526103bf81858761036b565b90506103ce6020830184610397565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61040d82610266565b915061041883610266565b92508282039050818111156104305761042f6103d6565b5b92915050565b5f81905092915050565b5f61044b8385610436565b935061045883858461034d565b82840190509392505050565b5f610470828486610440565b91508190509392505050565b61048581610299565b82525050565b5f6080820190508181035f8301526104a481878961036b565b90506104b36020830186610397565b6104c06040830185610397565b6104cd606083018461047c565b9695505050505050565b50565b5f6104e55f83610436565b91506104f0826104d7565b5f82019050919050565b5f610504826104da565b9150819050919050565b7f455448207472616e73666572206661696c6564000000000000000000000000005f82015250565b5f61054260138361033d565b915061054d8261050e565b602082019050919050565b5f6020820190508181035f83015261056f81610536565b905091905056fea26469706673582212201a7e29062c5bb211c5b70b80d225832999e8a08becb1c58f90464b16b5480a0e64736f6c634300081d003300000000000000000000000000000000000c2e074ec69a0dfb2997ba6c7d2e1e000000000000000000000000253553366da8546fc250f225fe3d25d0c782303b

Deployed Bytecode

0x608060405260043610610021575f3560e01c806318026ad11461002c57610028565b3661002857005b5f5ffd5b610046600480360381019061004191906102cc565b610048565b005b5f4790507f000000000000000000000000253553366da8546fc250f225fe3d25d0c782303b73ffffffffffffffffffffffffffffffffffffffff1663acf1a841348787876040518563ffffffff1660e01b81526004016100aa939291906103a6565b5f604051808303818588803b1580156100c1575f5ffd5b505af11580156100d3573d5f5f3e3d5ffd5b50505050505f4790505f81836100e99190610403565b905086866040516100fb929190610464565b60405180910390207fbdc63144ed642739de589db600d0c625e01c4994358ad6591b3f6e424ea59945888884898960405161013a95949392919061048b565b60405180910390a25f8211156101f4575f3373ffffffffffffffffffffffffffffffffffffffff168360405161016f906104fa565b5f6040518083038185875af1925050503d805f81146101a9576040519150601f19603f3d011682016040523d82523d5f602084013e6101ae565b606091505b50509050806101f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101e990610558565b60405180910390fd5b505b50505050505050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261022657610225610205565b5b8235905067ffffffffffffffff81111561024357610242610209565b5b60208301915083600182028301111561025f5761025e61020d565b5b9250929050565b5f819050919050565b61027881610266565b8114610282575f5ffd5b50565b5f813590506102938161026f565b92915050565b5f819050919050565b6102ab81610299565b81146102b5575f5ffd5b50565b5f813590506102c6816102a2565b92915050565b5f5f5f5f606085870312156102e4576102e36101fd565b5b5f85013567ffffffffffffffff81111561030157610300610201565b5b61030d87828801610211565b9450945050602061032087828801610285565b9250506040610331878288016102b8565b91505092959194509250565b5f82825260208201905092915050565b828183375f83830152505050565b5f601f19601f8301169050919050565b5f610376838561033d565b935061038383858461034d565b61038c8361035b565b840190509392505050565b6103a081610266565b82525050565b5f6040820190508181035f8301526103bf81858761036b565b90506103ce6020830184610397565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61040d82610266565b915061041883610266565b92508282039050818111156104305761042f6103d6565b5b92915050565b5f81905092915050565b5f61044b8385610436565b935061045883858461034d565b82840190509392505050565b5f610470828486610440565b91508190509392505050565b61048581610299565b82525050565b5f6080820190508181035f8301526104a481878961036b565b90506104b36020830186610397565b6104c06040830185610397565b6104cd606083018461047c565b9695505050505050565b50565b5f6104e55f83610436565b91506104f0826104d7565b5f82019050919050565b5f610504826104da565b9150819050919050565b7f455448207472616e73666572206661696c6564000000000000000000000000005f82015250565b5f61054260138361033d565b915061054d8261050e565b602082019050919050565b5f6020820190508181035f83015261056f81610536565b905091905056fea26469706673582212201a7e29062c5bb211c5b70b80d225832999e8a08becb1c58f90464b16b5480a0e64736f6c634300081d0033

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

00000000000000000000000000000000000c2e074ec69a0dfb2997ba6c7d2e1e000000000000000000000000253553366da8546fc250f225fe3d25d0c782303b

-----Decoded View---------------
Arg [0] : ens (address): 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e
Arg [1] : _wrappedEthRegistrarController (address): 0x253553366Da8546fC250F225fe3d25d0C782303b

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000c2e074ec69a0dfb2997ba6c7d2e1e
Arg [1] : 000000000000000000000000253553366da8546fc250f225fe3d25d0c782303b


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.