How will two Dapps, developed using truffle framework, will communicate with the contract deployed by one Dapp ( Consider testnet using geth)?


When you deploy a contract, it gets assigned an Ethereum Contract Address. If you want to interact with a contract you must load the contract address to your wallet. (Take a look at how it is done with DAO: https://daohub.org/voting.html)

To interact with a Contract you need 2 things:

  • The contract's Address
  • The contract's JSON interface

By using these two you are able to load and invoke a contract onto web3.js and begin to interact with it.

navigate to 'Contracts'. Select then 'Watch Contract'. In the "Watch Contracts" interface, type 'The DAO' as the Contract name, paste the contract address, and the JSON interface. Click 'OK'.

With the contract interface registered, click "The DAO" in your custom contract section, and wait a few seconds. You are now able to use the interface and interact with the contract.

Not the answer you're looking for? Browse other questions tagged or ask your own question.