I know that there is no contract instance copy implementation (yet) in solidity but what would be the best way to backup a contract?
Suppose the following scenario:
- contract is deployed to the block chain
- contract has a number of attributes that each have a getter() method callable by the owner (an address)
- contract is populated with new data
- the contract needs a new functionality (implemented through a new set of methods)
- a new contract is developed and deployed to the network but it needs the data from the previous contract
How can the new contract retrieve the state of the previous contract?
The trivial approach would be to use getters for all attributes in the original contract and setters in the new contract and simply copy the attributes from one contract to another.