Edmund Edgar
  • Member for 5 years, 10 months
  • Last seen this week
How do I make money developing DAPP on ethereum?
Accepted answer
5 votes

The crypto-futurist answer is that your contract does something useful for people, they send it ether, and it sends a proportion of those ether to you. The practical answer is that you make silly ...

View answer
restricting sensitive information accessible from / linked to the blockchain?
5 votes

Do you actually need anything blockchain-like for the sensitive data? The obvious way to do this is to store versions of the data off-chain, either encrypted or in a private database, then store the ...

View answer
Contracts as data feed?
Accepted answer
5 votes

Ultimately you're going to be relying on somebody to tell the truth, because somebody is going to have to be in charge of the thermometer. The information from the thermometer then needs to be ...

View answer
Deriving Ethereum address from Bitcoin address
Accepted answer
4 votes

A Bitcoin address is made by: private key -> public key -> hash An Ethereum address is made by: private key -> public key -> hash -> throw some of it away and keep the rest This means that the ...

View answer
Official Update on Ethereum 2.0?
4 votes

Ethereum is a decentralized network so nobody has the last word on what is "official". Vitalik may propose something and everyone may ignore it. The closest thing Ethereum has to an "official" ...

View answer
Doesn't having a centralised front end pose a huge security risk to an Ethereum app?
Accepted answer
4 votes

This does indeed present a glaring security risk. In theory the user previews their transaction in MetaMask etc before sending, so they don't have to trust the dapp, but in practice the data you ...

View answer
How to check for 0 address with web 3
Accepted answer
4 votes

Either do a string comparison to "0x0000000000000000000000000000000000000000" or make a BigNumber with it and compare it to zero.

View answer
When to use safemath library
Accepted answer
4 votes

If the only maths you need to do is adding sums of Ether obtained from msg.value to other sums of Ether obtained from msg.value, it shouldn't be necessary to use SafeMath, since the msg.value is ...

View answer
Running testnet and main net on the same geth
Accepted answer
4 votes

The files on disk are stored in different directories, so they won't conflict. However, by default both will want to use the same network ports, so if you want to run both instances simultaneously (...

View answer
How do I do the equivalent of Solidity's bytes32(a_signed_integer) in JavaScript?
Accepted answer
4 votes

Using BN.js as suggested by @Ismael: function numStringToBytes32(num) { var bn = new BN(num).toTwos(256); return padToBytes32(bn.toString(16)); } function bytes32ToNumString(bytes32str) { ...

View answer
How to do a contract with expire time?
4 votes

If you're looking at something happening days in advance you should probably stop worrying and just use block.timestamp. See this discussion on how much you should worry about miner manipulation: ...

View answer
Save hash data with KECCAK-256 then reverse the process in PHP
4 votes

Hashing is one-way: If you have text you can create a hash, but if you have a hash you can't use it to recreate the text.

View answer
Calling contracts within contracts
Accepted answer
4 votes

When you call m.sendCoin() in otherCoin, the msg.sender of that call isn't the purchaser, it's the otherCoin contract itself. That means your contract is trying to send its owner its own MetaCoins, ...

View answer
Contract not Compiling: Undeclared identifier
Accepted answer
4 votes

The variable _from doesn't exist in the burn() function. If you mean to burn the balance of the person (or contract) making the transaction, substitute msg.sender. It works as is in the burnFrom ...

View answer
Using strings as indices in Solidity
4 votes

Strings don't work as mapping keys. Hash the string with keccak256() and use the resulting bytes32 as the mapping key. As for the approach of using a 2-dimensional array rather than a separate ...

View answer
Is it possible to create a unique hash inside geth?
4 votes

The answer to the question in the title is no, it is not possible to create a hash in Solidity that you are sure will be unique, at least given the possibility of block orphaning and reorgs. Users ...

View answer
Are there any cryptocurrencies built by modifying ethereum code, like there are many alt-coins based on bitcoin code?
Accepted answer
4 votes

Yes, you're welcome to copy the code and run your own Ethereum-like network. The most famous example along those lines is Ethereum Classic, although it's a bit of a special case because it starts with ...

View answer
How does Etherscan know the uncompiled contents of contracts?
Accepted answer
4 votes

The source code is uploaded to Etherscan by the contract developer or someone else who has access to it. They also provide Git hooks to do this automatically. Since Ethercan can recompile the source ...

View answer
How do I use "testrpc --account"?
4 votes

Per the testrpc Readme you need a 0x stuck on the front of the private key.

View answer
contract instance has a null transactionHash
Accepted answer
4 votes

You're creating the contract instance with an address. You haven't told eth.contract anything about a transaction, so there's no reason why you should be seeing a transaction hash.

View answer
Can I write and deploy smart contracts in Java language?
4 votes

It's not out yet but you might be interested in Corda, which is being developed by Mike Hearn and his team on behalf of the R3 consortium. This targets Java developers, and doesn't use a blockchain, ...

View answer
ERC-20 tokens and freezing accounts
Accepted answer
4 votes

It sounds like you could use a simple mapping, eg when you got the KYC notification you'd set kyced_customers[customer_address] = true. Then when they try to send funds you do a single read from that ...

View answer
Is gas price paid by the transaction sender to the miner, or the miner reward is newly generated?
Accepted answer
4 votes

Both. The miner always gets the block reward, in the form of newly-printed money if they mine a block. Then for each transaction that block includes, they also get to debit fees (user-defined gas ...

View answer
Calling function from deployed contract
4 votes

contract A { // This doesn't have to match the real contract name. Call it what you like. function f1(){} // No implementation, just the function signature. This is just so Solidity can work out ...

View answer
What is used for default string value in mapping?
4 votes

You should get an empty string, as if you'd done function return2 () returns (string) { string my_string; return my_string; }

View answer
How can you call a payable function in another contract with arguments and send funds?
4 votes

Yes, this can be done. Don't call call "call" though - it's asking for trouble. You'll need the contract that receives the payment to know the address of your Main contract. Imagining it's stored in ...

View answer
Who can access private state variables?
Accepted answer
4 votes

External observers are anyone who access to a block explorer, or is otherwise able to get blocks from the network and parse the data on the blockchain. Note that they can only access data in your ...

View answer
How is a private blockchain secure from a 51% attack?
Accepted answer
4 votes

The publicly available information about VaultOS appears to consist mainly of a series of buzzwords, and although that list has "blockchain" in it among other things it's hard to tell what the product ...

View answer
2-phase commit between IPFS and Ethereum
4 votes

What I've done in a previous project is simply to add the data to IPFS first then send the Ethereum transaction with the IPFS hash of the newly-created content once that appears to have happened ...

View answer
X.509 certificate verification in Solidity
4 votes

Validating signed data against arbitrary CA-issued certificates is currently not practical in Ethereum, at least on the public chain. This specific issue I'm aware of is that RSA verification would ...

View answer
1 2
3
4 5
14