Most voted questions in Blockchain

0 votes
1 answer

Cannot find package “google/protobuf”

Firstly, your import is wrong, you are ...READ MORE

Oct 1, 2018 in Blockchain by Perry
• 17,100 points
3,181 views
0 votes
2 answers

Modifiers in solidity

pragma solidity ^0.4.17; contract ModifiersTutorial { ...READ MORE

Oct 12, 2018 in Blockchain by Pulkit
1,795 views
0 votes
1 answer

How to make Observable from callback?

RxJS includes a bindNodeCallback observable creator specifically for creating ...READ MORE

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

How to fix browser/IERC20.sol:4:53: Warning: This declaration shadows an existing declaration

I believe the issue is the reuse ...READ MORE

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

Why is (startingBalance - endBalance) > (gasUsed * gasPrice) for an Ethereum transaction?

startingBalance and endBalance are BigNumber objects. Change ...READ MORE

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

Web3j: Writing operations on a contract always throw “java.lang.ArrayIndexOutOfBoundsException”

That exception is thrown when you pass ...READ MORE

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

Send all Tokens and Eth to a Address automatically

require(token.transfer(beneficiary, token.balanceOf(this))); where token is the ERC20 token you're transferring. ...READ MORE

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

Ethereum client-go RPC response 403 “invalid host specified”

Adding --rpcvhosts=* should solve the issue READ MORE

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

How to call function in one contract from another contract in private blockchain?

Please check whether you have byzantiumBlock: 0 in your ...READ MORE

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

web3.eth.sendSignedTransaction() always return “Returned error: nonce too low”

This bit of code looks wrong: var rawTx ...READ MORE

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

Solidity mocha : address is not a contract error

Try the following: // Initialize contract variable with ...READ MORE

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

Add Peers does not add a peer in Geth console

Setup actual boot node, don't treat base ...READ MORE

Sep 28, 2018 in Blockchain by slayer
• 29,350 points
2,318 views
0 votes
1 answer

Invalid method parameters for eth_sendTransaction

params needs to be an array, try {"jsonrpc":"2.0","method":"eth_se ...READ MORE

Sep 28, 2018 in Blockchain by digger
• 26,740 points
1,563 views
0 votes
1 answer

NodeJS POST Request Over JSON-RPC

You're missing the --header option: curl --request POST \ ...READ MORE

Sep 28, 2018 in Blockchain by digger
• 26,740 points
2,193 views
0 votes
1 answer

How to run Meteor insert within a Fiber?

Just replace events.watch(function(error, event) { ... }); with events.watch(Meteor.bindEnvironment(function(error, event) ...READ MORE

Sep 28, 2018 in Blockchain by slayer
• 29,350 points
621 views
0 votes
1 answer

How to get value from solidity contract using java?

web3j caters for this very use case. It ...READ MORE

Sep 28, 2018 in Blockchain by slayer
• 29,350 points
1,755 views
0 votes
1 answer

Etheruem: Pyethereum Error

Try running this: sudo easy_install -U setuptools In my ...READ MORE

Sep 28, 2018 in Blockchain by digger
• 26,740 points
307 views
0 votes
1 answer

Uncaught ReferenceError: web3 is not defined at window.onload

I think the onload is giving the issue. Try this ...READ MORE

Sep 28, 2018 in Blockchain by slayer
• 29,350 points
2,245 views
0 votes
1 answer

How are the ethers sent to smart contract in the IBM example?

They are in magical variable msg. The function ...READ MORE

Sep 28, 2018 in Blockchain by digger
• 26,740 points
323 views
0 votes
1 answer

Can't call contract function in truffle console

Inspect the object adoption within the console. You will ...READ MORE

Sep 28, 2018 in Blockchain by slayer
• 29,350 points
2,917 views
0 votes
1 answer

Why estimateGas always returns null or zero?

The Web3 API uses error first style callbacks. Your ...READ MORE

Sep 28, 2018 in Blockchain by digger
• 26,740 points
1,122 views
0 votes
1 answer

ethereum eth_sendTransaction via PHP curl

Your params field is missing a wrapping array. Try ...READ MORE

Sep 27, 2018 in Blockchain by slayer
• 29,350 points
4,556 views
0 votes
1 answer

How to achieve simple OOP in Solidity?

contract A { uint public ...READ MORE

Sep 27, 2018 in Blockchain by slayer
• 29,350 points
713 views
0 votes
1 answer

Truffle init: throw er; // Unhandled 'error' event

Modified the cli.bundled.js: replaced https.request with request Diff: ...READ MORE

Sep 27, 2018 in Blockchain by digger
• 26,740 points
2,147 views
0 votes
1 answer

NPM cannot install “truffle” on Windows

Your install is failing at node-gyp rebuild. Solutions ...READ MORE

Sep 27, 2018 in Blockchain by slayer
• 29,350 points
3,939 views
0 votes
3 answers

python ethereum (pyethapp): Failed building wheel for scrypt.

First try installing sudo apt-get install openssl However, If ...READ MORE

Oct 12, 2018 in Blockchain by Girish
1,344 views
0 votes
1 answer

Can't install pyethereum module

The module's name is ethereum, not pyethereum. Using the ...READ MORE

Sep 27, 2018 in Blockchain by slayer
• 29,350 points
796 views
0 votes
1 answer

How do I compile a piece of Solidity Code using eris' javascript?

The easiest way to compile Solidity is ...READ MORE

Sep 27, 2018 in Blockchain by digger
• 26,740 points
644 views
0 votes
1 answer

Getting error during “truffle migrate” for an ethereum contract on testrpc

Can you just try to give network ...READ MORE

Sep 27, 2018 in Blockchain by slayer
• 29,350 points
455 views
0 votes
1 answer

How do I send ether from an EOA to a smart contract?

You include ether to send in the ...READ MORE

Sep 27, 2018 in Blockchain by digger
• 26,740 points
1,368 views
0 votes
1 answer

Solidity: How can I return a list of user-defined function?

You can do it with something like ...READ MORE

Sep 26, 2018 in Blockchain by digger
• 26,740 points
1,146 views
0 votes
1 answer

How can I get the same return value as solidity `abi.encodePacked` in Golang?

This is what I used:  package main import ( ...READ MORE

Sep 26, 2018 in Blockchain by slayer
• 29,350 points
3,816 views
0 votes
1 answer

How connect library to smart contract from external resources?

pragma solidity ^0.4.0; import "github.com/OpenZeppelin/zeppelin-solidity/contracts/math/SafeMath.sol"; contract MathExtended { ...READ MORE

Sep 26, 2018 in Blockchain by digger
• 26,740 points
419 views
0 votes
1 answer

Is it possible to send eth to a contract through its constructor from another contract?

I found the solution for this: pragma solidity ...READ MORE

Sep 26, 2018 in Blockchain by slayer
• 29,350 points
1,500 views
0 votes
1 answer

Testrpc Error: listen EADDRINUSE :::8545 on Mac

Another process is already using the port ...READ MORE

Sep 26, 2018 in Blockchain by digger
• 26,740 points
755 views
0 votes
1 answer

Nethereum C# Unit Test GetTransactionCount

You have already made the test async ...READ MORE

Sep 26, 2018 in Blockchain by slayer
• 29,350 points
1,230 views
0 votes
1 answer

Error using EtherJS: this.provider.getTransactionCount is not a function

With this line it should work fine: wallet.provider ...READ MORE

Sep 26, 2018 in Blockchain by digger
• 26,740 points
2,260 views
0 votes
2 answers

Warning: Using contract member “balance” inherited from the address type is deprecated. Solidity

Alternatively you could assign this to a local variable ...READ MORE

Oct 3, 2018 in Blockchain by Rustom
932 views
0 votes
3 answers

String conversion to Array in Solidity

There is no built-in method/function for this ...READ MORE

Oct 3, 2018 in Blockchain by Charlie
2,989 views
0 votes
1 answer

Cannot access web3 object with typescript and ethereum

You still need to instantiate it first. ...READ MORE

Sep 25, 2018 in Blockchain by slayer
• 29,350 points
2,672 views
0 votes
1 answer

Poloniex C# API - get trades

Outputting the Trade will just show you ...READ MORE

Sep 25, 2018 in Blockchain by digger
• 26,740 points
1,195 views
0 votes
1 answer

How to set token price in solidity?

We know that 1 Ether = 1018 wei, ...READ MORE

Sep 25, 2018 in Blockchain by slayer
• 29,350 points
8,280 views
0 votes
1 answer

Ethereum call contract method that emits an event, from another contract

You need to refer to the EventEmitter by ...READ MORE

Sep 25, 2018 in Blockchain by digger
• 26,740 points
1,868 views
0 votes
1 answer

eth.getTransactionReceipt returns null

It looks like there's an issue with ...READ MORE

Sep 25, 2018 in Blockchain by slayer
• 29,350 points
1,904 views
0 votes
1 answer

Call contract methods with web3 from newly created account

In fact, we can't just send transactions ...READ MORE

Sep 25, 2018 in Blockchain by digger
• 26,740 points
6,098 views
0 votes
1 answer

Not able send ether to my smart contract's address

It turns out that you need to create ...READ MORE

Sep 25, 2018 in Blockchain by slayer
• 29,350 points
1,341 views
0 votes
1 answer

Why Gas Used By Txn is different when invoking the same function in the same smart contract?

The input data might be different, but ...READ MORE

Sep 25, 2018 in Blockchain by Christine
• 15,790 points
735 views
0 votes
1 answer

How to detect if an ethereum address is an ERC20 token contract?

There are many possible ways to achieve ...READ MORE

Sep 25, 2018 in Blockchain by Christine
• 15,790 points
7,116 views
0 votes
1 answer

Getting the length of public array variable (getter)

The calling contract will need the ABI ...READ MORE

Sep 24, 2018 in Blockchain by digger
• 26,740 points
1,203 views
0 votes
4 answers

Unable to run truffle@2.1.2 migrate --network live. “Exceeds block gas limit”

A simple solution to avoid this is: module.exports ...READ MORE

Sep 28, 2018 in Blockchain by Ludo
1,371 views