Most voted questions in Blockchain

0 votes
1 answer

How to save complex object in the contract in solidity

You can't pass objects when initiating a ...READ MORE

Oct 15, 2018 in Blockchain by Omkar
• 69,210 points
3,340 views
0 votes
1 answer

Solidity geth: Error encountered during contract execution [Bad instruction]

recipes is a dynamic storage array. You need ...READ MORE

Oct 15, 2018 in Blockchain by Omkar
• 69,210 points
1,259 views
0 votes
1 answer

UnhandledPromiseRejectionWarning: Insufficient funds error in Ethereum: NodeJS web3

sendSignedTransaction returns a promiEvent onto which you can chain then and catch: web3.eth.sendSignedTransaction('0x' + ...READ MORE

Oct 15, 2018 in Blockchain by Omkar
• 69,210 points
1,219 views
0 votes
1 answer

Solidity: logical AND outputs parser error

Its Syntax error logical and operator is ...READ MORE

Oct 12, 2018 in Blockchain by Perry
• 17,100 points
1,601 views
0 votes
1 answer

How do Ethereum node compete for blocks?

Yes, all the nodes do compete for ...READ MORE

Oct 12, 2018 in Blockchain by Perry
• 17,100 points
577 views
0 votes
1 answer

How to force gradle to take UTF-8 encoding instead of operating system default encoding?

I've removed the UTF-8 chars from erroneous ...READ MORE

Oct 12, 2018 in Blockchain by Perry
• 17,100 points
7,077 views
0 votes
1 answer

How to input realtime data from google sheets into urlfetch google scripts?

Based on your title I hope to ...READ MORE

Oct 12, 2018 in Blockchain by Perry
• 17,100 points
1,306 views
0 votes
4 answers

Issue with getting web3.eth.accounts (MetaMask)

I solved problem, using: web3.eth.getAccounts((err, res) => ...READ MORE

Oct 12, 2018 in Blockchain by Perry
• 17,100 points
5,022 views
0 votes
1 answer

Is the msg.sender address changed while passing to another contract as a parameter?

I tried your contracts in Remix, but ...READ MORE

Oct 10, 2018 in Blockchain by Omkar
• 69,210 points
1,155 views
0 votes
1 answer

Blockchain: Installing an earlier version of ethereum using apt-get on

geth does not make the previous version available ...READ MORE

Oct 10, 2018 in Blockchain by Omkar
• 69,210 points
1,129 views
0 votes
1 answer

Using json rpc with curl on java?

Quoting different pieces the way you're doing ...READ MORE

Oct 10, 2018 in Blockchain by Omkar
• 69,210 points
2,415 views
0 votes
1 answer

Ethereum generating genesis Python Syntax

print in python3 is a method not a ...READ MORE

Oct 10, 2018 in Blockchain by Omkar
• 69,210 points
674 views
0 votes
1 answer

Where is the geth.exe in the Ethereum mist?

In Windows, you will find geth.exe in a path ...READ MORE

Oct 10, 2018 in Blockchain by Omkar
• 69,210 points
678 views
0 votes
1 answer

TypeError: XMLHttpRequest is not a function when using web3 on meteor server side

I had the same problem. Instead ethereum:web3 Meteor package ...READ MORE

Oct 10, 2018 in Blockchain by Omkar
• 69,210 points
861 views
0 votes
1 answer

Getting Invalid number of parameters for “undefined” when deploying smart contract

Try something like this for contracts that ...READ MORE

Oct 10, 2018 in Blockchain by Omkar
• 69,210 points
2,910 views
0 votes
1 answer

Calling function in truffle console error

Inside Truffle console ContractName.deployed().then(function(instance){app = instance}) app.adopt(23)//call method on ...READ MORE

Oct 10, 2018 in Blockchain by Omkar
• 69,210 points
2,706 views
0 votes
1 answer

Transfer the gas value of contract to my own address

Works fine for me: pragma solidity ^0.4.0; contract Test ...READ MORE

Oct 10, 2018 in Blockchain by Omkar
• 69,210 points
378 views
0 votes
1 answer

Store contract results tag in a variable

then() takes a function as argument that is ...READ MORE

Oct 9, 2018 in Blockchain by Omkar
• 69,210 points
352 views
0 votes
1 answer

Ethereum: functions Burn and Transfer source

This statement is used to publish an event that ...READ MORE

Oct 9, 2018 in Blockchain by Omkar
• 69,210 points
1,755 views
0 votes
1 answer

Etheruem: Unable to import library in Remix IDE

Your link is broken. This is the ...READ MORE

Oct 9, 2018 in Blockchain by Omkar
• 69,210 points
1,366 views
0 votes
1 answer

Creating an account with web3.js v0.2.6

The answer is let a=web3.personal.newAccount('!@superpassword') H ...READ MORE

Oct 9, 2018 in Blockchain by Omkar
• 69,210 points
524 views
0 votes
1 answer

How to allow request from host machine and deny from other machine, using ethereum in docker?

You can restrict access to the port ...READ MORE

Oct 9, 2018 in Blockchain by Omkar
• 69,210 points
537 views
0 votes
1 answer

Nodejs Express: Getting different output in console.log and callback

If your getOrderStatus() function is like this: function getOrderStatus(_orderId, callback) ...READ MORE

Oct 9, 2018 in Blockchain by Omkar
• 69,210 points
343 views
0 votes
1 answer

I am not able to change array elements globally

Remove the constant modifier from getArray(). constant functions do not write state ...READ MORE

Oct 9, 2018 in Blockchain by Omkar
• 69,210 points
455 views
0 votes
1 answer

Truffle Compile failing, ParserError: Expected token LParen got Identifier function

Your parentheses are mismatched. pragma solidity ^0.4.17; import "truffle/Assert.sol"; import ...READ MORE

Oct 9, 2018 in Blockchain by Omkar
• 69,210 points
2,258 views
0 votes
1 answer

Getting “web3.eth.filter is not a function” while trying to monitor Ethereum blocks

It appears you are using web3.js v1.0. ...READ MORE

Oct 9, 2018 in Blockchain by Omkar
• 69,210 points
2,392 views
0 votes
1 answer

Solidity ParserError: Expected identifier but got '='

Hey, the solidity grammar doesn't allow assignments ...READ MORE

Oct 9, 2018 in Blockchain by Omkar
• 69,210 points
8,990 views
0 votes
1 answer

truffle migrate Error

testrpc Check your truffle.js config port and ip ...READ MORE

Oct 8, 2018 in Blockchain by Omkar
• 69,210 points
1,138 views
0 votes
1 answer

How can I inject and use this javascript library (web3) with JavascriptCore

The web3.js library has dependencies on bignumber.js and crypto-js.js (See dependencies here). You will ...READ MORE

Oct 8, 2018 in Blockchain by Omkar
• 69,210 points
780 views
0 votes
1 answer

Get specific JSON data value using array from Coin Market Cap API

use inArray function. example: $.getJSON("//api.coinmarketcap.com/v1/ticker/?limit=0", function(data) { ...READ MORE

Oct 8, 2018 in Blockchain by Omkar
• 69,210 points
1,654 views
0 votes
1 answer

How to choose which function is called first in Node Js

You can do something like: infuraProvider.getBlockNumber().then(function(blockNumber) { ...READ MORE

Oct 8, 2018 in Blockchain by Omkar
• 69,210 points
439 views
0 votes
1 answer

javascript bytes32 to string

Assuming you're using web3 on the JS side, it's web3.toAscii. Example ...READ MORE

Oct 8, 2018 in Blockchain by Omkar
• 69,210 points
3,121 views
0 votes
1 answer

pubToAddress method from ethereumjs-util throws AssertionError: false == true

This code works fine: var keythereum = require('keythereum'); var ...READ MORE

Oct 8, 2018 in Blockchain by Omkar
• 69,210 points
1,063 views
0 votes
1 answer

What is the difference between creating a new solidity contract with and without the `new` keyword?

You cannot omit new keyword for creating ...READ MORE

Oct 8, 2018 in Blockchain by Omkar
• 69,210 points
939 views
0 votes
1 answer

Ethereum, web3, Error: invalid argument 0: cannot unmarshal non-string as hex data, when I call a contract

I have the same problem. But with ...READ MORE

Oct 8, 2018 in Blockchain by Omkar
• 69,210 points
1,777 views
0 votes
1 answer

Solidity different token price

Yes you can do this by modifying ...READ MORE

Oct 8, 2018 in Blockchain by Omkar
• 69,210 points
628 views
0 votes
1 answer

Sending hash in function parameter

I am developing a smart contract using ...READ MORE

Oct 8, 2018 in Blockchain by Omkar
• 69,210 points
509 views
0 votes
1 answer

How can I deploy a hyperledger business network using docker-compose?

If you want to use Composer, be ...READ MORE

Oct 4, 2018 in Blockchain by Perry
• 17,100 points
1,270 views
0 votes
1 answer

How to define the path to hyperledger-fabric chaincode?

You can find that in docker-compose files ...READ MORE

Oct 4, 2018 in Blockchain by Perry
• 17,100 points
1,182 views
0 votes
1 answer

Contract deployment is raising gas issue while transaction and issue vary on various networksbl

Starting time can't be in the past. new ...READ MORE

Oct 3, 2018 in Blockchain by Omkar
• 69,210 points
514 views
0 votes
1 answer

Error when Installing Ethereum: Package 'ethereum' has no installation candidate

It seems that there is a compatibility ...READ MORE

Oct 3, 2018 in Blockchain by digger
• 26,740 points
620 views
0 votes
1 answer

Web is not injected by metamask

You need to do import the Web3 ...READ MORE

Oct 3, 2018 in Blockchain by slayer
• 29,350 points
815 views
0 votes
1 answer

Truffle migrate fails due to missing function, but it exists in node_modules

deployer.deploy(password1, password2, deadline, {value: 100, from: accounts[0]}); ...READ MORE

Oct 3, 2018 in Blockchain by digger
• 26,740 points
1,699 views
0 votes
1 answer

Access variables through auto-generated getters from a different contract

You just need to pass it in ...READ MORE

Oct 3, 2018 in Blockchain by slayer
• 29,350 points
366 views
0 votes
1 answer

Handling UI when a trasaction is in pending (MetaMask)

You need to use the state of ...READ MORE

Oct 3, 2018 in Blockchain by digger
• 26,740 points
679 views
0 votes
1 answer

Error when trying to deploy Ethereum smart contract using web3j

Create a new credential based on the Credentials.create ...READ MORE

Oct 3, 2018 in Blockchain by slayer
• 29,350 points
1,414 views
0 votes
1 answer

What happens to Ether in a smart contract after selfdestruct?

selfdestruct takes one argument an address and then sends all ...READ MORE

Oct 3, 2018 in Blockchain by digger
• 26,740 points
718 views
0 votes
1 answer

Truffle migration error (test rpc is running)

1) Run the following command: npm install -g ...READ MORE

Oct 3, 2018 in Blockchain by slayer
• 29,350 points
625 views
0 votes
1 answer

How do display all the events logs from a smart contract?

You'll need to watch the events. const filter ...READ MORE

Oct 3, 2018 in Blockchain by digger
• 26,740 points
3,012 views
0 votes
1 answer

How do I initialize an array in a struct

You need to manually change the length ...READ MORE

Oct 1, 2018 in Blockchain by Perry
• 17,100 points
2,768 views