monobase.xyz Open in urlscan Pro
76.76.21.21  Public Scan

URL: https://monobase.xyz/ethereum/address/0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e
Submission: On November 30 via api from US — Scanned from DE

Form analysis 1 forms found in the DOM

<form><label for="search-input" class="sr-only">Search input</label>
  <div class="relative"><input class="w-full px-3 py-2 text-base border pr-12 bg-background placeholder-ghost focus:outline-none focus:ring-2 text-foreground border-ghost focus:border-transparent focus:ring-brand" type="text" required=""
      autocapitalize="none" enterkeyhint="go" id="search-input" placeholder="address / ENS / tx hash / Etherscan link" name="searchValue">
    <div class="absolute inset-y-px right-px invisible"><button
        class="inline-flex items-center justify-center font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-60 disabled:cursor-not-allowed ring-offset-background bg-primary text-primary-foreground hover:bg-primary-hovered w-fit h-full px-2 py-0 md:px-3"
        type="submit"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4 md:h-5 md:w-5">
          <path d="M5 12h14"></path>
          <path d="m12 5 7 7-7 7"></path>
        </svg></button></div>
  </div>
</form>

Text Content

On-chain HTML written in Solidity! Sounds cool? Check out the HTML editor or an
on-chain HTML contract deployed on Goerli

Dismiss
Search input

VSCode extension is in beta!
new
Ethereum


CONTRACT

0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e


ENSREGISTRYWITHFALLBACK


STATE

balance:
0 wei
ENS:



DEPLOYMENT

date:
Jan 30, 2020 1:37 AM
deployer:
0x4Fe4e...3E0e8
tx hash:
0x00d...9bf


SOURCE CODE

language:
solidity
compiler:
v0.5.16+commit.9c3226ce
EVM version:
Default
optimization enabled:
no (200 runs)
code
frontend
universal query

code
Wrap lines
// File: @ensdomains/ens/contracts/ENS.sol


pragma solidity >=0.4.24;


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: @ensdomains/ens/contracts/ENSRegistry.sol


pragma solidity ^0.5.0;




/**
 * The ENS registry contract.
 */
