ETH Price: $1,975.38 (+0.08%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Delegate245092022026-02-22 1:44:358 hrs ago1771724675IN
Snapshot: Delegation
0 ETH0.000005630.1207908
Set Delegate245088212026-02-22 0:27:599 hrs ago1771720079IN
Snapshot: Delegation
0 ETH0.000002470.05308
Set Delegate245082772026-02-21 22:38:2311 hrs ago1771713503IN
Snapshot: Delegation
0 ETH0.000002470.05304041
Set Delegate245082052026-02-21 22:23:5911 hrs ago1771712639IN
Snapshot: Delegation
0 ETH0.000006250.13416979
Set Delegate245074902026-02-21 19:59:5914 hrs ago1771703999IN
Snapshot: Delegation
0 ETH0.000002030.04365277
Set Delegate245073782026-02-21 19:37:2314 hrs ago1771702643IN
Snapshot: Delegation
0 ETH0.000095132.04030271
Clear Delegate245073662026-02-21 19:34:5914 hrs ago1771702499IN
Snapshot: Delegation
0 ETH0.000049532.04389495
Set Delegate245073442026-02-21 19:30:3514 hrs ago1771702235IN
Snapshot: Delegation
0 ETH0.000095252.04288477
Set Delegate245065022026-02-21 16:41:3517 hrs ago1771692095IN
Snapshot: Delegation
0 ETH0.000002750.05911203
Set Delegate245064422026-02-21 16:29:2317 hrs ago1771691363IN
Snapshot: Delegation
0 ETH0.000002180.0466846
Set Delegate245060802026-02-21 15:16:5919 hrs ago1771687019IN
Snapshot: Delegation
0 ETH0.000095572.04976613
Clear Delegate245060732026-02-21 15:15:3519 hrs ago1771686935IN
Snapshot: Delegation
0 ETH0.000049472.0415558
Set Delegate245060702026-02-21 15:14:5919 hrs ago1771686899IN
Snapshot: Delegation
0 ETH0.000064382.04721188
Set Delegate245060362026-02-21 15:08:1119 hrs ago1771686491IN
Snapshot: Delegation
0 ETH0.000002470.05301886
Set Delegate245058052026-02-21 14:21:4719 hrs ago1771683707IN
Snapshot: Delegation
0 ETH0.000002540.05451875
Set Delegate245054232026-02-21 13:05:1121 hrs ago1771679111IN
Snapshot: Delegation
0 ETH0.000095512.04844539
Set Delegate245048632026-02-21 11:12:4723 hrs ago1771672367IN
Snapshot: Delegation
0 ETH0.000002890.062149
Set Delegate245045322026-02-21 10:06:2324 hrs ago1771668383IN
Snapshot: Delegation
0 ETH0.000001990.04284475
Set Delegate245044742026-02-21 9:54:4724 hrs ago1771667687IN
Snapshot: Delegation
0 ETH0.000003760.08051152
Set Delegate245040072026-02-21 8:20:4726 hrs ago1771662047IN
Snapshot: Delegation
0 ETH0.00000180.03881174
Clear Delegate245040022026-02-21 8:19:4726 hrs ago1771661987IN
Snapshot: Delegation
0 ETH0.000001080.04496776
Set Delegate245039672026-02-21 8:12:4726 hrs ago1771661567IN
Snapshot: Delegation
0 ETH0.000001870.04018374
Set Delegate245023892026-02-21 2:56:1131 hrs ago1771642571IN
Snapshot: Delegation
0 ETH0.000095062.03874628
Set Delegate245022322026-02-21 2:24:4731 hrs ago1771640687IN
Snapshot: Delegation
0 ETH0.000002980.06393336
Set Delegate245020432026-02-21 1:46:5932 hrs ago1771638419IN
Snapshot: Delegation
0 ETH0.000001990.04267254
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Method Block
From
To
-112253292020-11-09 19:56:371930 days ago1604951797  Contract Creation0 ETH
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:
DelegateRegistry

Compiler Version
v0.7.2+commit.51b20bc0

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, GNU LGPLv3 license
// 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);
    }
}

Settings
{
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

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

75:2077:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;225:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;965:621;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1806:344;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;225:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;965:621::-;1054:10;1042:22;;:8;:22;;;;1033:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1130:1;1110:22;;:8;:22;;;;1101:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1168:23;1194:10;:22;1205:10;1194:22;;;;;;;;;;;;;;;:26;1217:2;1194:26;;;;;;;;;;;;;;;;;;;;;1168:52;;1251:15;1239:27;;:8;:27;;;;1230:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1389:8;1360:10;:22;1371:10;1360:22;;;;;;;;;;;;;;;:26;1383:2;1360:26;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;1447:1;1420:29;;:15;:29;;;1416:111;;1500:15;1470:46;;1496:2;1484:10;1470:46;;;;;;;;;;;;1416:111;1570:8;1542:37;;1566:2;1554:10;1542:37;;;;;;;;;;;;965:621;;;:::o;1806:344::-;1858:23;1884:10;:22;1895:10;1884:22;;;;;;;;;;;;;;;:26;1907:2;1884:26;;;;;;;;;;;;;;;;;;;;;1858:52;;1956:1;1929:29;;:15;:29;;;;1920:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2071:1;2034:10;:22;2045:10;2034:22;;;;;;;;;;;;;;;:26;2057:2;2034:26;;;;;;;;;;;;:39;;;;;;;;;;;;;;;;;;2127:15;2097:46;;2123:2;2111:10;2097:46;;;;;;;;;;;;1806:344;;:::o

Swarm Source

ipfs://b6cd5a8d04426e1189563fbec7dfec4ba70090dc70fe05097a137991fe1b3969

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.