lesson 9: checkUpkeep interval config #2775
-
Hey guys,
My question is: Did I miss something? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Yes, the And we will never deploy the same contract again because it will never be the same, yes it is true that the code will be the same but also data, instances, and everything will be new for each deployed contract. So this can never happen that one contract redeploys every time for performing some functionality. |
Beta Was this translation helpful? Give feedback.
-
You are confused b/w the properties (not referring to Solidity keywords here, but general terms) immutable and constant. It is indeed true that the code of the contract, once deloyed, is immutable and cannot be changed. But, the state it holds, is subject to change and can be variable (i.e. not constant) if the logic of the code is so. E.g. |
Beta Was this translation helpful? Give feedback.
-
Hey guys, hi! Thanks for answer. |
Beta Was this translation helpful? Give feedback.
@lucasfernandes
Yes, the
i_interval
isimmutable
buts_lastTimeStamp
is not.i_interval
we are setting through our deploy scripts is 30 and after every performUpkeep we are resettings_lastTimeStamp = block.timestamp
as we did in the constructor and as so with other variables we resetting them after performing performUpkeep function.And we will never deploy the same contract again because it will never be the same, yes it is true that the code will be the same but also data, instances, and everything will be new for each deployed contract. So this can never happen that one contract redeploys every time for performing some functionality.