I have RLPReader smart contract, took it from here.

And I have a function untouched for a while:

function deposit(bytes txBytes) public pure returns (uint) {
    RLP.RLPItem[] memory txList = txBytes.toRLPItem().toList();
    require(txList.length == 15);

Everything worked fine until I changed pragma solidity ^0.4.18; to pragma solidity ^0.4.24. I just change this one line and my test fails now. I found that code fails on this line require(txList.length == 15); because previously txList.length was BigNumber { s: 1, e: 1, c: [ 15 ] }, but after upgrade to ^0.4.24 it's BigNumber { s: 1, e: 0, c: [ 4 ] } and I can't find why. Does anybody know what changes can affect on this code?

  • What data are you parsing? It look like a bug, you should report to the RPL library developers or the solidity compiler. – Ismael May 22 '18 at 2:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.