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

Unit test case uncommented for complete protocol with mock contract f… #66

Merged
merged 1 commit into from
Dec 14, 2017

Conversation

deepesh-kn
Copy link
Contributor

…or protocol versioning


function blocksToWaitForProtocolTransfer() public pure returns (uint256) {
return PROTOCOL_TRANSFER_BLOCKS_TO_WAIT;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasonklein curious to know if blocksToWaitForProtocolTransfer is needed in ProtocolVersionedMock.sol?

This method is already there in ProtocolVersioned.sol. I guess solidity should inherit blocksToWaitForProtocolTransfer from ProtocolVersioned.sol to ProtocolVersionedMock.sol.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abhayks1: sorry, I merged before I saw this question! Yes, you need to overwrite because
ProtocolVersioned.blocksToWaitForProtocolTransfer points to the PROTOCOL_TRANSFER_BLOCKS_TO_WAIT constant scoped to it, and not scoped to ProtocolVersionedMock.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Banks for clarifying. Solidity is little different in method overriding as compared to other languages like Java, Ruby :)

Copy link
Contributor

@jasonklein jasonklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@jasonklein jasonklein merged commit f9c2ccc into develop Dec 14, 2017
@benjaminbollen benjaminbollen deleted the unit_case_protocol_versioning branch December 15, 2017 10:02
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

Successfully merging this pull request may close these issues.

3 participants