Edmund Edgar
  • Member for 5 years, 11 months
  • Last seen this week
Deploying smart contract on Testrpc with Truffle
Accepted answer
3 votes

As of recent versions of truffle deployed() now returns a promise, so try something like: var poe; ProofOfExistence1 .deployed() .then(function(result){ poe = result; console.log(poe....

View answer
Are solidity contracts still vulnerable to callstack exploits?
Accepted answer
3 votes

This attack was eliminated for all practical purposes by EIP 150, which was implemented in October, 2016. For details see How does EIP 150 change the call depth attack?

View answer
What are the limitations to estimateGas and when would its estimate be considerably wrong?
3 votes

One limitation (from my own observation, hopefully someone will correct me if I'm miunderstanding) is that even if estimateGas estimates correctly, that doesn't give you the gas limit that you need to ...

View answer
Can an Ethereum key generated on a laptop be brute-forced by someone else because of low entropy?
Accepted answer
3 votes

Generally a working laptop will have sufficient entropy, especially when it's been running for a while, as it has lots of places to get it from, such as you typing on your keyboard and moving the ...

View answer
Does Ethereum have the "private key exposed on spend" problem?
3 votes

Done correctly, sending a signed transaction does not reveal the private key, so in theory there is no need to create a new address to prevent someone else taking the Ether. The signed transaction ...

View answer
How to use metamask for etheruem dapp
3 votes

In general any of your JavaScript code that runs in the browser should automatically be able to read web3, or more precisely window.web3, once the page is loaded. See the Metamask README for the ...

View answer
What about the theft of eth?
3 votes

It sounds like either there's malware on your computer, or your node is exposing its RPC API to other computers on your LAN or on the internet, and one of those is spending your money. If you've got ...

View answer
Detect token transaction to a contract
Accepted answer
3 votes

If you know which token your contract expects to receive, you can listen for a Transfer event issued by the token contract. (Not your contract!) The standard ERC20 Transfer event looks like this: ...

View answer
Will Ethereum transaction fees reach Bitcoin transacion fees?
Accepted answer
3 votes

Probably cheaper, but it's complicated. Fees are not directly related to market capitalization. There may be an indirect relationship, in that including extra transactions makes it more likely that ...

View answer
Self destruct to multiple parties?
3 votes

You can't send the result of selfdestruct to multiple parties. What you could do is self-destruct to the address of another contract, and put the splitting logic in that contract. However, unlike a ...

View answer
Can we mine BTC on Ethereum Platform?
Accepted answer
3 votes

In theory it's just hashing so yes, you could make a contract that did Bitcoin mining. In practice it would be impossibly expensive, and you'd never find a block. Ethereum's distributed computing ...

View answer
What's wrong with forwarding contract?
3 votes

It looks like the contract doesn't have any code. This suggests that something went wrong with your deployment.

View answer
using solidity to verify ECDSA signature from external key pair
3 votes

Since you mention it's an ECDSA key, I assume you're talking about using the same crypto that Ethereum uses for signatures. If you want to do this in Solidity, the simplest and most efficient thing ...

View answer
Truffle migration stuck
3 votes

One thing that can cause this behaviour with Parity (not sure if that's what the Azure service is running or not) is that if the account it wants to deploy with is locked, as it is by default, it ...

View answer
What happens to Ether in a contract after selfdestruct
Accepted answer
3 votes

When you call selfdestruct(), it takes a parameter of type address. Any remaining funds in the contract balance are sent to this address.

View answer
Questions regarding Safe Remote Purchase contract in Solidity docs
3 votes

How does the seller then receive the remaining balance in the contract? Is it expected that a developer would include an additional withdrawal function for the seller? The seller gets the remaining ...

View answer
Unit Testing Date Time Values
3 votes

If you use pyethereum for testing - which I highly recommend, it's lovely - you can directly alter the timestamp of the simulated block that is mining your transaction. self.s = t.state() self.s....

View answer
Can I generate an identical address on main net as in test net?
3 votes

Did you create your Parity testnet address with a normal account management command? If so it should be stored in your parity directories, and you should simply be able to copy the key over from the ...

View answer
How can I read from and write to the blockchain without having a full node?
3 votes

As @Vixon mentions Infura is a possibility, but it has some limitations on calls that can use a lot of resources like fetching past event logs. One option short of running the experimental light mode ...

View answer
Should I be shifting array elements as I remove them?
3 votes

If you have to shift everything up then you'll have a potentially unbounded gas cost, which is generally something you want to avoid, unless you know that there's a practical limit. But if you don't ...

View answer
Creating a new contract via sendRawTransaction() dropped
Accepted answer
3 votes

Obvious things to look at would be: Check that you are setting the nonce correctly. If it works for a new account that has never sent a transaction but fails for an account that has already ...

View answer
Is mapping via msg.sender as secure as calling a function only by the owner?
3 votes

Yes, if anything it's probably more secure to enforce ownership by keeping it under a mapping key, because you can't write code to change it without considering who it belongs to, whereas if you're ...

View answer
Oraclize out of gas on Ropsten Testnet
3 votes

Is this the failing transaction? https://testnet.etherscan.io/tx/0x369c48423586f5cdffefb2d202d6588e3874b6f1075b3feda205c7718f13dff3 This shows you sending only 78525 gas, which is probably not enough ...

View answer
How can you distribute dividends from a smart contract?
3 votes

If the divident payments don't happen very often, you can have the investors send a transaction when they want to claim their dividend, either specifying a particular dividend or looping through a (...

View answer
Should I use different sender addresses for multiple transactions in same block?
Accepted answer
3 votes

I'm not sure that this is necessary in practice; The advice you quote is for a situation where you're making raw transactions offline and may drop some of them, but if you just send your transactions ...

View answer
multi-sig transactions, not on contract-level
Accepted answer
3 votes

Your intuition is correct and it's easy to make a proof-of-concept, although it has some limitations. A and B want shared access to funds so they both have to sign to spend them. A and B each make ...

View answer
Is there any way for a contract to know when it gets sent a token?
Accepted answer
3 votes

Conventionally a call to a token following the token API is a call against the token contract and not the token-owning contract, so you can't hook a function into it in the way that you can when your ...

View answer
Hiding variables in Solidity
3 votes

Practical answer: You can't. If the contract can see it when it executes, everyone who has the blockchain can see it. Theoretical answer that won't help you: Homomorphic encryption. See Can smart ...

View answer
Tokens All-or-Nothing Atomic Transaction Support
3 votes

So to be clear, the issue is that although Ethereum supports atomic transactions - this is the default model for the way contracts work - it does it in the form of wrapping the various individual ...

View answer
Set permissions to view variables
3 votes

If somebody has a node on the network, they can read all the data on the blockchain. There's nothing you can do about this, except stop storing the data unencrypted on the blockchain. You may want to ...

View answer
1
3 4
5
6 7
14