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

EXECUTE CONTRACT button disabled #22

Open
arsen3d opened this issue Oct 28, 2018 · 3 comments
Open

EXECUTE CONTRACT button disabled #22

arsen3d opened this issue Oct 28, 2018 · 3 comments

Comments

@arsen3d
Copy link

arsen3d commented Oct 28, 2018

screen shot 2018-10-27 at 12 22 14 pm

@davedispatch
Copy link
Contributor

I'm unable to replicate this issue. Could you please provide replication steps, if possible?

@arsen3d
Copy link
Author

arsen3d commented Nov 13, 2018

It may have to do with older version of solidity. 0.4.19 specifically
Try it with this contract

pragma solidity 0.4.19;


contract TrademarkRegistration {
    struct TradeMark {
        string phrase;
        string authorName;
        uint256 timestamp;
        bytes32 proof;
    }

    mapping (bytes32 => bool) private trademarkLookup;
    mapping (bytes32 => TradeMark) public trademarkRegistry;
    
    function checkTradeMark(string phrase) constant returns (bool) {
        bytes32 proof = phraseProof(phrase);
        return trademarkLookup[proof];
    }

    function registerTradeMark(string document, string author) returns (bool){
        if (checkTradeMark(document) == false) {
            bytes32 proofHash = phraseProof(document);
            TradeMark memory trademark = TradeMark({
                phrase: document,
                authorName: author,
                timestamp: now,
                proof: proofHash
            });
            trademarkLookup[proofHash] = true;
            trademarkRegistry[proofHash] = trademark;
            return true;
        }
        return false;
    }

    function phraseProof(string phrase) constant returns (bytes32) {
        return sha256(phrase);
    }

    function getTradeMarkData(string phrase) 
        constant returns 
        (string document, 
         string authorName, 
         uint256 timestamp, 
         bytes32 proof) {
        TradeMark memory t = trademarkRegistry[phraseProof(phrase)];
        return (t.phrase, t.authorName, t.timestamp, t.proof);
    }
}

@ZaneWithSpoon
Copy link
Member

The issue is replicable on methods that require a parameter. I'm working on a fix today!

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

3 participants