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
0
votes
1answer
431 views

How long does it take to sync Rinkeby network with geth?

I am syncing the Rinkeby network with geth geth --rinkeby --rpc --rpcapi="personal,eth,network,web3,net" --ipcpath="~/.ethereum/geth.ipc" When I run eth syncing in geth console, it is showing { ...
0
votes
1answer
37 views

Script to automatically transfer ether to another address

Please, can anyone help with a script to use and watch my address for any incoming ether, and once it enters, the script would quickly transfer the ether to another address. I would also love to know ...
1
vote
1answer
280 views

MetaMask breaking change - does ethereum.enable() prompt an Access signature every time it's called?

Does ethereum.enable() prompt an Access signature every time it's called? Or will access-granted status persist?
1
vote
3answers
77 views

What is Metamask?

I know it's a dApp web3 browser, a wallet. But which ethereum client is used in the back end to interact with block chain? How the same account is able to connect with all networks (mainnet,testnet, ...
3
votes
3answers
170 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 ...
3
votes
1answer
371 views

Send eth from one account to another using transfer() function

I am trying to write a smart contract that will send eth from one account to another account : Contract Send { event Sent(address from, address to, uint amount ); function send(address _receiver,...
0
votes
1answer
169 views

About getPastLogs usage

"getPastLogs" can get past event log. I check the web3 documentation: fromBlock - Number|String: The number of the earliest block ("latest" may be given to mean the most recent and "pending" ...
0
votes
3answers
641 views

Sending Signed Transaction returns pending and event:undefined

I am trying to send a signed transaction using web3 1.0 and Infura.io through the browser. When I run it I dont get any errors but the transaction never hits the blockchain so I am confused on whats ...
0
votes
3answers
272 views

how to generate mnemonics from randombytes

I am able to get the randombytes using react-native-crypto-js const words = CryptoJS.lib.WordArray.random(32); Is that possible to generate mnemonics using random bytes.
0
votes
1answer
353 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-...
2
votes
1answer
772 views

Different address with single mnemonic phrase

I'm trying to implement ethereumjs-wallet library to my code. But when I decided to compare generated accounts with accounts generated with the same mnemonic here, I got absolutely different accounts, ...
1
vote
1answer
131 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 ...
0
votes
1answer
197 views

How to state private keys when using node.js and ethereum to run a contract?

I have to run node.js to execute smart contracts. My quetsion is about the keys. I have seen this from the docs - 1. Code to sign 2. Code to execute But I am unsure how the two are combined. Could ...
2
votes
0answers
294 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 ...
4
votes
3answers
162 views

Getting Addresses using a Path causes the error: Could not derive hardened child key

I am using ethereumjs-wallet npm package to generate a unique wallet address for each user. However instead of using the mnemonic/seed, a public extended key xpub will be used instead to keep the ...
1
vote
0answers
84 views

How to integrate ledger wallet in REACT DAPP? [closed]

i cant seem to find a way to integrate ledger wallet in react DAPP. Like which library to use. Any kind of guidance and starting material would be helpful. Thank You
0
votes
1answer
136 views

Deployment of Blockchain Dapp application on cloud!

I have my dapp in progress using PrivateNet, Metamask, HTML, CSS, JAVASCRIPT & Solidity in Ethereum. After the finishing of my application I just wanted to host my application on cloud. As of now ...
2
votes
2answers
641 views

solidity ecrecovery and ethereumjs ecsign return different address

I have a code as follow using web3 0.2 and ethereumjs-util to interact with smart contract. What exactly am i doing it wrong? is it incompatible between ecsign of ehtereumjs with smart contract ...
1
vote
0answers
587 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
956 views

Deploying contract with arguments using raw transaction

I want to deployed to deploy the following contract that has a constructor with the following arguments. contract test{ constructor(address _recipient, address _user){ ... } } I want ...
1
vote
1answer
293 views

Connecting with existing ganache core server

I have a ganache-core server running at port 18545 (part of an npm app) How can I attach to it and see the transactions/blocks in that. I tried running ganache GUI and setting port number as 18545 in ...
0
votes
1answer
82 views

Solidity smart contract interacting with deployed smartcontract

Below are the steps (take note, no issues when I test this on remix, it works absolutely fine) Two smart contracts, Usermapping.sol and CoffeeNetworking.sol in truffle "2_deploy_contract.js" enable ...
7
votes
1answer
4k views

Web3 js 1.0 is throwing big number error while transfering tokens

When I tried to transfer more then 1000 tokens, it's throwing an error like as mentioned below (I'm using web3 js 1.0.0 34 beta version). Error: [number-to-bn] while converting number 1e+23 to BN....
1
vote
1answer
55 views

Allowing multiple polling for user

Is there a way to allow user to vote for multiple proposals. For example: User A can vote for proposals :P1,P2,P3,etc. Once A has voted for P1 he should not be allowed to vote for P1 but is eligible ...
1
vote
1answer
296 views

Unable to Generate Same Account from MetaMask Mnemonic in EthereumJSWallet

I've been unable to generate the Account I see in MetaMask in EthereumJSWallet even if I use the same mnemonic. Due to the lack of documentation, I may be misunderstanding how to do so. I have run ...
0
votes
2answers
112 views

Require validation error not working

I tried using require method in solidity in the following way: require(validate(personName),"Error: Invalid Person") In this case i am checking if a person is already added to my person list. If not ...
0
votes
1answer
33 views

solidity error, while accessing struct value of an array of nested mapping of deployed contract

Remix Error: Type error, Return argument type inaccessible dynamic type is not implicitly convertible to expected type (type of first return variable) bytes32[] snippet code shown below: Do take ...
0
votes
1answer
53 views

solidity interaction with a struct mapping of a deployed smart contract

I have followed the below code as follows on remix and it works fine but i have an issue when i try to access one of the struct value of a key.The last line of the code doesnt work. pragma solidity ^...
1
vote
1answer
4k 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 , ...
1
vote
2answers
110 views

Convert array with hex datatype to readable format using truffle console

I am new to ethereum. I am using truffle to develop, deploy and interact with my solidity contract.I have a function in my contract which is as follows: function getResult(bytes32 name) public view ...
0
votes
1answer
85 views

Store N key value pairs

I have a scenario where I need to store N no. of document hashes in a smart contract with some key(id). And also fetch the particular document hash by it's key. Any help on designing the structure for ...
4
votes
2answers
545 views

Difference between public private and consortium blockchain

I am new to blockchain therefore i am trying to understand difference between private public and consortium blockchain. I do understand public blockchain but i am unable to differentiate between ...
1
vote
1answer
185 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
1answer
363 views

How to calculate optimal gasPrice and gasLimit? [duplicate]

I am using rawTransactions and web3Instance.eth.sendSignedTransaction to deploy and interact with smart-contracts. The problem is that I can't figure out hot to calculate optimal gasPrice & ...
2
votes
2answers
654 views

Problem using require('ethereumjs-tx');

I am making a dapp and I am trying to import modules. The structure of my folders is the one that you can get from the truffle webpackage, the following: -App ---build ---constracts ---migrations ---...
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
182 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
61 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/...
1
vote
0answers
210 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
243 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
1answer
103 views

Digital Identity with signing

Is there a way to sign some data right out from a smart contract? Let's say I want to create a smart contract, that will represent my Digital Identity and I want it to have sign() method. Maybe ...
3
votes
0answers
297 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 ...
1
vote
0answers
162 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. ...
0
votes
1answer
24 views

Access Block Document

I have a requirement where we need to save data(pdf) to blockchain so that any third party can access and view it later by the block address. I can't store the hash of the data on blockchain as the ...
1
vote
0answers
136 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. ...
2
votes
0answers
176 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 ...
0
votes
1answer
36 views

30 second delay after payment submitted to Rinkeby test network before receiving Tx hash?

When I call the .send(); from Web3.js based browser Javascript code, there is a 30 second delay right after I submit payment via the Metamask extension before the call returns with the Tx hash. Note,...
6
votes
3answers
2k views

I get error couldn't find module 'ethereumjs-wallet/hdkey'

I was running this code deploy.js const HDWalletProvider = require('truffle-hdwallet-provider'); const Web3 = require('web3'); const { interface, bytecode } = require('./compile'); const provider = ...
0
votes
1answer
423 views

Problem with sending ERC20 token using web3@1.0.0

Circumstance I have followed all indications from this GH issue and from other SO posts. The transaction gets successfully broadcasted but no tokens are transferred. When I check the balance before ...
1
vote
1answer
30 views

Why am I not receiving '5 passing, 1 failing' after performing truffle test?

After running truffle test i get the following unexpected error: Zanes-iMac:riskxtoken zanemassey$ truffle test Using network 'development'. Compiling ./contracts/Migrations.sol... Compiling ./...

1 2 3 4 5 8