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
    Commented Aug 19, 2019 at 11:52
  • yes it is the contract ABI
    – cqx
    Commented Aug 19, 2019 at 11:54

Your Answer

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

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