I created the server based on golang. This server can load smart contract that is deployed using its address. It works on my local machine, but it does not work on EC2 instance. So I decided to develop it based on nodejs. But I can't find how it can load same smart contract in nodejs. Please help me. Thanks.

| improve this question | | | | |

Get the contract object via:

const contract = await new web3.eth.Contract(JSON.parse(interface), smartContractAddress);
| improve this answer | | | | |
  • thanks for replying. I wonder what the interface is. is It json data based on abi file? – Sheng Yu Aug 19 '19 at 11:52
  • yes it is the contract ABI – Niklas Feurstein Aug 19 '19 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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