Tag Archives: Ethereum

Create prefunded accounts on a test blockchain

I want to create a test blockchain to play around. When I try test-rpc there are already ten accounts created but no funds – how can I generate funds? can I import a genesis.json? My second approach is to use geth init ‘/my-path/genesis.json’ I generated some accounts with https://iancoleman.io/bip39/ and added some funds with alloc… Read More »

Deploying Migrations using network ‘rinkeby’ – insufficient funds for gas * price + value

I’m connected to the “Rinkeby” network on MetaMask. I’ve imported the private key into Geth. Thereby, I unlocked the account using geth –rpc –networkid 4 –unlock . Thereafter, I’m trying to deploy my smart contract using truffle. I’m using the following command to deploy the migrations: truffle migrate –reset –network rinkeby –compile-all. But I receive… Read More »

BlockCypher Account nonce too far behind transaction

I’m currently working on a DApp that involves sending transactions. I’m using BlockCypher to send the transactions since the API is fairly straight forward. One issue I’m finding is that when I run my API locally and call the send transaction method I receive the transaction hash and I’m able to check it on Etherscan… Read More »

Constant function returns empty array + web3js

I have a simple solidity script where I tested in remix (injected Web3 using geth local environment) and worked fine returning an array of data from a constant method. pragma solidity ^0.4.11; contract TestBetting { struct BettingInfo { uint256 matchId; uint homeTeamScore; uint awayTeamScore; uint bettingPrice; } address public owner; mapping(address => BettingInfo[]) public bettingInfo;… Read More »

Subscription using websocket through Geth

I am trying to build a dapp which will monitor a particular address balance, and update in case someone send fund (ether) to it. Instead of polling using call getBalance, I want to take advantage of the relatively new subscription API through WebSocket (https://github.com/ethereum/go-ethereum/wiki/RPC-PUB-SUB). While I can successfully connect geth using WebSocket, I am struggling… Read More »

send a tx, json rpc, golang

I tried to send a tx via geth json rpc using the following code. But the geth rpc server response with “Invalid sender”. I also tried HomesteadSigner. In that case there is no error received, but I cannot find the receipt for the transaction, no matter how long I wait. Is there anything wrong? thx… Read More »

MetaMask, what is it and how to use it

I am relatively new to the eth community and i am currently trying to find a good way of using eth blockchain to create a signuo/signin mechanism. it turns out to do so in browsers, something like Metamask is needed. What is Metamask ? what does it do ? EDIT What i need to know… Read More »