Created
March 27, 2015 17:34
-
-
Save TOMOAKI12345/0c19b97f984dcc388811 to your computer and use it in GitHub Desktop.
Ethereum Sales Contract as JSON (memo)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"xml": { | |
"-xmlns": "http://www.w3.org/1999/xhtml", | |
"block": { | |
"-type": "INIT", | |
"-id": "65", | |
"-x": "52", | |
"-y": "55", | |
"statement": [ | |
{ | |
"-name": "INIT", | |
"block": { | |
"-type": "COMMENT", | |
"-id": "66", | |
"field": { | |
"-name": "NOTE", | |
"#text": "*** An Ethereum smart contract to sell a website for \"5000 by March\"" | |
}, | |
"next": { | |
"block": { | |
"-type": "COMMENT", | |
"-id": "67", | |
"field": { | |
"-name": "NOTE", | |
"#text": "First, store buyer's ethereum address:" | |
}, | |
"next": { | |
"block": { | |
"-type": "STORE", | |
"-id": "68", | |
"-inline": "true", | |
"field": { | |
"-name": "POOL", | |
"#text": "sstore" | |
}, | |
"value": [ | |
{ | |
"-name": "SPOT", | |
"block": { | |
"-type": "VAL", | |
"-id": "69", | |
"field": { | |
"-name": "VAL", | |
"#text": "BUYER" | |
} | |
} | |
}, | |
{ | |
"-name": "VAL", | |
"block": { | |
"-type": "VAL", | |
"-id": "70", | |
"field": { | |
"-name": "VAL", | |
"#text": "0x6af26739b9ffef8aa2985252e5357fde" | |
} | |
} | |
} | |
], | |
"next": { | |
"block": { | |
"-type": "COMMENT", | |
"-id": "71", | |
"field": { | |
"-name": "NOTE", | |
"#text": "Then, store seller's ethereum address:" | |
}, | |
"next": { | |
"block": { | |
"-type": "STORE", | |
"-id": "72", | |
"-inline": "true", | |
"field": { | |
"-name": "POOL", | |
"#text": "sstore" | |
}, | |
"value": [ | |
{ | |
"-name": "SPOT", | |
"block": { | |
"-type": "VAL", | |
"-id": "73", | |
"field": { | |
"-name": "VAL", | |
"#text": "SELLER" | |
} | |
} | |
}, | |
{ | |
"-name": "VAL", | |
"block": { | |
"-type": "VAL", | |
"-id": "74", | |
"field": { | |
"-name": "VAL", | |
"#text": "0xfeab802c014588f08bfee2741086c375" | |
} | |
} | |
} | |
], | |
"next": { | |
"block": { | |
"-type": "COMMENT", | |
"-id": "75", | |
"field": { | |
"-name": "NOTE", | |
"#text": "April 1, 2014 is 1396310400 in \"computer time\"" | |
}, | |
"next": { | |
"block": { | |
"-type": "STORE", | |
"-id": "76", | |
"-inline": "true", | |
"field": { | |
"-name": "POOL", | |
"#text": "sstore" | |
}, | |
"value": [ | |
{ | |
"-name": "SPOT", | |
"block": { | |
"-type": "VAL", | |
"-id": "77", | |
"field": { | |
"-name": "VAL", | |
"#text": "DEADLINE" | |
} | |
} | |
}, | |
{ | |
"-name": "VAL", | |
"block": { | |
"-type": "VAL", | |
"-id": "78", | |
"field": { | |
"-name": "VAL", | |
"#text": "1396310400" | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
{ | |
"-name": "BODY", | |
"block": { | |
"-type": "COMMENT", | |
"-id": "79", | |
"field": { | |
"-name": "NOTE", | |
"#text": "If the agreed amount is received on time..." | |
}, | |
"next": { | |
"block": { | |
"-type": "WHEN", | |
"-id": "80", | |
"-inline": "false", | |
"field": { | |
"-name": "WORD", | |
"#text": "when" | |
}, | |
"value": { | |
"-name": "COND", | |
"block": { | |
"-type": "LOGIC", | |
"-id": "81", | |
"-inline": "false", | |
"field": { | |
"-name": "OP", | |
"#text": "and" | |
}, | |
"value": [ | |
{ | |
"-name": "A", | |
"block": { | |
"-type": "COMPARE", | |
"-id": "82", | |
"-inline": "true", | |
"field": { | |
"-name": "OP", | |
"#text": ">=" | |
}, | |
"value": [ | |
{ | |
"-name": "A", | |
"block": { | |
"-type": "CONTRACT", | |
"-id": "83", | |
"field": { | |
"-name": "PROP", | |
"#text": "balance" | |
} | |
} | |
}, | |
{ | |
"-name": "B", | |
"block": { | |
"-type": "CURRENCY", | |
"-id": "84", | |
"-inline": "true", | |
"field": { | |
"-name": "DENOM", | |
"#text": "ether" | |
}, | |
"value": { | |
"-name": "AMT", | |
"block": { | |
"-type": "VAL", | |
"-id": "85", | |
"field": { | |
"-name": "VAL", | |
"#text": "5000" | |
} | |
} | |
} | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"-name": "B", | |
"block": { | |
"-type": "COMPARE", | |
"-id": "86", | |
"-inline": "true", | |
"field": { | |
"-name": "OP", | |
"#text": "<=" | |
}, | |
"value": [ | |
{ | |
"-name": "A", | |
"block": { | |
"-type": "BLOCKINFO", | |
"-id": "87", | |
"field": { | |
"-name": "PROP", | |
"#text": "timestamp" | |
} | |
} | |
}, | |
{ | |
"-name": "B", | |
"block": { | |
"-type": "LOAD", | |
"-id": "88", | |
"-inline": "true", | |
"field": { | |
"-name": "POOL", | |
"#text": "sload" | |
}, | |
"value": { | |
"-name": "SPOT", | |
"block": { | |
"-type": "VAL", | |
"-id": "89", | |
"field": { | |
"-name": "VAL", | |
"#text": "DEADLINE" | |
} | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
] | |
} | |
}, | |
"statement": { | |
"-name": "THEN", | |
"block": { | |
"-type": "COMMENT", | |
"-id": "90", | |
"field": { | |
"-name": "NOTE", | |
"#text": "... then designate the buyer as the new website admin and pay the seller" | |
}, | |
"next": { | |
"block": { | |
"-type": "STORE", | |
"-id": "91", | |
"-inline": "true", | |
"field": { | |
"-name": "POOL", | |
"#text": "sstore" | |
}, | |
"value": [ | |
{ | |
"-name": "SPOT", | |
"block": { | |
"-type": "VAL", | |
"-id": "92", | |
"field": { | |
"-name": "VAL", | |
"#text": "WEBSITE_ADMIN" | |
} | |
} | |
}, | |
{ | |
"-name": "VAL", | |
"block": { | |
"-type": "LOAD", | |
"-id": "93", | |
"-inline": "true", | |
"field": { | |
"-name": "POOL", | |
"#text": "sload" | |
}, | |
"value": { | |
"-name": "SPOT", | |
"block": { | |
"-type": "VAL", | |
"-id": "94", | |
"field": { | |
"-name": "VAL", | |
"#text": "BUYER" | |
} | |
} | |
} | |
} | |
} | |
], | |
"next": { | |
"block": { | |
"-type": "SPEND", | |
"-id": "95", | |
"-inline": "true", | |
"value": [ | |
{ | |
"-name": "AMOUNT", | |
"block": { | |
"-type": "CONTRACT", | |
"-id": "96", | |
"field": { | |
"-name": "PROP", | |
"#text": "balance" | |
} | |
} | |
}, | |
{ | |
"-name": "TO", | |
"block": { | |
"-type": "LOAD", | |
"-id": "97", | |
"-inline": "true", | |
"field": { | |
"-name": "POOL", | |
"#text": "sload" | |
}, | |
"value": { | |
"-name": "SPOT", | |
"block": { | |
"-type": "VAL", | |
"-id": "98", | |
"field": { | |
"-name": "VAL", | |
"#text": "SELLER" | |
} | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment