Questions tagged [web3js-v1.x]

For questions specifically about version 1.x of the web3js Javascript API and library for Ethereum

23 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
1k views

SendSignedTransaction web3 v1.0 smart contract method call

Running parity node, connected to Kovan testnet. Contract Address: 0x354Db5AE17b11fbc01A8a146B63506b1d90872E0 Using a nodejs app + web3 to send/sign transactions with the private key corresponding to ...
2
votes
1answer
105 views

Clarification on “password” argument for web3.eth.personal.sign

Context: I'm fairly new to web3, and as we all know it's developing quite regularly. I'm working towards a "sign in with Metamask"-type functionality using web3@1.0.0-beta.46. Most of the docs/...
1
vote
0answers
36 views

Help me fix Error: No “from” address specified in neither the given options, nor the default options. I'm use MetaMask

file web3.js import Web3 from 'web3'; const web3 = new Web3(window.web3.currentProvider); export default web3; file image.js import web3 from './web3'; const address = '...
1
vote
0answers
36 views

Solidity calldata for an array of structs

I'm trying to create the calldata offchain for an on-chain low-level call to a method that accepts an array of structs as an argument. I'm not sure how to encode the calldata for this. Here's a ...
1
vote
1answer
117 views

Cannot deploy contract

I'm having difficulty deploying a solc-compiled contract to ganache test network using web3. package.json { "name": "smartinvoice", "version": "1.0.0", "description": "", "main": "index.js", ...
1
vote
0answers
189 views

using events in private blockchain raises leveldb not found error

i'm getting { [Error: Node error: {"code":-32000,"message":"leveldb: not found"}] when trying to use events on a private eth blockhain. What might be the problem? (I've installed Leveldb with brew) ...
1
vote
0answers
177 views

web3js 1.0 fromWei throwing although passing correct type

I have encountered a problem with the web3js 1.0 library. I have a simple function that is getting a balance from a smart contract: async balance() { return await this.Marketplace.balances(this....
1
vote
1answer
29 views

How can I create a copy of an existent contract in Javascript ?

I'm trying to create a copy of an contract existent contract using web3.js 1.0. I'm trying to use the functions clone and deploy but without success. contract2 = contract1.clone(); ...
1
vote
0answers
29 views

Unable to install web3-eth-ens while installing web3-version 35

I had web3 ver 36. Due to an issue, I rolled back to ver 35 as follows - npm install -g web3@1.0.0-beta.35 --save Before this, I did npm cache clear --force. However, it looks like web3-eth-ens is ...
0
votes
0answers
13 views

mobile web3 v1.0 not listening to events

I'm able to listen to contract events on desktop but it's not listening on mobile (coinbase wallet). const contractInstance = new web3.eth.Contract(abi, contractAddress); contractInstance.events....
0
votes
0answers
26 views

subscriptions in Geth or Parity

I am trying to get the way to register subscriptions to events, with the services of QuikNode I can do it without problem and it is working perfect, but I am trying to raise a node --light with geth ...
0
votes
0answers
26 views

invalid JSON RPC when using custom domain name

geth --testnet --networkid 3 --syncmode "fast" --datadir "." --cache=2048 --rpc --rpcport 8545 --rpcaddr example.ropsten.hk --rpcvhosts example.ropsten.hk --rpccorsdomain "*" --rpcapi="web3,miner,...
0
votes
1answer
65 views

Where Do I Find web3.min.js for Beta 55?

There is this issue on github (among several other duplicate complaints): https://github.com/ethereum/web3.js/issues/2623. There is also this stack question: How can the web3 library be imported in ...
0
votes
1answer
38 views

Does web3.eth.wallet.create set the newly created wallet file as the 'global' source of addresses for the web3 instance?

I'm playing about with web3js@1.0.0-beta.55 and I'm setting an HttpProvider on Ganache for my web3 instance: this.web3Instance = new Web3(new Web3.providers.HttpProvider(environment.ethereum.provider)...
0
votes
0answers
60 views

How to get web3.eth.getPendingTransactions on JavaScript?

I read in the official document for web3js v1 https://web3js.readthedocs.io/en/1.0/web3-eth.html#getpendingtransactions getPendingTransactions web3.eth.getPendingTransactions([, callback]) ...
0
votes
1answer
103 views

miner.start() is not a function?

"web3": "^1.0.0-beta.37" "web3": "^1.0.0-beta.55" import {Miner} from 'web3-eth-miner'; then const options = { defaultAccount: "0x78dB3e2129D58685444989dD9682DDDC70dd3C82", ...
0
votes
0answers
86 views

How to get the value from the frontend form and save value to the blockchain using +web3 1.0.0-beta.37 + reactjs

I am writing my first Dapp and want to save the value of the form to the blockchain. I am Using React and web3 js 1.0.0-beta.37 on the frontend. Also I am new to react. Following is my App.js ...
0
votes
0answers
82 views

Problem with send method in Infura

Newly Infura site has been changed its interface. Before that all methods of our client program was successfully working, but now when I logon to Infura, all whitelists has been removed. I added our ...
0
votes
1answer
112 views

Unlocking account web3.js 1.0 on AWS Lambda

I'm getting following error message when trying to unlock account on AWS Lambda: Error: Node error: {"code":-32601,"message":"The method personal_unlockAccount does not exist/is not available"} ...
0
votes
0answers
185 views

Error: Invalid bytes string given: 0x

Contract code: function getAddressDnaIds(address owner) external view returns(uint256[]) { return addressDnaIds[owner]; } Code causing the error: var dna = await this.airdrop.methods....
0
votes
0answers
86 views

Unable to transfer token from one personal account to another

I have created two personal account on private blockchain with geth. This is the balance of one account web3.fromWei(eth.getBalance(eth.accounts[0]), "ether"); 100000000000 And this is of the ...
0
votes
1answer
117 views

how to find if a Tx hash is in pending state in ethereum mainnet after web3j fastTxMgr timeout

I am using QueuingTransactionReceiptProcessor() with callback accept(). DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH is 10 and POLLING_FREQUENCY is 15000. That gives nearly 3 min wait for network to ...
0
votes
1answer
254 views

UnhandledPromiseRejectionWarning: Error: “gas” is missing

How can I catch exception thrown by method call? (async () => { try { const contract = await MyContract.deployed(); const gasPrice = await web3.eth.getGasPrice(); contract....