0

I am curious to know about, how the updation of field variables in solidity is happening ?. Whether world state is maintaining for each variable in the contract as like account balance?. And one more thing, As ethereum is immutable, can we get the value of the variable at particular time or block Number in past?.

2

Can we get the value of the variable at a particular block number?

Yes, for example, using web3.js v1.2.1:

const variableValue = await contractInstance.methods.variableName().call(null, blockNumber);
| improve this answer | |

Your Answer

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

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