Lesson 09: TypeError: raffle.getEntranceFee is not a function #4891
-
this is my code const { assert, expect } = require("chai"); !developmentChains.includes(network.name)
I got this error
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @umairahmed88. Could you please provide the code for your Meanwhile, this could mean that this function cannot be accessed from outside the contract. This could be due to:
Let me know if it solves your issue. If not, please provide the code from |
Beta Was this translation helpful? Give feedback.
Hi @umairahmed88. Could you please provide the code for your
Raffle
contract?Meanwhile, this could mean that this function cannot be accessed from outside the contract. This could be due to:
getEntranceFee
in your contract ;internal
orprivate
in your contract, which means that it cannot be accessed outside of it. In this case, you can mark it asexternal
(access it only from outside) orpublic
(access it from outside as well as from inside the contract).Let me know if it solves your issue. If not, please provide the code from
Raffle.sol
for better assistance.