Skip to content

Instantly share code, notes, and snippets.

contract Ballot {
// 하나의 투표자를 나타내기 위한 Complex Type
struct Voter {
uint weight;
bool voted;
address delegate;
uint vote;
}
// 하나의 무기명 투표 후보 (Proposal)
contract SimpleAuction {
address public beneficiary;
uint public auctionStart;
uint public biddingTime;
address public highestBidder;
uint public highestBid;
bool ended;
contract BlindAuction {
struct Bid {
bytes32 blindedBid;
uint deposit;
}
address public beneficiary;
uint public auctionStart;
uint public biddingEnd;
uint public revealEnd;
contract Purchase {
uint public value;
address public seller;
address public buyer;
enum State { Created, Locked, Inactive }
State public state;
function Purchase() {
seller = msg.sender;
contract owned {
address owner;
function owned() {
owner = msg.sender;
}
modifier onlyowner {
if (msg.sender != owner) {
throw;
}
{
"alloc": {
"d1c8b6e81af8ef16a7dbcd410234f12e10f1579d": {
"balance": "5000000000000000000000000000"
},
"2c6191a4792a3a33cbd2f8b7b7e583a61fb33b23": {
"balance": "5000000000000000000000000000"
}
},
{
"alloc": {
"ea4f6280a67889f883147a5dfaaebc658795ae88": {
"balance": "5000000000000000000000000000"
}
},
"nonce": "0x0000000000000000",
"difficulty": "0x010000",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
[
"enode://f004d682ccc3aab5a4c3ce7401183a11b402e79a0783e2bfbfcc37d67596d930ae92b6bb06ffedb1ce7afbfb7fbc44af51244d5e5e93dd01646ec15855867537@172.18.94.55:3031"
]
@goodjoon
goodjoon / transfer.html
Last active May 3, 2016 15:04
기본 HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Transfer Sample</title>
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="bower_components/web3/dist/web3.js"></script>
</head>
<body>
<div>
@goodjoon
goodjoon / contract1.html
Created May 10, 2016 14:01
ContractSample1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Transfer Sample</title>
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="bower_components/web3/dist/web3.js"></script>
</head>
<body>
<h2>Contract</h2>