contract ENSRegistry is ENS {


    struct Record {
        address owner;
        address resolver;
        uint64 ttl;
    }


    mapping (bytes32 => Record) records;
    mapping (address => mapping(address => bool)) operators;


    // Permits modifications only by the owner of the specified node.
    modifier authorised(bytes32 node) {
        address owner = records[node].owner;
        require(owner == msg.sender || operators[owner][msg.sender]);
        _;
    }


    /**
     * @dev Constructs a new ENS registrar.
     */
    constructor() public {
        records[0x0].owner = msg.sender;
    }


    /**
     * @dev Sets the record for a node.
     * @param node The node to update.
     * @param owner The address of the new owner.
     * @param resolver The address of the resolver.
     * @param ttl The TTL in seconds.
     */
    function setRecord(bytes32 node, address owner, address resolver, uint64 ttl) external {
        setOwner(node, owner);
        _setResolverAndTTL(node, resolver, ttl);
    }


    /**
     * @dev Sets the record for a subnode.
     * @param node The parent node.
     * @param label The hash of the label specifying the subnode.
     * @param owner The address of the new owner.
     * @param resolver The address of the resolver.
     * @param ttl The TTL in seconds.
     */
    function setSubnodeRecord(bytes32 node, bytes32 label, address owner, address resolver, uint64 ttl) external {
        bytes32 subnode = setSubnodeOwner(node, label, owner);
        _setResolverAndTTL(subnode, resolver, ttl);
    }


    /**
     * @dev Transfers ownership of a node to a new address. May only be called by the current owner of the node.
     * @param node The node to transfer ownership of.
     * @param owner The address of the new owner.
     */
    function setOwner(bytes32 node, address owner) public authorised(node) {
        _setOwner(node, owner);
        emit Transfer(node, owner);
    }


    /**
     * @dev Transfers ownership of a subnode keccak256(node, label) to a new address. May only be called by the owner of the parent node.
     * @param node The parent node.
     * @param label The hash of the label specifying the subnode.
     * @param owner The address of the new owner.
     */
    function setSubnodeOwner(bytes32 node, bytes32 label, address owner) public authorised(node) returns(bytes32) {
        bytes32 subnode = keccak256(abi.encodePacked(node, label));
        _setOwner(subnode, owner);
        emit NewOwner(node, label, owner);
        return subnode;
    }


    /**
     * @dev Sets the resolver address for the specified node.
     * @param node The node to update.
     * @param resolver The address of the resolver.
     */
    function setResolver(bytes32 node, address resolver) public authorised(node) {
        emit NewResolver(node, resolver);
        records[node].resolver = resolver;
    }


    /**
     * @dev Sets the TTL for the specified node.
     * @param node The node to update.
     * @param ttl The TTL in seconds.
     */
    function setTTL(bytes32 node, uint64 ttl) public authorised(node) {
        emit NewTTL(node, ttl);
        records[node].ttl = ttl;
    }


    /**
     * @dev Enable or disable approval for a third party ("operator") to manage
     *  all of `msg.sender`'s ENS records. Emits the ApprovalForAll event.
     * @param operator Address to add to the set of authorized operators.
     * @param approved True if the operator is approved, false to revoke approval.
     */
    function setApprovalForAll(address operator, bool approved) external {
        operators[msg.sender][operator] = approved;
        emit ApprovalForAll(msg.sender, operator, approved);
    }


    /**
     * @dev Returns the address that owns the specified node.
     * @param node The specified node.
     * @return address of the owner.
     */
    function owner(bytes32 node) public view returns (address) {
        address addr = records[node].owner;
        if (addr == address(this)) {
            return address(0x0);
        }


        return addr;
    }


    /**
     * @dev Returns the address of the resolver for the specified node.
     * @param node The specified node.
     * @return address of the resolver.
     */
    function resolver(bytes32 node) public view returns (address) {
        return records[node].resolver;
    }


    /**
     * @dev Returns the TTL of a node, and any records associated with it.
     * @param node The specified node.
     * @return ttl of the node.
     */
    function ttl(bytes32 node) public view returns (uint64) {
        return records[node].ttl;
    }


    /**
     * @dev Returns whether a record has been imported to the registry.
     * @param node The specified node.
     * @return Bool if record exists
     */
    function recordExists(bytes32 node) public view returns (bool) {
        return records[node].owner != address(0x0);
    }


    /**
     * @dev Query if an address is an authorized operator for another address.
     * @param owner The address that owns the records.
     * @param operator The address that acts on behalf of the owner.
     * @return True if `operator` is an approved operator for `owner`, false otherwise.
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool) {
        return operators[owner][operator];
    }


    function _setOwner(bytes32 node, address owner) internal {
        records[node].owner = owner;
    }


    function _setResolverAndTTL(bytes32 node, address resolver, uint64 ttl) internal {
        if(resolver != records[node].resolver) {
            records[node].resolver = resolver;
            emit NewResolver(node, resolver);
        }


        if(ttl != records[node].ttl) {
            records[node].ttl = ttl;
            emit NewTTL(node, ttl);
        }
    }
}


// File: @ensdomains/ens/contracts/ENSRegistryWithFallback.sol


pragma solidity ^0.5.0;






/**
 * The ENS registry contract.
 */
contract ENSRegistryWithFallback is ENSRegistry {


    ENS public old;


    /**
     * @dev Constructs a new ENS registrar.
     */
    constructor(ENS _old) public ENSRegistry() {
        old = _old;
    }


    /**
     * @dev Returns the address of the resolver for the specified node.
     * @param node The specified node.
     * @return address of the resolver.
     */
    function resolver(bytes32 node) public view returns (address) {
        if (!recordExists(node)) {
            return old.resolver(node);
        }


        return super.resolver(node);
    }


    /**
     * @dev Returns the address that owns the specified node.
     * @param node The specified node.
     * @return address of the owner.
     */
    function owner(bytes32 node) public view returns (address) {
        if (!recordExists(node)) {
            return old.owner(node);
        }


        return super.owner(node);
    }


    /**
     * @dev Returns the TTL of a node, and any records associated with it.
     * @param node The specified node.
     * @return ttl of the node.
     */
    function ttl(bytes32 node) public view returns (uint64) {
        if (!recordExists(node)) {
            return old.ttl(node);
        }


        return super.ttl(node);
    }


    function _setOwner(bytes32 node, address owner) internal {
        address addr = owner;
        if (addr == address(0x0)) {
            addr = address(this);
        }


        super._setOwner(node, addr);
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283


NAVIGATION

 * Home
 * Blog
 * Contract Deployments


FEATURES

 * Code Reader
 * Universal Frontend
 * Universal Query


BLOG

 * ENS contract breakdown
 * More articles


JOIN OUR DISCORD

For updates, latest releases, feature requests, and filing bugs.

Discord

built by Nazar Ilamanov

 * 
 * 

monobase © 2023