I created a contract campaign and deployed this contract in infura , then I called some functions of the contract which created the subsequent data(as in list of ongoing campaigns) in blockchain. In these campaigns people can contribute some ether to these campaigns(this required payable keyword). I was able to view these from my front end application created using react .

Now , I added some public view functions to the contract , rebuilt and redeployed the same , when I tried accessing this , I was not able to view any of my old data (none of the old campaigns) ,

What might have happened to them?

And how can we persist data in these releases ?

I am new to blockchain , please help me in understanding the flow. Thanks

1 Answer 1


I got the answer by referring to How do Proxy Upgraded Logic Contracts Share Data

This suggests we have proxy contracts

  • "Old data" are still on the blockchain, when you deploy a newest version of a contract, the oldest one still persist on the blockchain (beacuse of the blockchain technology behavior, immutability!), so if you try and call the oldest address you used (whit also the oldest abi) you will get the previous data. So if you plan to have an upgradable contract, a proxy contract and a state contract could be a good way, but remember that this involves higher gas cost (to read/write from the state contract, the proxy contract create a new transaction)
    – Dibi91
    Commented Jan 7, 2021 at 15:09
  • Please post the relevant parts from that link here. Answers consisting only of links are not particularly helpful and are liable to be deleted.
    – Chenmunka
    Commented Jan 7, 2021 at 17:58
  • Cool thanks , Chenmunka as Dibi91 explained , thats the same. Commented Jan 8, 2021 at 3:18

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.