I have my Contract A which creates an ERC20 in the constructor. In the ContractA.t.sol I want to get the ERC20 to interact with it (I have a public method inside Contract A to get the ERC20 address). Does Foundry provide something like the ethers.getContractAt
?
1 Answer
You can :
1.Write a solidity depoly script and return your deployed ERC20 object in the script and import it in your test file.
Or
- Deploy it in your setUp() and use the object if you're testing locally.
There are also tools that can help you to get the deployed contract data from out(I guess)folder.