To test my contracts i need to use multiple accounts. I hoped that changing value of from option will help me with this. But it is ignored and msg.sender is always accounts[0] (my deployer)


await this.proposal.increaseCredit(fromWei(11, 'micro'), {from: '0x4e66526f50b4c09d0eee8ee01294c7003cfed859'})


function increaseCredit(uint _amount) public {
    emit Test(msg.sender, address(this));

Here is event log:

Test(_test1: 0xd3fe1c237a5dddd86d27b3c2ff00885629176765, _test2: 0xefbed05633cc5a9feafe6fc0836bded1f3763a62)

this is not a fallback/payable function. So sendTransaction here doesnt fit

What im doing wrong?

  • Try this: ethereum.stackexchange.com/a/62804/44907 – valem Feb 25 '19 at 2:29
  • As you see ive did the same for truffle. I tried to change from option param – Undrooleek Feb 25 '19 at 5:53
  • Can you show the code for your Test event? Also try changing your default account as they explain in the post too. – valem Feb 26 '19 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.