Are we capable of checking LINK balance like this? Lesson - 9 (14:45:47) #892
-
Hey everyone, Are we able to check if we have LINK in our subscription or not? bool hasBalance = (address(this).balance > 0); I thought the balance stays in the Keepers and VRF dashboard and not gets transferred to the contract. Also, what happens if we transfer the balance of the account, will LINK also get transferred? The question is raised in "Lesson 9: Hardhat Smart Contract Lottery" at 14:45:47 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
@rishavsharma-eth Hope it clears your queries! |
Beta Was this translation helpful? Give feedback.
@rishavsharma-eth
address(this)
means contract. We are passing the current contract address with this keyword. And etherum-based smart contracts store the balance in Wei, when you transfer the amount of contract only the amount of contract(Wei) will be transferred.Hope it clears your queries!