I'm currently following this tutorial (https://medium.com/zeppelin-blog/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05) as I try to get into ethereum programming. Step 3 is interacting with the deployed contract.
When I enter
truffle(default)> var poe = ProofOfExistence1.deployed()
I get "undefined" as a result and cannot interact with the following commands as well. I definitely deployed the contract, because
truffle(development)> ProofOfExistence1.deployed()
gets me output and lists me all functions inside the contract etc. tried it with testrpc and geth testnet so I guess it's got something to do with truffle?
Use right click and paste. It works for me.
Truffle Console: A basic interactive console connecting to any Ethereum client. Truffle Develop: An interactive console that also spawns a development blockchain.
The .deployed()
method returns a Promise
. Try:
truffle(development)> ProofOfExistence1.deployed().then(function(a) { poe = a; })
...
truffle(development)> poe.address
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With