Skip to content

Lesson 09: TypeError: raffle.getEntranceFee is not a function #4891

Answered by 0xpolarzero
umairahmed88 asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  • a typo: maybe you mistyped getEntranceFee in your contract ;
  • the visibility: perhaps this function is marked as internal or private in your contract, which means that it cannot be accessed outside of it. In this case, you can mark it as external (access it only from outside) or public (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.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@umairahmed88
Comment options

@0xpolarzero
Comment options

@umairahmed88
Comment options

@umairahmed88
Comment options

@umairahmed88
Comment options

Answer selected by umairahmed88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants