Skip to content

How do I test receive and fallback function #653

Answered by mattjaf
samlak asked this question in Q&A
Discussion options

You must be logged in to vote

For the fallback you can send a function to the contract that doesn't exist

here's an awesome article that goes more indept

https://stackoverflow.com/questions/72584559/how-to-test-the-solidity-fallback-function-via-hardhat

and for receive:

I'd imagine you just send ether directly to the contract

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by alymurtazamemon
Comment options

You must be logged in to vote
0 replies
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