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
164 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
1answer
12 views

web3 providers for ethereum apart from metamask, to connect web and mobile dapps?

I want to create a list of ethereum web3 providers available apart from metamask, which could be used to integrate blockchain functionalities in our apps or dapps created in various platforms (web app,...
0
votes
0answers
5 views

Ethereum Skipping Empty Blocks --preload option doesnt work

In my clique PoA private network setup I try to mine skipping empty blocks and mine only when there is transaction present. I try to follow How to make miner to mine only when there are Pending ...
1
vote
1answer
27 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 ...
0
votes
1answer
164 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 ...
2
votes
1answer
139 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 ...
0
votes
0answers
15 views

Ethereum Logs since Beginning of Time

I can subscribe to all events in ethereum network (logs, pendingTransaction etc) so I can get only newly generated events (while I am subscribed). For my analysis I need to retrieve all logs from ...
0
votes
0answers
8 views

web3.js error ethjs-query gives out error in write contract functions

Hi I am getting error Error: [ethjs-query] while formatting inputs '[{"0":false}]' for method 'getTransactionReceipt' error: Error: [ethjs-format] hex string '[object Object]' must be an ...
0
votes
1answer
581 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 ...
0
votes
4answers
366 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.
4
votes
1answer
173 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 ...
0
votes
1answer
202 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 ...
1
vote
1answer
40 views

Whats the best way to sign and send a transaction?

Hey I want to send a transaction that has a message embedded in it. I want the most secure way to unlock the personal account. I have full node GETH installed and am using web3.I have a nodejs script ...
0
votes
0answers
15 views

Getting suffix of blockchain domain

I have a program that can get me the first part of registered blockchain domains, but not the suffix (.eth, .zil, etc.) and am not sure how to associate suffixes with names. I know that in some cases, ...
4
votes
1answer
198 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
37 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
20 views

Can a contract auto execute a transaction given certain conditions? [duplicate]

I've tried searching for this question but can't seem to find an answer. There are others asking to auto execute based on an hour interval or other real world check. What I would like to do is have ...
0
votes
1answer
17 views

solidity function works perfectly in remix but in react application it is not executing in the same way

in Remix i execute it and it works as i expecting and when i check the value from other function it returns the expecting value function makeadmin(string memory cityN, address adminAdress, string ...
0
votes
2answers
16 views

Deploying App on Ropsten or any Test Network

I have a web3.js application which uses truffle and interacts with smart contracts deployed on Ganache. How do I deploy my smart contract on a Test Network and interact with it through my application?
0
votes
1answer
12 views

ERC20 Transaction failing due to invalid nonce value

I am trying to send an erc20 transaction but I keep getting an error telling me that the account I'm sending the transaction from has a nonce value of 1 while the tx has a nonce value of 31613. I am ...
3
votes
3answers
686 views

how to setup a ethereum private blockchain?

Does anyone know how to set up a private blockchain in ethereum network? is that possible to run a private ethereum node? I have seen forking of public blockchain like EOS into a private blockchain.i ...
1
vote
2answers
50 views

How do you add miner address so that it can mint tokens?

I have ERC721 that I'm making. function mint(address to, uint256 tokenId) public onlyMinter returns (bool) { _mint(to, tokenId); return true; } How can I add an address so that it is able ...
1
vote
1answer
458 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 ...
2
votes
1answer
397 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
450 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
1answer
390 views

What is the networkid and chain id of truffle cli?

I am using truffle console to deploy contracts and using Nodejs/web3js to interact with it. I wanted to use ethereumjs-tx for signing transactions, here is the reference link. I am not sure how can I ...
1
vote
2answers
513 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
418 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
0answers
28 views

EIP712— Sign/Recovery using ethereumJS/Solidity

I've tried to mirror the example as shown: https://github.com/ethereum/EIPs/tree/master/assets/eip-712 However after much attempt at troubleshooting I have been unable to return the correct address ...
3
votes
3answers
228 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 ...
1
vote
1answer
28 views

What does literal refer to?

Hello I am new to blockchain. I was reading solidity docs and they were continuously repeating the word "literal", what does this word mean? Please elaborate.
0
votes
1answer
81 views

Error: "Transaction ran out of gas. Please provide more gas:

I'm facing a little issue here, that's the mintTo function from contract for NFT. Which I require the sender to send a value with >= 0.1 Ether: pragma solidity ^0.5.0; import "./TradeableERC721Token....
0
votes
1answer
90 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 ...
1
vote
4answers
1k views

Smart contract function always returning transaction underpriced or exceeds block gas limit

Was wondering if anyone has come across this before. I am using Ropsten through Infura and no matter what I set the gas to it will always return either transaction underpriced or exceeds block gas ...
2
votes
1answer
355 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 ...
6
votes
1answer
535 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'...
0
votes
1answer
93 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
0answers
32 views

bytes32[] returns true value in remix but when i run it through web3 it returns empty Array why?

Note All other functions working perfectly function viewAssets()public view returns(bytes32[] memory){ return (profile[msg.sender].noOfLand); } //profile is a mapping on address=> bytes32[]...
1
vote
2answers
23 views

Call view function using web3.js 1.2.6

I am trying to call view only function, not sure whether this is correct procedure or not. Getting success in result but the result is in different format. Is this wrong ? const NODE_ADDRESS = ...
1
vote
1answer
16 views

Function call error in ethereum smart contract

I am trying to call a ethereum smart contract function but it gives me error. It works perfectly fine with remix JVM environment but throws error with web3 provider. I am just trying to call a ...
1
vote
1answer
26 views

Call ethereum smart contract function using web3js 1.2.6

I am trying to call a smart contract but i am getting error : The function eth_sendTransaction does not exist. I think it is because of transaction not signed , but how can i sign the transaction when ...
1
vote
1answer
19 views

How to deploy ethereum smart contract with parameters using web3 1.2.6?

I am trying to deploy smart contract using web3 1.2.6 , my smart contract accepts 2 argument in constructor : id , name. I dont know what i am doing wrong , but both approaches are not working. Error (...
0
votes
1answer
873 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
2answers
2k 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
47 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
1answer
2k views

How to use “web3.js library” in a “JavaScript” file without using “require(”web3“)”?

Consider we want to use web3.personal.sign in a JavaScript file. So, we need to add : Web3 = require("web3") web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); at top of our ...
1
vote
2answers
39 views

Read message of require / revert statement in app.js

In my App.js I have called the smart contract function and the require statement in the function is not satisfied, so how do I get the message of that require statement in my App.js?
0
votes
3answers
37 views

Could not assign contract state variable value to javascript variable

I want to retrieve and assign the value of my contract state variable to my javascript variable.I am doing as per guidlines provided on this community, but failed to assigned. my javascript code is ...
2
votes
2answers
41 views

How to decode a transaction to verify its signature in Javascript?

I noticed that it's possible to sign a transaction with a wrong private key. I took the following example found at https://github.com/ethereumjs/ethereumjs-tx const EthereumTx = require('ethereumjs-...
0
votes
2answers
36 views

Calling smart contract functions and submitting transacions in BACK-END in high level

I have read some references to create ethereum transactions by a BACK-END server, all in low level, for example, requiring that I control the nonce by myself. Are there safe ways to avoid this control ...

1
2 3 4 5
8