4

If yes then how smart contract interact with each other in network?

Actually I was facing issue with understanding contract interaction

  • did you get it or still need any clarifications? – Achala Dissanayake May 1 '18 at 16:13
2

does every peer has same copy of smarcontract?

Yes

If yes then how smart contract interact with each other in network?

One contract interacting with another (two contracts deployed in two different addresses) means , there has to be a transaction including that interaction. If that transaction is broadcast and mined, then every node will update the state of their copies of contracts accordingly showing that particular interaction has taken place.

| improve this answer | |
0

Yes, every peer has the same copy of the contract at the same address. Think of it as every peer having a copy of the same database (or state of accounts).

So when one contract interacts with another contract, the interaction is made with the address in the same copy and that interaction is being done between the contracts on each peers copy (ie each copy of the network database).

| improve this answer | |

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