I have a Solidity smart contract for NFTs that I need to test using Truffle Suite. While deploying the contract on Rinkeby, I provide it with an existing ERC20 token contract address that I use for payments of the NFTs.
How do I test the NFT smart contract on my local? Do I deploy a dummy contract for the ERC20 token.
I would also like to develop a testing solution that would work in CI/CD. If I deploy the contract on my local, how do I deploy the contract using the same truffle migration files on Rinkeby or Mainnet.
On the ERC20 token, what I need my tests to do :
- Provide the ERC20 token contract address while deploying the NFT Smart Contract
- Approve the NFT smart contract as a spender for X tokens on a user's wallet.
- Transfer Y tokens from one wallet to another.
Any help is appreciated.