Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ArgentENSManager
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-02-04 */ pragma solidity ^0.4.24; /** * ENS Registry interface. */ contract ENSRegistry { function owner(bytes32 _node) public view returns (address); function resolver(bytes32 _node) public view returns (address); function ttl(bytes32 _node) public view returns (uint64); function setOwner(bytes32 _node, address _owner) public; function setSubnodeOwner(bytes32 _node, bytes32 _label, address _owner) public; function setResolver(bytes32 _node, address _resolver) public; function setTTL(bytes32 _node, uint64 _ttl) public; } /** * ENS Resolver interface. */ contract ENSResolver { function addr(bytes32 _node) public view returns (address); function setAddr(bytes32 _node, address _addr) public; function name(bytes32 _node) public view returns (string); function setName(bytes32 _node, string _name) public; } /** * ENS Reverse Registrar interface. */ contract ENSReverseRegistrar { function claim(address _owner) public returns (bytes32 _node); function claimWithResolver(address _owner, address _resolver) public returns (bytes32); function setName(string _name) public returns (bytes32); function node(address _addr) public view returns (bytes32); } /* * @title String & slice utility library for Solidity contracts. * @author Nick Johnson <[email protected]> * * @dev Functionality in this library is largely implemented using an * abstraction called a 'slice'. A slice represents a part of a string - * anything from the entire string to a single character, or even no * characters at all (a 0-length slice). Since a slice only has to specify * an offset and a length, copying and manipulating slices is a lot less * expensive than copying and manipulating the strings they reference. * * To further reduce gas costs, most functions on slice that need to return * a slice modify the original one instead of allocating a new one; for * instance, `s.split(".")` will return the text up to the first '.', * modifying s to only contain the remainder of the string after the '.'. * In situations where you do not want to modify the original slice, you * can make a copy first with `.copy()`, for example: * `s.copy().split(".")`. Try and avoid using this idiom in loops; since * Solidity has no memory management, it will result in allocating many * short-lived slices that are later discarded. * * Functions that return two slices come in two versions: a non-allocating * version that takes the second slice as an argument, modifying it in * place, and an allocating version that allocates and returns the second * slice; see `nextRune` for example. * * Functions that have to copy string data will return strings rather than * slices; these can be cast back to slices for further processing if * required. * * For convenience, some functions are provided with non-modifying * variants that create a new slice and return both; for instance, * `s.splitNew('.')` leaves s unmodified, and returns two values * corresponding to the left and right parts of the string. */ /* solium-disable */ library strings { struct slice { uint _len; uint _ptr; } function memcpy(uint dest, uint src, uint len) private pure { // Copy word-length chunks while possible for(; len >= 32; len -= 32) { assembly { mstore(dest, mload(src)) } dest += 32; src += 32; } // Copy remaining bytes uint mask = 256 ** (32 - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) let destpart := and(mload(dest), mask) mstore(dest, or(destpart, srcpart)) } } /* * @dev Returns a slice containing the entire string. * @param self The string to make a slice from. * @return A newly allocated slice containing the entire string. */ function toSlice(string memory self) internal pure returns (slice memory) { uint ptr; assembly { ptr := add(self, 0x20) } return slice(bytes(self).length, ptr); } /* * @dev Returns the length of a null-terminated bytes32 string. * @param self The value to find the length of. * @return The length of the string, from 0 to 32. */ function len(bytes32 self) internal pure returns (uint) { uint ret; if (self == 0) return 0; if (self & 0xffffffffffffffffffffffffffffffff == 0) { ret += 16; self = bytes32(uint(self) / 0x100000000000000000000000000000000); } if (self & 0xffffffffffffffff == 0) { ret += 8; self = bytes32(uint(self) / 0x10000000000000000); } if (self & 0xffffffff == 0) { ret += 4; self = bytes32(uint(self) / 0x100000000); } if (self & 0xffff == 0) { ret += 2; self = bytes32(uint(self) / 0x10000); } if (self & 0xff == 0) { ret += 1; } return 32 - ret; } /* * @dev Returns a slice containing the entire bytes32, interpreted as a * null-terminated utf-8 string. * @param self The bytes32 value to convert to a slice. * @return A new slice containing the value of the input argument up to the * first null. */ function toSliceB32(bytes32 self) internal pure returns (slice memory ret) { // Allocate space for `self` in memory, copy it there, and point ret at it assembly { let ptr := mload(0x40) mstore(0x40, add(ptr, 0x20)) mstore(ptr, self) mstore(add(ret, 0x20), ptr) } ret._len = len(self); } /* * @dev Returns a new slice containing the same data as the current slice. * @param self The slice to copy. * @return A new slice containing the same data as `self`. */ function copy(slice memory self) internal pure returns (slice memory) { return slice(self._len, self._ptr); } /* * @dev Copies a slice to a new string. * @param self The slice to copy. * @return A newly allocated string containing the slice's text. */ function toString(slice memory self) internal pure returns (string memory) { string memory ret = new string(self._len); uint retptr; assembly { retptr := add(ret, 32) } memcpy(retptr, self._ptr, self._len); return ret; } /* * @dev Returns the length in runes of the slice. Note that this operation * takes time proportional to the length of the slice; avoid using it * in loops, and call `slice.empty()` if you only need to know whether * the slice is empty or not. * @param self The slice to operate on. * @return The length of the slice in runes. */ function len(slice memory self) internal pure returns (uint l) { // Starting at ptr-31 means the LSB will be the byte we care about uint ptr = self._ptr - 31; uint end = ptr + self._len; for (l = 0; ptr < end; l++) { uint8 b; assembly { b := and(mload(ptr), 0xFF) } if (b < 0x80) { ptr += 1; } else if(b < 0xE0) { ptr += 2; } else if(b < 0xF0) { ptr += 3; } else if(b < 0xF8) { ptr += 4; } else if(b < 0xFC) { ptr += 5; } else { ptr += 6; } } } /* * @dev Returns true if the slice is empty (has a length of 0). * @param self The slice to operate on. * @return True if the slice is empty, False otherwise. */ function empty(slice memory self) internal pure returns (bool) { return self._len == 0; } /* * @dev Returns a positive number if `other` comes lexicographically after * `self`, a negative number if it comes before, or zero if the * contents of the two slices are equal. Comparison is done per-rune, * on unicode codepoints. * @param self The first slice to compare. * @param other The second slice to compare. * @return The result of the comparison. */ function compare(slice memory self, slice memory other) internal pure returns (int) { uint shortest = self._len; if (other._len < self._len) shortest = other._len; uint selfptr = self._ptr; uint otherptr = other._ptr; for (uint idx = 0; idx < shortest; idx += 32) { uint a; uint b; assembly { a := mload(selfptr) b := mload(otherptr) } if (a != b) { // Mask out irrelevant bytes and check again uint256 mask = uint256(-1); // 0xffff... if(shortest < 32) { mask = ~(2 ** (8 * (32 - shortest + idx)) - 1); } uint256 diff = (a & mask) - (b & mask); if (diff != 0) return int(diff); } selfptr += 32; otherptr += 32; } return int(self._len) - int(other._len); } /* * @dev Returns true if the two slices contain the same text. * @param self The first slice to compare. * @param self The second slice to compare. * @return True if the slices are equal, false otherwise. */ function equals(slice memory self, slice memory other) internal pure returns (bool) { return compare(self, other) == 0; } /* * @dev Extracts the first rune in the slice into `rune`, advancing the * slice to point to the next rune and returning `self`. * @param self The slice to operate on. * @param rune The slice that will contain the first rune. * @return `rune`. */ function nextRune(slice memory self, slice memory rune) internal pure returns (slice memory) { rune._ptr = self._ptr; if (self._len == 0) { rune._len = 0; return rune; } uint l; uint b; // Load the first byte of the rune into the LSBs of b assembly { b := and(mload(sub(mload(add(self, 32)), 31)), 0xFF) } if (b < 0x80) { l = 1; } else if(b < 0xE0) { l = 2; } else if(b < 0xF0) { l = 3; } else { l = 4; } // Check for truncated codepoints if (l > self._len) { rune._len = self._len; self._ptr += self._len; self._len = 0; return rune; } self._ptr += l; self._len -= l; rune._len = l; return rune; } /* * @dev Returns the first rune in the slice, advancing the slice to point * to the next rune. * @param self The slice to operate on. * @return A slice containing only the first rune from `self`. */ function nextRune(slice memory self) internal pure returns (slice memory ret) { nextRune(self, ret); } /* * @dev Returns the number of the first codepoint in the slice. * @param self The slice to operate on. * @return The number of the first codepoint in the slice. */ function ord(slice memory self) internal pure returns (uint ret) { if (self._len == 0) { return 0; } uint word; uint length; uint divisor = 2 ** 248; // Load the rune into the MSBs of b assembly { word:= mload(mload(add(self, 32))) } uint b = word / divisor; if (b < 0x80) { ret = b; length = 1; } else if(b < 0xE0) { ret = b & 0x1F; length = 2; } else if(b < 0xF0) { ret = b & 0x0F; length = 3; } else { ret = b & 0x07; length = 4; } // Check for truncated codepoints if (length > self._len) { return 0; } for (uint i = 1; i < length; i++) { divisor = divisor / 256; b = (word / divisor) & 0xFF; if (b & 0xC0 != 0x80) { // Invalid UTF-8 sequence return 0; } ret = (ret * 64) | (b & 0x3F); } return ret; } /* * @dev Returns the keccak-256 hash of the slice. * @param self The slice to hash. * @return The hash of the slice. */ function keccak(slice memory self) internal pure returns (bytes32 ret) { assembly { ret := keccak256(mload(add(self, 32)), mload(self)) } } /* * @dev Returns true if `self` starts with `needle`. * @param self The slice to operate on. * @param needle The slice to search for. * @return True if the slice starts with the provided text, false otherwise. */ function startsWith(slice memory self, slice memory needle) internal pure returns (bool) { if (self._len < needle._len) { return false; } if (self._ptr == needle._ptr) { return true; } bool equal; assembly { let length := mload(needle) let selfptr := mload(add(self, 0x20)) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } return equal; } /* * @dev If `self` starts with `needle`, `needle` is removed from the * beginning of `self`. Otherwise, `self` is unmodified. * @param self The slice to operate on. * @param needle The slice to search for. * @return `self` */ function beyond(slice memory self, slice memory needle) internal pure returns (slice memory) { if (self._len < needle._len) { return self; } bool equal = true; if (self._ptr != needle._ptr) { assembly { let length := mload(needle) let selfptr := mload(add(self, 0x20)) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } } if (equal) { self._len -= needle._len; self._ptr += needle._len; } return self; } /* * @dev Returns true if the slice ends with `needle`. * @param self The slice to operate on. * @param needle The slice to search for. * @return True if the slice starts with the provided text, false otherwise. */ function endsWith(slice memory self, slice memory needle) internal pure returns (bool) { if (self._len < needle._len) { return false; } uint selfptr = self._ptr + self._len - needle._len; if (selfptr == needle._ptr) { return true; } bool equal; assembly { let length := mload(needle) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } return equal; } /* * @dev If `self` ends with `needle`, `needle` is removed from the * end of `self`. Otherwise, `self` is unmodified. * @param self The slice to operate on. * @param needle The slice to search for. * @return `self` */ function until(slice memory self, slice memory needle) internal pure returns (slice memory) { if (self._len < needle._len) { return self; } uint selfptr = self._ptr + self._len - needle._len; bool equal = true; if (selfptr != needle._ptr) { assembly { let length := mload(needle) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } } if (equal) { self._len -= needle._len; } return self; } // Returns the memory address of the first byte of the first occurrence of // `needle` in `self`, or the first byte after `self` if not found. function findPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) { uint ptr = selfptr; uint idx; if (needlelen <= selflen) { if (needlelen <= 32) { bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1)); bytes32 needledata; assembly { needledata := and(mload(needleptr), mask) } uint end = selfptr + selflen - needlelen; bytes32 ptrdata; assembly { ptrdata := and(mload(ptr), mask) } while (ptrdata != needledata) { if (ptr >= end) return selfptr + selflen; ptr++; assembly { ptrdata := and(mload(ptr), mask) } } return ptr; } else { // For long needles, use hashing bytes32 hash; assembly { hash := keccak256(needleptr, needlelen) } for (idx = 0; idx <= selflen - needlelen; idx++) { bytes32 testHash; assembly { testHash := keccak256(ptr, needlelen) } if (hash == testHash) return ptr; ptr += 1; } } } return selfptr + selflen; } // Returns the memory address of the first byte after the last occurrence of // `needle` in `self`, or the address of `self` if not found. function rfindPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) { uint ptr; if (needlelen <= selflen) { if (needlelen <= 32) { bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1)); bytes32 needledata; assembly { needledata := and(mload(needleptr), mask) } ptr = selfptr + selflen - needlelen; bytes32 ptrdata; assembly { ptrdata := and(mload(ptr), mask) } while (ptrdata != needledata) { if (ptr <= selfptr) return selfptr; ptr--; assembly { ptrdata := and(mload(ptr), mask) } } return ptr + needlelen; } else { // For long needles, use hashing bytes32 hash; assembly { hash := keccak256(needleptr, needlelen) } ptr = selfptr + (selflen - needlelen); while (ptr >= selfptr) { bytes32 testHash; assembly { testHash := keccak256(ptr, needlelen) } if (hash == testHash) return ptr + needlelen; ptr -= 1; } } } return selfptr; } /* * @dev Modifies `self` to contain everything from the first occurrence of * `needle` to the end of the slice. `self` is set to the empty slice * if `needle` is not found. * @param self The slice to search and modify. * @param needle The text to search for. * @return `self`. */ function find(slice memory self, slice memory needle) internal pure returns (slice memory) { uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr); self._len -= ptr - self._ptr; self._ptr = ptr; return self; } /* * @dev Modifies `self` to contain the part of the string from the start of * `self` to the end of the first occurrence of `needle`. If `needle` * is not found, `self` is set to the empty slice. * @param self The slice to search and modify. * @param needle The text to search for. * @return `self`. */ function rfind(slice memory self, slice memory needle) internal pure returns (slice memory) { uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr); self._len = ptr - self._ptr; return self; } /* * @dev Splits the slice, setting `self` to everything after the first * occurrence of `needle`, and `token` to everything before it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and `token` is set to the entirety of `self`. * @param self The slice to split. * @param needle The text to search for in `self`. * @param token An output parameter to which the first token is written. * @return `token`. */ function split(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) { uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr); token._ptr = self._ptr; token._len = ptr - self._ptr; if (ptr == self._ptr + self._len) { // Not found self._len = 0; } else { self._len -= token._len + needle._len; self._ptr = ptr + needle._len; } return token; } /* * @dev Splits the slice, setting `self` to everything after the first * occurrence of `needle`, and returning everything before it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and the entirety of `self` is returned. * @param self The slice to split. * @param needle The text to search for in `self`. * @return The part of `self` up to the first occurrence of `delim`. */ function split(slice memory self, slice memory needle) internal pure returns (slice memory token) { split(self, needle, token); } /* * @dev Splits the slice, setting `self` to everything before the last * occurrence of `needle`, and `token` to everything after it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and `token` is set to the entirety of `self`. * @param self The slice to split. * @param needle The text to search for in `self`. * @param token An output parameter to which the first token is written. * @return `token`. */ function rsplit(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) { uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr); token._ptr = ptr; token._len = self._len - (ptr - self._ptr); if (ptr == self._ptr) { // Not found self._len = 0; } else { self._len -= token._len + needle._len; } return token; } /* * @dev Splits the slice, setting `self` to everything before the last * occurrence of `needle`, and returning everything after it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and the entirety of `self` is returned. * @param self The slice to split. * @param needle The text to search for in `self`. * @return The part of `self` after the last occurrence of `delim`. */ function rsplit(slice memory self, slice memory needle) internal pure returns (slice memory token) { rsplit(self, needle, token); } /* * @dev Counts the number of nonoverlapping occurrences of `needle` in `self`. * @param self The slice to search. * @param needle The text to search for in `self`. * @return The number of occurrences of `needle` found in `self`. */ function count(slice memory self, slice memory needle) internal pure returns (uint cnt) { uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr) + needle._len; while (ptr <= self._ptr + self._len) { cnt++; ptr = findPtr(self._len - (ptr - self._ptr), ptr, needle._len, needle._ptr) + needle._len; } } /* * @dev Returns True if `self` contains `needle`. * @param self The slice to search. * @param needle The text to search for in `self`. * @return True if `needle` is found in `self`, false otherwise. */ function contains(slice memory self, slice memory needle) internal pure returns (bool) { return rfindPtr(self._len, self._ptr, needle._len, needle._ptr) != self._ptr; } /* * @dev Returns a newly allocated string containing the concatenation of * `self` and `other`. * @param self The first slice to concatenate. * @param other The second slice to concatenate. * @return The concatenation of the two strings. */ function concat(slice memory self, slice memory other) internal pure returns (string memory) { string memory ret = new string(self._len + other._len); uint retptr; assembly { retptr := add(ret, 32) } memcpy(retptr, self._ptr, self._len); memcpy(retptr + self._len, other._ptr, other._len); return ret; } /* * @dev Joins an array of slices, using `self` as a delimiter, returning a * newly allocated string. * @param self The delimiter to use. * @param parts A list of slices to join. * @return A newly allocated string containing all the slices in `parts`, * joined with `self`. */ function join(slice memory self, slice[] memory parts) internal pure returns (string memory) { if (parts.length == 0) return ""; uint length = self._len * (parts.length - 1); for(uint i = 0; i < parts.length; i++) length += parts[i]._len; string memory ret = new string(length); uint retptr; assembly { retptr := add(ret, 32) } for(i = 0; i < parts.length; i++) { memcpy(retptr, parts[i]._ptr, parts[i]._len); retptr += parts[i]._len; if (i < parts.length - 1) { memcpy(retptr, self._ptr, self._len); retptr += self._len; } } return ret; } } /** * @title ENSConsumer * @dev Helper contract to resolve ENS names. * @author Julien Niset - <[email protected]> */ contract ENSConsumer { using strings for *; // namehash('addr.reverse') bytes32 constant public ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2; // the address of the ENS registry address ensRegistry; /** * @dev No address should be provided when deploying on Mainnet to avoid storage cost. The * contract will use the hardcoded value. */ constructor(address _ensRegistry) public { ensRegistry = _ensRegistry; } /** * @dev Resolves an ENS name to an address. * @param _node The namehash of the ENS name. */ function resolveEns(bytes32 _node) public view returns (address) { address resolver = getENSRegistry().resolver(_node); return ENSResolver(resolver).addr(_node); } /** * @dev Gets the official ENS registry. */ function getENSRegistry() public view returns (ENSRegistry) { return ENSRegistry(ensRegistry); } /** * @dev Gets the official ENS reverse registrar. */ function getENSReverseRegistrar() public view returns (ENSReverseRegistrar) { return ENSReverseRegistrar(getENSRegistry().owner(ADDR_REVERSE_NODE)); } } /** * @title Owned * @dev Basic contract to define an owner. * @author Julien Niset - <[email protected]> */ contract Owned { // The owner address public owner; event OwnerChanged(address indexed _newOwner); /** * @dev Throws if the sender is not the owner. */ modifier onlyOwner { require(msg.sender == owner, "Must be owner"); _; } constructor() public { owner = msg.sender; } /** * @dev Lets the owner transfer ownership of the contract to a new owner. * @param _newOwner The new owner. */ function changeOwner(address _newOwner) external onlyOwner { require(_newOwner != address(0), "Address must not be null"); owner = _newOwner; emit OwnerChanged(_newOwner); } } /** * @title Managed * @dev Basic contract that defines a set of managers. Only the owner can add/remove managers. * @author Julien Niset - <[email protected]> */ contract Managed is Owned { // The managers mapping (address => bool) public managers; /** * @dev Throws if the sender is not a manager. */ modifier onlyManager { require(managers[msg.sender] == true, "M: Must be manager"); _; } event ManagerAdded(address indexed _manager); event ManagerRevoked(address indexed _manager); /** * @dev Adds a manager. * @param _manager The address of the manager. */ function addManager(address _manager) external onlyOwner { require(_manager != address(0), "M: Address must not be null"); if(managers[_manager] == false) { managers[_manager] = true; emit ManagerAdded(_manager); } } /** * @dev Revokes a manager. * @param _manager The address of the manager. */ function revokeManager(address _manager) external onlyOwner { require(managers[_manager] == true, "M: Target must be an existing manager"); delete managers[_manager]; emit ManagerRevoked(_manager); } } /** * @dev Interface for an ENS Mananger. */ interface IENSManager { function changeRootnodeOwner(address _newOwner) external; function register(string _label, address _owner) external; function isAvailable(bytes32 _subnode) external view returns(bool); } /** * @title ArgentENSManager * @dev Implementation of an ENS manager that orchestrates the complete * registration of subdomains for a single root (e.g. argent.xyz). * The contract defines a manager role who is the only role that can trigger the registration of * a new subdomain. * @author Julien Niset - <[email protected]> */ contract ArgentENSManager is IENSManager, Owned, Managed, ENSConsumer { using strings for *; // The managed root name string public rootName; // The managed root node bytes32 public rootNode; // The address of the ENS resolver address public ensResolver; // *************** Events *************************** // event RootnodeOwnerChange(bytes32 indexed _rootnode, address indexed _newOwner); event ENSResolverChanged(address addr); event Registered(address indexed _owner, string _ens); event Unregistered(string _ens); // *************** Constructor ********************** // /** * @dev Constructor that sets the ENS root name and root node to manage. * @param _rootName The root name (e.g. argentx.eth). * @param _rootNode The node of the root name (e.g. namehash(argentx.eth)). */ constructor(string _rootName, bytes32 _rootNode, address _ensRegistry, address _ensResolver) ENSConsumer(_ensRegistry) public { rootName = _rootName; rootNode = _rootNode; ensResolver = _ensResolver; } // *************** External Functions ********************* // /** * @dev This function must be called when the ENS Manager contract is replaced * and the address of the new Manager should be provided. * @param _newOwner The address of the new ENS manager that will manage the root node. */ function changeRootnodeOwner(address _newOwner) external onlyOwner { getENSRegistry().setOwner(rootNode, _newOwner); emit RootnodeOwnerChange(rootNode, _newOwner); } /** * @dev Lets the owner change the address of the ENS resolver contract. * @param _ensResolver The address of the ENS resolver contract. */ function changeENSResolver(address _ensResolver) external onlyOwner { require(_ensResolver != address(0), "WF: address cannot be null"); ensResolver = _ensResolver; emit ENSResolverChanged(_ensResolver); } /** * @dev Lets the manager assign an ENS subdomain of the root node to a target address. * Registers both the forward and reverse ENS. * @param _label The subdomain label. * @param _owner The owner of the subdomain. */ function register(string _label, address _owner) external onlyManager { bytes32 labelNode = keccak256(abi.encodePacked(_label)); bytes32 node = keccak256(abi.encodePacked(rootNode, labelNode)); address currentOwner = getENSRegistry().owner(node); require(currentOwner == 0, "AEM: _label is alrealdy owned"); // Forward ENS getENSRegistry().setSubnodeOwner(rootNode, labelNode, address(this)); getENSRegistry().setResolver(node, ensResolver); getENSRegistry().setOwner(node, _owner); ENSResolver(ensResolver).setAddr(node, _owner); // Reverse ENS strings.slice[] memory parts = new strings.slice[](2); parts[0] = _label.toSlice(); parts[1] = rootName.toSlice(); string memory name = ".".toSlice().join(parts); bytes32 reverseNode = getENSReverseRegistrar().node(_owner); ENSResolver(ensResolver).setName(reverseNode, name); emit Registered(_owner, name); } // *************** Public Functions ********************* // /** * @dev Returns true is a given subnode is available. * @param _subnode The target subnode. * @return true if the subnode is available. */ function isAvailable(bytes32 _subnode) public view returns (bool) { bytes32 node = keccak256(abi.encodePacked(rootNode, _subnode)); address currentOwner = getENSRegistry().owner(node); if(currentOwner == 0) { return true; } return false; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"getENSReverseRegistrar","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_label","type":"string"},{"name":"_owner","type":"address"}],"name":"register","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_manager","type":"address"}],"name":"addManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getENSRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_manager","type":"address"}],"name":"revokeManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ADDR_REVERSE_NODE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"changeRootnodeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_subnode","type":"bytes32"}],"name":"isAvailable","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_node","type":"bytes32"}],"name":"resolveEns","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ensResolver","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rootName","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rootNode","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_ensResolver","type":"address"}],"name":"changeENSResolver","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"managers","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_rootName","type":"string"},{"name":"_rootNode","type":"bytes32"},{"name":"_ensRegistry","type":"address"},{"name":"_ensResolver","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_rootnode","type":"bytes32"},{"indexed":true,"name":"_newOwner","type":"address"}],"name":"RootnodeOwnerChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"ENSResolverChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":false,"name":"_ens","type":"string"}],"name":"Registered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_ens","type":"string"}],"name":"Unregistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_manager","type":"address"}],"name":"ManagerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_manager","type":"address"}],"name":"ManagerRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_newOwner","type":"address"}],"name":"OwnerChanged","type":"event"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200199e3803806200199e83398101604090815281516020808401519284015160608501516000805433600160a060020a03199182161790915560028054909116600160a060020a038416179055929094018051909492916200007e91600391870190620000ac565b506004929092555060058054600160a060020a031916600160a060020a039092169190911790555062000151565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620000ef57805160ff19168380011785556200011f565b828001600101855582156200011f579182015b828111156200011f57825182559160200191906001019062000102565b506200012d92915062000131565b5090565b6200014e91905b808211156200012d576000815560010162000138565b90565b61183d80620001616000396000f3006080604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166309d7344281146100ea5780631e59c5291461011b5780632d06177a1461014b5780632f6807951461016c578063377e32e6146101815780637cf8a2eb146101a257806386605d96146101c957806389b6f027146101ea5780638da5cb5b146102165780639eb869c71461022b578063a6f9dae114610243578063adce1c5f14610264578063f20387df14610279578063faff50a814610303578063fb41999914610318578063fdff9b4d14610339575b600080fd5b3480156100f657600080fd5b506100ff61035a565b60408051600160a060020a039092168252519081900360200190f35b34801561012757600080fd5b506101496024600480358281019291013590600160a060020a03903516610419565b005b34801561015757600080fd5b50610149600160a060020a0360043516610c97565b34801561017857600080fd5b506100ff610dd5565b34801561018d57600080fd5b50610149600160a060020a0360043516610de4565b3480156101ae57600080fd5b506101b7610f35565b60408051918252519081900360200190f35b3480156101d557600080fd5b50610149600160a060020a0360043516610f59565b3480156101f657600080fd5b5061020260043561108a565b604080519115158252519081900360200190f35b34801561022257600080fd5b506100ff6111da565b34801561023757600080fd5b506100ff6004356111e9565b34801561024f57600080fd5b50610149600160a060020a0360043516611322565b34801561027057600080fd5b506100ff611443565b34801561028557600080fd5b5061028e611452565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102c85781810151838201526020016102b0565b50505050905090810190601f1680156102f55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561030f57600080fd5b506101b76114e0565b34801561032457600080fd5b50610149600160a060020a03600435166114e6565b34801561034557600080fd5b50610202600160a060020a0360043516611613565b6000610364610dd5565b604080517f02571be30000000000000000000000000000000000000000000000000000000081527f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260048201529051600160a060020a0392909216916302571be3916024808201926020929091908290030181600087803b1580156103e857600080fd5b505af11580156103fc573d6000803e3d6000fd5b505050506040513d602081101561041257600080fd5b5051905090565b336000908152600160208190526040822054829182916060918291849160ff90911615151461049757604080516000805160206117f2833981519152815260206004820152601260248201527f4d3a204d757374206265206d616e616765720000000000000000000000000000604482015290519081900360640190fd5b8888604051602001808383808284378201915050925050506040516020818303038152906040526040518082805190602001908083835b602083106104ed5780518252601f1990920191602091820191016104ce565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600454838301528285018190528451808403860181526060909301948590528251909c509195509293508392850191508083835b602083106105675780518252601f199092019160209182019101610548565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020945061059e610dd5565b600160a060020a03166302571be3866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15801561060757600080fd5b505af115801561061b573d6000803e3d6000fd5b505050506040513d602081101561063157600080fd5b50519350600160a060020a0384161561069957604080516000805160206117f2833981519152815260206004820152601d60248201527f41454d3a205f6c6162656c20697320616c7265616c6479206f776e6564000000604482015290519081900360640190fd5b6106a1610dd5565b60048054604080517f06ab5923000000000000000000000000000000000000000000000000000000008152928301919091526024820189905230604483015251600160a060020a0392909216916306ab59239160648082019260009290919082900301818387803b15801561071557600080fd5b505af1158015610729573d6000803e3d6000fd5b50505050610735610dd5565b600554604080517f1896f70a00000000000000000000000000000000000000000000000000000000815260048101899052600160a060020a03928316602482015290519290911691631896f70a9160448082019260009290919082900301818387803b1580156107a457600080fd5b505af11580156107b8573d6000803e3d6000fd5b505050506107c4610dd5565b604080517f5b0fc9c300000000000000000000000000000000000000000000000000000000815260048101889052600160a060020a038a8116602483015291519290911691635b0fc9c39160448082019260009290919082900301818387803b15801561083057600080fd5b505af1158015610844573d6000803e3d6000fd5b5050600554604080517fd5fa2b00000000000000000000000000000000000000000000000000000000008152600481018a9052600160a060020a038c81166024830152915191909216935063d5fa2b009250604480830192600092919082900301818387803b1580156108b657600080fd5b505af11580156108ca573d6000803e3d6000fd5b50506040805160028082526060820190925292509050816020015b6108ed6117da565b8152602001906001900390816108e557905050925061093b89898080601f01602080910402602001604051908101604052809392919081815260200183838082843750611628945050505050565b83600081518110151561094a57fe5b602090810291909101810191909152600380546040805160026001841615610100026000190190931692909204601f81018590048502830185019091528082526109ec939192918301828280156109e25780601f106109b7576101008083540402835291602001916109e2565b820191906000526020600020905b8154815290600101906020018083116109c557829003601f168201915b5050505050611628565b8360018151811015156109fb57fe5b90602001906020020181905250610a5683610a4a6040805190810160405280600181526020017f2e00000000000000000000000000000000000000000000000000000000000000815250611628565b9063ffffffff61164e16565b9150610a6061035a565b600160a060020a031663bffbe61c886040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610ad357600080fd5b505af1158015610ae7573d6000803e3d6000fd5b505050506040513d6020811015610afd57600080fd5b5051600554604080517f773722130000000000000000000000000000000000000000000000000000000081526004810184815260248201928352865160448301528651949550600160a060020a0390931693637737221393869388939192909160640190602085019080838360005b83811015610b84578181015183820152602001610b6c565b50505050905090810190601f168015610bb15780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015610bd157600080fd5b505af1158015610be5573d6000803e3d6000fd5b5050505086600160a060020a03167fb3eccf73f39b1c07947c780b2b39df2a1bb058b4037b0a42d0881ca1a028a132836040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c52578181015183820152602001610c3a565b50505050905090810190601f168015610c7f5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505050505050505050565b600054600160a060020a03163314610cfe57604080516000805160206117f2833981519152815260206004820152600d60248201527f4d757374206265206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0381161515610d6357604080516000805160206117f2833981519152815260206004820152601b60248201527f4d3a2041646472657373206d757374206e6f74206265206e756c6c0000000000604482015290519081900360640190fd5b600160a060020a03811660009081526001602052604090205460ff161515610dd257600160a060020a0381166000818152600160208190526040808320805460ff1916909217909155517f3b4a40cccf2058c593542587329dd385be4f0b588db5471fbd9598e56dd7093a9190a25b50565b600254600160a060020a031690565b600054600160a060020a03163314610e4b57604080516000805160206117f2833981519152815260206004820152600d60248201527f4d757374206265206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a03811660009081526001602081905260409091205460ff16151514610eec57604080516000805160206117f2833981519152815260206004820152602560248201527f4d3a20546172676574206d75737420626520616e206578697374696e67206d6160448201527f6e61676572000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a038116600081815260016020526040808220805460ff19169055517fe5def11e0516f317f9c37b8835aec29fc01db4d4b6d6fecaca339d3596a29bc19190a250565b7f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e281565b600054600160a060020a03163314610fc057604080516000805160206117f2833981519152815260206004820152600d60248201527f4d757374206265206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b610fc8610dd5565b60048054604080517f5b0fc9c300000000000000000000000000000000000000000000000000000000815292830191909152600160a060020a0384811660248401529051921691635b0fc9c39160448082019260009290919082900301818387803b15801561103657600080fd5b505af115801561104a573d6000803e3d6000fd5b5050600454604051600160a060020a03851693509091507f1219ccb7de3c75be86cb7065f05d9d42fb6a5162e02537d1b0d95a890ff4fd9d90600090a350565b600454604080516020808201939093528082018490528151808203830181526060909101918290528051600093849384939290918291908401908083835b602083106110e75780518252601f1990920191602091820191016110c8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020915061111e610dd5565b600160a060020a03166302571be3836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15801561118757600080fd5b505af115801561119b573d6000803e3d6000fd5b505050506040513d60208110156111b157600080fd5b50519050600160a060020a03811615156111ce57600192506111d3565b600092505b5050919050565b600054600160a060020a031681565b6000806111f4610dd5565b600160a060020a0316630178b8bf846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15801561125d57600080fd5b505af1158015611271573d6000803e3d6000fd5b505050506040513d602081101561128757600080fd5b5051604080517f3b3b57de000000000000000000000000000000000000000000000000000000008152600481018690529051919250600160a060020a03831691633b3b57de916024808201926020929091908290030181600087803b1580156112ef57600080fd5b505af1158015611303573d6000803e3d6000fd5b505050506040513d602081101561131957600080fd5b50519392505050565b600054600160a060020a0316331461138957604080516000805160206117f2833981519152815260206004820152600d60248201527f4d757374206265206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a03811615156113ee57604080516000805160206117f2833981519152815260206004820152601860248201527f41646472657373206d757374206e6f74206265206e756c6c0000000000000000604482015290519081900360640190fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038316908117825560405190917fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf3691a250565b600554600160a060020a031681565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156114d85780601f106114ad576101008083540402835291602001916114d8565b820191906000526020600020905b8154815290600101906020018083116114bb57829003601f168201915b505050505081565b60045481565b600054600160a060020a0316331461154d57604080516000805160206117f2833981519152815260206004820152600d60248201527f4d757374206265206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a03811615156115b257604080516000805160206117f2833981519152815260206004820152601a60248201527f57463a20616464726573732063616e6e6f74206265206e756c6c000000000000604482015290519081900360640190fd5b60058054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f8bd878c65101d815c50829c7b19270ff5c19e91bd1ad6ebaa282c4a65a5baa5f9181900360200190a150565b60016020526000908152604090205460ff1681565b6116306117da565b50604080518082019091528151815260209182019181019190915290565b60606000806060600085516000141561167757604080516020810190915260008152945061178c565b60018651038760000151029350600092505b85518310156116bb5785838151811015156116a057fe5b60209081029091010151519390930192600190920191611689565b836040519080825280601f01601f1916602001820160405280156116e9578160200160208202803883390190505b5060009350915050602081015b85518310156117885761173d81878581518110151561171157fe5b9060200190602002015160200151888681518110151561172d57fe5b6020908102909101015151611796565b858381518110151561174b57fe5b602090810290910101515186519101906000190183101561177d576117798188602001518960000151611796565b8651015b6001909201916116f6565b8194505b5050505092915050565b60005b602082106117bb578251845260209384019390920191601f1990910190611799565b50905182516020929092036101000a6000190180199091169116179052565b604080518082019091526000808252602082015290560008c379a000000000000000000000000000000000000000000000000000000000a165627a7a72305820bc8281a3268ca363dca54c448fbc73cdbbe2411ad9b9badde4b5087a07ce112900290000000000000000000000000000000000000000000000000000000000000080f0b914d803bfbcc81715a4b6f6abb05dd0e6b106f3574a8c36ef7dce598567a4000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b000000000000000000000000da1756bb923af5d1a05e277cb1e54f1d0a127890000000000000000000000000000000000000000000000000000000000000000a617267656e742e78797a00000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166309d7344281146100ea5780631e59c5291461011b5780632d06177a1461014b5780632f6807951461016c578063377e32e6146101815780637cf8a2eb146101a257806386605d96146101c957806389b6f027146101ea5780638da5cb5b146102165780639eb869c71461022b578063a6f9dae114610243578063adce1c5f14610264578063f20387df14610279578063faff50a814610303578063fb41999914610318578063fdff9b4d14610339575b600080fd5b3480156100f657600080fd5b506100ff61035a565b60408051600160a060020a039092168252519081900360200190f35b34801561012757600080fd5b506101496024600480358281019291013590600160a060020a03903516610419565b005b34801561015757600080fd5b50610149600160a060020a0360043516610c97565b34801561017857600080fd5b506100ff610dd5565b34801561018d57600080fd5b50610149600160a060020a0360043516610de4565b3480156101ae57600080fd5b506101b7610f35565b60408051918252519081900360200190f35b3480156101d557600080fd5b50610149600160a060020a0360043516610f59565b3480156101f657600080fd5b5061020260043561108a565b604080519115158252519081900360200190f35b34801561022257600080fd5b506100ff6111da565b34801561023757600080fd5b506100ff6004356111e9565b34801561024f57600080fd5b50610149600160a060020a0360043516611322565b34801561027057600080fd5b506100ff611443565b34801561028557600080fd5b5061028e611452565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102c85781810151838201526020016102b0565b50505050905090810190601f1680156102f55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561030f57600080fd5b506101b76114e0565b34801561032457600080fd5b50610149600160a060020a03600435166114e6565b34801561034557600080fd5b50610202600160a060020a0360043516611613565b6000610364610dd5565b604080517f02571be30000000000000000000000000000000000000000000000000000000081527f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260048201529051600160a060020a0392909216916302571be3916024808201926020929091908290030181600087803b1580156103e857600080fd5b505af11580156103fc573d6000803e3d6000fd5b505050506040513d602081101561041257600080fd5b5051905090565b336000908152600160208190526040822054829182916060918291849160ff90911615151461049757604080516000805160206117f2833981519152815260206004820152601260248201527f4d3a204d757374206265206d616e616765720000000000000000000000000000604482015290519081900360640190fd5b8888604051602001808383808284378201915050925050506040516020818303038152906040526040518082805190602001908083835b602083106104ed5780518252601f1990920191602091820191016104ce565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600454838301528285018190528451808403860181526060909301948590528251909c509195509293508392850191508083835b602083106105675780518252601f199092019160209182019101610548565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020945061059e610dd5565b600160a060020a03166302571be3866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15801561060757600080fd5b505af115801561061b573d6000803e3d6000fd5b505050506040513d602081101561063157600080fd5b50519350600160a060020a0384161561069957604080516000805160206117f2833981519152815260206004820152601d60248201527f41454d3a205f6c6162656c20697320616c7265616c6479206f776e6564000000604482015290519081900360640190fd5b6106a1610dd5565b60048054604080517f06ab5923000000000000000000000000000000000000000000000000000000008152928301919091526024820189905230604483015251600160a060020a0392909216916306ab59239160648082019260009290919082900301818387803b15801561071557600080fd5b505af1158015610729573d6000803e3d6000fd5b50505050610735610dd5565b600554604080517f1896f70a00000000000000000000000000000000000000000000000000000000815260048101899052600160a060020a03928316602482015290519290911691631896f70a9160448082019260009290919082900301818387803b1580156107a457600080fd5b505af11580156107b8573d6000803e3d6000fd5b505050506107c4610dd5565b604080517f5b0fc9c300000000000000000000000000000000000000000000000000000000815260048101889052600160a060020a038a8116602483015291519290911691635b0fc9c39160448082019260009290919082900301818387803b15801561083057600080fd5b505af1158015610844573d6000803e3d6000fd5b5050600554604080517fd5fa2b00000000000000000000000000000000000000000000000000000000008152600481018a9052600160a060020a038c81166024830152915191909216935063d5fa2b009250604480830192600092919082900301818387803b1580156108b657600080fd5b505af11580156108ca573d6000803e3d6000fd5b50506040805160028082526060820190925292509050816020015b6108ed6117da565b8152602001906001900390816108e557905050925061093b89898080601f01602080910402602001604051908101604052809392919081815260200183838082843750611628945050505050565b83600081518110151561094a57fe5b602090810291909101810191909152600380546040805160026001841615610100026000190190931692909204601f81018590048502830185019091528082526109ec939192918301828280156109e25780601f106109b7576101008083540402835291602001916109e2565b820191906000526020600020905b8154815290600101906020018083116109c557829003601f168201915b5050505050611628565b8360018151811015156109fb57fe5b90602001906020020181905250610a5683610a4a6040805190810160405280600181526020017f2e00000000000000000000000000000000000000000000000000000000000000815250611628565b9063ffffffff61164e16565b9150610a6061035a565b600160a060020a031663bffbe61c886040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610ad357600080fd5b505af1158015610ae7573d6000803e3d6000fd5b505050506040513d6020811015610afd57600080fd5b5051600554604080517f773722130000000000000000000000000000000000000000000000000000000081526004810184815260248201928352865160448301528651949550600160a060020a0390931693637737221393869388939192909160640190602085019080838360005b83811015610b84578181015183820152602001610b6c565b50505050905090810190601f168015610bb15780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015610bd157600080fd5b505af1158015610be5573d6000803e3d6000fd5b5050505086600160a060020a03167fb3eccf73f39b1c07947c780b2b39df2a1bb058b4037b0a42d0881ca1a028a132836040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c52578181015183820152602001610c3a565b50505050905090810190601f168015610c7f5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505050505050505050565b600054600160a060020a03163314610cfe57604080516000805160206117f2833981519152815260206004820152600d60248201527f4d757374206265206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0381161515610d6357604080516000805160206117f2833981519152815260206004820152601b60248201527f4d3a2041646472657373206d757374206e6f74206265206e756c6c0000000000604482015290519081900360640190fd5b600160a060020a03811660009081526001602052604090205460ff161515610dd257600160a060020a0381166000818152600160208190526040808320805460ff1916909217909155517f3b4a40cccf2058c593542587329dd385be4f0b588db5471fbd9598e56dd7093a9190a25b50565b600254600160a060020a031690565b600054600160a060020a03163314610e4b57604080516000805160206117f2833981519152815260206004820152600d60248201527f4d757374206265206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a03811660009081526001602081905260409091205460ff16151514610eec57604080516000805160206117f2833981519152815260206004820152602560248201527f4d3a20546172676574206d75737420626520616e206578697374696e67206d6160448201527f6e61676572000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a038116600081815260016020526040808220805460ff19169055517fe5def11e0516f317f9c37b8835aec29fc01db4d4b6d6fecaca339d3596a29bc19190a250565b7f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e281565b600054600160a060020a03163314610fc057604080516000805160206117f2833981519152815260206004820152600d60248201527f4d757374206265206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b610fc8610dd5565b60048054604080517f5b0fc9c300000000000000000000000000000000000000000000000000000000815292830191909152600160a060020a0384811660248401529051921691635b0fc9c39160448082019260009290919082900301818387803b15801561103657600080fd5b505af115801561104a573d6000803e3d6000fd5b5050600454604051600160a060020a03851693509091507f1219ccb7de3c75be86cb7065f05d9d42fb6a5162e02537d1b0d95a890ff4fd9d90600090a350565b600454604080516020808201939093528082018490528151808203830181526060909101918290528051600093849384939290918291908401908083835b602083106110e75780518252601f1990920191602091820191016110c8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020915061111e610dd5565b600160a060020a03166302571be3836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15801561118757600080fd5b505af115801561119b573d6000803e3d6000fd5b505050506040513d60208110156111b157600080fd5b50519050600160a060020a03811615156111ce57600192506111d3565b600092505b5050919050565b600054600160a060020a031681565b6000806111f4610dd5565b600160a060020a0316630178b8bf846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15801561125d57600080fd5b505af1158015611271573d6000803e3d6000fd5b505050506040513d602081101561128757600080fd5b5051604080517f3b3b57de000000000000000000000000000000000000000000000000000000008152600481018690529051919250600160a060020a03831691633b3b57de916024808201926020929091908290030181600087803b1580156112ef57600080fd5b505af1158015611303573d6000803e3d6000fd5b505050506040513d602081101561131957600080fd5b50519392505050565b600054600160a060020a0316331461138957604080516000805160206117f2833981519152815260206004820152600d60248201527f4d757374206265206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a03811615156113ee57604080516000805160206117f2833981519152815260206004820152601860248201527f41646472657373206d757374206e6f74206265206e756c6c0000000000000000604482015290519081900360640190fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038316908117825560405190917fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf3691a250565b600554600160a060020a031681565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156114d85780601f106114ad576101008083540402835291602001916114d8565b820191906000526020600020905b8154815290600101906020018083116114bb57829003601f168201915b505050505081565b60045481565b600054600160a060020a0316331461154d57604080516000805160206117f2833981519152815260206004820152600d60248201527f4d757374206265206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a03811615156115b257604080516000805160206117f2833981519152815260206004820152601a60248201527f57463a20616464726573732063616e6e6f74206265206e756c6c000000000000604482015290519081900360640190fd5b60058054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f8bd878c65101d815c50829c7b19270ff5c19e91bd1ad6ebaa282c4a65a5baa5f9181900360200190a150565b60016020526000908152604090205460ff1681565b6116306117da565b50604080518082019091528151815260209182019181019190915290565b60606000806060600085516000141561167757604080516020810190915260008152945061178c565b60018651038760000151029350600092505b85518310156116bb5785838151811015156116a057fe5b60209081029091010151519390930192600190920191611689565b836040519080825280601f01601f1916602001820160405280156116e9578160200160208202803883390190505b5060009350915050602081015b85518310156117885761173d81878581518110151561171157fe5b9060200190602002015160200151888681518110151561172d57fe5b6020908102909101015151611796565b858381518110151561174b57fe5b602090810290910101515186519101906000190183101561177d576117798188602001518960000151611796565b8651015b6001909201916116f6565b8194505b5050505092915050565b60005b602082106117bb578251845260209384019390920191601f1990910190611799565b50905182516020929092036101000a6000190180199091169116179052565b604080518082019091526000808252602082015290560008c379a000000000000000000000000000000000000000000000000000000000a165627a7a72305820bc8281a3268ca363dca54c448fbc73cdbbe2411ad9b9badde4b5087a07ce11290029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000080f0b914d803bfbcc81715a4b6f6abb05dd0e6b106f3574a8c36ef7dce598567a4000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b000000000000000000000000da1756bb923af5d1a05e277cb1e54f1d0a127890000000000000000000000000000000000000000000000000000000000000000a617267656e742e78797a00000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _rootName (string): argent.xyz
Arg [1] : _rootNode (bytes32): 0xf0b914d803bfbcc81715a4b6f6abb05dd0e6b106f3574a8c36ef7dce598567a4
Arg [2] : _ensRegistry (address): 0x314159265dD8dbb310642f98f50C066173C1259b
Arg [3] : _ensResolver (address): 0xDa1756Bb923Af5d1a05E277CB1E54f1D0A127890
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : f0b914d803bfbcc81715a4b6f6abb05dd0e6b106f3574a8c36ef7dce598567a4
Arg [2] : 000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b
Arg [3] : 000000000000000000000000da1756bb923af5d1a05e277cb1e54f1d0a127890
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [5] : 617267656e742e78797a00000000000000000000000000000000000000000000
Swarm Source
bzzr://bc8281a3268ca363dca54c448fbc73cdbbe2411ad9b9badde4b5087a07ce1129
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.