#StackBounty: #solidity #unittesting #msg.sender Using different accounts for executing a function in solidity unit testing

Bounty: 100

I have written a smart contract and within which I have declared a payable function where everyone could send their funds to the contract. Once they have transferred their funds, they would have the allowance to use some other features. However, now I want to write a solidity unit test for the script to test its functions when different accounts send funds through. I wanted to know whether there is any way to modify the msg.sender while executing functions of solidity unit testing. For instance, account 1 sends eth to contract, then account 2 needs to do the same.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.