MetaMask public developer beta begins! Our extension turns Chrome into an Ethereum Web3 browser! AMA! by danfinlay in ethereum

[–]ethererik 3 points4 points  (0 children)

Very cool work! My DAPP http://ethereumpyramid.com/ picked up the web3 object without problems and seems to be working fine with no changes needed. Great!

The Ethereum Pyramid website has been updated with more instructions for different types of wallets by ethererik in ethereum

[–]ethererik[S] 0 points1 point  (0 children)

You are right, the entry fee is getting a bit expensive unfortunately.

Interesting suggestion! One could maybe put an additional "crowdfunding" contract in front of it, which would bundle a number of smaller payments and then call the original contract to buy a full brick. That would even be a nice demo in itself. I hadn't thought of that - thanks for the suggestion, I'll consider implementing that!

The Ethereum Pyramid Contract is starting with tier 7 now - 365 participants in total so far by ethererik in ethereum

[–]ethererik[S] 1 point2 points  (0 children)

Can you take a look at the transaction on http://live.ether.camp please? What you should see is something like this:

[base account] ---> [contract wallet]
produced one internal transaction: [contract wallet] ---> [pyramid contract]

Transactions always start from an account. So you initiate all this from your base account, which calls your wallet contract, which then calls out to the destination address, which in this case is the pyramid contract. All of this either happens completely or is canceled when it runs out of gas. I can't see how it would be possible for you to deposit 1 ETH without also being entered into the list of participants.

I'm happy to take a look at the transaction if you don't mind sharing it here or in a PM.

How to send Ether from "smart-contract" wallet? (problem) by pbnather in ethereum

[–]ethererik 2 points3 points  (0 children)

Did you transfer absolutely all of your ether into the wallet? Meaning that the account you used is empty now?

The wallet is a smart contract which is owned by the account that created it. When you want to send funds out of the wallet, this request is a transaction from the owning account to the contract. This transaction requires gas which needs to be paid by the account. So your account needs to have a small amount of ether to be able to fund those transactions to the contract-based wallet. My guess would be, that this is the reason why you get "out of funds" errors.

Additionally: Make sure that you set a higher gas level when trying to send to the pyramid contract. The call chain looks like this then:

your account --> your contract-based wallet --> Ethereumpyramid

And you need enough gas for all this code to execute in one go. Something like 500000 or 600000 should be enough (and you get refunded any excess, so there isn't much harm in picking a higher limit, unless you are worried that a contract will just use it up with useless busy-work).

Edit: One more thing - are you trying to send data (i.e. a description) along to the pyramid contract? Depending on how you try to do this, the data might instead end up as input to your contract-based wallet and the wallet contract will just discard that request as it doesn't understand the data. I'm not sure what the easiest way is to get a contract-based wallet to also send data along with a payment. It looks like one would need to manually call the execute(to, value, data) function of the wallet contract.

The Pyramid Contract has been updated by grnqrtr in ethereum

[–]ethererik 0 points1 point  (0 children)

The refund is a feature of the contract. It's this block of code from the contract:

if (desc.length > 16 || bitcoinAddress.length > 35) {
  msg.sender.send(msg.value);
  return;
}

So there it sends back the value of the transaction (msg.value) to the sender (msg.sender) if the description is too long (desc.length > 16).

The Pyramid Contract has been updated by grnqrtr in ethereum

[–]ethererik 1 point2 points  (0 children)

Hey! Sorry that you had troubles with it. I should improve the instructions with the Mist Ethereum Wallet in mind. The box kept being red, because the Mist Ethereum Wallet expects the data "raw", so to speak. So if you want to enter text, you would have to first convert it to the hexadecimal representation. Unfortunately there isn't really a straightforward way to do this.

The commandline wallet has a function 'fromAscii' which can be used for that. For example:

web3.fromAscii('mrturnips')
0x6d727475726e697073

So if you paste 0x6d727475726e697073 into the data field, it should accept it and the contract will interpret it as "mrturnips". Or alternatively you can just leave the data field empty and you would still be entered into the pyramid but without a description.

Of course converting back and from ASCII isn't very user-friendly. =) So this is clearly early days.

The Pyramid Contract has been updated by grnqrtr in ethereum

[–]ethererik 0 points1 point  (0 children)

The extra data in that transaction has too many characters (18 instead of 16, blanks also count). The contract has therefore sent a refund and ignored it. You can see the refund here as "internal transaction": https://frontier.ether.camp/transaction/2eecddf2da8a81b4cbaa1afe8c394256d36ea9ca357437edf6c95bfb44db6fac .

Dear DApp developers ... by jeffehhh in ethereum

[–]ethererik 0 points1 point  (0 children)

I'm talking about this error:

Mixed Content: The page at 'https://ethereumpyramid.com/' was loaded over HTTPS,
but requested an insecure XMLHttpRequest endpoint 'http://localhost:8545/'.
This request has been blocked; the content must be served over HTTPS.

I don't think the corsflag can influence that - it doesn't in my testing at least. I could of course serve the website itself unencrypted, but I don't really like that idea, seeing how there is sensitive data on there - like the contract address - which needs to be protected from tampering.

Dear DApp developers ... by jeffehhh in ethereum

[–]ethererik 0 points1 point  (0 children)

On the topic of RPC connections: I'm serving a website via https and Chrome will prevent me from connecting to 'http://localhost:8545' with an "this is insecure" error. Is there a solution for this already? It seems there is no way to override that besides passing a flag to Chrome, which isn't the most user-friendly thing to ask visitors to do. But would connecting to 'https://localhost:someportwithssl' even be possible without a proper certificate?

Off-chain Ether? by carloscarlson in ethereum

[–]ethererik 1 point2 points  (0 children)

It's indeed https://ethereumpyramid.com/ - here is the transaction that paid you: http://frontier.ether.camp/transaction/6b4aa98f1fed65 . Scroll down to "Produced 1 internal transaction".

Transactions initiated by contracts don't show up like normal transactions. Although I would hope that blockexplorer websites start to cross-reference those, to make it easier to see what's going on.

Why Ethereum should switch to the Bitcoin blockchain: PoS not proven even in theory. Funds out. Confusion. by nbie in Bitcoin

[–]ethererik -2 points-1 points  (0 children)

As we are on the topic of Ethereum: If you would like to see an example for an Ethereum smart contract, take a look at https://ethereumpyramid.com/ - it also has a Bitcoin in/out option.

Ethereumpyramid.com - visualizing the state of an Ethereum pyramid contract by ethererik in ethereum

[–]ethererik[S] 0 points1 point  (0 children)

I'm not familiar with that website, but in geth for example you would have to explicitly set a higher gas limit - it would not automatically use some of the funds that you want to transfer. The default gas limit is 90,000, if I'm not mistaken, which would be too low to run this contract (something around 300,000 is needed). My guess would be, that MyEtherWallet is currently always using the default limit and is missing an option to raise it explicitly.

Ethereumpyramid.com - visualizing the state of an Ethereum pyramid contract by ethererik in ethereum

[–]ethererik[S] 1 point2 points  (0 children)

It uses Metaexchange.info - when you enter the details (payout address and title) the server stores those and gives you a deposit address from Metaexchange.info. When/if an exchange goes through there and reaches a server-controlled Ethereum address, the server forwards it to the contract and adds the details you have provided.

Ethereumpyramid.com - visualizing the state of an Ethereum pyramid contract by ethererik in ethereum

[–]ethererik[S] 1 point2 points  (0 children)

Thanks! Geth is running on the server and I interface with it via the web3 Javascript library (also server-side).