Issue
I want to create a default generated project working with Truffle. After running the commands truffle init
, truffle compile
and truffle migrate
I got the error: Expected parameter 'from' not passed to function.
The geth rpc is successfully running in the other window of Terminal so it's not the cause of the problem. I expect Truffle to start deploying migrations for the default Truffle project.
Actual Results
Using network 'development'.
/usr/local/lib/node_modules/truffle/build/cli.bundled.js:23538
throw new Error("Expected parameter '" + key + "' not passed to function.");
^
Error: Expected parameter 'from' not passed to function.
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:23538:15
at Array.forEach (<anonymous>)
at Object.options (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:23536:19)
at Object.run (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:66868:12)
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:88946:23
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:67033:9
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:66861:7
at done (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:155469:5)
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:155526:11
at FSReqWrap.oncomplete (fs.js:153:5)
Environment
- Operating System: macOS Sierra
- Truffle version: 3.4.9
- Ethereum client: Geth 1.6.7
- node version: 8.3.0
- npm version: 5.3.0
Best Answer
truffle needs to know from which address you want to send transactions.
Try to specify this in
truffle.js
config file:Be sure that this address is unlocked in
geth
before deploying.