Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [ethereumjs]

For questions regarding the installation or use of EthereumJS, a Javascript library that implements a number of Ethereum utility functions.

Filter by
Sorted by
Tagged with
1
vote
1answer
266 views

Web3 - Cannot read property 'clearSubscriptions' of undefined

While creating a web3 instance, and attempting to call setProvider with a valid provider (Ganache), I get a TypeError. TypeError: Cannot read property 'clearSubscriptions' of undefined Steps to ...
1
vote
1answer
149 views

How to make user sign up and login on my decentralized application?(on production it should work without metamask)

Assuming that user who is going to signup is not having any ethereum account so how can I generate a public, private key and address for ethereum and make use of it to make further transactions. Users ...
0
votes
3answers
180 views

What is the best practice for a tax payment Smart Contract?

I have just been introduced to Ethereum Smart Contracts and I have a faculty-related project that implies the usage of them. The idea is to create a DApp which allows clients (persons) pay taxes (in ...
0
votes
1answer
25 views

How can a smart contract payable based function returns value against any purchase

I am trying to get a return value from the payable function, the idea is a user must pay the fees and in return, he will get his special code. My JS test code is as follow it('get special code ...
3
votes
1answer
76 views

Signing a transaction with uport can't approve as the selected account can't change.How can i change in uport selected account?

I am developing a dapp with uport verifications but when I go for saving information into ropsten network, a uport signing transaction appears on my screen and I can't approved the transaction. I ...
0
votes
1answer
16 views

rpc error with payload and exception thrown in contract code

This is the problem I get when trying to run my contract! And then when I go ahead and run it, this pops up This is my js code: import React, { Component } from 'react'; import Web3 from 'web3'; ...
0
votes
0answers
16 views

What is the networkid and chain id of truffle cli?

I am using truffle console to deploy contracts and using Nodejs/web3js to interract with it. I wanted to use ethereumjs-tx for signing transaction, here is the reference link. I am not sure ,how can ...
0
votes
1answer
171 views

Unable to view the transaction details in etherscan

I am using ethereumJs and web3.js to send erc20 tokens from one account to another account.I am able to get the hash of transaction, but cant see any transaction details on the etherscan. var Web3 = ...
0
votes
1answer
276 views

Error: Cannot find module 'ethereumjs-wallet'

A truffle test needs ethereumjs-wallet const wallet = require('ethereumjs-wallet'); I tried npm install ethereumjs-wallet and even npm uninstall ethereumjs-wallet npm install --save ethereumjs-...
1
vote
1answer
100 views

Error when testing the contract

ApprovalContract.sol pragma solidity ^0.5.1; contract ApprovalContract{ address public sender; address payable public reciever; address public constant approver=...
0
votes
1answer
140 views

BlockCypher Account nonce too far behind transaction

I'm currently working on a DApp that involves sending transactions. I'm using BlockCypher to send the transactions since the API is fairly straight forward. One issue I'm finding is that when I run my ...
0
votes
0answers
158 views

EIP150 testBlockchain RangeError: Maximum call stack size exceeded

ethereumjs-vm > npm run testBlockchain TAP version 13 # BlockchainTests # file: ContractCreationSpam test: ContractCreationSpam_d0g0v0_EIP150 ok 1 correct pre stateRoot ok 2 correct genesis RLP ...
0
votes
2answers
35 views

Exchange ERC20 token with other ERC20 token

I have 2 ERC20 tokens. The contract are designed as standard ERC20. Here are the 2 tokens to take as an example - AUDC --> Contract Address: (0xContractAUDC) Wallet Address: (...
1
vote
1answer
254 views

NodeJS with HDWalletProvider

I want to execute signed Ethereum transactions from a NodeJS program. I am creating a web3_provider like this var contract = require("truffle-contract"); var provider = new HDWalletProvider("nemonic"...
0
votes
1answer
401 views

Transaction signing fails Invalid RLP.“,”data“:”RlpExpectedToBeList"

I'm trying to sign and push a transaction using ethereumjs and Infura. It seems to be working and I'm getting a transaction hash back, but the transaction is not visible on Etherscan, and when I'm ...
2
votes
1answer
135 views

Implementing a transaction fee via direct address and QR code

I was looking through the ethereum javascript api and I was wondering if there is way to implement a custom transaction fee? For an example, if someone send a certain amount of ethereum to another ...
1
vote
1answer
14 views

Geth and JavaScript

I want to deploy a private blockchain using Geth. I am considering using JavaScript to build the backend as I did before (NodeJS) but what about the smart contract? Since it is private is there a way ...
0
votes
2answers
35 views

Script For Emptying Address

Does anyone have a script that can be used to transfer all ether found in an address to another address? The script will constantly check for any incoming ether and make an automatic transaction, ...
0
votes
1answer
189 views

Unable to install ethereumjs-testrpc on AWS Cloud9 (Closed Issue)

I was able to install truffle and as a follow up was trying to install ethereumjs-testrpc on the Amazon AWS Cloud9 dev environment. While running the following install command sudo npm install ...
0
votes
3answers
470 views

Access to a child contract method

my question is simple and I want to know if there is a possibility to achieve something like this. I have two contracts, one inherit from the other; I want to access to a method of the child contract ...
0
votes
1answer
27 views

Code:const web3 = new Web3(window.web3.currentProvider) Error: window.web3 is undefined

I am going to connect my contract with the website.However,there was something wrong with the web3? I'm not sure. import Web3 from "web3"; const web3 = new Web3(window.web3.currentProvider); const ...
0
votes
1answer
24 views

How to parse ecrecover parameters?

I am looking into getting the public key from ANY ethereum address (not owned by me) that has sent a transaction at least once. It seems that the most viable solution here would be to use ethereumjs-...
4
votes
1answer
170 views

Testrpc transactions are failing. How do I perform a transaction when Mist cannot estimate gas?

I am attempting to perform transactions and create contracts using EthereumJS Testrpc. I set it up by running the following: Terminal 1: testrpc Terminal 2: mist --rpc localhost:8545 Running both ...
4
votes
1answer
197 views

How to use BTCRelay for my ICO to get funds in BTC?

I want my ICO get investment in BTC also ,When i browse over internet I came up with BTCRelay concept . I tried to read their docs but it make me confused .Anybody give me a simple way to use BTC ...
0
votes
2answers
350 views

How can I call smart Contract function from server side using ethereum account

I want to call Smart Contract function from server side. How can I call? I want to use nodejs.
1
vote
1answer
65 views

How do I use web3js 1.0.0 in geth 1.9.0? I want to import an account whose address, private key and passphrase I have in my geth node [duplicate]

I am at Geth/v1.9.0-stable-52f24617/linux-amd64/go1.11.5 web3JS version is giving : > web3.version { api: "0.20.1", ethereum: "0x2712", network: "4", node: "Geth/v1.9.0-stable-52f24617/...
1
vote
1answer
371 views

Cannot get web3.eth.sendTransaction() to work properly. The function does not fire

I am creating this very simple program that sends ETH from one address to another. I am using rinkeby.infura.io to get FREE ether and for testing purposes. My code seems to work fine because when I ...
0
votes
1answer
283 views

ethereumjs-wallet/hdkey is no more in npm

how to generate multiple addresses from single mnemonic? var hdkey = require("ethereumjs-wallet/hdkey") var bip39 = require("bip39"); // You can generate a mnemonic seed with bip39 library var ...
1
vote
1answer
396 views

Ethereum Contract ABI - Encoding for functions with no arguments

I am using argument encoding from this page (https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) to build data field for offline signing. I am using eth.sendRawTransaction to call a function ...
1
vote
2answers
35 views

I Call SmartContract Token ERC20, Why Show Hashing Output ? (Web3 + Metamask + Javascript)

I do not know why with this, even though in the previous version (web3 + Metamask) can issue real data. But now used as hashing (output). I took the example in the code and output below (to get the ...
0
votes
3answers
64 views

How to build a decentralised Voting Website without using any 3rd party extensions like Metamask, or IDEs like Remix? [closed]

I've gone through various Blockchain Tutorials but everywhere it's one or the other same thing. Download truffle/ganache, from 10 free testrpc account, use one, use metamask, Remix IDE etc, and Voila!...
0
votes
1answer
45 views

how to connect my html form that is username and password to blockchin and taking the username as metamask key?

I am developing a decentralized cloud web application, when the user will login into the application he/she will generate password from blockchain, I am not getting how to connect my html form that is ...
2
votes
1answer
334 views

How to change block generation period?in POA private ethereum blockchain

my genesis.json like that: "config": { "chainId": 333, "homesteadBlock": 1, "eip150Block": 2, "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "...
0
votes
1answer
414 views

Gas estimate infinite

This is my code pragma solidity ^0.4.19; contract FirstContract { address creator; uint256 priceOfATransaction = msg.value; uint256 totalAmount; address buyer; function ...
1
vote
2answers
36 views

Contract.deployed() does not work as expected

I use Truffle to test a contract. When i use Contract.deployed() and i fetch address, for example : In a first test, the contract's address is 0x07D899846146b3503dE9D9Dc36B94C2e428eA434 In a second ...
3
votes
3answers
2k views

How to verify MetaMask account holder is the real owner of the address?

I'm making a dapp that will make calls to a Node.js server. I expect the user to have MetaMask installed and I want to verify that he is the real owner of the current address on MetaMask (i.e. ...
6
votes
1answer
456 views

How to use Nodejs/Javascript and LevelUp to read Blocks from local geth database files (.ldb)?

Here's what I've been able to get going to far. I can open the blockchain database but I can't seem to create a valid blockchain object (nor call the blockchain.getBlock() function successfully). I'...
2
votes
1answer
350 views

Error in crowdsale code on Ethereum

I wanted to do it on private blockchain crowdsale, I did everything according to the instructions on the site https://www.ethereum.org/crowdsale#unlimited-crowdsale, but when I copied the last code I ...
1
vote
1answer
3k views

getting error nonce too low , but nonce is proper stuck since one day

I am working with web3.js since sometime now , but now i am stuck with nonce too low error , the nonce is proper also i have checked private key and other addresses , they also seem to proper , ...
0
votes
1answer
868 views

Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: VM Exception while processing transaction: revert

Googled around and nothing could solve this error. truffle migrate --network development Using network 'development'. Running migration: 2_deploy_contracts.js 1520374082 1522102082 1000 '...
0
votes
1answer
32 views

Why txHash in sendSignedTransaction giving Undefined value on sending on rinkeby testnet

let Tx= require('ethereumjs-tx').Transaction; const Web3= require('web3'); const url='https://rinkeby.infura.io/v3/d4dbc79ea192404fb42689cc55ce2fc0'; const web3 =new Web3(url); const account1= '...
0
votes
2answers
1k views

how to get the token transaction history via web3.js (0.20.6)

set up node.js + web3.js (0.20.6 version) + and using infura for the httpProvider I've figured out and successfully sent erc20 tokens using the web3.js, (after a lot of googling... complete noobie ...
1
vote
1answer
21 views

Make sure I don't jump any blocks

I'm making a simple program to track transactions in and out of an address, I have a function that gets the latest block and then I run it consecutively. When I run the function sometimes the block ...
0
votes
0answers
40 views

Transactions go to an older contract address rather than the present deployed one

Though I have deployed a new contract but the transactions go to a previously deployed contract in my application. I'm attaching the screenshot of my Remix-ide code and the code for the front end ...
0
votes
1answer
172 views

problem connecting web3 v 1.2.1 with metamask : 'currentProvider' of undefined

I am using Web3 v1.2.1 with nodejs v10 and following this link. I am having issue connecting with metamask,below is my code snippet: const Web3 = require('web3') const window = require('window'); ...
1
vote
1answer
41 views

Token added to each MetaMask account

I just request a token(Ropsten test net) from one of my "MetaMask" account(Account 1). But MetaMask showing me same token balance from each Account(I have 3 Accounts). Why this token added to each ...
2
votes
1answer
84 views

Which version of web3 shall i be using now?

I found the documentation of version 1.0.0 which was released on the 6th of August here. I was told that v1 is not stable and very different than earlier versions. But when i check the available ...
0
votes
3answers
46 views

transferFrom function not working in ICO Smart contract

I am facing issues with the transferFrom function of smart contract address 0x6560a9b6436e129cf835ab9da96201207facd4f8: I copied the smart contract code from etherscan.io and deployed on ropsten ...
3
votes
3answers
120 views

How to setup 'topics' for function getPastLogs ()?

Sir, I want to read the past event log by using getPastLogs(),but I got the whole log.I hope I can filter some log. I find I can setup the 'topics' in getPastLogs(),but it always fails. How ...