0

I want to call Smart Contract function from server side. How can I call? I want to use nodejs.

0

For your code, you'll want to look at web3.js or ethjs. To actually access the network you'll need an Ethereum client node like geth or parity, or if you want to keep things simpler/web-servicey you can use a provider like Infura.

| improve this answer | |
0

Yes you can call. Use web3js or ethjs. I hope your smart contract is deployed in some eth network. If not then read below links for how to create smart contract and integrate with web3js.

| improve this answer | |
  • Thank you for your reply. Then can I create a new account which has a new secret key using web3JS? – Jiro Yamamoto Feb 15 '18 at 8:11
0

Any interaction with ethereum smart contracts happens through an ethereum transaction. contract creation is a transaction, contract invocation is a transaction. Transaction are signed with a private key, the signing process happens with the help of a software called "wallet". After the transaction is signed it must be broadcasted to the network. You broadcast a transaction by connecting to any ethereum node json-rpc interface and using the appropriate RPC call.

read more about this here; https://github.com/web3j/web3j & https://github.com/ethereum/wiki/wiki/JSON-RPC

| improve this answer | |
0

There is a comprehensive answer about interaction between smart contract and Node-js at here . I suggest read the question in first, after that, see the marked answer there.

| improve this answer | |

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.