Latest 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,199 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,822 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,485 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,285 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
745 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
540 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
4,016 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,744 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
714 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,644 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
829 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,351 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,584 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,206 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
626 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,770 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
310 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,251 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
332 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,926 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,125 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,579 views
+1 vote
3 answers

Pass parameter as bytes32 to Solidity Smart Contract

Use the common.HexToHash package and pass the string ...READ MORE

Sep 19, 2019 in Blockchain by Grashias

edited Sep 19, 2019 by Omkar 9,223 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
721 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,161 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,964 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,361 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
817 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
650 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
471 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,391 views
+1 vote
1 answer

Deploy contract using solcjs

Try to add some typo and run ...READ MORE

Sep 26, 2018 in Blockchain by slayer
• 29,350 points
862 views
+1 vote
1 answer

Calling deployed smart contract from node.js

contractInstance.wakeUp.call is calling the function as constant, but ...READ MORE

Sep 26, 2018 in Blockchain by digger
• 26,740 points
3,708 views
+1 vote
1 answer

Solidity: Sending ERC20 Tokens

You can try this code transferTokensTo: function(contract, address_from, ...READ MORE

Sep 26, 2018 in Blockchain by slayer
• 29,350 points
1,439 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,153 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,849 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
427 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,522 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
763 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,251 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,272 views
+5 votes
1 answer

What are the programming languages I should know to become a Blockchain Developer?

Well, what programming language you have to ...READ MORE

Sep 25, 2018 in Blockchain by digger
• 26,740 points
693 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
944 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
3,018 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,684 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,215 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,306 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,888 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,910 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,110 views