{"action":"created","issue":{"url":"https://api.github.com/repos/trufflesuite/truffle/issues/914","repository_url":"https://api.github.com/repos/trufflesuite/truffle","labels_url":"https://api.github.com/repos/trufflesuite/truffle/issues/914/labels{/name}","comments_url":"https://api.github.com/repos/trufflesuite/truffle/issues/914/comments","events_url":"https://api.github.com/repos/trufflesuite/truffle/issues/914/events","html_url":"https://github.com/trufflesuite/truffle/issues/914","id":317067869,"number":914,"title":"Error with `from` in tests","user":{"login":"auser","id":529,"avatar_url":"https://avatars1.githubusercontent.com/u/529?v=4","gravatar_id":"","url":"https://api.github.com/users/auser","html_url":"https://github.com/auser","followers_url":"https://api.github.com/users/auser/followers","following_url":"https://api.github.com/users/auser/following{/other_user}","gists_url":"https://api.github.com/users/auser/gists{/gist_id}","starred_url":"https://api.github.com/users/auser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auser/subscriptions","organizations_url":"https://api.github.com/users/auser/orgs","repos_url":"https://api.github.com/users/auser/repos","events_url":"https://api.github.com/users/auser/events{/privacy}","received_events_url":"https://api.github.com/users/auser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-04-24T04:39:41Z","updated_at":"2018-04-24T17:35:59Z","closed_at":null,"author_association":"NONE","body":"- [x] I've asked for help in the [Truffle Gitter](http://gitter.im/Consensys/truffle) before filing this issue.\r\n\r\n---------------------------\r\n\r\n## Issue\r\n\r\nWhen running tests with the `{from: account}` is ignored in tests. I have debugged it through the `SolidityFunction.prototype.sendTransaction` function where there are _two_ options objects with the argument I pass in the test and the default options (I assume).\r\n\r\nRegardless, the `{from: account}` is ignored (see the github repo below).\r\n\r\nMore debugging. I updated the `sendTransaction()` function with a `console.log`:\r\n\r\n```javascript\r\nSolidityFunction.prototype.execute = function () {\r\n    var transaction = !this._constant;\r\n\r\n\tconsole.log('execute ------->', transaction, Array.prototype.slice.call(arguments))\r\n\r\n    // send transaction\r\n    if (transaction) {\r\n        return this.sendTransaction.apply(this, Array.prototype.slice.call(arguments));\r\n    }\r\n\r\n    // call\r\n    return this.call.apply(this, Array.prototype.slice.call(arguments));\r\n};\r\n```\r\n\r\nThis results in: ![](https://d.pr/i/2eyiQF.png)\r\n\r\nNotice the second `{from}` options object. The first `{from}` options object contains the address I am passing in while the second one contains the `accounts[0]` address.\r\n\r\n## Steps to Reproduce\r\n\r\n```bash\r\ngit clone https://github.com/auser/truffle-bug\r\nnpm install\r\n```\r\n\r\nIn one terminal, run `ganache`:\r\n\r\n```bash\r\nnpm run ganache\r\n```\r\nIn another, run the test:\r\n\r\n```bash\r\n./node_modules/.bin/truffle test --network development test/multisig/testMultiSig.js\r\n```\r\n\r\n## Expected Behavior\r\n\r\nI expect the `msg.sender` address to be the address I pass in instead of the default account (`accounts[0]`). \r\n\r\n## Actual Results\r\n\r\nThe `msg.sender` value is the default account (`accounts[0]`) instead of the address I pass in using the `from` option.\r\n\r\n## Environment\r\n\r\n* Operating System: OSX High Sierra\r\n* Ethereum client: truffle test\r\n* Truffle version (`truffle version`):\r\nTruffle v4.1.5 (core: 4.1.5)\r\nSolidity v0.4.21 (solc-js)\r\n* node version (`node --version`):\r\nv9.5.0\r\n* npm version (`npm --version`): 5.8.0\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/trufflesuite/truffle/issues/comments/384017377","html_url":"https://github.com/trufflesuite/truffle/issues/914#issuecomment-384017377","issue_url":"https://api.github.com/repos/trufflesuite/truffle/issues/914","id":384017377,"user":{"login":"auser","id":529,"avatar_url":"https://avatars1.githubusercontent.com/u/529?v=4","gravatar_id":"","url":"https://api.github.com/users/auser","html_url":"https://github.com/auser","followers_url":"https://api.github.com/users/auser/followers","following_url":"https://api.github.com/users/auser/following{/other_user}","gists_url":"https://api.github.com/users/auser/gists{/gist_id}","starred_url":"https://api.github.com/users/auser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auser/subscriptions","organizations_url":"https://api.github.com/users/auser/orgs","repos_url":"https://api.github.com/users/auser/repos","events_url":"https://api.github.com/users/auser/events{/privacy}","received_events_url":"https://api.github.com/users/auser/received_events","type":"User","site_admin":false},"created_at":"2018-04-24T17:35:59Z","updated_at":"2018-04-24T17:35:59Z","author_association":"NONE","body":"@cgewecke okay... anything I can look at while you're gone. This is really kind of a blocker for me right now :("}}
{"actor":{"display_login":"auser"}}