I want to call Smart Contract function from server side. How can I call? I want to use nodejs.
4 Answers
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.
- 2,154
- 1
- 8
- 15
-
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 08:11
-
@JiroYamamoto Yes: https://stackoverflow.com/q/50239320/3151675 – Tamás Sengel Jun 01 '22 at 17:44
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
- 171
- 5