Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Blockchain by (12.8k points)

I am having two contracts say A and B, and two nodes running in different machines Machine1 and Machine 2 with same network id and i had added the peer using node URL. Contract A is deployed by machine1 on blockchain, Contract B is deployed by machine2. Now I want to access the function of contract A from machine2 and machine 1 and also access the function of contract B from machine2 and machine 1. How can I access the functions

1 Answer

0 votes
by (29.8k points)

To generate Abi goto and place your contract code and get the abi
Use var contract = eth.contract(abi).at(contractaddress)
abi and address with the ABI and address of the contract.
This will allow you to access the contract.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94k users

Browse Categories