ETH Price: $1,801.75 (+10.47%)
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Delegate293084482025-04-23 11:04:032 mins ago1745406243IN
0x469788fE...6Fc015446
0 ETH0.000000090.00207374
Set Delegate293083722025-04-23 11:01:315 mins ago1745406091IN
0x469788fE...6Fc015446
0 ETH0.00000010.00216388
Set Delegate293075562025-04-23 10:34:1932 mins ago1745404459IN
0x469788fE...6Fc015446
0 ETH0.000000090.00200488
Set Delegate293073242025-04-23 10:26:3540 mins ago1745403995IN
0x469788fE...6Fc015446
0 ETH0.000000090.00200959
Set Delegate293071612025-04-23 10:21:0945 mins ago1745403669IN
0x469788fE...6Fc015446
0 ETH0.00000010.00229824
Set Delegate293070802025-04-23 10:18:2748 mins ago1745403507IN
0x469788fE...6Fc015446
0 ETH0.00000010.00215299
Set Delegate293070292025-04-23 10:16:4550 mins ago1745403405IN
0x469788fE...6Fc015446
0 ETH0.00000010.00220457
Set Delegate293062342025-04-23 9:50:151 hr ago1745401815IN
0x469788fE...6Fc015446
0 ETH0.000000120.00261053
Set Delegate293056732025-04-23 9:31:331 hr ago1745400693IN
0x469788fE...6Fc015446
0 ETH0.000000090.00201313
Set Delegate293052802025-04-23 9:18:271 hr ago1745399907IN
0x469788fE...6Fc015446
0 ETH0.000000090.00201309
Set Delegate293050312025-04-23 9:10:091 hr ago1745399409IN
0x469788fE...6Fc015446
0 ETH0.000000080.00190853
Set Delegate293049692025-04-23 9:08:051 hr ago1745399285IN
0x469788fE...6Fc015446
0 ETH0.000000080.00190577
Set Delegate293048412025-04-23 9:03:492 hrs ago1745399029IN
0x469788fE...6Fc015446
0 ETH0.000000090.00211888
Set Delegate293044652025-04-23 8:51:172 hrs ago1745398277IN
0x469788fE...6Fc015446
0 ETH0.000000090.00211354
Set Delegate293043842025-04-23 8:48:352 hrs ago1745398115IN
0x469788fE...6Fc015446
0 ETH0.000000090.00201655
Set Delegate293043762025-04-23 8:48:192 hrs ago1745398099IN
0x469788fE...6Fc015446
0 ETH0.000000130.0028318
Clear Delegate293042392025-04-23 8:43:452 hrs ago1745397825IN
0x469788fE...6Fc015446
0 ETH0.000000050.00210934
Set Delegate293038082025-04-23 8:29:232 hrs ago1745396963IN
0x469788fE...6Fc015446
0 ETH0.000000090.00210357
Set Delegate293037392025-04-23 8:27:052 hrs ago1745396825IN
0x469788fE...6Fc015446
0 ETH0.000000090.00200363
Set Delegate293036762025-04-23 8:24:592 hrs ago1745396699IN
0x469788fE...6Fc015446
0 ETH0.000000090.00200954
Set Delegate293032312025-04-23 8:10:092 hrs ago1745395809IN
0x469788fE...6Fc015446
0 ETH0.000000110.00239423
Set Delegate293028032025-04-23 7:55:533 hrs ago1745394953IN
0x469788fE...6Fc015446
0 ETH0.00000010.00220919
Set Delegate293027602025-04-23 7:54:273 hrs ago1745394867IN
0x469788fE...6Fc015446
0 ETH0.000000090.00201566
Set Delegate293026632025-04-23 7:51:133 hrs ago1745394673IN
0x469788fE...6Fc015446
0 ETH0.000000090.00200349
Set Delegate293025532025-04-23 7:47:333 hrs ago1745394453IN
0x469788fE...6Fc015446
0 ETH0.000000110.00242347
View all transactions

Latest 1 internal transaction

Parent Transaction Hash Block From To
178947242024-08-02 6:06:35264 days ago1722578795  Contract Creation0 ETH

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DelegateRegistry

Compiler Version
v0.7.2+commit.51b20bc0

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license
/**
 *Submitted for verification at basescan.org on 2024-08-02
*/

/**
 *Submitted for verification at optimistic.etherscan.io on 2022-08-14
*/

// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.8.0;

