I am using 

```
truffle migrate --reset --compile-all

```

to deploy the contract to local network

but in order to use ***new web3.eth.Contract(jsonInterface[, address][, options])***, i should be able to know the contract address, 

so how could know the address which truffle is deploying?
['https://ethereum.stackexchange.com/questions/34570', 'https://ethereum.stackexchange.com', 'https://ethereum.stackexchange.com/users/22913/']
There are a few ways to do this:

1) In your blockchain node (testrpc|ganache or your test/live network with geth/parity), the contract deployments will be logged and you can see the address created then

```
Transaction: 0xc2471aa6d1e020921d41247ac2a86eb5ad2447e93450347365a25f8d632e34bd
Contract created: 0x98445ab3eaafdd2293981525631730c64adec41a // <--- contract address
Gas usage: 245439
Block Number: 20
Block Time: Thu Dec 28 2017 19:43:44 GMT+0800 (+08)

```

2 & 3) You can get the address via the artifact after the contract is deployed, either from the artifact directly or by using the artifact and getting the contract instance.

**Example: log from deployment file: (migrations/2\_deploy\_contracts.js)**

*(Note: I've used the deployment file as the example, but you can retrieve the address from any javascript file where you've imported and made available the artifact)*

```
var SimpleStorage = artifacts.require("./SimpleStorage.sol");

module.exports = function(deployer) {
  deployer.deploy(SimpleStorage)

    // Option 2) Console log the address:
    .then(() => console.log(SimpleStorage.address))

    // Option 3) Retrieve the contract instance and get the address from that:
    .then(() => SimpleStorage.deployed())
    .then(_instance => console.log(_instance.address));
};

```
You can find the contract address in your build .json files. For example build/contracts/deployedContract.json Just search the file for address.

If you deployed the contract and lost the address/build.json you can simply retrieve it by truffle commands. You just need the name of the deployed contract.

For example, I deployed **NewContract** but lost his address.

```
truffle console --network private

truffle(private)> 

truffle(private)> let contract = await NewContract.deployed()

truffle(private)> contract.address
'0xb0B8956f1B95a562bC7CF3e77Ec8BeA712321315'

```

And that is it, you have your address