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

Deprecation warnings when compiling Registry and Parameterizer #63

Open
adklempner opened this issue Apr 21, 2018 · 1 comment
Open

Comments

@adklempner
Copy link

Invoking events without "emit" prefix is deprecated.

Registry.sol:186:13: Warning: Invoking events without "emit" prefix is deprecated.
            _TouchAndRemoved(_listingHash);
            ^----------------------------^
Parameterizer.sol:155:5: Warning: Invoking events without "emit" prefix is deprecated.
    _ReparameterizationProposal(_name, _value, propID, deposit, proposals[propID].appExpiry, msg.sender);

Easily fixed by adding the emit prefix to all events.

Use of the "var" keyword is deprecated.

Registry.sol:214:29: Warning: Use of the "var" keyword is deprecated.
        var (commitEndDate, revealEndDate,) = voting.pollMap(pollID);

Parameterizer.sol:189:25: Warning: Use of the "var" keyword is deprecated.
    var (commitEndDate, revealEndDate,) = voting.pollMap(pollID);

Not sure how to go about this one. Trying to store the result to a Poll struct gives a TypeError

Parameterizer.sol:189:5: TypeError: Too many components (5) in value for variable assignment (1 needed).
    PLCRVoting.Poll memory poll = voting.pollMap(pollID);
    ^--------------------------------------------------^

This declaration shadows an existing declaration.

Registry.sol:176:9: Warning: This declaration shadows an existing declaration.
        uint deposit = parameterizer.get("minDeposit");
        ^----------^
Registry.sol:115:5: The shadowed declaration is here:
    function deposit(bytes32 _listingHash, uint _amount) external {
    ^ (Relevant source part starts here and spans across multiple lines).

Can be fixed by changing uint deposit to uint minDeposit (seems more descriptive too)

@Shachindra
Copy link

I too would agree to change the "uint deposit" to "uint minDeposit" for clear understanding.

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

2 participants