The deployed contract has a function as below:
function checkBalance() onlyTrainee constant returns (uint256) {
return traineeBalances[msg.sender];
}
When I call checkBalance()
, it always checks the balance of sender 0x00..00
. There is no input field that lets me fill out who I am. In web3, I would accomplish that with checkBalance().call({from: '0x123....'})
.
Is there any way to indicate to MyEtherWallet who the caller (msg.sender
) should be?
Note that this is not about setting the sender of a transaction, which of course only works if I have the private key.
checkBalance()
? You could store every address which initiated the function in alog
or in astruct
, would this be a solution for you?