Questions tagged [nodejs]

Node.js is a platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications.

Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

Node.js provides an event-driven architecture and a non-blocking I/O API designed to optimize an application's throughput and scalability for real-time Web applications. It uses Google V8 JavaScript engine to execute code, and a large percentage of the basic modules are written in JavaScript. Node.js contains a built-in library to allow applications to act as a stand-alone Web server.

792 questions
3
votes
1 answer

Develop/Run Dapps with Node.js

I read in the manual that programmers can use common languages to program Dapps. Questions: So I could program a Dapp without Solidity just with JS, node.js, HTML, CSS, and HTML. Or do I still need Solidity? How will users run the app? Don't they…
Andi Giga
  • 439
  • 4
  • 15
3
votes
1 answer

Cannot compile contract with nodejs

Everything was working fine until today that when I try to use readFileSync it gives me [Function] for every kind of file. In my example when I try to compile the contract it gives me 'Error parsing input JSON: * Line 1, Column 1\n Syntax error:…
1
vote
2 answers

How to convert a uint to 64 byte hex string using Node.js?

Sir, If my uint is 10,how to convert 10 to '0x000000000000000000000000000000000000000000000000000000000000000a' by using Node.js? and reverse it from '0x000000000000000000000000000000000000000000000000000000000000000a' to uint 10 ?
黃智祥
  • 465
  • 6
  • 16
0
votes
0 answers

Withdraw ETH from Keythereum wallets

So I was using keythereum to generate public and private keys. const dk = ethereum.create(); parameters.address = ethereum.privateKeyToAddress(dk.privateKey); parameters.pKey = dk.privateKey.toString('hex'); Now I have send some ETH to the…
Shifatul
  • 101
0
votes
0 answers

How to make sign tx for erc20 token transfer?

How can I make an erc20 token transfer in node, I know to transfer eth is like this for using ethers. Lib: let privateKey = "0x3141592653589793238462643383279502884197169399375105820974944592" let wallet = new…
Louis
  • 1,155
  • 5
  • 17
  • 29
0
votes
1 answer

How can I keep nodejs running even after crash on Ubuntu

Is there any way I can run the nodejs program app.js always in the server even it crash? So I do not need to keep restarting node app.js by nohup
Louis
  • 1,155
  • 5
  • 17
  • 29
0
votes
1 answer

web3.eth.getBlockNumber returns { [Function: get] request: [Function: bound ] }

0 down vote favorite I am using express and web3 while i get the blockNumber it returns { [Function: get] request: [Function: bound ] } my code is var express = require('express'); var app = express(); const Web3 = require('web3'); var web3 = new…
Sammu Sundar
  • 219
  • 5
  • 14
0
votes
0 answers

Why does this error occur? Error when sending a transaction: cannot estimate gas; transaction may fail or may require manual gas limit?

There is enough balance, the network is also working correctly, the keys are also correct, the gas has been increased, but the error remains. const ethers = require("ethers"); const networkRPC =…
0
votes
1 answer

Node Testing and Port 3000

I am using node to test solidity with a ReactJS front end. After IPFS required I used a SSL I had to add some changes to my nginx conf and now port 3000 is not being found. I installed the SSL and nginx -t is all ok. Here is my congif file: server…
Trevor Lee Oakley
  • 2,327
  • 2
  • 19
  • 48
0
votes
1 answer

Problems installing hardhat using npm and node

I really need to be able to use hardhat on vscode and I am having so many problems trying to use node and npm. Does anyone know how to solve these errors? I know node and npm are installed because I ran node -v and npm -v. I already tried deleting…