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.

123 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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'...
4
votes
0answers
506 views

How can I retrieve transaction hashes using web3 batch requests?

When I send a transaction using Truffle's contract wrappers - or using plain web3 sendTransaction() - I get a tx hash back that I can use to confirm the tx has completed. While using batch requests (...
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 ...
4
votes
0answers
224 views

how to get revert at the previous timestamp of evm in testrpc

I am testing my contracts so at some point i need to increase the timestamp of evm that i achieve through evm_timeIncrease but now i want to execute some functions on the basis of current timestamp ...
4
votes
0answers
278 views

Why are there discrepancies between client message signatures?

I have been investigating message signing using an Ethereum account, and have become somewhat bemused by the different signatures that I receive from different clients and different libraries. I have ...
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 ...
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 ...
3
votes
0answers
263 views

How to use ethereumjs-vm to find the internal transactions for a transaction/block using infura.io

I am using infura.io as my node and trying to get the internal transactions (i.e. transfers initiated by smart contract) for a specific transaction (or its parent block). I have two attempts (both ...
3
votes
0answers
1k views

Issue won't allow this transaction (Smart contract)

•Windows 8 •Mist 0.8.9 •Tesnet When I publish my crowdsale smart contract and try to send ethers,i have this warning
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 ...
2
votes
0answers
22 views

What is the difference between signing a document, signing a transaction and signing a message? (very basic)

As per my limited knowledge in Ethereum, user can sign the object(doc, Tx, msg) for the security purpose and with the public key other user can get that object. But not understand the difference ...
2
votes
0answers
80 views

geth : Unable to fully sync to Rinkeby

I am trying to synchronise geth with Rinkeby node but when around 100 or so block left, it keep on dropping the peer and doesnot sync fully with the test net below are the screenshot for the same.
2
votes
0answers
257 views

Mnemonic and HD Path in Ganache and ethereumjs-tx gives different private key and address

I am having difficulty reproducing the private key and address using the mnemonic and HD path provided by Ganache. Mnemonic weird farm vast surge upper truth answer end radar impact mind jeans HD ...
2
votes
0answers
27 views

msg.sender is not showing corect value

I am facing a strange issue. Please read the below case craefully and assit me to geth this issue resolved. I have ERC20Token created by Zeppling templates. [Please ignore syntaxes, I am just trying ...
2
votes
0answers
164 views

Signature generated through web3.eth.sign not leading to same address after fromRpcSig

I am trying to write sign a challenge using web3.eth.sign, web3 uses ganache.provider(), But when i do fromRpcSig(signature) ecrecover(challenge) which results in different address. But when i sign ...
2
votes
0answers
56 views

Estimated gas is always low

web3.eth.estimateGas is always calculating low gas for the transaction. Here is a reference to a trasaction in ropsten. https://ropsten.etherscan.io/tx/...
2
votes
0answers
147 views

miner shows 0x0000000… while getting block details using eth.getBlock()

I have created a private ethereum POA network using a bootnode and 6 nodes , of them 3 are miners .But every time i do a successful transaction over network , the miner returned by the getBlock of eth ...
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", "...
2
votes
0answers
564 views

Hyperledger Fabric and Ethereum Blockchain Integration

How can I connect Hyperledger Fabric to the ethereum blockchain so as to make payments. I am recording the number of tokens to be alloted in the hyperledger system I want to access the data and then ...
2
votes
0answers
123 views

Ethereumjs: How to save the blockchain / state

Ethereumjs noob here. Using the code below, I'm able to create a new blockchain and add blocks to it. But the blocks are not being saved to the database. var blockdb = levelup("./blockdb", {...
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 ...
2
votes
0answers
426 views

Why is dynamic array length not updated after addition of new element?

I created a struct as follows: struct Node{ // each node models each device on the network address nodeAdress; // adress of the node uint trustValue; // trust value ...
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
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=...
1
vote
0answers
13 views

Oraclize ethereum bridge : Notifying __callback tx error to frontend

I have called API dynamically using Oraclize with the delay of 10 minutes. The code is shown below and it works well. uint256 constant DELAY = 60*10; event Log(string result); function ...
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
0answers
28 views

Smart Contract ABI in Remix (Ethereum)

When I deploy smart contract on the Rinkeby network using Remix the ABI of smart contract does not contain its address, so how do I connect it with my frontend application.
1
vote
0answers
58 views

Ecrecover wrong address is returned

I'm trying to validate signed data with ecrecover. The message is signed like this on the FE: return this.web3.eth.personal.sign( `${nonce}`, publicAddress ).then( ( signature ) => { ...
1
vote
1answer
41 views

Sign message twice with web3

a quick beginner's question... is it possible to sign a message twice with web3? For example Alice creates a message and signs it. Then it is sent to Bob. Can Bob sign the message before he executes ...
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 ...
1
vote
1answer
23 views

is there any method convert mutiple params to one bytes in web3js ,and then get these original data from bytes in solidity?

eg: the params in js code below,how to convert to one bytes var min=100; var max=100000000000; var price=1000000000000000000000000000; var name="john"; in solidity code below,how to get original ...
1
vote
1answer
117 views

Unable to deploy smart contract to rinkeby using ledger wallet?

I am trying to deploy smart contract using ledger wallet. But i keep getting the error cant subscribe to new header. However i get the transaction hash but cant receive the contract instance and ...
1
vote
0answers
519 views

Metamask create transaction with popup prompt

Im trying to create a basic static html page to send a transaction using metamask. It looks like web3 is not being injected into the page at all even though i have metamask installed. I would have ...
1
vote
1answer
168 views

problem deploying a contract

I am trying to deploy a contract on testrpc using web3.js, contract deploys fine when I deploy it from remix, it uses roughly the same amount of gas as the estimate. However, when I try to deploy ...
1
vote
0answers
202 views

Uncaught at initializeDrizzle TypeError: Cannot read property 'apply' of undefined

I am working a Drizzle truffle box project, and this is my first intro to React so I am struggling a little bit. I keep getting this error and I cannot for the life of me seem to fix it. The ...
1
vote
0answers
225 views

Loading Script Geth puppeth

I failed to load a script into a private blockchain setup using puppeth. I have used puppeth to configure a private blockchain (PoA) with a few sealers on different vms. Could someone help? I now ...
1
vote
0answers
140 views

How do I get a merkle proof (stateHash) from the merkle patricia trie?

So I understand how a patricia trie works, it's a trie using 0 to f as root nodes, and it also removes empty nodes to make leafs and extensions. What I don't get is how the stateRoot hash is made. ...
1
vote
0answers
133 views

creation of Hourglass errored: transaction execution failed

I don't know why I'm getting this error while deploying 2 of my contracts. creation of Hourglass errored: transaction execution failed while code compiles successfully no issues there. ...
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"...
1
vote
0answers
39 views

Same Transaction is getting mined twice

I have a smart contract which generates a random number and compares it with the user's input to check if both are equals, and based on that it updates a mapping. But anyhow the same transaction is ...
1
vote
1answer
172 views

Ethereum private chain not able to addPeer

I created a private chain with my friend with exactly the same genesis block and we wanted to connect through the admin.addPeer method. The problem is that for some reason they are able to connect to ...
1
vote
0answers
168 views

Truffle TypeError: Member “error” not found or not visible after argument-dependent lookup in type(library Assert)

Trying to test my Solidity contract for errors using Truffle test. TestSafeMath.sol function test_add_10_and_max_should_return_err() { uint256 max = 2**256 - 1; Assert.error(SafeMathExt....
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 ...
1
vote
0answers
104 views

Library for create ethereum wallet

I want to create an ethereum wallet that is erc20 compatible on my client side. It should allow user to enter his own password and generate private key, recovery phrases and utc file. I try to ...
1
vote
0answers
326 views

Raw Transaction: GasPrice, Limit in Hex or Decimal?

When signing a raw Transaction like this: (example taken from Javascript API Docs) var Tx = require('ethereumjs-tx'); var privateKey = new Buffer('e331b6d698.......................23123', 'hex') var ...
1
vote
0answers
54 views

Derive additional accounts from private key

Im building a dApp and during account creation I can generate an address as well as private/public (extended) keys. What i want is to be able to generate further accounts after the seed is no longer ...
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 ...
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 ...
1
vote
0answers
54 views

How can I set a previous state/storage trie when running ethereumjs-vs runCode?

I am trying to call runCode on an ethereumjs VM with the contract code, the necessary data (method specifier + params; encoded) and the contract storage trie I got from a previous call on runCode ...
1
vote
0answers
153 views

State channel implementation

Say I have a data chain, a party is moving data to a party and so on and so on, and I'd like to trace exactly what party touched what data (given my data has an ID). I wouldn't like to store this on-...