ETH Price: $3,106.59 (+0.43%)
Gas: 4 Gwei

Transaction Decoder

Block:
17743377 at Jul-21-2023 06:42:59 PM +UTC
Transaction Fee:
0.005128787961601524 ETH $15.93
Gas Used:
114,852 Gas / 44.655626037 Gwei

Emitted Events:

292 ENS.NewOwner( node=91D1777781884D03A6757A803996E38DE2A42967FB37EEACA72729271025A9E2, label=17A4A6A55D955A6A9EDBBB3E952609FF8687F744685CABA288FB934645058E9E, owner=[Receiver] ReverseRegistrar )
293 ENS.NewResolver( node=AEDF10960C2F84EA6E255A3CF0BF1B048591918120CC74F882BB6D9EEB3EC6B9, resolver=DefaultReverseResolver )

Account State Difference:

  Address   Before After State Difference Code
0x31415926...173C1259b
(ENS: Eth Name Service)
0x5fBb459C...0eC2Cf358
(Flashbots: Builder)
0.092808113136105021 Eth0.092948540539913265 Eth0.000140427403808244
0xf2BaD7C3...31a5b2071
0.063642035639303197 Eth
Nonce: 11
0.058513247677701673 Eth
Nonce: 12
0.005128787961601524

Execution Trace

