Yahya
  • Member for 3 years, 9 months
  • Last seen more than a month ago
How do I send a transaction using web3.py and Infura?
1 votes

you can try web3-hdwallet-provider to sign transactions for addresses derived from a 12-word mnemonic. const Web3 = require('web3'); const Web3HDWalletProvider = require('web3-hdwallet-provider'); ...

View answer
Getting address of a new contract in truffle with javascript?
1 votes

One possible solution could be: // setting up web3 provider const Web3 = require('web3') const web3 = new Web3('ws://localhost:8545') // import contract artifacts from build folder generated // as a ...

View answer
Calling contract functions using only ABI without source code
Accepted answer
1 votes

For your question no. 1: Search for "type": "constructor" in your ABI. From this object, you can see the inputs that has an array of parameters along with their name and type. Example: { "...

View answer
hdwallet-provider set multiple account addresses when deploy contract
1 votes

This is the expected behavior that you will get the only account selected in the Metamask. This is for privacy reasons. Metamsk even don't expose one account be default, Dapps need to send an ...

View answer
How to get events result using web3 1.0.0 version
1 votes

You have to take care of following things: Use websocket provider in order to subscribe to events in web3.js 1.0. For example, if you are using local TestRPC then instantiate the web3 as by using ...

View answer
How can I output the latest block number to a web page using web3.js 1.0.0 beta?
1 votes

create a div element (in this case it's div with id "blockNumber") in your index.html file to hold the block number: <div id="blockNumber"></div> then try the following in your front-end ...

View answer
Ethereum web3 filter not found
Accepted answer
1 votes

You already kind of answered your question. The watch call is a stateful operation. Sometimes it can happen that we lose connection as explained in https://blockone.thomsonreuters.com/docs/ . 1) ...

View answer
How can i make a simple chartjs chart with ethereum contract address
0 votes

You can use getBalance method to get the balance of an address: web3.eth.getBalance(address [, defaultBlock] [, callback]) // Example web3.eth.getBalance("0x407d73d8a49eeb85d32cf465507dd71d507100c1") ...

View answer
Difference between Kovan and Rinkeby?
0 votes

Rinkeby is not supported by Parity because Rinkeby uses Clique consensus mechanism and Parity has not implemented this mechanism. Kovan is not supported by Geth because Kovan uses Aura consensus ...

View answer
error in remix IDE
0 votes

If you face any issue while connecting with the network(let say ganache) you can try the following steps: make sure ganache is up and running(ideally on port 8545) from remix change the environment ...

View answer
web3.eth.contract not working
0 votes

If you are using Web3@0.2x.x, you can look at API Documentation how to create a contract object and initiate it on an address.

View answer
How to search value in data field transaction
0 votes

I'm not sure if I understood it correctly, here is something you can try: async function getCount() { // get block with transaction object let block = await web3.eth.getBlock(2535330, true); ...

View answer
What are effective techniques to encrypt/decrypt data stored in a smart contract?
0 votes

eth-crypto provides cryptographic JavaScript functions, such as encrypting data with the public key and decrypting it with the private key.

View answer
mapping one id to multiple addresses
0 votes

I think struct can help you out to achieve what you have stated in your question: I want to have a result like this (get all the addresses with the id) 56 => [0xcc6Bfe0C579416A6cC8532e984af0e6a, ...

View answer
Ethers.js: Call constant method with await does not work
Accepted answer
0 votes

From MDN: The await operator is used to wait for a Promise. It can only be used inside an async function. if you don't want to use async function, you can try: // ... let gameCount; contract....

View answer
ethers.js - estimating gas limit
0 votes

From the official documentation, see the deployment section from contracts module. The section provides an example of deploying a contract on ropsten. From the contract deployment hash, you can get ...

View answer
Could not assign contract state variable value to javascript variable
0 votes

The result of the contract call will be available only inside the init function. In order to make it available to other functions, you can return the result. const contractAddress1 = '...

View answer
Gas estimation failed - remix
0 votes

I have tested your code in remix and its working fine for me in both cases, either using JavaScript VM or Injected Web3. I would suggest the following steps to try: First, in Remix select the ...

View answer
Failed to load events from Block 0 on page refresh in Vue app
Accepted answer
0 votes

After hours of research, I could figure out that it is not a problem with either block of code or Vue.js. The problem is with web3 API version and it seems a bug with web3:1.0.0-beta.37. I updated to ...

View answer