0

Consider the following .sol file:

pragma solidity ^0.8.3;
    
contract Testing {
        string public astring="firstvalue";
        function setString(string memory newValue)public{
            astring=newValue;
        }
}

If you deploy it on Rinkeby with Remix, calling the astring variable will show "firstvalue", which is what you'd expect.

However, if you deploy it Mumbai, astring has no value upon deployment. Then if you use the function setString and pass "secondvalue" as argument, it will change to "firstvalue". If you call it again with "thirdvalue" it will change to "secondvalue" and so forth.

Why is this a thing?

Any input will be valued.

1 Answer 1

0

It's not that the network is one execution behind, it just takes a while for the values to update. As distinct from Rinkeby which shows the new value immediately after the transaction is mined, Mumbai has a bit of latency. So the perceived effect of being one execution behind was caused by the fact that this latency was the same as the time it took for me to actually send the transactions. It's not as big of a problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.