Skip to content

Unable to understand the test for checkUpkeep function #2968

Discussion options

You must be logged in to vote

@decentralized-86 Sometimes we do not want to do a transaction when calling a function, we just wanna read the data, we can mark the function as view/pure but another thing that is very helpful in tests is a callStatic. Appending callStatic while calling a function in tests will not create a transaction but it simulates the transaction and give the results.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@decentralized-86
Comment options

@alymurtazamemon
Comment options

Answer selected by decentralized-86
Comment options

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