Skip to content

lesson-9 testing` questions about callStatic #2412

Answered by krakxn
TimeKeyRoll asked this question in Q&A
Discussion options

You must be logged in to vote
  1. "I need to know why does not we want to use if its a public function and create a transaction? Why not we want a transaction for testing? and what happens when we create a transaction?" Creating a transaction leads to a change in state. We do not want the state to change for checkUpkeep (where we check for the validity of the values, we do not want them to change--we want them to remain as is). Hence, we do not want the transaction to execute.

  2. "Where does this function is coming from?" It is included in Ethers.js, the library we are using for JavaScript.

"AND how its is different/useful in this case other than the non-transaction case?" For the difference b/w the two part: as above,…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TimeKeyRoll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants