0

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.

3
+50

Get the contract object via:

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