I write a smart contract, that should interact with another smart contract, such as USDT and BUSD.
I use a hardhat environment and her local environment, not a testnet.
For testing those interactions I must copy needed smart contracts locally, or I can just extend safeERC20 with name USDT and BUSD accordingly?
It is up to you, but I think you can also fork the mainnet to test, for more details, you can have a look at Mainnet forking | Hardhat
you have to deploy to the testnet or create an erc20 token to simulate on your local blockchain
Thank you, it's help me!
Do you know any examples with tests where you need to transfer from a third-party contract and wallet to a tested contract and withdraw back?
Thanks for asking, this will be also one of my next questions