Skip to content

What is "bytes memory"? #3096

Answered by krakxn
yyc13236 asked this question in Q&A
Oct 5, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote
 function checkUpkeep(bytes memory)

Here, the function checkUpkeep()is a parameterized function (a function which requires parameters). In addition, (bytes memory) basically is a variable (any arbitrary name can be used, in this case memory) of the data-type bytes.

The word "memory" likely threw you off. It is just a name. You can do bytes yangyueche as well; it is the data-type which is compulsory.


Now, as to the how:

The function above has the keyword override; therefore, this implies that the function in the inherited contract has a parameter of the bytes type. This is why we have the bytes variable in the first place. Of course, in our case, we did not really use that variable, whic…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@yyc13236
Comment options

@RamanSB
Comment options

Answer selected by yyc13236
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