ETH Price: $3,281.68 (+0.06%)
Gas: 4 Gwei

Contract

0x95Ba548C660E134e6Cfb6DBE011481DfF122bd2a
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040154040552022-08-24 16:52:23703 days ago1661359943IN
 Create: BatchENSLookup
0 ETH0.0089470118.90975101

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BatchENSLookup

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2022-08-24
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// Batch ENS Lookup
// Author: 0xInuarashi
// https://twitter.com/0xInuarashi || 0xInuarashi#1234

interface iReverseRegistrar {
    function node(address addr) external view returns (bytes32);
}

interface iReverseResolver {
    function name(bytes32 resolver) external view returns (string memory);
}

contract BatchENSLookup {
    // Interfaces
    iReverseRegistrar public ENSReverseRegistrar = 
        iReverseRegistrar(0x084b1c3C81545d370f3634392De611CaaBFf8148);
    iReverseResolver public ENSReverseResolver = 
        iReverseResolver(0xA2C122BE93b0074270ebeE7f6b7292C7deB45047);
    
    // Batch Lookup ENS
    function batchENSLookup(address[] calldata addresses_) external view
    returns (string[] memory) {
        uint256 l = addresses_.length;
        string[] memory _batchENS = new string[] (l);

        for (uint256 i = 0; i < addresses_.length; i++) {
            // First, find the bytes32 registrar
            bytes32 _registrar = ENSReverseRegistrar.node(addresses_[i]);
            // Then, find the ENS from the resolver
            string memory _ens = ENSReverseResolver.name(_registrar);
            // Add it to the array
            _batchENS[i] = _ens;
        }

        return _batchENS;
    }

    // Batch Lookup Registrar
    function batchRegistrarLookup(address[] calldata addresses_) public view
    returns (bytes32[] memory) {
        uint256 l = addresses_.length;
        bytes32[] memory _batchRegistrar = new bytes32[] (l);

        for (uint256 i = 0; i < addresses_.length; i++) {
            // First, find the bytes32 registrar
            bytes32 _registrar = ENSReverseRegistrar.node(addresses_[i]);
            // Then, add it to the array
            _batchRegistrar[i] = _registrar;
        }

        return _batchRegistrar;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ENSReverseRegistrar","outputs":[{"internalType":"contract iReverseRegistrar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ENSReverseResolver","outputs":[{"internalType":"contract iReverseResolver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses_","type":"address[]"}],"name":"batchENSLookup","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses_","type":"address[]"}],"name":"batchRegistrarLookup","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"}]

6080604052600080546001600160a01b031990811673084b1c3c81545d370f3634392de611caabff8148179091556001805490911673a2c122be93b0074270ebee7f6b7292c7deb4504717905534801561005857600080fd5b506106c7806100686000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632f39f29b14610051578063a79b81731461007a578063dacc8645146100a5578063f8f420be146100c5575b600080fd5b61006461005f366004610413565b6100d8565b6040516100719190610592565b60405180910390f35b60005461008d906001600160a01b031681565b6040516001600160a01b039091168152602001610071565b6100b86100b3366004610413565b6102ab565b604051610071919061054e565b60015461008d906001600160a01b031681565b60608160008167ffffffffffffffff8111156100f6576100f661067b565b60405190808252806020026020018201604052801561012957816020015b60608152602001906001900390816101145790505b50905060005b848110156102a257600080546001600160a01b031663bffbe61c88888581811061015b5761015b610665565b905060200201602081019061017091906103e3565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156101af57600080fd5b505afa1580156101c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e79190610488565b60015460405163691f343160e01b8152600481018390529192506000916001600160a01b039091169063691f34319060240160006040518083038186803b15801561023157600080fd5b505afa158015610245573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261026d91908101906104a1565b90508084848151811061028257610282610665565b60200260200101819052505050808061029a9061063c565b91505061012f565b50949350505050565b60608160008167ffffffffffffffff8111156102c9576102c961067b565b6040519080825280602002602001820160405280156102f2578160200160208202803683370190505b50905060005b848110156102a257600080546001600160a01b031663bffbe61c88888581811061032457610324610665565b905060200201602081019061033991906103e3565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561037857600080fd5b505afa15801561038c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b09190610488565b9050808383815181106103c5576103c5610665565b602090810291909101015250806103db8161063c565b9150506102f8565b6000602082840312156103f557600080fd5b81356001600160a01b038116811461040c57600080fd5b9392505050565b6000806020838503121561042657600080fd5b823567ffffffffffffffff8082111561043e57600080fd5b818501915085601f83011261045257600080fd5b81358181111561046157600080fd5b8660208260051b850101111561047657600080fd5b60209290920196919550909350505050565b60006020828403121561049a57600080fd5b5051919050565b6000602082840312156104b357600080fd5b815167ffffffffffffffff808211156104cb57600080fd5b818401915084601f8301126104df57600080fd5b8151818111156104f1576104f161067b565b604051601f8201601f19908116603f011681019083821181831017156105195761051961067b565b8160405282815287602084870101111561053257600080fd5b61054383602083016020880161060c565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156105865783518352928401929184019160010161056a565b50909695505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156105ff57878503603f19018452815180518087526105e0818989018a850161060c565b601f01601f1916959095018601945092850192908501906001016105b9565b5092979650505050505050565b60005b8381101561062757818101518382015260200161060f565b83811115610636576000848401525b50505050565b600060001982141561065e57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220470087536ff317be456b71c38df73374e5296ddb44601b1396a0a411c1c1507f64736f6c63430008070033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632f39f29b14610051578063a79b81731461007a578063dacc8645146100a5578063f8f420be146100c5575b600080fd5b61006461005f366004610413565b6100d8565b6040516100719190610592565b60405180910390f35b60005461008d906001600160a01b031681565b6040516001600160a01b039091168152602001610071565b6100b86100b3366004610413565b6102ab565b604051610071919061054e565b60015461008d906001600160a01b031681565b60608160008167ffffffffffffffff8111156100f6576100f661067b565b60405190808252806020026020018201604052801561012957816020015b60608152602001906001900390816101145790505b50905060005b848110156102a257600080546001600160a01b031663bffbe61c88888581811061015b5761015b610665565b905060200201602081019061017091906103e3565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156101af57600080fd5b505afa1580156101c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e79190610488565b60015460405163691f343160e01b8152600481018390529192506000916001600160a01b039091169063691f34319060240160006040518083038186803b15801561023157600080fd5b505afa158015610245573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261026d91908101906104a1565b90508084848151811061028257610282610665565b60200260200101819052505050808061029a9061063c565b91505061012f565b50949350505050565b60608160008167ffffffffffffffff8111156102c9576102c961067b565b6040519080825280602002602001820160405280156102f2578160200160208202803683370190505b50905060005b848110156102a257600080546001600160a01b031663bffbe61c88888581811061032457610324610665565b905060200201602081019061033991906103e3565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561037857600080fd5b505afa15801561038c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b09190610488565b9050808383815181106103c5576103c5610665565b602090810291909101015250806103db8161063c565b9150506102f8565b6000602082840312156103f557600080fd5b81356001600160a01b038116811461040c57600080fd5b9392505050565b6000806020838503121561042657600080fd5b823567ffffffffffffffff8082111561043e57600080fd5b818501915085601f83011261045257600080fd5b81358181111561046157600080fd5b8660208260051b850101111561047657600080fd5b60209290920196919550909350505050565b60006020828403121561049a57600080fd5b5051919050565b6000602082840312156104b357600080fd5b815167ffffffffffffffff808211156104cb57600080fd5b818401915084601f8301126104df57600080fd5b8151818111156104f1576104f161067b565b604051601f8201601f19908116603f011681019083821181831017156105195761051961067b565b8160405282815287602084870101111561053257600080fd5b61054383602083016020880161060c565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156105865783518352928401929184019160010161056a565b50909695505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156105ff57878503603f19018452815180518087526105e0818989018a850161060c565b601f01601f1916959095018601945092850192908501906001016105b9565b5092979650505050505050565b60005b8381101561062757818101518382015260200161060f565b83811115610636576000848401525b50505050565b600060001982141561065e57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220470087536ff317be456b71c38df73374e5296ddb44601b1396a0a411c1c1507f64736f6c63430008070033

Deployed Bytecode Sourcemap

376:1529:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;704:623;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;426:118;;;;;-1:-1:-1;;;;;426:118:0;;;;;;-1:-1:-1;;;;;2167:32:1;;;2149:51;;2137:2;2122:18;426:118:0;2003:203:1;1366:536:0;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;551:115::-;;;;;-1:-1:-1;;;;;551:115:0;;;704:623;787:15;827:10;815:9;827:10;883:16;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;855:44;;917:9;912:379;932:21;;;912:379;;;1025:18;1046:19;;-1:-1:-1;;;;;1046:19:0;:24;1071:10;;1082:1;1071:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;1046:39;;-1:-1:-1;;;;;;1046:39:0;;;;;;;-1:-1:-1;;;;;2167:32:1;;;1046:39:0;;;2149:51:1;2122:18;;1046:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1174:18;;:35;;-1:-1:-1;;;1174:35:0;;;;;4000:25:1;;;1025:60:0;;-1:-1:-1;1153:18:0;;-1:-1:-1;;;;;1174:18:0;;;;:23;;3973:18:1;;1174:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1174:35:0;;;;;;;;;;;;:::i;:::-;1153:56;;1275:4;1260:9;1270:1;1260:12;;;;;;;;:::i;:::-;;;;;;:19;;;;960:331;;955:3;;;;;:::i;:::-;;;;912:379;;;-1:-1:-1;1310:9:0;704:623;-1:-1:-1;;;;704:623:0:o;1366:536::-;1453:16;1494:10;1482:9;1494:10;1557:17;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1557:17:0;;1522:52;;1592:9;1587:273;1607:21;;;1587:273;;;1700:18;1721:19;;-1:-1:-1;;;;;1721:19:0;:24;1746:10;;1757:1;1746:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;1721:39;;-1:-1:-1;;;;;;1721:39:0;;;;;;;-1:-1:-1;;;;;2167:32:1;;;1721:39:0;;;2149:51:1;2122:18;;1721:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1700:60;;1838:10;1817:15;1833:1;1817:18;;;;;;;;:::i;:::-;;;;;;;;;;:31;-1:-1:-1;1630:3:0;;;;:::i;:::-;;;;1587:273;;14:286:1;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;168:23;;-1:-1:-1;;;;;220:31:1;;210:42;;200:70;;266:1;263;256:12;200:70;289:5;14:286;-1:-1:-1;;;14:286:1:o;305:615::-;391:6;399;452:2;440:9;431:7;427:23;423:32;420:52;;;468:1;465;458:12;420:52;508:9;495:23;537:18;578:2;570:6;567:14;564:34;;;594:1;591;584:12;564:34;632:6;621:9;617:22;607:32;;677:7;670:4;666:2;662:13;658:27;648:55;;699:1;696;689:12;648:55;739:2;726:16;765:2;757:6;754:14;751:34;;;781:1;778;771:12;751:34;834:7;829:2;819:6;816:1;812:14;808:2;804:23;800:32;797:45;794:65;;;855:1;852;845:12;794:65;886:2;878:11;;;;;908:6;;-1:-1:-1;305:615:1;;-1:-1:-1;;;;305:615:1:o;925:184::-;995:6;1048:2;1036:9;1027:7;1023:23;1019:32;1016:52;;;1064:1;1061;1054:12;1016:52;-1:-1:-1;1087:16:1;;925:184;-1:-1:-1;925:184:1:o;1114:884::-;1194:6;1247:2;1235:9;1226:7;1222:23;1218:32;1215:52;;;1263:1;1260;1253:12;1215:52;1296:9;1290:16;1325:18;1366:2;1358:6;1355:14;1352:34;;;1382:1;1379;1372:12;1352:34;1420:6;1409:9;1405:22;1395:32;;1465:7;1458:4;1454:2;1450:13;1446:27;1436:55;;1487:1;1484;1477:12;1436:55;1516:2;1510:9;1538:2;1534;1531:10;1528:36;;;1544:18;;:::i;:::-;1619:2;1613:9;1587:2;1673:13;;-1:-1:-1;;1669:22:1;;;1693:2;1665:31;1661:40;1649:53;;;1717:18;;;1737:22;;;1714:46;1711:72;;;1763:18;;:::i;:::-;1803:10;1799:2;1792:22;1838:2;1830:6;1823:18;1878:7;1873:2;1868;1864;1860:11;1856:20;1853:33;1850:53;;;1899:1;1896;1889:12;1850:53;1912:55;1964:2;1959;1951:6;1947:15;1942:2;1938;1934:11;1912:55;:::i;:::-;1986:6;1114:884;-1:-1:-1;;;;;;;1114:884:1:o;2211:632::-;2382:2;2434:21;;;2504:13;;2407:18;;;2526:22;;;2353:4;;2382:2;2605:15;;;;2579:2;2564:18;;;2353:4;2648:169;2662:6;2659:1;2656:13;2648:169;;;2723:13;;2711:26;;2792:15;;;;2757:12;;;;2684:1;2677:9;2648:169;;;-1:-1:-1;2834:3:1;;2211:632;-1:-1:-1;;;;;;2211:632:1:o;2848:1001::-;3010:4;3039:2;3079;3068:9;3064:18;3109:2;3098:9;3091:21;3132:6;3167;3161:13;3198:6;3190;3183:22;3236:2;3225:9;3221:18;3214:25;;3298:2;3288:6;3285:1;3281:14;3270:9;3266:30;3262:39;3248:53;;3336:2;3328:6;3324:15;3357:1;3367:453;3381:6;3378:1;3375:13;3367:453;;;3446:22;;;-1:-1:-1;;3442:36:1;3430:49;;3502:13;;3544:9;;3566:24;;;3603:61;3544:9;3638:15;;;3625:11;;;3603:61;:::i;:::-;3730:2;3707:17;-1:-1:-1;;3703:31:1;3691:44;;;;3687:53;;;-1:-1:-1;3798:12:1;;;;3763:15;;;;3403:1;3396:9;3367:453;;;-1:-1:-1;3837:6:1;;2848:1001;-1:-1:-1;;;;;;;2848:1001:1:o;4498:258::-;4570:1;4580:113;4594:6;4591:1;4588:13;4580:113;;;4670:11;;;4664:18;4651:11;;;4644:39;4616:2;4609:10;4580:113;;;4711:6;4708:1;4705:13;4702:48;;;4746:1;4737:6;4732:3;4728:16;4721:27;4702:48;;4498:258;;;:::o;4761:232::-;4800:3;-1:-1:-1;;4821:17:1;;4818:140;;;4880:10;4875:3;4871:20;4868:1;4861:31;4915:4;4912:1;4905:15;4943:4;4940:1;4933:15;4818:140;-1:-1:-1;4985:1:1;4974:13;;4761:232::o;4998:127::-;5059:10;5054:3;5050:20;5047:1;5040:31;5090:4;5087:1;5080:15;5114:4;5111:1;5104:15;5130:127;5191:10;5186:3;5182:20;5179:1;5172:31;5222:4;5219:1;5212:15;5246:4;5243:1;5236:15

Swarm Source

ipfs://470087536ff317be456b71c38df73374e5296ddb44601b1396a0a411c1c1507f

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.