Show HN: /r/place backed by the Bitcoin blockchain
mess110.github.io
Show HN: /r/place backed by the Bitcoin blockchain
1–10 of 29 posts
Re: Show HN: /r/place backed by the Bitcoin blockchain
#2Re: Show HN: /r/place backed by the Bitcoin blockchain
#3Re: Show HN: /r/place backed by the Bitcoin blockchain
#4I tend to be pretty skeptical of all things crypto, but this seems pretty cool. It's not very useful, but it seems like a fun concept.
Re: Show HN: /r/place backed by the Bitcoin blockchain
#5A fun way to get people to donate money to wallets you control. Kind of like Million Dollar Homepage, but without any pesky guarantees.
That said, cryptocurrency is much more niche than, say, an open-access canvas requiring only a Reddit account.
Re: Show HN: /r/place backed by the Bitcoin blockchain
#6A fun way to get people to donate money to wallets you control. Kind of like Million Dollar Homepage, but without any pesky guarantees.
Re: Show HN: /r/place backed by the Bitcoin blockchain
#7Re: Show HN: /r/place backed by the Bitcoin blockchain
#8 contract Place {
struct Pixel {
bytes3 color;
uint lastPayment;
}
Pixel[10000][10000] board;
modifier onBoard(uint x, uint y) {
if (x > 10000 || y > 10000) {
throw;
}
_;
}
// Accepts funds, if the funds sent are greater than funds for that pixel last, change the color.
function colorPixel(uint x, uint y, bytes3 color) payable onBoard(x, y) {
Pixel p = board[x][y];
if (msg.value > p.lastPayment) {
msg.sender.send(p.lastPayment); // refund previous price of pixel
p.color = color; // set the color
p.lastPayment = msg.value; // set new cost to whatever the person sent in
} else {
throw;
}
}
}
May contain an error or two, but that's the general gist of it.Re: Show HN: /r/place backed by the Bitcoin blockchain
#9Re: Show HN: /r/place backed by the Bitcoin blockchain
#10Would have been much easier with an ethereum smart contract. No gimmicky address list, it's a crowdsourced picture in the blockchain. contract Place { struct Pixel { bytes3 color; uint lastPayment; } Pixel[10000][10000] board; modifier onBoard(uint x, uint y) { if (x > 10000 || y > 10000) { throw; } _; } // Accepts funds, if the funds sent are greater than funds for that pixel last, change the color. function colorPi…