I'm attempting to setup some fairly comprehensive testing of a Solidity contract I wrote using hardhat & waffle, etc. One of the things I want to do is things like mint using various addresses while testing. If I go to Remix I can easily switch between which address is talking. This allows me to mint or try and test changing config settings from multiple Remix addresses, for instance. But how do we do that in a Hardhat testing script? Every interaction with the contract is always from the 1st address I've set:
const [owner, addr2, addr3] = await ethers.getSigners();
I'd like to change that occasionally for my tests - to use addr2.address instead as an example. There's got to be a way, I just don't know the syntax to make it happen. Is it possible to flip between addresses that are talking to the contract from a test script? -- thanks for your help!