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

RLP: adapting to changes in Solidity version 0.5.0 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christianparpart
Copy link

This PR adapts the RLP.sol to the changes needed when you compile this file with a solidity compiler version 0.5.0+, which is not yet released, but you can test it already with current compiler that has experimental v0.5.0 features enabled.

This PR basically contains the changes we did in order to get our test suite pass.

@@ -208,10 +210,10 @@ library RLP {
/// RLPItem is a list.
/// @param self The RLPItem.
/// @return The decoded string.
function toAscii(RLPItem memory self) internal constant returns (string memory str) {
function toAscii(RLPItem memory self) internal returns (string memory str) {

Choose a reason for hiding this comment

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

Why is this not view?

Choose a reason for hiding this comment

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

Ah because _copyToBytes still uses jumps.

@axic
Copy link

axic commented Jul 23, 2018

Shouldn't this also update the assembly?

@ekpyron
Copy link

ekpyron commented Aug 2, 2018

I vote for updating the assembly and promoting _copyToBytes back to view (both here and in the solidity repo; actually my fault - I should have done that with the constant keyword PR already).

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.

4 participants