Teleporting Goat
  • Member for 5 years, 2 months
  • Last seen more than a week ago
Comprehensive guide to mining testnet ether
1 votes

This question has gotten a lot of views and still no answer so I thought I might as well post what I know. I haven't done much related to Ethereum lately so it might be a little outdated. Basically, ...

View answer
How to view structs with truffle
Accepted answer
1 votes

Apparently my question was misunderstood, but I solved the problem with the help of Mikko Ohtamaa in the comments. For some reason I didn't realized I could return multiple variables (and of ...

View answer
How to calcualate Ethereum transaction fee
3 votes

This site is pretty useful to calculate Ether transaction price and giving current gas price. Median and recommended gas price varies depending on several things. With the current standard gas price (...

View answer
how to catch "revert" error in truffle test javascript?
5 votes

You can do something like this: it("test1.....", async() => { let instant = await myContract.deployed(); try{ await instant.doRevert(); } catch(e){ myHandleException(e); } . ....

View answer
How is Ethereum Blockchain immutable?
3 votes

A blockchain is based on consensus. If you change data from your local node, it doesn't change the data of the whole distributed blockchain. You'll just have a different blockchain than everyone else. ...

View answer
Is there a way to safely send ether from a contract without the recipient triggering it?
0 votes

From what I understand, when a user bids, he sends ether (or tokens), so they're on the contract. So the withdrawal doesn't have to be triggered by them. One thing you could do is to let the ...

View answer
How to know whether the my address received ERC20Tokens?
0 votes

One thing you can do is check in MetaMask if it detects any tokens on your address. Go to Token > Add Token, then give the address of your token contract and the rest should fill automatically. Then ...

View answer
calling smart contract functions from app.js
0 votes

If PublishService is your contract, you can't call functions just like that. You need to instanciate your contract, and it's an asynchronous function so you'll have to wait for callback or you ...

View answer
Detailed tutorial for DApp programming
0 votes

I'd recommend the Truffle pet shop tutorial. It's pretty straightforward and it's not so hard to plug your own contract when you start to understand what everything does. At the end of it you end up ...

View answer
How to airdrop tokens to multiple addresses in one transaction
1 votes

This article gives a good solution. Have all your addesses in a CSV file (remove blanks or erroneous addresses first) Make an airdropTokens(address[] addresses, value) function in your token contract ...

View answer
how can I send ether and call function in truffle test?
2 votes

Regular functions look like this in truffle: var account = accounts[0]; [...] myTestInstance.regularFunction(_arg1, _arg2, {from: account}); To make it payable, all you have to do is this: var ...

View answer
Fast access of any given transaction in the blockchain
0 votes

Two things: First, with a getter you can call your data structure with no cost, if you're not writing anything you're not dependant on blockchain time. You can virtually fetch your whole data ...

View answer
Invalid JSON RPC response when creating contract
1 votes

I had a similar problem (different context but same error code). As suggested at the bottom of this github issue, use truffle migrate --reset instead of just truffle migrate, that worked for me.

View answer
Truffle compiles and migrates the wrong contract
Accepted answer
1 votes

As thefett suggested, it worked to delete the build folder. My guess is that the Migration contract was already built but with wrong information, and because the JSON existed truffle compile didn't ...

View answer
gas required exceeds allowance or always failing transaction when I try to transfer ether...
1 votes

It seems that the problem is setting the value part of the mapping to 0. contract Bank11{ mapping(address=>uint) userBalances; function getUserBalance(address user) constant returns(uint) { ...

View answer
How can I retrieve the stored data from blockchain?
0 votes

Maybe use something more high-level? Like remix, coupled with a local testrpc you can access data and call functions from your contract. (You can also access your contract if it's deployed in any ...

View answer
Mining ether on Private Blockchain
0 votes

Making a private blockchain is like building a bank in your backyard and printing your own money. The currency doesn't have any value, you have total control over it and you can print any amount you ...

View answer
What is the best way for my Dapp users to not pay gas fees?
1 votes

If you don't want people to have Ethereum addresses and Ether, all you have to do is make your javascript (or whatever language you're using) to call transactions from a "server" contract (with your ...

View answer
How can I estimate price of data storage?
1 votes

Well, it looks like no matter how long I search, I only find what I'm looking for after asking my question. According to this question, "the fee is 20k gas to store a 256 bit word." Assuming this ...

View answer
How to get testnet ether?
3 votes

The ether faucet I used is not available anymore so I removed the link. They come and go, but try looking for "testnet ether faucet", there is often at least one that works. It's a website than you ...

View answer
What is the simplest and fastest way to mine Testnet Ether on a Windows Machine
1 votes

What I don't like with Ethereum Wallet mining is it doesn't let you set your mining settings (as far as I know). If you have EW you must have geth somewhere, find it, run it (geth attach) and mine ...

View answer
Can I pass arguments to a .js script on Geth?
Accepted answer
3 votes

EDIT : I will leave my old answer for legacy, but user BokkyPooBah gave me an awesome answer to another problem, somewhat related to this one. His solution solved both, so go give him points on his ...

View answer
What is better, mapping a struct with 2 variables or having 2 mappings?
Accepted answer
6 votes

I tried both, and measured gas for both transactions. I got 107864 with a struct, and 107856 with two mappings.... I'm pretty sure that the two bytes32 take all the gas, and the data structure are ...

View answer
What is the difference between networkid 3 and testnet?
1 votes

--networkid 3 is the new testnet specifically, Ropsten. 1 is the main blockchain and 2 is the old testnet, morden. When you use geth --networkid 3, it sets the default testnet to Ropsten, so after ...

View answer
Testing Smart Contracts - accessing internal vars
2 votes

You can either make them public during testing and change them back to internal for release, or you can use events at every place you want to watch your variable. Both solution cost more gas but are ...

View answer
How deploy a smart contract with meteor and metamask?
-2 votes

There is a great series of tutorial I followed to deploy a meteor Dapp, that you can find here. It's fairly recent, and when I had problems I left a comment and the author answered personally and ...

View answer