ReverseRegistrar.setName( name=cryptometaversealerts.eth ) => ( node=AEDF10960C2F84EA6E255A3CF0BF1B048591918120CC74F882BB6D9EEB3EC6B9 )
  • ENS.owner( node=AEDF10960C2F84EA6E255A3CF0BF1B048591918120CC74F882BB6D9EEB3EC6B9 ) => ( 0x0000000000000000000000000000000000000000 )
  • ENS.resolver( node=AEDF10960C2F84EA6E255A3CF0BF1B048591918120CC74F882BB6D9EEB3EC6B9 ) => ( 0x0000000000000000000000000000000000000000 )
  • ENS.setSubnodeOwner( node=91D1777781884D03A6757A803996E38DE2A42967FB37EEACA72729271025A9E2, label=17A4A6A55D955A6A9EDBBB3E952609FF8687F744685CABA288FB934645058E9E, owner=0x9062C0A6Dbd6108336BcBe4593a3D1cE05512069 )
  • ENS.setResolver( node=AEDF10960C2F84EA6E255A3CF0BF1B048591918120CC74F882BB6D9EEB3EC6B9, resolver=0x5fBb459C49BB06083C33109fA4f14810eC2Cf358 )
  • DefaultReverseResolver.setName( node=AEDF10960C2F84EA6E255A3CF0BF1B048591918120CC74F882BB6D9EEB3EC6B9, _name=cryptometaversealerts.eth )
    • ENS.owner( node=AEDF10960C2F84EA6E255A3CF0BF1B048591918120CC74F882BB6D9EEB3EC6B9 ) => ( 0x9062C0A6Dbd6108336BcBe4593a3D1cE05512069 )
      File 1 of 3: ReverseRegistrar
      pragma solidity ^0.4.10;
      
      contract AbstractENS {
          function owner(bytes32 node) constant returns(address);
          function resolver(bytes32 node) constant returns(address);
          function ttl(bytes32 node) constant returns(uint64);
          function setOwner(bytes32 node, address owner);
          function setSubnodeOwner(bytes32 node, bytes32 label, address owner);
          function setResolver(bytes32 node, address resolver);
          function setTTL(bytes32 node, uint64 ttl);
      }
      
      contract Resolver {
          function setName(bytes32 node, string name) public;
      }
      
      /**
       * @dev Provides a default implementation of a resolver for reverse records,
       * which permits only the owner to update it.
       */
      contract DefaultReverseResolver is Resolver {
          // namehash('addr.reverse')
          bytes32 constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;
      
          AbstractENS public ens;
          mapping(bytes32=>string) public name;
          
          /**
           * @dev Constructor
           * @param ensAddr The address of the ENS registry.
           */
          function DefaultReverseResolver(AbstractENS ensAddr) {
              ens = ensAddr;
      
              // Assign ownership of the reverse record to our deployer
              var registrar = ReverseRegistrar(ens.owner(ADDR_REVERSE_NODE));
              if(address(registrar) != 0) {
                  registrar.claim(msg.sender);
              }
          }
      
          /**
           * @dev Only permits calls by the reverse registrar.
           * @param node The node permission is required for.
           */
          modifier owner_only(bytes32 node) {
              require(msg.sender == ens.owner(node));
              _;
          }
      
          /**
           * @dev Sets the name for a node.
           * @param node The node to update.
           * @param _name The name to set.
           */
          function setName(bytes32 node, string _name) public owner_only(node) {
              name[node] = _name;
          }
      }
      
      contract ReverseRegistrar {
          // namehash('addr.reverse')
          bytes32 constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;
      
          AbstractENS public ens;
          Resolver public defaultResolver;
      
          /**
           * @dev Constructor
           * @param ensAddr The address of the ENS registry.
           * @param resolverAddr The address of the default reverse resolver.
           */
          function ReverseRegistrar(AbstractENS ensAddr, Resolver resolverAddr) {
              ens = ensAddr;
              defaultResolver = resolverAddr;
      
              // Assign ownership of the reverse record to our deployer
              var oldRegistrar = ReverseRegistrar(ens.owner(ADDR_REVERSE_NODE));
              if(address(oldRegistrar) != 0) {
                  oldRegistrar.claim(msg.sender);
              }
          }
          
          /**
           * @dev Transfers ownership of the reverse ENS record associated with the
           *      calling account.
           * @param owner The address to set as the owner of the reverse record in ENS.
           * @return The ENS node hash of the reverse record.
           */
          function claim(address owner) returns (bytes32 node) {
              return claimWithResolver(owner, 0);
          }
      
          /**
           * @dev Transfers ownership of the reverse ENS record associated with the
           *      calling account.
           * @param owner The address to set as the owner of the reverse record in ENS.
           * @param resolver The address of the resolver to set; 0 to leave unchanged.
           * @return The ENS node hash of the reverse record.
           */
          function claimWithResolver(address owner, address resolver) returns (bytes32 node) {
              var label = sha3HexAddress(msg.sender);
              node = sha3(ADDR_REVERSE_NODE, label);
              var currentOwner = ens.owner(node);
      
              // Update the resolver if required
              if(resolver != 0 && resolver != ens.resolver(node)) {
                  // Transfer the name to us first if it's not already
                  if(currentOwner != address(this)) {
                      ens.setSubnodeOwner(ADDR_REVERSE_NODE, label, this);
                      currentOwner = address(this);
                  }
                  ens.setResolver(node, resolver);
              }
      
              // Update the owner if required
              if(currentOwner != owner) {
                  ens.setSubnodeOwner(ADDR_REVERSE_NODE, label, owner);
              }
      
              return node;
          }
      
          /**
           * @dev Sets the `name()` record for the reverse ENS record associated with
           * the calling account. First updates the resolver to the default reverse
           * resolver if necessary.
           * @param name The name to set for this address.
           * @return The ENS node hash of the reverse record.
           */
          function setName(string name) returns (bytes32 node) {
              node = claimWithResolver(this, defaultResolver);
              defaultResolver.setName(node, name);
              return node;
          }
      
          /**
           * @dev Returns the node hash for a given account's reverse records.
           * @param addr The address to hash
           * @return The ENS node hash.
           */
          function node(address addr) constant returns (bytes32 ret) {
              return sha3(ADDR_REVERSE_NODE, sha3HexAddress(addr));
          }
      
          /**
           * @dev An optimised function to compute the sha3 of the lower-case
           *      hexadecimal representation of an Ethereum address.
           * @param addr The address to hash
           * @return The SHA3 hash of the lower-case hexadecimal encoding of the
           *         input address.
           */
          function sha3HexAddress(address addr) private returns (bytes32 ret) {
              addr; ret; // Stop warning us about unused variables
              assembly {
                  let lookup := 0x3031323334353637383961626364656600000000000000000000000000000000
                  let i := 40
              loop:
                  i := sub(i, 1)
                  mstore8(i, byte(and(addr, 0xf), lookup))
                  addr := div(addr, 0x10)
                  i := sub(i, 1)
                  mstore8(i, byte(and(addr, 0xf), lookup))
                  addr := div(addr, 0x10)
                  jumpi(loop, i)
                  ret := sha3(0, 40)
              }
          }
      }

      File 2 of 3: ENS
      ;;; --------------------------------------------------------------------------- 
      ;;; @title The Ethereum Name Service registry. 
      ;;; @author Daniel Ellison <[email protected]> 
       
      (seq 
       
        ;; -------------------------------------------------------------------------- 
        ;; Constant definitions. 
       
        ;; Memory layout. 
        (def 'node-bytes  0x00) 
        (def 'label-bytes 0x20) 
        (def 'call-result 0x40) 
       
        ;; Struct: Record 
        (def 'resolver 0x00) ; address 
        (def 'owner    0x20) ; address 
        (def 'ttl      0x40) ; uint64 
       
        ;; Precomputed function IDs. 
        (def 'get-node-owner    0x02571be3) ; owner(bytes32) 
        (def 'get-node-resolver 0x0178b8bf) ; resolver(bytes32) 
        (def 'get-node-ttl      0x16a25cbd) ; ttl(bytes32) 
        (def 'set-node-owner    0x5b0fc9c3) ; setOwner(bytes32,address) 
        (def 'set-subnode-owner 0x06ab5923) ; setSubnodeOwner(bytes32,bytes32,address) 
        (def 'set-node-resolver 0x1896f70a) ; setResolver(bytes32,address) 
        (def 'set-node-ttl      0x14ab9038) ; setTTL(bytes32,uint64) 
       
        ;; Jumping here causes an EVM error. 
        (def 'invalid-location 0x02) 
       
        ;; -------------------------------------------------------------------------- 
        ;; @notice Shifts the leftmost 4 bytes of a 32-byte number right by 28 bytes. 
        ;; @param input A 32-byte number. 
       
        (def 'shift-right (input) 
          (div input (exp 2 224))) 
       
        ;; -------------------------------------------------------------------------- 
        ;; @notice Determines whether the supplied function ID matches a known 
        ;;         function hash and executes <code-body> if so. 
        ;; @dev The function ID is in the leftmost four bytes of the call data. 
        ;; @param function-hash The four-byte hash of a known function signature. 
        ;; @param code-body The code to run in the case of a match. 
       
        (def 'function (function-hash code-body) 
          (when (= (shift-right (calldataload 0x00)) function-hash) 
            code-body)) 
       
        ;; -------------------------------------------------------------------------- 
        ;; @notice Calculates record location for the node and label passed in. 
        ;; @param node The parent node. 
        ;; @param label The hash of the subnode label. 
       
        (def 'get-record (node label) 
          (seq 
            (mstore node-bytes node) 
            (mstore label-bytes label) 
            (sha3 node-bytes 64))) 
       
        ;; -------------------------------------------------------------------------- 
        ;; @notice Retrieves owner from node record. 
        ;; @param node Get owner of this node. 
       
        (def 'get-owner (node) 
          (sload (+ node owner))) 
       
        ;; -------------------------------------------------------------------------- 
        ;; @notice Stores new owner in node record. 
        ;; @param node Set owner of this node. 
        ;; @param new-owner New owner of this node. 
       
        (def 'set-owner (node new-owner) 
          (sstore (+ node owner) new-owner)) 
       
        ;; -------------------------------------------------------------------------- 
        ;; @notice Stores new subnode owner in node record. 
        ;; @param node Set owner of this node. 
        ;; @param label The hash of the label specifying the subnode. 
        ;; @param new-owner New owner of the subnode. 
       
        (def 'set-subowner (node label new-owner) 
          (sstore (+ (get-record node label) owner) new-owner)) 
       
        ;; -------------------------------------------------------------------------- 
        ;; @notice Retrieves resolver from node record. 
        ;; @param node Get resolver of this node. 
       
        (def 'get-resolver (node) 
          (sload node)) 
       
        ;; -------------------------------------------------------------------------- 
        ;; @notice Stores new resolver in node record. 
        ;; @param node Set resolver of this node. 
        ;; @param new-resolver New resolver for this node. 
       
        (def 'set-resolver (node new-resolver) 
          (sstore node new-resolver)) 
       
        ;; -------------------------------------------------------------------------- 
        ;; @notice Retrieves TTL From node record. 
        ;; @param node Get TTL of this node. 
       
        (def 'get-ttl (node) 
          (sload (+ node ttl))) 
       
        ;; -------------------------------------------------------------------------- 
        ;; @notice Stores new TTL in node record. 
        ;; @param node Set TTL of this node. 
        ;; @param new-resolver New TTL for this node. 
       
        (def 'set-ttl (node new-ttl) 
          (sstore (+ node ttl) new-ttl)) 
       
        ;; -------------------------------------------------------------------------- 
        ;; @notice Checks that the caller is the node owner. 
        ;; @param node Check owner of this node. 
       
        (def 'only-node-owner (node) 
          (when (!= (caller) (get-owner node)) 
            (jump invalid-location))) 
       
        ;; -------------------------------------------------------------------------- 
        ;; INIT 
       
        ;; Set the owner of the root node (0x00) to the deploying account. 
        (set-owner 0x00 (caller)) 
       
        ;; -------------------------------------------------------------------------- 
        ;; CODE 
       
        (returnlll 
          (seq 
       
            ;; ---------------------------------------------------------------------- 
            ;; @notice Returns the address of the resolver for the specified node. 
            ;; @dev Signature: resolver(bytes32) 
            ;; @param node Return this node's resolver. 
            ;; @return The associated resolver. 
       
            (def 'node (calldataload 0x04)) 
       
            (function get-node-resolver 
              (seq 
       
                ;; Get the node's resolver and save it. 
                (mstore call-result (get-resolver node)) 
       
                ;; Return result. 
                (return call-result 32))) 
       
            ;; ---------------------------------------------------------------------- 
            ;; @notice Returns the address that owns the specified node. 
            ;; @dev Signature: owner(bytes32) 
            ;; @param node Return this node's owner. 
            ;; @return The associated address. 
       
            (def 'node (calldataload 0x04)) 
       
            (function get-node-owner 
              (seq 
       
                ;; Get the node's owner and save it. 
                (mstore call-result (get-owner node)) 
       
                ;; Return result. 
                (return call-result 32))) 
       
            ;; ---------------------------------------------------------------------- 
            ;; @notice Returns the TTL of a node and any records associated with it. 
            ;; @dev Signature: ttl(bytes32) 
            ;; @param node Return this node's TTL. 
            ;; @return The node's TTL. 
       
            (def 'node (calldataload 0x04)) 
       
            (function get-node-ttl 
              (seq 
       
                ;; Get the node's TTL and save it. 
                (mstore call-result (get-ttl node)) 
       
                ;; Return result. 
                (return call-result 32))) 
       
            ;; ---------------------------------------------------------------------- 
            ;; @notice Transfers ownership of a node to a new address. May only be 
            ;;         called by the current owner of the node. 
            ;; @dev Signature: setOwner(bytes32,address) 
            ;; @param node The node to transfer ownership of. 
            ;; @param new-owner The address of the new owner. 
       
            (def 'node (calldataload 0x04)) 
            (def 'new-owner (calldataload 0x24)) 
       
            (function set-node-owner 
              (seq (only-node-owner node) 
       
                ;; Transfer ownership by storing passed-in address. 
                (set-owner node new-owner) 
       
                ;; Emit an event about the transfer. 
                ;; Transfer(bytes32 indexed node, address owner); 
                (mstore call-result new-owner) 
                (log2 call-result 32 
                    (sha3 0x00 (lit 0x00 "Transfer(bytes32,address)")) node) 
       
                ;; Nothing to return. 
                (stop))) 
       
            ;; ---------------------------------------------------------------------- 
            ;; @notice Transfers ownership of a subnode to a new address. May only be 
            ;;         called by the owner of the parent node. 
            ;; @dev Signature: setSubnodeOwner(bytes32,bytes32,address) 
            ;; @param node The parent node. 
            ;; @param label The hash of the label specifying the subnode. 
            ;; @param new-owner The address of the new owner. 
       
            (def 'node (calldataload 0x04)) 
            (def 'label (calldataload 0x24)) 
            (def 'new-owner (calldataload 0x44)) 
       
            (function set-subnode-owner 
              (seq (only-node-owner node) 
       
                ;; Transfer ownership by storing passed-in address. 
                (set-subowner node label new-owner) 
       
                ;; Emit an event about the transfer. 
                ;; NewOwner(bytes32 indexed node, bytes32 indexed label, address owner); 
                (mstore call-result new-owner) 
                (log3 call-result 32 
                    (sha3 0x00 (lit 0x00 "NewOwner(bytes32,bytes32,address)")) 
                    node label) 
       
                ;; Nothing to return. 
                (stop))) 
       
            ;; ---------------------------------------------------------------------- 
            ;; @notice Sets the resolver address for the specified node. 
            ;; @dev Signature: setResolver(bytes32,address) 
            ;; @param node The node to update. 
            ;; @param new-resolver The address of the resolver. 
       
            (def 'node (calldataload 0x04)) 
            (def 'new-resolver (calldataload 0x24)) 
       
            (function set-node-resolver 
              (seq (only-node-owner node) 
       
                ;; Transfer ownership by storing passed-in address. 
                (set-resolver node new-resolver) 
       
                ;; Emit an event about the change of resolver. 
                ;; NewResolver(bytes32 indexed node, address resolver); 
                (mstore call-result new-resolver) 
                (log2 call-result 32 
                    (sha3 0x00 (lit 0x00 "NewResolver(bytes32,address)")) node) 
       
                ;; Nothing to return. 
                (stop))) 
       
            ;; ---------------------------------------------------------------------- 
            ;; @notice Sets the TTL for the specified node. 
            ;; @dev Signature: setTTL(bytes32,uint64) 
            ;; @param node The node to update. 
            ;; @param ttl The TTL in seconds. 
       
            (def 'node (calldataload 0x04)) 
            (def 'new-ttl (calldataload 0x24)) 
       
            (function set-node-ttl 
              (seq (only-node-owner node) 
       
                ;; Set new TTL by storing passed-in time. 
                (set-ttl node new-ttl) 
       
                ;; Emit an event about the change of TTL. 
                ;; NewTTL(bytes32 indexed node, uint64 ttl); 
                (mstore call-result new-ttl) 
                (log2 call-result 32 
                    (sha3 0x00 (lit 0x00 "NewTTL(bytes32,uint64)")) node) 
       
                ;; Nothing to return. 
                (stop))) 
       
            ;; ---------------------------------------------------------------------- 
            ;; @notice Fallback: No functions matched the function ID provided. 
       
            (jump invalid-location))) 
       
      )

      File 3 of 3: DefaultReverseResolver
      pragma solidity ^0.4.10;
      
      contract AbstractENS {
          function owner(bytes32 node) constant returns(address);
          function resolver(bytes32 node) constant returns(address);
          function ttl(bytes32 node) constant returns(uint64);
          function setOwner(bytes32 node, address owner);
          function setSubnodeOwner(bytes32 node, bytes32 label, address owner);
          function setResolver(bytes32 node, address resolver);
          function setTTL(bytes32 node, uint64 ttl);
      }
      
      contract Resolver {
          function setName(bytes32 node, string name) public;
      }
      
      /**
       * @dev Provides a default implementation of a resolver for reverse records,
       * which permits only the owner to update it.
       */
      contract DefaultReverseResolver is Resolver {
          // namehash('addr.reverse')
          bytes32 constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;
      
          AbstractENS public ens;
          mapping(bytes32=>string) public name;
          
          /**
           * @dev Constructor
           * @param ensAddr The address of the ENS registry.
           */
          function DefaultReverseResolver(AbstractENS ensAddr) {
              ens = ensAddr;
      
              // Assign ownership of the reverse record to our deployer
              var registrar = ReverseRegistrar(ens.owner(ADDR_REVERSE_NODE));
              if(address(registrar) != 0) {
                  registrar.claim(msg.sender);
              }
          }
      
          /**
           * @dev Only permits calls by the reverse registrar.
           * @param node The node permission is required for.
           */
          modifier owner_only(bytes32 node) {
              require(msg.sender == ens.owner(node));
              _;
          }
      
          /**
           * @dev Sets the name for a node.
           * @param node The node to update.
           * @param _name The name to set.
           */
          function setName(bytes32 node, string _name) public owner_only(node) {
              name[node] = _name;
          }
      }
      
      contract ReverseRegistrar {
          // namehash('addr.reverse')
          bytes32 constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;
      
          AbstractENS public ens;
          Resolver public defaultResolver;
      
          /**
           * @dev Constructor
           * @param ensAddr The address of the ENS registry.
           * @param resolverAddr The address of the default reverse resolver.
           */
          function ReverseRegistrar(AbstractENS ensAddr, Resolver resolverAddr) {
              ens = ensAddr;
              defaultResolver = resolverAddr;
      
              // Assign ownership of the reverse record to our deployer
              var oldRegistrar = ReverseRegistrar(ens.owner(ADDR_REVERSE_NODE));
              if(address(oldRegistrar) != 0) {
                  oldRegistrar.claim(msg.sender);
              }
          }
          
          /**
           * @dev Transfers ownership of the reverse ENS record associated with the
           *      calling account.
           * @param owner The address to set as the owner of the reverse record in ENS.
           * @return The ENS node hash of the reverse record.
           */
          function claim(address owner) returns (bytes32 node) {
              return claimWithResolver(owner, 0);
          }
      
          /**
           * @dev Transfers ownership of the reverse ENS record associated with the
           *      calling account.
           * @param owner The address to set as the owner of the reverse record in ENS.
           * @param resolver The address of the resolver to set; 0 to leave unchanged.
           * @return The ENS node hash of the reverse record.
           */
          function claimWithResolver(address owner, address resolver) returns (bytes32 node) {
              var label = sha3HexAddress(msg.sender);
              node = sha3(ADDR_REVERSE_NODE, label);
              var currentOwner = ens.owner(node);
      
              // Update the resolver if required
              if(resolver != 0 && resolver != ens.resolver(node)) {
                  // Transfer the name to us first if it's not already
                  if(currentOwner != address(this)) {
                      ens.setSubnodeOwner(ADDR_REVERSE_NODE, label, this);
                      currentOwner = address(this);
                  }
                  ens.setResolver(node, resolver);
              }
      
              // Update the owner if required
              if(currentOwner != owner) {
                  ens.setSubnodeOwner(ADDR_REVERSE_NODE, label, owner);
              }
      
              return node;
          }
      
          /**
           * @dev Sets the `name()` record for the reverse ENS record associated with
           * the calling account. First updates the resolver to the default reverse
           * resolver if necessary.
           * @param name The name to set for this address.
           * @return The ENS node hash of the reverse record.
           */
          function setName(string name) returns (bytes32 node) {
              node = claimWithResolver(this, defaultResolver);
              defaultResolver.setName(node, name);
              return node;
          }
      
          /**
           * @dev Returns the node hash for a given account's reverse records.
           * @param addr The address to hash
           * @return The ENS node hash.
           */
          function node(address addr) constant returns (bytes32 ret) {
              return sha3(ADDR_REVERSE_NODE, sha3HexAddress(addr));
          }
      
          /**
           * @dev An optimised function to compute the sha3 of the lower-case
           *      hexadecimal representation of an Ethereum address.
           * @param addr The address to hash
           * @return The SHA3 hash of the lower-case hexadecimal encoding of the
           *         input address.
           */
          function sha3HexAddress(address addr) private returns (bytes32 ret) {
              addr; ret; // Stop warning us about unused variables
              assembly {
                  let lookup := 0x3031323334353637383961626364656600000000000000000000000000000000
                  let i := 40
              loop:
                  i := sub(i, 1)
                  mstore8(i, byte(and(addr, 0xf), lookup))
                  addr := div(addr, 0x10)
                  i := sub(i, 1)
                  mstore8(i, byte(and(addr, 0xf), lookup))
                  addr := div(addr, 0x10)
                  jumpi(loop, i)
                  ret := sha3(0, 40)
              }
          }
      }