I have a Truffle example app and then when I try to interact with it in truffle console, I don't understand why it is not deploying or working.
I activate testrpc and then after that, I type:
> truffle console
> migrate --reset
> MetaCoin.new();
After that:
truffle(development)> MetaCoin.name
'TruffleContract'
truffle(development)> MetaCoin.country
undefined
truffle(development)> a1 = web3.eth.accounts[0];
'0x0a3d66a80b50875770fd264dd7c905f21395037f'
truffle(development)> MetaCoin.sendCoin(a1, 100);
TypeError: MetaCoin.sendCoin is not a function
at evalmachine.<anonymous>:1:10
at ContextifyScript.Script.runInContext (vm.js:59:29)
at Object.runInContext (vm.js:120:6)
at Console.interpret (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:199314:17)
at ReplManager.interpret (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:200019:18)
at bound (domain.js:301:14)
at REPLServer.runBound [as eval] (domain.js:314:12)
at REPLServer.onLine (repl.js:440:10)
at emitOne (events.js:115:13)
at REPLServer.emit (events.js:210:7)
truffle(development)> MetaCoin.sendCoin(a1, 100);
It says that the sendCoin function is not a function, so I'm not sure how to interact with the contract. How can I call that?