In the "Deploy & run Transactions" section of remix.ethereum.org I can change the account before I deploy a contract - and the selected account is the owneer of the deployed contract. That's fine. But in the "File Explorer" section I cannot select, with which account a (ethers) script is running. msg.sender of a script is always the first account of the "Deploy & run Transactions" section. How can I change the sender address?
1 Answer
@Majd TL, Thanks for the hint. My mistake: I was looking for a setting in remix. In fact, the solution is within the script. Instead of:
const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner()
... i can use e.g.
const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(2)
... to make the third account to msg.sender address.