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.

1 Answer 1

4
+50

Get the contract object via:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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