Deployed Contract Address – How to Get Deployed Contract Address Using Truffle 3.x Console

truffle

I opened truffle console and when I type my contract's name, I see a very long message on the console but not sure How do I deploy the contract and find the deployed contract address. Kindly advise.

Best Answer

$truffle console
truffle(development)>compile
truffle(development)>migrate
truffle(development)>contract_name.new().then(function(res) { sc = contract_name.at(res.address) })
truffle(development)>sc.address 
Related Topic