1
votes

I have just started learning blockchain engineering and I have a few problems I have dealt with.

I have just deployed a simple smart contract on a rinkeby test network using remix IDE and Metamask.

I want to make a simple interaction with my smart contract, read a value or something similar. How should I do it? I am working on AWS server using Ubuntu OS. I have installed node.js, npm, web3.js and geth. What my next steps should look like? I have already set up a node on rinkeby network by typing geth --rinkeby. I am using VIM IDE to code, how should I deploy a web3.js library into the IDE? Would this code deploy a web3.js library which I could use to connect to ethereum network?: const Web3 = require('web3'); const provider = new Web3.providers.HttpProvider('http://localhost:7545'); const web3 = new Web3(provider);

What would be the steps to interact with my ETH smart contract and read a value from it from where I am right now, using only AWS Ubuntu server?

Thank you for the help.

1

1 Answers

0
votes

First, you have to write functions to read data, in your smart contract(I am assuming that you have done it).

If you just want to interact with your smart contract, then there are options for that on RUN tab of your remix IDE. Or you can try this to interact with your contract using metamask. You can also go the way you are doing it right now, by creating your own node and interacting with it via self-made API on a server, but that is a lengthy task to do as compared to the 2 above-mentioned methods. But if you want to go that way, just tell me, I can provide you some info.