Skip to content

lesson-14 questions about CONSTRUCTOR. #2828

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

You must be logged in to vote
constructor(address vrfCoordinatorV2)

This is just a parameter of our constructor; we are not fetching it or anything from the packages (the name is just for its aptness--you can even put TimeKeyRoll).

Since, you know that when we deploy the contract--where this code snippet is from--in a deploy script, we provide the args which represent the parameters of the constructor (of the contract).

Thus, it can be any address syntactically; however, logically speaking, for our code to work as intended, we should provide it a VRFCoordinator address in the deploy script.

So, it is just an address type parameter which should be provided a VRFCoordinator address in the deploy script.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@TimeKeyRoll
Comment options

Comment options

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

@krakxn
Comment options

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
3 participants