Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment params and intelligent IDE #87

Open
3esmit opened this issue Mar 16, 2017 · 1 comment
Open

Comment params and intelligent IDE #87

3esmit opened this issue Mar 16, 2017 · 1 comment

Comments

@3esmit
Copy link

3esmit commented Mar 16, 2017

    /**
     * @modifier secret (use current token and replace it by new _token)
     * @set hidden
     * @param bytes32 secret (the revealed secret)
     * @param bytes32 token (the keccak256 hash of next secret)
     * @throws["new token already used", "secret does not matches current token"]
     */
    modifier secret(bytes32 secret, bytes32 _token){ 
        if(tokens[_token] == true) throw; 
        if(keccak256(secret) != this.token) throw;
        tokens[this.token] = true;
        this.token = _token;            
    }
    
    /**
     * @function setOwner (changes owner using rolling secret)
     * @modifier secret
     */
    function setOwner(bytes32 secret, bytes32 _token, address newOwner) secret(secret, _token) external {
        this.owner = newOwner;
    }
     */

This comments params could also help IDE to identify the contracts deployed by other contracts, with parameters like @deploys ["MyToken","MyStorage"].

Can we have it?

@3esmit
Copy link
Author

3esmit commented Mar 16, 2017

I noticed that solidity already implement some of them, so should follow their pattern https://github.com/ethereum/wiki/wiki/Solidity,-Docs-and-ABI and include others by using other notation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant