Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Introduce Directory contract and integrate into address-entry autocomplete #3091

Closed
gavofyork opened this issue Nov 2, 2016 · 3 comments
Closed
Labels
F8-enhancement 🎊 An additional feature request. P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.

Comments

@gavofyork
Copy link
Contributor

Directory contract not strictly necessary: Initially, just enumerating the Registry::ReverseConfirmed events should also give a full list of names.

The names can be filtered to those with an associated address (A metadata record) and used to autocomplete the address-input box.

Example directory contract:

contract Registry {
    function reserved(bytes32 _name) constant returns (bool reserved);
}

contract Directory {
    function Directory(Registry _r) {
        registry = _r;
    }
    
    event Registered(uint index, string name);
    
    modifier only_reserved(string _name) { if (!registry.reserved(sha3(_name))) return; }
    
    function register(string _name) only_reserved(_name) {
        Registered(names.length, _name);
        names.push(_name);
    }
    
    function count() returns (uint) { return names.length; }
    
    function get(uint _i) returns (string) { return names[_i]; }

    string[] names;
    Registry registry;
}
@gavofyork gavofyork added F8-enhancement 🎊 An additional feature request. P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. M6-ui labels Nov 2, 2016
@derhuerst
Copy link
Contributor

See also #3991.

@5chdn
Copy link
Contributor

5chdn commented May 10, 2017

This issue is labelled with sometimesoon: Issue is worth doing soon; and easy: Can be fixed by copy and pasting from StackOverflow. But it's neither assigned nor linked to a milestone.

It probably needs a re-prioritization, or a proper deadline and an assignee.

@ngotchac
Copy link
Contributor

This has been done in #4066

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F8-enhancement 🎊 An additional feature request. P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Projects
None yet
Development

No branches or pull requests

4 participants