Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Blockchain by (12.7k 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.5k points)

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

Browse Categories

...