contract DelegateRegistry {
    
    // The first key is the delegator and the second key a id. 
    // The value is the address of the delegate 
    mapping (address => mapping (bytes32 => address)) public delegation;
    
    // Using these events it is possible to process the events to build up reverse lookups.
    // The indeces allow it to be very partial about how to build this lookup (e.g. only for a specific delegate).
    event SetDelegate(address indexed delegator, bytes32 indexed id, address indexed delegate);
    event ClearDelegate(address indexed delegator, bytes32 indexed id, address indexed delegate);
    
    /// @dev Sets a delegate for the msg.sender and a specific id.
    ///      The combination of msg.sender and the id can be seen as a unique key.
    /// @param id Id for which the delegate should be set
    /// @param delegate Address of the delegate
    function setDelegate(bytes32 id, address delegate) public {
        require (delegate != msg.sender, "Can't delegate to self");
        require (delegate != address(0), "Can't delegate to 0x0");
        address currentDelegate = delegation[msg.sender][id];
        require (delegate != currentDelegate, "Already delegated to this address");
        
        // Update delegation mapping
        delegation[msg.sender][id] = delegate;
        
        if (currentDelegate != address(0)) {
            emit ClearDelegate(msg.sender, id, currentDelegate);
        }

        emit SetDelegate(msg.sender, id, delegate);
    }
    
    /// @dev Clears a delegate for the msg.sender and a specific id.
    ///      The combination of msg.sender and the id can be seen as a unique key.
    /// @param id Id for which the delegate should be set
    function clearDelegate(bytes32 id) public {
        address currentDelegate = delegation[msg.sender][id];
        require (currentDelegate != address(0), "No delegate set");
        
        // update delegation mapping
        delegation[msg.sender][id] = address(0);
        
        emit ClearDelegate(msg.sender, id, currentDelegate);
    }
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"}],"name":"ClearDelegate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"}],"name":"SetDelegate","type":"event"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"clearDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"delegation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610794806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806374c6c45414610046578063bd86e508146100be578063f0bedbe21461010c575b600080fd5b6100926004803603604081101561005c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061013a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61010a600480360360408110156100d457600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061017c565b005b6101386004803603602081101561012257600080fd5b8101908080359060200190929190505050610538565b005b60006020528160005260406000206020528060005260406000206000915091509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561021e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f43616e27742064656c656761746520746f2073656c660000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156102c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f43616e27742064656c656761746520746f20307830000000000000000000000081525060200191505060405180910390fd5b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156103ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061073e6021913960400191505060405180910390fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146104d8578073ffffffffffffffffffffffffffffffffffffffff16833373ffffffffffffffffffffffffffffffffffffffff167f9c4f00c4291262731946e308dc2979a56bd22cce8f95906b975065e96cd5a06460405160405180910390a45b8173ffffffffffffffffffffffffffffffffffffffff16833373ffffffffffffffffffffffffffffffffffffffff167fa9a7fd460f56bddb880a465a9c3e9730389c70bc53108148f16d55a87a6c468e60405160405180910390a4505050565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561064f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4e6f2064656c656761746520736574000000000000000000000000000000000081525060200191505060405180910390fd5b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16823373ffffffffffffffffffffffffffffffffffffffff167f9c4f00c4291262731946e308dc2979a56bd22cce8f95906b975065e96cd5a06460405160405180910390a4505056fe416c72656164792064656c65676174656420746f20746869732061646472657373a2646970667358221220b6cd5a8d04426e1189563fbec7dfec4ba70090dc70fe05097a137991fe1b396964736f6c63430007020033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c806374c6c45414610046578063bd86e508146100be578063f0bedbe21461010c575b600080fd5b6100926004803603604081101561005c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061013a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61010a600480360360408110156100d457600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061017c565b005b6101386004803603602081101561012257600080fd5b8101908080359060200190929190505050610538565b005b60006020528160005260406000206020528060005260406000206000915091509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561021e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f43616e27742064656c656761746520746f2073656c660000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156102c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f43616e27742064656c656761746520746f20307830000000000000000000000081525060200191505060405180910390fd5b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156103ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061073e6021913960400191505060405180910390fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146104d8578073ffffffffffffffffffffffffffffffffffffffff16833373ffffffffffffffffffffffffffffffffffffffff167f9c4f00c4291262731946e308dc2979a56bd22cce8f95906b975065e96cd5a06460405160405180910390a45b8173ffffffffffffffffffffffffffffffffffffffff16833373ffffffffffffffffffffffffffffffffffffffff167fa9a7fd460f56bddb880a465a9c3e9730389c70bc53108148f16d55a87a6c468e60405160405180910390a4505050565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561064f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4e6f2064656c656761746520736574000000000000000000000000000000000081525060200191505060405180910390fd5b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16823373ffffffffffffffffffffffffffffffffffffffff167f9c4f00c4291262731946e308dc2979a56bd22cce8f95906b975065e96cd5a06460405160405180910390a4505056fe416c72656164792064656c65676174656420746f20746869732061646472657373a2646970667358221220b6cd5a8d04426e1189563fbec7dfec4ba70090dc70fe05097a137991fe1b396964736f6c63430007020033

Deployed Bytecode Sourcemap

160:2120:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;314:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1065:635;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1925:352;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;314:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1065:635::-;1155:10;1143:22;;:8;:22;;;;1134:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1232:1;1212:22;;:8;:22;;;;1203:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1271:23;1297:10;:22;1308:10;1297:22;;;;;;;;;;;;;;;:26;1320:2;1297:26;;;;;;;;;;;;;;;;;;;;;1271:52;;1355:15;1343:27;;:8;:27;;;;1334:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1496:8;1467:10;:22;1478:10;1467:22;;;;;;;;;;;;;;;:26;1490:2;1467:26;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;1556:1;1529:29;;:15;:29;;;1525:113;;1610:15;1580:46;;1606:2;1594:10;1580:46;;;;;;;;;;;;1525:113;1683:8;1655:37;;1679:2;1667:10;1655:37;;;;;;;;;;;;1065:635;;;:::o;1925:352::-;1978:23;2004:10;:22;2015:10;2004:22;;;;;;;;;;;;;;;:26;2027:2;2004:26;;;;;;;;;;;;;;;;;;;;;1978:52;;2077:1;2050:29;;:15;:29;;;;2041:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2195:1;2158:10;:22;2169:10;2158:22;;;;;;;;;;;;;;;:26;2181:2;2158:26;;;;;;;;;;;;:39;;;;;;;;;;;;;;;;;;2253:15;2223:46;;2249:2;2237:10;2223:46;;;;;;;;;;;;1925:352;;:::o

Swarm Source

ipfs://b6cd5a8d04426e1189563fbec7dfec4ba70090dc70fe05097a137991fe1b3969

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