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
0answers
14 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
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, ...
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
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
15 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 ...
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 ...
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
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
30 views

Get emitted events of a a smart contract function using infura

I have used infura in my App.js to connect to the kovan network. Then I am creating an instance of the smart contract deployed on that network. Then I am calling a function on that smart contract ...
0
votes
1answer
78 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....
1
vote
2answers
38 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
1answer
14 views

Question about transaction confirmation

My question is that when a miner broadcast some transactions and other nodes don't think these transactions are valid, what will happen? Fork?
1
vote
0answers
26 views

Error: Provided address “[object Promise]” is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be

i want to use the 'set' function ,but the console tell me that i have a wrong ,it also can say that 'set is not a function ',you can see this : import React, { Component } from "react"; import ...
1
vote
1answer
32 views

Compute transactions trie root hash from a BlockBodies message using ethereumjs

Given a decoded BlockBodies message, I want to compute the root hash of the transactions trie, so that I can match it against block headers that my node has downloaded. After reviewing How Ethereum ...
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-...
1
vote
0answers
22 views

ipfs with ethereum

Module not found: Can't resolve 'ipfs-api' in 'C:\Users.......\src' I have used this code //using the infura.io node, otherwise ipfs requires you to run a //daemon on your own computer/server. const ...
1
vote
1answer
18 views

Account Private Keys not Logging with Web3.js with Pure Javascript and HTML on browser

Here is the code below, I want to create accounts using web3 js and logged the private keys. But am having an error Reference Error and keys not logging. I followed the docs at https://web3js....
0
votes
1answer
20 views

EthereumJS returning wrong public key

I'm using https://iancoleman.io/bip39/#english to generate a random 12 word mneumonic with the following settings. Mneumonic language: English Coin: Ethereum Derivation Path: BIP44 It generated the ...
1
vote
1answer
20 views

Using `recoverPersonalSignature` from `eth-sig-util` to verify message signed with go-ethereum's `crypto` package

I am using https://godoc.org/github.com/ethereum/go-ethereum/crypto#Sign to sign an arbitrary message and trying to recover the signer address using sigUtil.recoverPersonalSignature(https://www.npmjs....
1
vote
2answers
278 views

Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings

Getting error while creating ethereum raw transaction var rawTx = { nonce: '0x2a', gasPrice: '0x4a717c800', gasLimit: '0xc340', to: '0x73F7Ced8cc9D27DC426210c32fc6d0a40f941eE1', value: '...
0
votes
0answers
71 views

get event logs and debug trace from eth_call

I am looking for a way to execute a transaction locally (using local geth/parity node) for simulation only, before actually submitting it to blockchain. I know that I can use 'eth_call' RPC call and ...
0
votes
1answer
33 views

VM error: revert. Try to send ether from contract to another contract

I just facing a little issue here in sending some ether from Sender contract to another contract Escrow by msg.sender value. Btw, I'm executing code on Remix, and specify the value from the sender ...
0
votes
1answer
32 views

If Wallet and address generated using EthHDWallet, can we get its recovery using ethereumjs-utils/hdkey getWallet() method by provideing seed?

Generated wallet address using: let mnemonic = request.body.seed; const wallet = EthHdWallet.fromMnemonic(mnemonic); let address = wallet.generateAddresses(1); console.log(wallet, address); How can ...
0
votes
0answers
54 views

Script for opening a geth console for a node and running commands in it

I am trying to create a script running a couple of geth nodes, open a console for each of them and run a couple of commands such as admin.addPeer() and miner.start(). I read that i can use --exec to ...
0
votes
1answer
31 views

Why do we use `serialize` function of `ethereumjs-tx` package before broadcasting a transaction

I just want to know the purpose/functionality of serialize function which we use before broadcasting a transaction: const serializedTransaction = tx.serialize() const raw = '0x' + ...
0
votes
1answer
27 views

How to resolve this error in solidity “The constructor should be payable if you send value.”?

In this solidity code the finalizeRequest() is giving a run-time error. Here is the error : Campaign.finalizeRequest(uint256) 0x692...77b3a transact to Campaign.finalizeRequest errored: VM error: ...
0
votes
1answer
45 views

How can i use Token from an ERC20 Contract in my own contract?

I have following contract here on ropsten https://ropsten.etherscan.io/address/0x813870feba76f27ec1afcf79432e065a4839f7ab#code I want to use tokens from a different erc20 contract(...
1
vote
2answers
83 views

why did this transaction fail?

I have a smart contract on Ropsten that I'm testing: 0x813870feba76f27ec1AfcF79432e065A4839F7AB Transaction has failed(reverted). What is the problem, because I don't see an error message ...
0
votes
0answers
61 views

Metamask and Ether.js API

I am trying to use the ether.js API with Metamask (with Ganache GUI i.e. localhost 7545) via the Chrome console. I am getting an error saying that ethers is not defined. > let currentProvider = ...
0
votes
1answer
22 views

DApp Design Consideration

Does a site like Cryptokitties query the blockchain in order to verify which ERC-721 tokens a specific user owns upon logging into his wallet, or does it store the list of owned tokens locally in a ...
0
votes
0answers
14 views

How do you recover in web3.js 1.2 a message signed with web3 0.2? [duplicate]

MetaMask injects 0.20 and you can't switch it off or mix web3 versions (not easily anyway). I am forced to use this method for signing: web3.personal.sign(web3.fromUtf8(nonce), web3.eth.coinbase) It ...
0
votes
1answer
22 views

Return a value from send function [duplicate]

Hi guys i have one really big problem. I have this pice of code function showInfo(uint _pesel) public onlyMainPerson(msg.sender) returns (string memory, string memory) { string memory x = ...
0
votes
1answer
41 views

How to open multiple terminals using docker?

Here I am trying to create private ethereum instance using dockerfile. I want to open two terminals and run command1 in terminal1 and execute command2 in terminal2 only when command1 returns true. ...
1
vote
1answer
17 views

input field is not getting displayed by using ContractForm

<DrizzleProvider options={drizzleOptions}> <LoadingContainer> <div> <h1>Welcome Doctor</h1> ...
0
votes
2answers
25 views

Recovering of typed signature fails because it's too long

I have a typed signature generated by EIP712 V3. It is 132 characters long. I'm trying to recover it using recoverTypedSignature from eth-sig-util. This fails saying: index.js:1 Error: Invalid ...
1
vote
1answer
97 views

Could not find declaration module for file 'solc'

I was trying with a simple contract,when I do "node compile.js" in my windows cmd it throws an error.I was using vscode it showing error in const solc = require('solc'),I installed everything ...
0
votes
0answers
56 views

Why does Infura Ropsten websocket filtering event timeout?

When listening events via Infura Ropsten websocket, web3.py implementation timeout while web3.js succeeds. The demo can be cloned from -- https://github.com/jerryji/ropsten_wss_timeout_demo After ...
2
votes
1answer
63 views

What does it mean to serialize a transaction?

In tx library there is a function: serialize() that "serializes" your transaction object. You can then convert that serialization into hexa decimal string, and use it to send the transaction with the ...
0
votes
1answer
26 views

Could not call contract function

I want to access the balance of contract(i.e. 0x552F3AfaA0394632f4aEfa9E923fA3e2bbDAF5FE) and its totalSupply(state variable). I could access the balancec of this contract , but why I could not call ...
1
vote
0answers
35 views

pass struct from web3 python interface to solidity

I have created a smart contract with some solidity functions which take structs, enums and mappings(all defined in my contract) as arguments. I intend to call these functions from my web3 python ...
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 ...
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 ...
0
votes
0answers
24 views

SendSignedTransaction is not sending tokens

I tried to use sendSignedTransaction function, it signed and sent the transaction successfully(i think), but it's not transferring tokens as it ought to. It's basically not doing the intended task 😔 ...

1
2 3 4 5
8