I have two contract nft_contract and staking_contract. I want to write test for staking_contract but while staking I need to mint nft and approve, then only I can use it to stake. How can this be done? Someone please give some idea?

This is github_code

1 Answer 1


For your case, you need to write e2e tests. I did something similar some time ago. Check this for inspiration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.