Questions tagged [nodejs]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
9 views

[SOLVED]: CANNOT find my pending transactions using: ether.js & [provider.on("pending") and provider.getTransaction(tx)]

I am using Quicknode and ether.js to monitor pending transactions using the following code: provider.on("pending", async (tx) => { provider.getTransaction(tx).then(function (transaction)...
0
votes
0answers
18 views

Send transactions through multisig wallet account in nodeJS

I am writing a backend code in nodeJS where I am using gnosis safe wallet to send transaction to a smart contract. So that would need permission from other private keys for approving the transaction ...
0
votes
0answers
11 views

NodeJs library for ETC

What is the well NodeJs library for Ethereum Classic? For ETH we are using web3js, but it doesn't want to work with ETC correctly. Or how can I implement send tokens and estimate transaction's fee for ...
0
votes
1answer
16 views

Why does `brownie run <script>` fail with FileNotFoundError even though the script does exist? [duplicate]

I have been trying to run a python "Hello" code using brownie run scripts/deploy.py I am obtaining the following output: Brownie v1.17.2 - Python development framework for Ethereum ...
0
votes
0answers
27 views

Finding the appropriate ABI to read input data

Given the transaction hash 0x7da7a1645278c94434bdc8f54eae8f8f6bf8d1a730d84af38ffcc05ded24492f I would like to understand the input data better. To do this, I attempted loading the ABI of the verified ...
0
votes
2answers
46 views

Cannot approve or sell token swapExactTokensForTokens: transaction fails (not a honeypot)

I am trying to sell a token (DOBO). Buying DOBO is no problem and it goes through. But I cannot sell it. I get a failed transaction, but no error message on node.js (see https://bscscan.com/tx/...
1
vote
0answers
31 views

Unable to create sell order with OpenSea SDK, but no errors reported

I'm learning how to use the OpenSea SDK in Node.js (found here) by referring to its example OpenSea Creatures. The SDK links to a two-year old branch but I'm using the master branch. I'm trying to ...
0
votes
0answers
17 views

sendSignedTransaction - (node:90923) UnhandledPromiseRejectionWarning: Error: Returned error: Invalid Signature

Hi I'm using Web3js and Ganache. I'm trying to send a serialized transaction but got the following error: (node:90923) UnhandledPromiseRejectionWarning: Error: Returned error: Invalid Signature . I'...
0
votes
0answers
52 views

How to properly subscribe to Uniswap v3 pool price events with NodeJS and JavaScript?

In reviewing the Uniswap v3 Quoter documentation: These functions are not marked view because they rely on calling non-view functions and reverting to compute the result. They are also not gas ...
1
vote
1answer
50 views

Why can't I access the Uniswap v3 Factory .getPool() function?

As a personal exercise, I am trying to convert the following Uniswap v2 project to Uniswap v3: Uniswap token price monitoring (this is not swapping), i.e. ETH/DAI https://www.youtube.com/watch?v=...
0
votes
0answers
36 views

Web3JS - Error: "gas" is missing

I have created a contract token on BSC Scan. But I'm getting an error when transferring tokens to another wallet address. My code const name = await this._contract.methods.name().call(); const symbol =...
0
votes
1answer
17 views

Etherjs Transfer BNB Return 0 and doesnt end to Receiver Address

Hi im new to smart contract. Im trying to code a simple transfer using etherjs and nextjs. Basically below are my code import {ethers} from 'ethers'; const ContractAddr = '...
1
vote
1answer
11 views

Fetching InternalType data from another contract

basically I have this ABI for a contract {"internalType":"bytes","name":"_DATA","type":"bytes"}],"name":"function","...
0
votes
1answer
19 views

Total Liquidity Calculation going wrong in specific situations

I cant really figure out how to phrase the question, but essentially the situation is: I use this code to calculate total liquidity: //Contracts instantiation is class object constructor (I use class ...
0
votes
0answers
28 views

Why Does My Ethereum ".on" Event Listener Stop Firing?

I have a node.js server where I am listening for an event that is emitted from a Solidity smart contract deployed on the Mumbai Polygon testnet. First, I'm using the "web3-providers-ws" node ...
0
votes
0answers
9 views

When comparing exchange token values, why don't the values change over time?

I setup and ran the price comparison Node.JS bot from https://github.com/dappuniversity/price-bot and followed Gregory's setup directions from https://www.youtube.com/watch?v=77G_-cMayRU. I have ...
0
votes
0answers
29 views

Cannot access methods in deployed Polygon Testnet smart contract

I've got a pretty straightforward payment splitter smart contract that uses the OpenZeppelin PaymentSplitter library: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@...
0
votes
0answers
199 views

error overflow pasing value to smart contract method

I am having an error when I want to send values ​​to the method in my smart contract, an example of what I am sending is: { from: '0x285A3aF6cAF3483676Ef10416784636b109eE6a8', to: '...
0
votes
0answers
84 views

web3.eth.Contract using getPair error: "This contract object doesn't have address set yet, please set an address first."

I am trying to get the contract address for two tokens (WBNB and DOBO) using the getPair method but get the error "This contract object doesn't have address set yet, please set an address first.&...
0
votes
0answers
280 views

Pancakeswap automatic bot: buy on liquidity. Unknown errors in node.js

I am adapting a BSC trading bot that (1) detects a liquidity event, (2) checks if at least 1 BNB in liquidity is available for the trading pair, (3) buys the token, (4) checks how many tokens were ...
0
votes
0answers
28 views

How do I see token amounts in a polygon wallet?

I'm trying to write something that will allow me to see how much of each coin a wallet has. I only have the private wallet address and addresses for different tokens on the polygon network. I'm ...
0
votes
0answers
20 views

How do i use Node.JS / C# Backend REST api to communicate with smart contracts built on https://remix.ethereum.org/

Been able to create contracts transfers , see balances etc. Now I want to use Node.JS to access it , display account balances initiate transfers etc. I have been able to create a token (a coin) but i ...
0
votes
1answer
64 views

How to integrate 2.5% sales fee in an NFT Marketplace

I'm currenttly building an NFT marketplace, I am done with all the major functionalities, i.e listing, selling, buying etc. but the problem is, when wiriting the code earlier I used a fixed listing ...
0
votes
1answer
43 views

Modifying receive function to take ether input instead of Wei

I am building a Shared Wallet contract as a project. As I have started working on the front end in react web app I have encountered the problem that javascript cannot store large numbers. I could not ...
0
votes
2answers
132 views

How to resolve 'Build failed: function.js does not exist; Error ID: 7485c5b6'

I'm trying to deploy a Chainlink external adapter to Google Cloud Function but running into the above error. I am using this template for the external adapter. https://github.com/thodges-gh/CL-EA-...
0
votes
0answers
11 views

console.log fails transaction

Let's say I have a system made up of four different sections with contracts, proxies, node files, etc: 1--------- | | | 2--------- | | | 3---...
0
votes
1answer
29 views

How to detect if user burned tokens

Looking through the code of ERC20 tokens they have the ability to burn and mint new tokens. I want to write a nodejs program that monitors if a user burns a token and then sends them a new one if ...
0
votes
0answers
45 views

how to debug this "Error: Transaction has been reverted by the EVM"

const Web3=require('web3'); var Tx = require('ethereumjs-tx').Transaction; const web3=new Web3('https://ropsten.infura.io/v3/1e9dedc0e54e44559345e5636c004114'); var account1='...
0
votes
0answers
73 views

Pancakeswap: TRANSFER_FAILED. Why?

I am trying to buy a token at the listing time, but my transactions get rejected with the error "TRANSFER_FAILED" while other transactions at the same time are successful. I have tried high ...
1
vote
0answers
57 views

web3.eth.sendSignedTransaction doesnt return a receipt

I am trying to transfer some funds using a NodeJS application. The code I am using is: async function transfer(to, amountToSend) { return new Promise(async (resolve, reject) => { var ...
0
votes
1answer
53 views

Is there any way to listen smart contract events from nodejs-expressjs server?

I am developing a smart contract project and I need to listen events on my expressjs-server. Is it possible to listen events from there?
1
vote
1answer
100 views

Difference between smart contract and wallet address

I have list of addresses & I am trying to find out if the address is wallet address or smart contract address. I am using web3js. Is there any way to distinguish between smart contract and wallet ...
0
votes
0answers
13 views

how to remove stacktrace in console log

how to remove this stack trace in console log?
0
votes
1answer
35 views

UnhandledPromiseRejectionWarning: Error: Transaction was not mined within 750 seconds, please make sure your transaction was properly sent

I am trying to run the below code: // Import modules var Web3 = require("web3"); const HDWalletProvider = require("truffle-hdwallet-provider"); const { interface, bytecode } = ...
0
votes
0answers
159 views

Best approach for historical token balances for each specified wallet

I am trying to archieve the following: -have a set of wallets -have the erc20 token balances for each of these wallets (every token on the chain or at least top 500) -data updated as close to ...
0
votes
1answer
97 views

AnyswapV5ERC20 deployment - set totalSupply

I have some questions about the anyswapV5ERC20.sol contract. First of all, are there some more detailed docs than the guide of andre cronje? My main question is: How can I set the totalSupply or mint ...
0
votes
1answer
341 views

BEP20: transfer amount exceeds allowance

I want to swap bep20 tokens like BUSD - BNB and BNB - BUSD, i already approved tokens for the swapping but while i try to swap BNB - BUSD it's throw error like BEP20: transfer amount exceeds allowance ...
0
votes
1answer
89 views

EtherscanProvider.getHistory(), got an error;

nodejs.SERVER_ERRORError: missing response (requestBody=null, requestMethod="GET", serverError={"code":"ECONNRESET","path":null,"host":"api....
1
vote
1answer
741 views

Make offer to opensea asset through opensea-js

I'm using opensea-js alongside with nodejs to make offer on opensea testnet assets. The code is following: process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; const Web3 = require('web3') const opensea = ...
1
vote
3answers
636 views

Hardhat: How to "spin up" a local JSON-RPC fork node at a specific block number with my new contract deployed in it?

I can "spin up" a local fake blockchain in Terminal using $ hardhat node I can also make it fork the real mainnet using Alchemy, even pin it to a specific block N. Other local applications ...
0
votes
0answers
55 views

Check if smart contract function exists from code and then call it

I'm getting the code of a smart contract by using web3.eth.getCode(contract_address) I want to call certain functions that I'm fairly certain exist on that contract, however I don't know the ...
0
votes
0answers
93 views

web3.eth.getBlock(i) is not working in my code. i am getting error for the 2nd block which is web3.eth.Block(1). Please anyone help

async function AllDocuments() { try { const latest = await web3.eth.getBlockNumber() let txStr = '' console.log("latest") for(let i = 0; i <= latest; i++ ) { ...
0
votes
0answers
11 views

Listen events synchronously using web3js

I am listening two events like this. contractConnection.events.allEvents(options).on('data', async (data) => { if (data.event == 'AddData') { await this.storeSecondarySale(data....
0
votes
0answers
152 views

OpenSea.js No output using web3 and node 8

Working with OpenSea.js and have the following code but the output is absolutely nothing. Can someone help? const Web3 = require("web3"); const OpenSea = require("opensea-js"); // ...
0
votes
0answers
181 views

How to load web3 in front-end correctly?

I am trying to develop a new Dapp. I have written the smart contracts and they are working well. I now need to use web3 to interact with the smart contracts, for now using ropsten or rinkeby. I get ...
1
vote
0answers
368 views

How to transfer an ERC1155 Matic token using Node.js?

I'm trying to write a Node script that will transfer an ERC1155 token on the Matic network from my address to someone else's address. Here's an example token: https://opensea.io/assets/matic/...
0
votes
0answers
88 views

I want to get the image(IPFS link) of the NFT i am using etherscan api

I am trying to list of all NFT tokens in account I am using this etherscan API to get all ERC721 tokens but not getting image in in https://api.etherscan.io/api ?module=account &action=...
0
votes
0answers
5k views

MetaMask - Internal JSON-RPC error

i was developing a full stack nft marketplace, where i can mint nfts but when i try to buy it gives me this error :MetaMask - Internal JSON-RPC error code: 3, message: "execution reverted: Please ...
0
votes
2answers
103 views

how can i send a transaction in spesific block numbers with web3Js?

I wanna know how to send the transaction in spesific block numbers with web3js ( Yes its for sniping bot ) The purpose is to avoid the tax in 1-3 blocks since liquidity is added For example : New ...
2
votes
0answers
78 views

Why does web3 say the transaction hasn't been mined in 750 seconds when the blockchain transaction says it was mined in 1:30 seconds

We keep getting an error from our node application with the following error: Transaction was not mined within 750 seconds, please make sure your transaction was properly sent. Be aware that it might ...

1
2 3 4 5
13